[antlr-interest] ANTLR syntax bug with array return types
Gavin Lambert
antlr at mirality.co.nz
Wed Feb 27 00:09:27 PST 2008
At 14:15 27/02/2008, Olivier Lefevre wrote:
>Consider this tree grammar rule with Java output:
>
> foo returns [List[] lists] <blah blah>
[...]
>which is just wrong: the array-ness of lists (i.e., the [])
>was thrown away. Is this is a deliberate limitation, where
>is it documented?
IIRC, the brackets need escaping:
foo returns [List\[\] lists] <blah blah>
More information about the antlr-interest
mailing list