[antlr-interest] string literal token rule not working?
Monty Zukowski
monty at codetransform.com
Tue Jul 13 14:55:45 PDT 2004
You need to set the charVocabulary option, see the documentation about
it. ANTLR assumes only characters referenced by the lexer are valid.
When inverting it only uses that set to invert upon, not the whole
ASCII or Unicode range.
Monty
On Jul 13, 2004, at 2:29 PM, meissnersd wrote:
>
>
>
> For some reason the ? charater can not be in string literals in my
> grammer. Sends an error message "found ?. expecting '"
>
> In my language strings are surrounded by single quotes.
>
> Here is the rule to does not work...
>
> STRING_LITERAL
> : '\'' (~'\'')* '\''
> ;
>
> Any ideas? Something with the ~ must be....
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit --
http://www.codetransform.com/gcc.html
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list