Am Thursday 16 July 2009 14:22:51 schrieb Jim Idle:
> This an FAQ really. I beleive I have nswered it mire than once on the
> list, but:
>
> MLB : '/*' ( options { greedy = false; } : .* )
> ( '*/' | { print error message }
> { skip(); }
> ;
>
> You might need EOF rather just empty alt.
I tried that too and it gives an error:
lexer grammar C;
MLB : '/*' ( options { greedy = false; } : .* )
( '*/' | EOF { print error message } )
{ skip(); }
;
error(201): C.g:3:44: The following alternatives can never be matched: 1
with and without the EOF
Michael
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
-~----------~----~----~----~------~----~------~--~---