At 05:54 29/06/2009, Sean O'Dell wrote:
>     WS : (' '|'\t')+;
>     DIGIT : ('0'..'9');
>     LETTER : ('a'..'z'|'A'..'Z');
>     NEWLINE : '\r'? '\n';
>
>     WORD : (LETTER|DIGIT)+;
>
>     EOL : WS? NEWLINE?;
>
>     PHRASE : WORD (WS WORD)*;
>
>     line : WS? PHRASE EOL?;

Turn DIGIT and LETTER into fragment rules.
Turn EOL and PHRASE into parser rules.

(In general, a lexer rule should not refer to any other lexer 
rule, unless that rule is a fragment.)


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