antlr4: ATN version 2 expected 3

主宰稳场 提交于 2019-12-08 17:31:28

问题


When trying to use a generated grammar and lexer I get:

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

What's wrong?


回答1:


Your parser was generated with ANTLR 4.0, but you are trying to execute it with ANTLR 4.1. The most likely cause of this is using ANTLRWorks 2.0 to generate the parser, which internally uses ANTLR 4.0. I'm in the process of releasing ANTLRWorks 2.1 which will correct this mismatch.



来源:https://stackoverflow.com/questions/18180103/antlr4-atn-version-2-expected-3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!