[antlr-interest] rule return value not declared

Gavin Lambert antlr at mirality.co.nz
Wed Jul 29 01:37:42 PDT 2009


At 09:37 29/07/2009, Kendall Shaw wrote:
 >The result is that the return attribute "list" is not
 >declared in the resulting parser:
[...]
 >    @init { list = new ArrayList<String>(); }
 >    : (t=thingy { list.add($t.name); })+

You should be using $list here.



More information about the antlr-interest mailing list