Hi, I am new to antlr (antlr3) and struggling with lexing common prefixes. My simple grammar:
grammar simple; R : 'R'; E : 'e'; D : '1'; RESULT : 'Result'; expr : ( RESULT | R E D ) EOF; On input 'Result' I expect token RESULT, and on input Re1 I expect tokens R E D but input 'Re1' only throws NoViableAltException. I searched for info 'antlr common prefixes' on the web and tried increasing k, lookahead predicates ..., things like RESULT options{filter=true;} : 'Result'; , but to no avail. I would be very much obliged if anyone could give me a hint. -- Alexander 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-inter...@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.