Lines Matching defs:alt

81  * tuples (stack context, semantic context, predicted alt) but it was slower
408 $alt = $this->execATN($dfa, $s0, $input, $index, $outerContext);
414 return $alt ?? 0;
449 * - single alt
450 * - single alt + preds
508 $alt = $this->getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(
513 if ($alt !== ATN::INVALID_ALT_NUMBER) {
514 return $alt;
690 // in SLL-only mode, we will stop at this state and return the minimum alt
725 // Update DFA so reach becomes accept state with (predicate,alt) pairs
738 // OR'd together like {p}? || NONE == NONE. If neither alt has preds,
739 // resolve to min alt.
750 * Comes back with reach.uniqueAlt set to a valid alt.
791 $alt = $this->getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule($previous, $outerContext);
793 if ($alt !== ATN::INVALID_ALT_NUMBER) {
794 return $alt;
867 * conflict. It's possible to have nonconflicting alt subsets as in:
1186 * usual match first alt upon conflict.
1254 // handle alt 1 first
1255 if ($config->alt !== 1) {
1280 if ($config->alt === 1) {
1285 * filter the prediction context for alternatives predicting alt>1
1315 * 1. null: no ATNConfig c is found such that c.alt==i
1317 * c.alt==i and c.semanticContext==SemanticContext.NONE. In other words,
1318 * alt i has at least one unpredicated config.
1320 * ATNConfig c such that c.alt==i, c.semanticContext!=SemanticContext.NONE.
1328 if ($ambigAlts->contains($c->alt)) {
1329 $altToPred[$c->alt] = SemanticContext::orContext($altToPred[$c->alt] ?? null, $c->semanticContext);
1407 * they are semantically valid if predicated, return the min associated alt.
1409 * or paths exist, return the minimum associated alt.
1446 $alt = $this->getAltThatFinishedDecisionEntryRule($semValidConfigs);
1448 if ($alt !== ATN::INVALID_ALT_NUMBER) {
1451 return $alt;
1456 $alt = $this->getAltThatFinishedDecisionEntryRule($semInvalidConfigs);
1458 if ($alt !== ATN::INVALID_ALT_NUMBER) {
1461 return $alt;
1475 $alts->addOne($c->alt);
1519 * Look through a list of predicate/alt pairs, returning alts for the
1520 * pairs that win. A `NONE` predicate indicates an alt containing an
1536 $predictions->add($pair->alt);
1550 $pair->alt,
1560 $this->log[] = \sprintf('PREDICT %d', $pair->alt);
1563 $predictions->add($pair->alt);
1577 int $alt,
1669 $c = new ATNConfig(null, $returnState, $newContext, $config->semanticContext, $config->alt);
1848 * There are no epsilon edges allowed in LR rule alt blocks or in
1877 * Closure is examining one config (some loopentrystate, some alt,
1878 * context) which means it is considering exactly one alt. Closure
1879 * always copies the same alt to any derived configs.
2235 associated with a single alt state in the state→config-list map.
2248 with states associated with the conflicting alternatives. Here alt
2306 $alt = ATN::INVALID_ALT_NUMBER;
2309 if ($alt === ATN::INVALID_ALT_NUMBER) {
2310 $alt = $c->alt; // found first alt
2311 } elseif ($c->alt !== $alt) {
2316 return $alt;