28 Jan
2009
28 Jan
'09
11:18 p.m.
Dave Jenkins wrote:
"Kim Kuen Tang" wrote:
Perhaps we can first check whether var1_ appears in the expression. If not we can return the expression unmodified.
The way to check if the expression is valid for a grammar is something like the code below. I'm hoping Eric can automatically do this check when a compile-time debug flag is defined.
The way I'll do this is add an MPL assert that the expression matches the grammar before invoking its transform. I can do this in proto::transform::operator(), and I can compile it conditionally only if BOOST_COMPILE_TIME_DEBUG is defined. -- Eric Niebler BoostPro Computing http://www.boostpro.com