我目前正在使用针对 C# 的 AnTLR4 创建语法,但在开发访问者时遇到问题。我找不到书中提到的 ParseTree 类。
书中我们有:
LabeledExprLexer lexer = new LabeledExprLexer(input);
CommonTokenStream tokens = new CommonTokenStream(lexer);
LabeledExprParser parser = new LabeledExprParser(tokens);
ParseTree tree = parser.prog(); // parse
but I can't see the equivalent C# code.
你能帮忙吗?
C# 中的接口有前缀I
。这里的完全限定名称是Antlr4.Runtime.Tree.IParseTree
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)