[antlr-interest] How to Match a Double-Quote Character
Raphael Reitzig
r_reitzi at cs.uni-kl.de
Sat Aug 9 04:16:53 PDT 2008
Hi Mike!
You generate Java code (?). In Java, you need to escape ".
Regards
Raphael
"titech at metaorb.com" <titech at metaorb.com> wrote (Fri Aug 8 21:51:21 2008):
> Johannes,
>
> Thanks!
>
> I very nearly replied with "nope,
> didn't work", but then I realized that the period might be part of the
> rule (not just the end of your sentence). I tried it and, sure enough,
> it worked!
>
> But why? Doesn't this say you want to match a
> double-quote followed by any character? And why the \ before the
> double-quote--lots of examples show the double quote within single
> quotes (no \)?
>
> Regards,
> --Mike
>
>
>
>>> Try '\"'.
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: PGP Digital Signature
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080809/f1c0945b/attachment.bin
More information about the antlr-interest
mailing list