[antlr-interest] Bounded Closures?
Johannes Luber
jaluber at gmx.de
Tue Jun 26 13:51:49 PDT 2007
Wincent Colaiuta wrote:
> If the += construct is used in a parser rule instead, then ANTLR does
> indeed generate code for updating list_foo upon each match:
>
> if (list_foo==null) list_foo=new ArrayList();
> list_foo.add(foo);
Hmm. Thinking over the alternatives I'd say that ANTLR should still
check that in lexer rules. Maybe it should generate temporary tokens for
that bit. I don't know a better place to check for such things and I
don't want to have generate more tokens than I actually need.
Best regards,
Johannes Luber
More information about the antlr-interest
mailing list