Lines Matching refs:config
1073 foreach ($configs->elements() as $config) {
1074 if ($config->state instanceof RuleStopState) {
1075 $result->add($config, $this->mergeCache);
1080 if ($lookToEndOfRule && $config->state->onlyHasEpsilonTransitions()) {
1081 $nextTokens = $this->atn->nextTokens($config->state);
1084 $endOfRuleState = $this->atn->ruleToStopState[$config->state->ruleIndex];
1085 $result->add(new ATNConfig($config, $endOfRuleState), $this->mergeCache);
1253 foreach ($configs->elements() as $config) {
1255 if ($config->alt !== 1) {
1260 $config->semanticContext->evalPrecedence($this->parser, $this->outerContext) :
1267 $statesFromAlt1[$config->state->stateNumber] = $config->context;
1269 if (!$updatedContext->equals($config->semanticContext)) {
1271 new ATNConfig($config, null, null, $updatedContext),
1275 $configSet->add($config, $this->mergeCache);
1279 foreach ($configs->elements() as $config) {
1280 if ($config->alt === 1) {
1288 if (!$config->isPrecedenceFilterSuppressed()) {
1289 $context = $statesFromAlt1[$config->state->stateNumber] ?? null;
1291 … if ($context !== null && $config->context !== null && $context->equals($config->context)) {
1296 $configSet->add($config, $this->mergeCache);
1591 ATNConfig $config, argument
1601 $config,
1616 ATNConfig $config, argument
1625 $this->log[] = \sprintf('closure(%s)', $config->toString(true));
1627 if ($config->reachesIntoOuterContext > 50) {
1632 if ($config->state instanceof RuleStopState) {
1635 if ($config->context !== null && !$config->context->isEmpty()) {
1636 for ($i =0; $i < $config->context->getLength(); $i++) {
1637 … if ($config->context->getReturnState($i) === PredictionContext::EMPTY_RETURN_STATE) {
1640 … new ATNConfig($config, $config->state, PredictionContext::empty(), null, null),
1648 $this->getRuleName($config->state->ruleIndex)
1653 $config,
1666 $returnState = $this->atn->states[$config->context->getReturnState($i)];
1667 $newContext = $config->context->getParent($i);// "pop" return state
1669 … $c = new ATNConfig(null, $returnState, $newContext, $config->semanticContext, $config->alt);
1678 $c->reachesIntoOuterContext = $config->reachesIntoOuterContext;
1694 $configs->add($config, $this->mergeCache);
1700 … $this->log[] = \sprintf('FALLING off rule %s.', $this->getRuleName($config->state->ruleIndex));
1705 …$this->closure_($config, $configs, $closureBusy, $collectPredicates, $fullCtx, $depth, $treatEofAs…
1712 ATNConfig $config, argument
1720 $p = $config->state;
1727 $configs->add($config, $this->mergeCache);
1731 if ($i === 0 && $this->canDropLoopEntryEdgeInLeftRecursiveRule($config)) {
1736 …$c = $this->getEpsilonTarget($config, $t, $continueCollecting, $depth === 0, $fullCtx, $treatEofAs…
1741 if ($config->state instanceof RuleStopState) {
1893 protected function canDropLoopEntryEdgeInLeftRecursiveRule(ATNConfig $config) : bool argument
1895 $p = $config->state;
1904 if ($config->context === null) {
1910 || $config->context->isEmpty()
1911 || $config->context->hasEmptyPath()) {
1916 $numCtxs = $config->context->getLength();
1920 $returnState = $this->atn->states[$config->context->getReturnState($i)];
1945 $returnStateNumber = $config->context->getReturnState($i);
1999 ATNConfig $config, argument
2012 return $this->ruleTransition($config, $t);
2019 … return $this->precedenceTransition($config, $t, $collectPredicates, $inContext, $fullCtx);
2026 return $this->predTransition($config, $t, $collectPredicates, $inContext, $fullCtx);
2033 return $this->actionTransition($config, $t);
2036 return new ATNConfig($config, $t->target);
2045 return new ATNConfig($config, $t->target);
2056 protected function actionTransition(ATNConfig $config, ActionTransition $t) : ATNConfig argument
2062 return new ATNConfig($config, $t->target);
2066 ATNConfig $config, argument
2108 $c = new ATNConfig($config, $pt->target);// no pred context
2111 … $newSemCtx = SemanticContext::andContext($config->semanticContext, $pt->getPredicate());
2112 $c = new ATNConfig($config, $pt->target, null, $newSemCtx);
2115 $c = new ATNConfig($config, $pt->target);
2124 ATNConfig $config, argument
2167 $c = new ATNConfig($config, $pt->target);// no pred context
2170 … $newSemCtx = SemanticContext::andContext($config->semanticContext, $pt->getPredicate());
2171 $c = new ATNConfig($config, $pt->target, null, $newSemCtx);
2174 $c = new ATNConfig($config, $pt->target);
2184 protected function ruleTransition(ATNConfig $config, RuleTransition $t) : ATNConfig argument
2190 $config->context
2195 … $newContext = SingletonPredictionContext::create($config->context, $returnState->stateNumber);
2197 return new ATNConfig($config, $t->target, $newContext);