I gave it a shot at your suggestion, with the same results. Why should lexer rules not refer to other lexer rules without being fragments? I've read that doing so only prevented token creation. It affects logic, as well?
Sean On Sun, Jun 28, 2009 at 2:05 PM, Gavin Lambert <[email protected]> wrote: > 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.) > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
