C# Antlr解析器不';无法生成所有预期的代码

C# Antlr解析器不';无法生成所有预期的代码,c#,antlr,antlr3,C#,Antlr,Antlr3,我的语法大致定义如下: 这会生成,但我没有预期的parser.expr\u result类,而parser.expr()返回astparserreturnscope我做错了什么?这是选项吗?工具命令行选项?还有什么吗?ANTLR 3.3像这样声明规则expr: public TestParser.expr_return expr() ANTLR 3.4声明如下: public AstParserRuleReturnScope<object, IToken> expr

我的语法大致定义如下:


这会生成,但我没有预期的
parser.expr\u result
类,而
parser.expr()
返回
astparserreturnscope
我做错了什么?这是选项吗?工具命令行选项?还有什么吗?

ANTLR 3.3像这样声明规则
expr

    public TestParser.expr_return expr()
ANTLR 3.4声明如下:

    public AstParserRuleReturnScope<object, IToken> expr()

astparserureturnscope
类与生成的
expr\u返回值
类等效

ANTLR 3.3像这样声明规则
expr

    public TestParser.expr_return expr()
ANTLR 3.4声明如下:

    public AstParserRuleReturnScope<object, IToken> expr()
astparserureturnscope
类与生成的
expr\u返回值
类等效