[antlr-interest] Can multi-lined string literals be done?
Gerald B. Rosenberg
gbr at newtechlaw.com
Mon Jun 13 17:29:43 PDT 2005
At 04:32 PM 6/13/2005, Matthew Tedder wrote:
>php just allows pressing enter between quotes where
>ever desired.
protected
QT: '\"';
ALONGLINE1: QT! (~QT)* QT!;
>Perl does it by specified a keyword to
>stop on
protected
WORD: ('A'..'Z'|'a'..'z')+;
protected
WS: ( ' ' | '\r' | '\n' { $setToken.SKIP; } )+;
protected
STOP: (QT)? "StopText" (QT)? ;
ALONGLINE2: "print <<"! WS! STOP! WS! (WORD (WS)?)+ STOP!;
>like this (probably truelly not possible for
>antlr):
Although sometimes a bit devilish in the details, this is all quite
possible with ANTLR.
----
Gerald B. Rosenberg, Esq.
NewTechLaw
285 Hamilton Avenue, Suite 520
Palo Alto, CA 94301-2576
650.325.2100 (office) / 650.703.1724 (cell)
650.325.2107 (facsimile)
www.newtechlaw.com
CONFIDENTIALITY NOTICE: This email message (including any attachments) is
being sent by an attorney, is for the sole use of the intended recipient,
and may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not the
intended recipient, please contact the sender immediately by reply e-mail
and delete all copies of this message and any attachments without retaining
a copy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050613/051643f4/attachment-0001.html
More information about the antlr-interest
mailing list