[antlr-interest] Faster expression parsing
parrt at cs.usfca.edu
Thu Aug 28 11:07:50 PDT 2008
Heh, really cool! This is a similar approach to:
except that you do the appropriate tree construction and after parsing
without consideration of operator precedence. Interesting. I wonder
which is faster.
Note that you can improve the speed slightly when you are grammar by
removing unnecessary tree stuff.
> : INTEGER
> -> ^(INTEGER)
> | '(' expression ')'
> -> expression
| '(' expression ')' -> expression
Let me know if that makes a difference.
More information about the antlr-interest