public ATNConfig precedenceTransition(ATNConfig config,PrecedencePredicateTransition pt,boolean collectPredicates,boolean inContext,boolean fullCtx){if ( debug ) {System.out.println("PRED (collectPredicates="+collectPredicates+") "+pt.precedence+">=_p"+", ctx dependent=true");if ( parser != null ) {System.out.println("context surrounding pred is "+parser.getRuleInvocationStack());}}ATNConfig c = null;if (collectPredicates && inContext) {if ( fullCtx ) {int currentPosition = _input.index();_input.seek(_startIndex);boolean predSucceeds = evalSemanticContext(pt.getPredicate(), _outerContext, config.alt, fullCtx);_input.seek(currentPosition);if ( predSucceeds ) {c = new ATNConfig(config, pt.target); }}else {SemanticContext newSemCtx =SemanticContext.and(config.semanticContext, pt.getPredicate());c = new ATNConfig(config, pt.target, newSemCtx);}}else {c = new ATNConfig(config, pt.target);}if ( debug ) System.out.println("config from pred transition="+c);return c;}
public ATNConfig PrecedenceTransition(ATNConfig config,PrecedencePredicateTransition pt,bool collectPredicates,bool inContext,bool fullCtx){if (debug){ConsoleWriteLine("PRED (collectPredicates=" + collectPredicates + ") " +pt.precedence + ">=_p" +", ctx dependent=true");if (parser != null){ConsoleWriteLine("context surrounding pred is " +parser.GetRuleInvocationStack());}}ATNConfig c = null;if (collectPredicates && inContext){if (fullCtx){int currentPosition = input.Index;input.Seek(startIndex);bool predSucceeds = EvalSemanticContext(pt.Predicate, context, config.alt, fullCtx);input.Seek(currentPosition);if (predSucceeds){c = new ATNConfig(config, pt.target); }}else {SemanticContext newSemCtx = SemanticContext.AndOp(config.semanticContext, pt.Predicate);c = new ATNConfig(config, pt.target, newSemCtx);}}else {c = new ATNConfig(config, pt.target);}if (debug) ConsoleWriteLine("config from pred transition=" + c);return c;}