[antlr-interest] Getting mismatched input error - 'find' expecting 'find' !!

Gavin Lambert antlr at mirality.co.nz
Fri Oct 26 20:05:30 PDT 2007


At 14:22 27/10/2007, Terence Parr wrote:
 >Hi. it sounds like a token type coherency problem.
 >Token types in lexer grammar are different from parser.
 >make sure you importVocab

I don't think that an importVocab will solve it, since it was a 
combined grammar to begin with.

But there definitely could be some kind of mismatch between the 
lexer and parser tokens.  Possibly you didn't rebuild both lexer 
and parser classes after running ANTLR.

I know that some IDEs can build "stale" copies of files (or just 
think that they don't need to rebuild them) if you have a 
generated file open in the IDE when you build.  So make sure you 
close the generated lexer/parser files before you build and run 
your program.  (And hit Rebuild the next time you try as well, 
just in case.)



More information about the antlr-interest mailing list