Greetings!
On Wed, 2011-03-30 at 12:43 +1100, Simon wrote:
> Hello all,
>
> I have a grammar that does a rewrite like so:
>
> bracketedBlock
> : '{' stmts=statement* '}' -> ^(Block $stmts)
> ;
>
you are not properly handling the cardinality of the * meta-operator.
try:
bracketedBlock : '{' statement* '}' -> ^(Block statement*) ;
or:
bracketedBlock : '{' stmts+=statement* '}' -> ^(Block $stmts} :
Hope this helps...
-jbb
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.