Hi, How can I resolve the ambiguous antlr3 lexer rules in following case:
xstr [aaa ----> A xstr whose value is '[aaa' [aaa bbb ccc] ----> An array with 3 strings: 'aaa' 'bbb' 'ccc' So I write following rules: STRING : ('a'..'z' | 'A'..'Z' | '0'..'9')+; # only contains digits and letters XSTRING : '\u0021'..'\u007e'+; # 0x21-0x7e are the readable ascii chars. xstr : 'xstr' (XSTRING | STRING); array : '[' STRING+ ']'; But the array rule doesn't work, because '[aaa' is treated as a XSTRING rather than '[' and 'aaa'. How can I fix it? Thanks, Fussi 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.