[antlr-interest] Faster expression parsing for ANTLR
Gavin Lambert
antlr at mirality.co.nz
Thu Dec 18 10:38:04 PST 2008
At 22:18 18/12/2008, Zenzike wrote:
>I thought about that, but I wasn't sure it would work --
wouldn't
>the scope be shared between the recursive calls to e[]?
[...]
>If the parameter p were scoped, rather than passed, then we
forget
>the call-tree that gets us to our current position don't we?
>My understanding might be wrong -- I thought scoped in the
grammar
>became static variables in the target language, is that true?
Yes, but they're represented as stacks rather than discrete
values. So recursive usage of them is safe. (Have a look at the
reference for $ values to see the syntax to refer to earlier items
in the stack.)
More information about the antlr-interest
mailing list