[antlr-interest] how to quote things?
Gavin Lambert
antlr at mirality.co.nz
Wed Feb 27 00:08:06 PST 2008
At 13:47 27/02/2008, Jim Idle wrote:
>C# requires two quotes per embedded quote
That's only the case for literal strings, not ordinary
strings. ie. the following two are equivalent (and represent a
string containing two quote marks):
"\"\""
@""""""
Rendered in ANTLR, they should respectively be:
["\\"\\""]
[@""""""]
(It's the backslashes that need escaping, not the quotes.)
If neither of those two work, then it might be a bug.
More information about the antlr-interest
mailing list