4 Jul 19:19
Re: [proto] grammar compile error
Felipe Magno de Almeida <felipe.m.almeida <at> gmail.com>
2009-07-04 17:19:01 GMT
2009-07-04 17:19:01 GMT
On Sat, Jul 4, 2009 at 1:57 PM, Eric Niebler<eric <at> boostpro.com> wrote: > Felipe Magno de Almeida wrote: >> [snip] >> Is this possible? > > Not directly. You will have to allow "create << table" in your grammar > (possibly by not specifying any grammar when defining your domain, or else > by specifying a loose one), and then define a /separate/ grammar that > validates fully formed expressions for correctness. Yes, I found that out. I'm planning in creating a full_grammar, which would only match a full expression. This can be passed as a compile-time assert to the expression evaluation. And I want to create the looser grammar, composed of all sub-expressions inside the full grammar somehow. Is there a way to do this in proto, or should I start creating it with mpl? Is there a way to iterate a grammar? > Presumably somewhere in > your code there is a place where these expressions get evaluated. That's the > place to ensure that "create << table" is always followed by a string > literal. For that, you would use BOOST_MPL_ASSERT and proto::matches. > > HTH, > > -- > Eric Niebler > BoostPro Computing > http://www.boostpro.com Thanks, -- -- Felipe Magno de Almeida _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed