[antlr-interest] Error with date
Jan van der Ven
jhvdven at xs4all.nl
Sun Jun 17 05:20:20 PDT 2007
Dear list,
I am taking my first steps with v3 (I have been working with 2.7
before). I use AntlrWorks and have created the following snippet:
DIGIT : '0'..'9';
INT: DIGIT (DIGIT)*;
timestamp
: day '/' month '/' year ;
day : INT;
month : ('Jan' | 'Feb' | 'Mar' | 'Apr' | 'May' | 'Jun' | 'Jul' |
'Aug' | 'Sep' | 'Oct' | 'Nov' | 'Dec');
year : INT;
When I feed it with: 09/Feb/2003 it matches the 09 and then tries to
match Feb/2003, which of course fails: line 3:21 mismatched input
'Feb/2003' expecting set null.
Can anyone explain this for me?
Kind regards,
Jan
More information about the antlr-interest
mailing list