[antlr-interest] Confused about backtracking
franck102 at yahoo.com
Sat Nov 26 04:21:09 PST 2011
I think I am missing something fundamental about backtracking. The grammar
below won't parse input such as
... even though I would expect it to backtrack after realizing that a=b.c
leads to a dead-end. What am I missing?
PS: I am not looking for refactoring options, I have the issue in a complex
grammar that can't easily be refactored.
: statement* EOF
: ID '=' expr
expr : ID suffix;
suffix : ( '.' expr )*
sep : ';' | '.';
: ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')*
WS : ( ' '
View this message in context: http://antlr.1301665.n2.nabble.com/Confused-about-backtracking-tp7033712p7033712.html
Sent from the ANTLR mailing list archive at Nabble.com.
More information about the antlr-interest