rm prints
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9824]
This commit is contained in:
parent
e7f6ba5ac1
commit
7d68546dbe
|
@ -139,8 +139,8 @@ public class GrammarTransformPipeline {
|
||||||
new LeftRecursiveRuleAnalyzer(tokens, ruleAST, tool, ruleName, language);
|
new LeftRecursiveRuleAnalyzer(tokens, ruleAST, tool, ruleName, language);
|
||||||
boolean isLeftRec = false;
|
boolean isLeftRec = false;
|
||||||
try {
|
try {
|
||||||
System.out.println("TESTING ---------------\n"+
|
// System.out.println("TESTING ---------------\n"+
|
||||||
leftRecursiveRuleWalker.text(ruleAST));
|
// leftRecursiveRuleWalker.text(ruleAST));
|
||||||
isLeftRec = leftRecursiveRuleWalker.rec_rule();
|
isLeftRec = leftRecursiveRuleWalker.rec_rule();
|
||||||
}
|
}
|
||||||
catch (RecognitionException re) {
|
catch (RecognitionException re) {
|
||||||
|
@ -151,7 +151,7 @@ public class GrammarTransformPipeline {
|
||||||
// replace old rule
|
// replace old rule
|
||||||
GrammarAST RULES = (GrammarAST)ast.getFirstChildWithType(ANTLRParser.RULES);
|
GrammarAST RULES = (GrammarAST)ast.getFirstChildWithType(ANTLRParser.RULES);
|
||||||
String newRuleText = leftRecursiveRuleWalker.getArtificialOpPrecRule();
|
String newRuleText = leftRecursiveRuleWalker.getArtificialOpPrecRule();
|
||||||
System.out.println("created: "+newRuleText);
|
// System.out.println("created: "+newRuleText);
|
||||||
GrammarAST t = parseArtificialRule(g, newRuleText);
|
GrammarAST t = parseArtificialRule(g, newRuleText);
|
||||||
RULES.setChild(ruleAST.getChildIndex(), t);
|
RULES.setChild(ruleAST.getChildIndex(), t);
|
||||||
tool.log("grammar", "added: "+t.toStringTree());
|
tool.log("grammar", "added: "+t.toStringTree());
|
||||||
|
|
Loading…
Reference in New Issue