本文整理了Java中org.antlr.v4.runtime.Parser.setBuildParseTree()
方法的一些代码示例,展示了Parser.setBuildParseTree()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.setBuildParseTree()
方法的具体详情如下:
包路径:org.antlr.v4.runtime.Parser
类名称:Parser
方法名:setBuildParseTree
[英]Track the ParserRuleContext objects during the parse and hook them up using the ParserRuleContext#children list so that it forms a parse tree. The ParserRuleContext returned from the start rule represents the root of the parse tree.
Note that if we are not building parse trees, rule contexts only point upwards. When a rule exits, it returns the context but that gets garbage collected if nobody holds a reference. It points upwards but nobody points at it.
When we build parse trees, we are adding all of these contexts to ParserRuleContext#children list. Contexts are then not candidates for garbage collection.
[中]
代码示例来源:origin: com.github.julianthome/inmemantlr-api
parser.addErrorListener(el);
parser.getInterpreter().setPredictionMode(PredictionMode.LL_EXACT_AMBIG_DETECTION);
parser.setBuildParseTree(true);
parser.setTokenStream(tokens);
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
parser.setBuildParseTree(true);
代码示例来源:origin: uk.co.nichesolutions/antlr4
parser.setBuildParseTree(true);
代码示例来源:origin: io.virtdata/virtdata-lib-realer
parser.setBuildParseTree(true);
代码示例来源:origin: org.antlr/antlr4
parser.setBuildParseTree(true);
代码示例来源:origin: com.tunnelvisionlabs/antlr4
parser.setBuildParseTree(true);
代码示例来源:origin: antlr/codebuff
doc.parser.setBuildParseTree(true);
内容来源于网络,如有侵权,请联系作者删除!