[antlr-interest] Faster expression parsing

Gavin Lambert antlr at mirality.co.nz
Thu Aug 28 00:50:51 PDT 2008


At 15:31 28/08/2008, Sam Harwell wrote:
>Profiling my grammar showed the expression parsing as one of the 
>slowest segments. The problem stemmed from the fact that this 
>grammar has ~18 precedence categories of operators, so getting to 
>a primary expression was unnecessarily slow. Here is an example 
>grammar that shows how you can flatten groups of operators while 
>maintaining a correct AST.

What about unary operators?



More information about the antlr-interest mailing list