Hi all,

I am studying parser generation and came across ANTLR which I have
found very intriguing.

I have been trying to put a grammar together (just for learning
purposes), and ran into a problem. I have managed to reduce the
grammar into just several lines which reproduces the problem.

Grammar:
=======
grammar quickTest;

start   :       NUMBER '..' NUMBER;

NUMBER
        :       '0' | '1'..'9' '0'..'9'* ('.' '0'..'9'+)?;
WHITESPACE
        :       (' '|'\t'|'\r'|'\n'){$channel = HIDDEN;};


The grammar works with the following inputs:
1 .. 10
1.0 .. 10.0
1.0..10.0
1.0..10


BUT, the grammar does not work for the following input:
1..10

[15:04:03] problem matching token at 1:3 MismatchedSetException(46!=
{48,49,50,51,52,53,54,55,56,57})


Can anybody help me with this issue?

Many thanks,
Lea Hayes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to