Reputation: 4195
I am using the ANTLR4 IntelliJ plug-in, and I am using a the Antlr-4.5.1 Jar.
When I Generate Antlr Recognizer
in Lexer and Parser can't resolve symbols RuntimeMetaData and Vocabulary.
If I use the command line to compile and run my .g4
file it works fine but gives errors in IntelliJ.
I can swap in the command line compiled Lexer and Parser Java files for the error ones and it runs fine.
I'm on Mac OS X 10.11 using IntelliJ 15.
Upvotes: 6
Views: 1003
Reputation: 581
You might have an older antlr4-runtime-x.y.z.jar on your compile classpath. I had the same issue when upgrading the antlr4-maven-plugin to 4.5.1, but forgetting to do the same for the antlr4-runtime dependency.
Upvotes: 2