Hi,

I have just started using ANTLR and I get stuck with this trivial grammar : 

grammar Test;

options {
       language = Java;
}

test  :       NAME '=' VALUE;

NAME    :       LETTER+;
VALUE   :       (LETTER | DIGIT)+;

fragment
LETTER
       :       'a'..'z'|'A'..'Z'
       ;

fragment
DIGIT
       :       '0'..'9'
       ;

With the input "test=toto" I have a MismatchedTokenException on the token
"toto" while I get a correct syntax with an input using a digit like
"test=toto0".
Can someone explain what is my mistake in the grammar ?

Thank you.

--
View this message in context: 
http://antlr.1301665.n2.nabble.com/Problem-with-MismatchedTokenException-tp6257670p6257670.html
Sent from the ANTLR mailing list archive at Nabble.com.

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
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