Prefer using debugger instead of interpreter. Interpreter doesn't work as
expected sometimes (when you are using semantic predicates).
That said, for this particular case it seems to works fine.
r : STRING
;
STRING
: '"' ( ~('\\'|'"') )* '"'
;
Are you using semantic predicates somewhere else that causes the interpreter
to fail?
BTW, what is the error message you get?
Cheers, Indhu
From: [email protected]
[mailto:[email protected]] On Behalf Of Mark Wilson
Sent: Tuesday, October 13, 2009 11:34 PM
To: [email protected]
Subject: [antlr-interest] ANTLRWorks question
I used the ANTLRWorks wizard to start my grammar. There appears to be
something wrong with the STRING token, basically something like "Joe" does
not parse correctly in the interpreter. This is what the rule looks like:
STRING
: '"' ( ESC_SEQ | ~('\\'|'"') )* '"'
;
What is this supposed to do?
Thanks,
Mark Wilson
--
Mark Wilson
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address