On Monday 12 January 2009 21:59:12 Dominic Tardif wrote:
>
> OK, I've removed the NEWLINE token and changed stmt+ by stmt* and it works
> just fine, except that I want to be able to support the ' ' operator, which
> acts like a '*'. If I didn't support it, I don't think I would have had
> any problems. Is there a way to have a white space act as an operator as
> well? If not, I'll just have to remove it. Thanks again for all your help!
> ^_^
maybe (i.e. not tested, just the idea):
WS: (' ' | '\t' )+ { channel=hidden;}
and:
multExpr: phase ('*'? phase)*
then WS is allowed as '*' . You can check the hidden channel, if it was
exactly one ws.
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
-~----------~----~----~----~------~----~------~--~---