Lines Matching refs:configs
395 $dfa->s0->configs = $s0_closure; // not used for prediction but useful to know start configs anyway
429 * set of ATN configs (proposed DFA state):
493 /* If any configs in previous dipped into outer context, that
504 $e = $this->noViableAlt($input, $outerContext, $previousD->configs, $startIndex);
509 $previousD->configs,
523 $conflictingAlts = $D->configs->getConflictingAlts();
571 $D->configs,
590 throw $this->noViableAlt($input, $outerContext, $D->configs, $startIndex);
598 $this->reportAmbiguity($dfa, $D, $startIndex, $stopIndex, false, $alts, $D->configs);
651 $reach = $this->computeReachSet($previousD->configs, $t, false);
668 'SLL altSubSets=[%s], previous=%s, configs=%s, predict=%d, allSubsetsConflict=%s, conflictingAlts=%s',
670 (string) $previousD->configs,
682 $D->configs->uniqueAlt = $predictedAlt;
687 $D->configs->setConflictingAlts($this->getConflictingAlts($reach));
693 $conflictingAlts = $D->configs->getConflictingAlts();
702 if ($D->isAcceptState && $D->configs->hasSemanticContext) {
728 $altsToCollectPredsFrom = $this->getConflictingAltsOrUniqueAlt($dfaState->configs);
731 $this->getPredsForAmbigAlts($altsToCollectPredsFrom, $dfaState->configs, $nalts);
737 // There are preds in configs but they might go away when
776 /* I any configs in previous dipped into outer context, that
1043 * `configs` which are in a {@see RuleStopState}. If all configurations in
1044 * `configs` are already in a rule stop state, this method simply returns
1045 * `configs`.
1048 * for each configuration in `configs` which is not already in a rule stop
1052 * @param ATNConfigSet $configs The configuration set to update
1056 * configuration in `configs`.
1058 * @return ATNConfigSet `configs` if all configurations in `configs` are
1061 * from `configs` which are in a rule stop state.
1065 protected function removeAllConfigsNotInRuleStopState(ATNConfigSet $configs, bool $lookToEndOfRule) : ATNConfigSet
1067 if (PredictionMode::allConfigsInRuleStopStates($configs)) {
1068 return $configs;
1071 $result = new ATNConfigSet($configs->fullCtx);
1073 foreach ($configs->elements() as $config) {
1097 $configs = new ATNConfigSet($fullCtx);
1103 $this->closure($c, $configs, $closureBusy, true, $fullCtx, false);
1106 return $configs;
1237 * @param ATNConfigSet $configs The configuration set computed by
1247 protected function applyPrecedenceFilter(ATNConfigSet $configs) : ATNConfigSet
1251 $configSet = new ATNConfigSet($configs->fullCtx);
1253 foreach ($configs->elements() as $config) {
1279 foreach ($configs->elements() as $config) {
1310 protected function getPredsForAmbigAlts(BitSet $ambigAlts, ATNConfigSet $configs, int $nalts) : ?array
1327 foreach ($configs->elements() as $c) {
1423 * @param ATNConfigSet $configs The ATN configurations which were valid
1439 ATNConfigSet $configs,
1444 [$semValidConfigs, $semInvalidConfigs] = $this->splitAccordingToSemanticValidity($configs, $outerContext);
1468 protected function getAltThatFinishedDecisionEntryRule(ATNConfigSet $configs) : int
1472 foreach ($configs->elements() as $c) {
1496 protected function splitAccordingToSemanticValidity(ATNConfigSet $configs, ParserRuleContext $outerContext) : array
1498 $succeeded = new ATNConfigSet($configs->fullCtx);
1499 $failed = new ATNConfigSet($configs->fullCtx);
1501 foreach ($configs->elements() as $c) {
1592 ATNConfigSet $configs,
1602 $configs,
1610 if ($fullCtx && $configs->dipsIntoOuterContext) {
1617 ATNConfigSet $configs,
1639 $configs->add(
1654 $configs,
1682 $configs,
1694 $configs->add($config, $this->mergeCache);
1705 $this->closure_($config, $configs, $closureBusy, $collectPredicates, $fullCtx, $depth, $treatEofAsEpsilon);
1713 ATNConfigSet $configs,
1727 $configs->add($config, $this->mergeCache);
1769 $configs->dipsIntoOuterContext = true;
1793 $configs,
1879 * always copies the same alt to any derived configs.
2201 * Gets a {@see BitSet} containing the alternatives in `configs`
2204 * @param ATNConfigSet $configs The {@see ATNConfigSet} to analyze.
2206 * @return BitSet The alternatives in `configs` which are part of one or
2207 * more conflicting alternative subsets. If `configs` does
2211 protected function getConflictingAlts(ATNConfigSet $configs) : BitSet
2213 $altsets = PredictionMode::getConflictingAltSubsets($configs);
2249 3 is not associated with the conflicting configs, but since we can continue
2254 protected function getConflictingAltsOrUniqueAlt(ATNConfigSet $configs) : ?BitSet
2256 if ($configs->uniqueAlt !== ATN::INVALID_ALT_NUMBER) {
2259 $conflictingAlts->add($configs->uniqueAlt);
2264 return $configs->getConflictingAlts();
2291 ?ATNConfigSet $configs,
2299 $configs,
2304 protected static function getUniqueAlt(ATNConfigSet $configs) : int
2308 foreach ($configs->elements() as $c) {
2400 if (!$D->configs->isReadOnly()) {
2401 $D->configs->optimizeConfigs($this);
2402 $D->configs->setReadonly(true);
2417 ATNConfigSet $configs,
2428 (string) $configs,
2440 $configs
2448 ATNConfigSet $configs,
2459 (string) $configs,
2471 $configs
2486 ATNConfigSet $configs
2495 (string) $configs,
2508 $configs