
On 07/03/10 00:17, Eric Niebler wrote: [snip]
This is the main reason I wanted a named type. I am not necessarily married to this syntax. Any other syntax, maybe just using proto mechanism, that allows (mutually) recursive function definitions would be cool..
That's a hard one. But for inspiration, see how Classic Spirit allows subrules:
http://www.boost.org/doc/libs/1_33_1/libs/spirit/doc/subrules.html
These are statically-bound, mutually recursive grammar rules. You need to pick one to be top-most (the rule). The others are merely placeholders, symbolic names to stand in for rules. The whole thing is composed in one giant expression template.
There's also: http://preview.tinyurl.com/38xrwj3 which refers to code in the vault which does something similar to spirit1 subrules. There's also this post: http://preview.tinyurl.com/2v9eg9b which says something similar to subrules was planned for spirit2; however, I don't know if that ever happened. HTH. -regards, Larry [snip]