[antlr-interest] Bug: mutli-lined return statements are not commented correctly in generated code
Terence Parr
parrt at cs.usfca.edu
Tue Mar 13 15:26:19 PDT 2007
On Mar 4, 2007, at 6:17 AM, Brian DeVries wrote:
> Hey guys,
>
> When I split up a parser rule return statement over multiple lines,
> the lines are not commented out in the generated Java code.
>
> Example:
>
> ANTLR:
> fnDecl returns [
> String name = null,
> ArrayList<String> params = null,
> ArrayList<String> indices = null
> ]
> : ID {$name = $ID.text;}
> (LPAREN (paramList {$params = $paramList.params;})? RPAREN
> (indexVars {$indices = $indexVars.indices;})?)?
> ;
Works in my pre 3.0b7:
// U.g:3:1: fnDecl returns [\n String name = null, \n
ArrayList<String> params = null,\n ArrayList<String> indices = null
\n ] : ID ;
Hmm...I wonder when that was fixed...
Ter
More information about the antlr-interest
mailing list