Hello Peter, You should probably change the name of rule PV to lowercase pv, because it is a parser rule and not a lexer rule.
Best regards, Ranco ________________________________________ From: [email protected] [[email protected]] on behalf of P.N. [[email protected]] Sent: Tuesday, June 07, 2011 10:32 AM To: [email protected] Subject: [antlr-interest] error(208) Hello! Using the following rules for grammar (ESC_SEQ defined as fragment): root : object; object : '{' props '}'; props : prop (',' prop)*; prop : ID ('=' PV | '+' | '-'); PV : STRING | object | INT; ID : ('a'..'z'|'A'..'Z') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')*; INT : '0' | ('1'..'9') ('0'..'9')*; WS : (' '|'\t'|'\r'|'\n') {$channel=HIDDEN;}; STRING : '"' (ESC_SEQ | ~('\\'|'"'))* '"'; When I try to generate the Java code, the following error message is shown: "error(208): The following token definitions can never be matched because prior tokens match the same input: INT,STRING" Why do I get this message, as every lexical rule has its own starting character? Kind regards Peter List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address 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.
