[antlr-interest] rules for ASCII

berserksangr berserksangr at poczta.onet.pl
Sun Jun 22 12:54:19 PDT 2003


In my parser created for c++, I need to parse a file that contains
some national signs. They have ASCII codes, i.e. 161, 198, 202, 163. How can
I write a lexer rule for accepting only chains made of this signs?

NATIONAL_CHAIN: (SIGN_161|SIGN_198|SIGN_202|SIGN_163)+;

My question can be treat more generally: What are the relations
between ASCII code and its ANTLR grammar representation in C++
ANTLR-related code?

-- 
Best regards,
 berserksangr                          mailto:berserksangr at poczta.onet.pl


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list