Antlr4: ATN version 2 expected

When I try to use the generated grammar and lexer, I get:

org.antlr.v4.runtime.atn.ATN; Failed to deserialize ATN with version 2 (expected 3).

What happened?

+4
source share
1 answer

Your parser was generated using ANTLR 4.0, but you are trying to execute it with ANTLR 4.1. The most likely reason for this is the use of ANTLRWorks 2.0 to generate a parser that uses ANTLR 4.0 for internal use. I am in the process of releasing ANTLRWorks 2.1, which will correct this inconsistency.

+7
source

Source: https://habr.com/ru/post/1496500/


All Articles