[antlr-interest] Problem with lexer rule
mzukowski at yci.com
mzukowski at yci.com
Thu Dec 18 08:31:05 PST 2003
That should work just like you have it written. What is going wrong?
Monty
-----Original Message-----
From: carstenzerbst [mailto:carsten.zerbst at atlantec-es.com]
Sent: Thursday, December 18, 2003 2:11 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Problem with lexer rule
Hello,
I'm just using antlr for step physical files and am pretty impressed
by the tool. I have a little problem to distinguish string like
'abcd.'
STRING :
APOSTROPHE! ( SPECIAL | DIGIT | SPACE | LOWER | UPPER | "''"
| REVERSE_SOLIDUS )* APOSTROPHE!
{Part21File.lexerLog.debug("found a string " + getText());} ;
and enumerations like '.UNUSED.'
ENUMERATION
options { paraphrase="an enumeration";} :
'.'! UPPER ((UPPER | DIGIT )*) '.'!
{Part21File.lexerLog.debug("found an enumeration " +
getText());} ;
How could I tell the string rule that tokens starting and ending with
a point (member of special) and including only uppercase and digits
are enumerations ?
Thanks, Carsten
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/
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