[antlr-interest] Bug using scopes, rule parameters, java code gen

Gavin Lambert antlr at mirality.co.nz
Fri Nov 9 01:28:18 PST 2007


At 20:06 9/11/2007, Joseph Gentle wrote:
 >bar	:	confabulate[$foo::x.toString()];
[...]
 >... when it actually calls confabulate there it generates this
 >incorrect code:
 >
 >             confabulate(((foo_scope)foo_stack.peek()).x,
 >.toString());
 >
 >instead of:
 >
 >confabulate(((foo_scope)foo_stack.peek()).x.toString());
 >
 >The problem has something to do with the '.' in the parameter
 >list being parsed incorrectly.

Haven't tried it, but an earlier post on the list suggests that 
this might work:

   bar : confabulate[$foo::x\.toString()];



More information about the antlr-interest mailing list