rm recognizerName field where possible

This commit is contained in:
parrt 2016-11-04 16:07:45 -07:00
parent 95dbf7b44b
commit 85f2a87840
3 changed files with 0 additions and 9 deletions

View File

@ -42,8 +42,6 @@ import org.antlr.v4.tool.Rule;
import org.antlr.v4.tool.ast.GrammarAST;
public class LeftRecursiveRuleFunction extends RuleFunction {
public String recognizerName;
public LeftRecursiveRuleFunction(OutputModelFactory factory, LeftRecursiveRule r) {
super(factory, r);
@ -74,7 +72,5 @@ public class LeftRecursiveRuleFunction extends RuleFunction {
struct.addDecl(d); // stick in overall rule's ctx
}
}
recognizerName = factory.getGrammar().getRecognizerName();
}
}

View File

@ -81,7 +81,6 @@ public class RuleFunction extends OutputModelObject {
public Rule rule;
public AltLabelStructDecl[] altToContext;
public boolean hasLookaheadBlock;
public String recognizerName;
@ModelElement public List<SrcOp> code;
@ModelElement public OrderedHashSet<Decl> locals; // TODO: move into ctx?
@ -139,7 +138,6 @@ public class RuleFunction extends OutputModelObject {
}
startState = factory.getGrammar().atn.ruleToStartState[r.index];
recognizerName = factory.getGrammar().getRecognizerName();
}
public void addContextGetters(OutputModelFactory factory, Rule r) {

View File

@ -34,10 +34,7 @@ import org.antlr.v4.codegen.OutputModelFactory;
import org.antlr.v4.tool.Rule;
public class RuleSempredFunction extends RuleActionFunction {
public String recognizerName;
public RuleSempredFunction(OutputModelFactory factory, Rule r, String ctxType) {
super(factory, r, ctxType);
recognizerName = factory.getGrammar().getRecognizerName();
}
}