At 07:32 14/08/2009, consili...@gmail.com wrote: >I have a simple grammar for quizzes that doesn't work in the >debugger, although works fine in the interpreter. [...] >LETTER : ('a'..'z'|'A'..'Z'); >INT : '0'..'9'+; >NEWLINE : '\n' '\r'? {skip();};
These rules should be marked as fragments, since you're consuming them from other lexer rules and not expecting to receive them in the parser. The general rule of thumb is that you should never define two non-fragment lexer rules that can consume the same input, and try to avoid doing so when they consume the same common left prefix. (Even in the cases where you can get away with having a common left prefix, it reduces performance to do so.) 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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---