[antlr-interest] Identifying DATE tokens in lexer

drbrain666 nassos4free at netsolutions.gr
Tue Jun 1 04:29:44 PDT 2004


Hello,

I'm trying to identify a DATE token in lexer, using the rule:
SEARCHVALUEDATE:
    '\'' INT INT '/' INT INT '/' INT INT INT INT '\''
;

This works fine, although I would like to extend it in order to cover 
cases such as: 30/5/2004, 1/5/2004 etc. I tried:
SEARCHVALUEDATE:
    '\'' INT (INT)? '/' INT (INT)? '/' INT INT INT INT '\''
;

but the above completely !freezes! antlr.Tool while parsing my .g 
file.

Any suggestions?


thanks!

-n-




 
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