Hi,
Suppose I have a very simple grammar:
line: x;
x : STRING+;
fragment BACKSLASH
: '\\';
NOTA: BACKSLASH A;
A : 'a';
STRING
: (~(A)|NOTA)+;
Now I want x to be able to match any sequence which doesn't have "a"
in it, including sequences which have "\a". This works for the most
part except when I try and match just "\a", at which point I get a
MismatchTokenException (or sometimes a NoViableAltException). However,
in the ANTLRWorks IDE if I parse it using the interpreter starting
from the STRING rule, it seems to match it just fine.
Any ideas?
Cheers,
Vipul
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=.