[antlr-interest] about lexer

Mike Quilleash mike.quilleash at azuresolutions.com
Thu May 25 06:13:43 PDT 2006


Make the UpperCase and Lowercase protected, then they will be considered =
tokens internal to the lexer for building other lexer tokens not tokens =
in their own right.=20

-----Original Message-----
From: antlr-interest-bounces at antlr.org =
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of ??? Jigang =
(Robert) Sun
Sent: 25 May 2006 14:05
To: antlr-interest at antlr.org
Subject: [antlr-interest] about lexer=20

To keep lexical grammar tidy, I would like define a rule in several =
lines, for example,

ID: UpperCase | LowerCase;

UpperCase: 'A'..'Z';
LowerCase: 'a'..'z';

The UpperCase and LowerCase are only used for convenience, there is no =
such token name used in parser. But it complains.=20

Is any  way to sort it out?

Thanks.

Jigang


=09

=09
	=09
___________________________________________________________
Mp3=B7=E8=BF=F1=CB=D1-=D0=C2=B8=E8=C8=C8=B8=E8=B8=DF=CB=D9=CF=C2
http://music.yahoo.com.cn/?source=3Dmail_mailbox_footer


More information about the antlr-interest mailing list