ANTLR generating invalid java exceptions throws code

南笙酒味 提交于 2019-12-05 16:08:49

Edit: This is a bug in ANTLRWorks 1.5 that has already been fixed for the next release.
#5: ANTLRworks fails to generate proper Java Code

I used the exact configuration you described above, with a copy/pasted grammar. The signature generated for the rule you mention was the following:

// $ANTLR start "addExpression"
// C:\\dev\\Cymbol.g:72:1: addExpression : postfixExpression ( '+' ^ postfixExpression )* ;
public final CymbolParser.addExpression_return addExpression() throws RecognitionException {

Can you post the first line of the generated file? It should start with // $ANTLR 3.5 like the following:

// $ANTLR 3.5 C:\\dev\\Cymbol.g 2013-02-13 09:55:44
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!