public LeftRecursiveRule(Grammar g, String name, RuleAST ast) { super(g, name, ast, 1); originalAST = ast; alt = new Alternative[numberOfAlts+1]; // always just one for (int i=1; i<=numberOfAlts; i++) alt[i] = new Alternative(this, i); }
@Override public boolean resolvesToLabel(String x, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); return anyLabelDef!=null && (anyLabelDef.type==LabelType.TOKEN_LABEL || anyLabelDef.type==LabelType.RULE_LABEL); }
@Override public boolean resolvesToAttributeDict(String x, ActionAST node) { if ( resolvesToToken(x, node) ) return true; if ( ruleRefs.get(x)!=null ) return true; // rule ref in this alt? LabelElementPair anyLabelDef = getAnyLabelDef(x); if ( anyLabelDef!=null && anyLabelDef.type==LabelType.RULE_LABEL ) return true; return false; }
@Override public boolean resolvesToListLabel(String x, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); return anyLabelDef!=null && (anyLabelDef.type==LabelType.RULE_LIST_LABEL || anyLabelDef.type==LabelType.TOKEN_LIST_LABEL); }
@Override public boolean resolvesToAttributeDict(String x, ActionAST node) { if ( resolvesToToken(x, node) ) return true; if ( ruleRefs.get(x)!=null ) return true; // rule ref in this alt? LabelElementPair anyLabelDef = getAnyLabelDef(x); if ( anyLabelDef!=null && anyLabelDef.type==LabelType.RULE_LABEL ) return true; return false; }
public LeftRecursiveRule(Grammar g, String name, RuleAST ast) { super(g, name, ast, 1); originalAST = ast; alt = new Alternative[numberOfAlts+1]; // always just one for (int i=1; i<=numberOfAlts; i++) alt[i] = new Alternative(this, i); }
@Override public boolean resolvesToListLabel(String x, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); return anyLabelDef!=null && (anyLabelDef.type==LabelType.RULE_LIST_LABEL || anyLabelDef.type==LabelType.TOKEN_LIST_LABEL); }
@Override public boolean resolvesToAttributeDict(String x, ActionAST node) { if ( resolvesToToken(x, node) ) return true; if ( ruleRefs.get(x)!=null ) return true; // rule ref in this alt? LabelElementPair anyLabelDef = getAnyLabelDef(x); if ( anyLabelDef!=null && anyLabelDef.type==LabelType.RULE_LABEL ) return true; return false; }
public Rule(Grammar g, String name, RuleAST ast, int numberOfAlts) { this.g = g; this.name = name; this.ast = ast; this.numberOfAlts = numberOfAlts; alt = new Alternative[numberOfAlts+1]; // 1..n for (int i=1; i<=numberOfAlts; i++) alt[i] = new Alternative(this, i); }
@Override public boolean resolvesToListLabel(String x, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); return anyLabelDef!=null && (anyLabelDef.type==LabelType.RULE_LIST_LABEL || anyLabelDef.type==LabelType.TOKEN_LIST_LABEL); }
@Override public boolean resolvesToAttributeDict(String x, ActionAST node) { if ( resolvesToToken(x, node) ) return true; if ( ruleRefs.get(x)!=null ) return true; // rule ref in this alt? LabelElementPair anyLabelDef = getAnyLabelDef(x); if ( anyLabelDef!=null && anyLabelDef.type==LabelType.RULE_LABEL ) return true; return false; }
public Rule(Grammar g, String name, RuleAST ast, int numberOfAlts) { this.g = g; this.name = name; this.ast = ast; this.numberOfAlts = numberOfAlts; alt = new Alternative[numberOfAlts+1]; // 1..n for (int i=1; i<=numberOfAlts; i++) alt[i] = new Alternative(this, i); }
@Override public boolean resolvesToListLabel(String x, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); return anyLabelDef!=null && (anyLabelDef.type==LabelType.RULE_LIST_LABEL || anyLabelDef.type==LabelType.TOKEN_LIST_LABEL); }
@Override public boolean resolvesToAttributeDict(String x, ActionAST node) { if ( resolvesToToken(x, node) ) return true; if ( ruleRefs.get(x)!=null ) return true; // rule ref in this alt? LabelElementPair anyLabelDef = getAnyLabelDef(x); if ( anyLabelDef!=null && anyLabelDef.type==LabelType.RULE_LABEL ) return true; return false; }
public Rule(Grammar g, String name, RuleAST ast, int numberOfAlts) { this.g = g; this.name = name; this.ast = ast; this.numberOfAlts = numberOfAlts; alt = new Alternative[numberOfAlts+1]; // 1..n for (int i=1; i<=numberOfAlts; i++) alt[i] = new Alternative(this, i); }
@Override public boolean resolvesToLabel(String x, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); return anyLabelDef!=null && (anyLabelDef.type==LabelType.TOKEN_LABEL || anyLabelDef.type==LabelType.RULE_LABEL); }
public LeftRecursiveRule(Grammar g, String name, RuleAST ast) { super(g, name, ast, 1); originalAST = ast; alt = new Alternative[numberOfAlts+1]; // always just one for (int i=1; i<=numberOfAlts; i++) alt[i] = new Alternative(this, i); }
@Override public boolean resolvesToLabel(String x, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); return anyLabelDef!=null && (anyLabelDef.type==LabelType.TOKEN_LABEL || anyLabelDef.type==LabelType.RULE_LABEL); }
public LeftRecursiveRule(Grammar g, String name, RuleAST ast) { super(g, name, ast, 1); originalAST = ast; alt = new Alternative[numberOfAlts+1]; // always just one for (int i=1; i<=numberOfAlts; i++) alt[i] = new Alternative(this, i); }
@Override public boolean resolvesToListLabel(String x, ActionAST node) { LabelElementPair anyLabelDef = getAnyLabelDef(x); return anyLabelDef!=null && (anyLabelDef.type==LabelType.RULE_LIST_LABEL || anyLabelDef.type==LabelType.TOKEN_LIST_LABEL); }