forked from jasder/antlr
rm recognizerName field where possible
This commit is contained in:
parent
95dbf7b44b
commit
85f2a87840
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue