Thanks Tom, I did as you said expr : (IDENTIFIER '=' VALUE ) ; // lex rules IDENTIFIER : LETTER (LETTER|DIGIT)* ; VALUE : '"' (LETTER|DIGIT)* '"' ; so now it works. I was wondering how to ignore the end of file value, what is the normal way to do that? BR/Anders.