Nick Vlassopoulos wrote:
> Hi Sean,
>
> I am not sure about this, but I think you have to rearrange the order 
> of the rules. More specifically,
> antlr will use rules in the order they appear, therefore, WS should 
> probably near the end of your list.
> Maybe something like this would work:
>
> grammar Phrase;
>
> line : WS? PHRASE EOL?;
>
> PHRASE : WORD (WS WORD)*;

It's because you have WS here which MUST be followed by WORD, but it is 
followed by EOF so it fails. Try:

line : WS? PHRASE EOF;
PHRASE : (WORD WS?)* EOL?;

Jim


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
-~----------~----~----~----~------~----~------~--~---

Reply via email to