Eric Niebler wrote: > On 12/8/2010 4:44 PM, Thomas Heller wrote: >> I will try to present a patch. I urgently need this feature to be >> become officially supported to use it for phoenix3 (a scope opened by let >> or lambda should be it's own sub domains in order to allow local >> variables, theses shall not be allowed in a "regular" expression, and >> they should be combinable with other expressions).
Basically, yes. The other point is to detect if a expression is nullary. With local variables we have a problem. They are not nullary, however need a proper environment in order to be evaluated. I only do the evaluation if the expression (evaluation also means result type calculation, the problem here is operator()() as it gets instantiated every time. And I can't calculate a result type for something like _1 or _a): 1) Matches the grammar (this is without extension) 2) Is nullary (no placeholders in the expression) So, The sub-domain with sub-grammar part is the easiest and cleanest solution, I actually looked it up in your old proto prototype. > > IIUC, this is to do "proper" error checking and detect scoping problems > early. But if you don't have this feature, you can still make properly > scoped expressions work, right? Can you move ahead with a looser grammar > and tighten it up later? I don't really now how to do it otherwise with the current design. There is really only this part of the puzzle missing. If it is done, we have a working and clean Phoenix V3. For the time being, I can live with the workaround I did. However, I will focus my efforts of the next days on working out a patch for this to work properly. _______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto