[antlr-interest] Lexer rule for number range matching ?

Nagesh, Harsha harsha.nagesh at credit-suisse.com
Thu Apr 24 09:18:02 PDT 2008


Hi,

How can specify a lexical rule to match a range of integers. For example
'0'...'9' is used for digits.

Lets say I want to match any integer from 1 to 12 for valid months, is
there a simple way to do this ? Similarly I want to match a range of
numbers. What is the best way to do this in antlr V3 ?

Thanks
Harsha

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================



More information about the antlr-interest mailing list