/** Create RuleFunction per rule and update sempreds,actions of parser * output object with stuff found in r. */ public void buildRuleFunction(Parser parser, Rule r) { RuleFunction function = rule(r); parser.funcs.add(function); pushCurrentRule(function); function.fillNamedActions(delegate, r); if ( r instanceof LeftRecursiveRule ) { buildLeftRecursiveRuleFunction((LeftRecursiveRule)r, (LeftRecursiveRuleFunction)function); } else { buildNormalRuleFunction(r, function); } Grammar g = getGrammar(); for (ActionAST a : r.actions) { if ( a instanceof PredAST ) { PredAST p = (PredAST)a; RuleSempredFunction rsf = parser.sempredFuncs.get(r); if ( rsf==null ) { rsf = new RuleSempredFunction(delegate, r, function.ctxType); parser.sempredFuncs.put(r, rsf); } rsf.actions.put(g.sempreds.get(p), new Action(delegate, p)); } } popCurrentRule(); }
/** Create RuleFunction per rule and update sempreds,actions of parser * output object with stuff found in r. */ public void buildRuleFunction(Parser parser, Rule r) { RuleFunction function = rule(r); parser.funcs.add(function); pushCurrentRule(function); function.fillNamedActions(delegate, r); if ( r instanceof LeftRecursiveRule ) { buildLeftRecursiveRuleFunction((LeftRecursiveRule)r, (LeftRecursiveRuleFunction)function); } else { buildNormalRuleFunction(r, function); } Grammar g = getGrammar(); for (ActionAST a : r.actions) { if ( a instanceof PredAST ) { PredAST p = (PredAST)a; RuleSempredFunction rsf = parser.sempredFuncs.get(r); if ( rsf==null ) { rsf = new RuleSempredFunction(delegate, r, function.ctxType); parser.sempredFuncs.put(r, rsf); } rsf.actions.put(g.sempreds.get(p), new Action(delegate, p)); } } popCurrentRule(); }
/** Create RuleFunction per rule and update sempreds,actions of parser * output object with stuff found in r. */ public void buildRuleFunction(Parser parser, Rule r) { RuleFunction function = rule(r); parser.funcs.add(function); pushCurrentRule(function); function.fillNamedActions(delegate, r); if ( r instanceof LeftRecursiveRule ) { buildLeftRecursiveRuleFunction((LeftRecursiveRule)r, (LeftRecursiveRuleFunction)function); } else { buildNormalRuleFunction(r, function); } Grammar g = getGrammar(); for (ActionAST a : r.actions) { if ( a instanceof PredAST ) { PredAST p = (PredAST)a; RuleSempredFunction rsf = parser.sempredFuncs.get(r); if ( rsf==null ) { rsf = new RuleSempredFunction(delegate, r, function.ctxType); parser.sempredFuncs.put(r, rsf); } rsf.actions.put(g.sempreds.get(p), new Action(delegate, p)); } } popCurrentRule(); }
/** Create RuleFunction per rule and update sempreds,actions of parser * output object with stuff found in r. */ public void buildRuleFunction(Parser parser, Rule r) { RuleFunction function = rule(r); parser.funcs.add(function); pushCurrentRule(function); function.fillNamedActions(delegate, r); if ( r instanceof LeftRecursiveRule ) { buildLeftRecursiveRuleFunction((LeftRecursiveRule)r, (LeftRecursiveRuleFunction)function); } else { buildNormalRuleFunction(r, function); } Grammar g = getGrammar(); for (ActionAST a : r.actions) { if ( a instanceof PredAST ) { PredAST p = (PredAST)a; RuleSempredFunction rsf = parser.sempredFuncs.get(r); if ( rsf==null ) { rsf = new RuleSempredFunction(delegate, r, function.ctxType); parser.sempredFuncs.put(r, rsf); } rsf.actions.put(g.sempreds.get(p), new Action(delegate, p)); } } popCurrentRule(); }
/** Create RuleFunction per rule and update sempreds,actions of parser * output object with stuff found in r. */ public void buildRuleFunction(Parser parser, Rule r) { RuleFunction function = rule(r); parser.funcs.add(function); pushCurrentRule(function); function.fillNamedActions(delegate, r); if ( r instanceof LeftRecursiveRule ) { buildLeftRecursiveRuleFunction((LeftRecursiveRule)r, (LeftRecursiveRuleFunction)function); } else { buildNormalRuleFunction(r, function); } Grammar g = getGrammar(); for (ActionAST a : r.actions) { if ( a instanceof PredAST ) { PredAST p = (PredAST)a; RuleSempredFunction rsf = parser.sempredFuncs.get(r); if ( rsf==null ) { rsf = new RuleSempredFunction(delegate, r, function.ctxType); parser.sempredFuncs.put(r, rsf); } rsf.actions.put(g.sempreds.get(p), new Action(delegate, p)); } } popCurrentRule(); }