[antlr-interest] more on faster expression parsing

Gavin Lambert antlr at mirality.co.nz
Thu Apr 10 14:52:46 PDT 2008


At 09:29 11/04/2008, Terence Parr wrote:
 ><http://www.antlr.org/wiki/display/~admin/2008/04/10/Still+more+about+expression+parsing>
 >
 >I think that covers it.
[...]
 >It also looks one level deep into rules referenced from the 
special rule.

Is it feasible to look further than one level?  (Ideally, to any 
number of levels.)  Just in case someone wants to factor the 
grammar a bit more.  Probably not a biggie, but if it's not hard 
to look further then it might be a good idea.

 >Rule suffix is left alone except for the removal of the left
 >recursion so you can add whatever tree construction you want
 >but you must allow a $lhs parameter to come in.

This is a little unclear, since presumably in the source grammar 
there will still be an 'e' in the lhs position, so surely they 
will refer to that in the tree rewrite, not $lhs?  Perhaps it will 
get internally converted into using $lhs, but I don't think it'd 
be like that in the source rule, surely?



More information about the antlr-interest mailing list