Lines Matching defs:config

365         // than a config that already reached an accept state for the same rule
370 throw new \RuntimeException('Unexpected config type.');
398 $config = new LexerATNConfig($cfg, $target, null, $lexerExecutor);
402 $config,
466 * search from `config`, all other (potentially reachable) states for
473 LexerATNConfig $config,
482 $this->log[] = \sprintf('closure(%s)', $config->toString(true));
485 if ($config->state instanceof States\RuleStopState) {
490 $this->recog->getRuleNames()[$config->state->ruleIndex],
491 $config
494 $this->log[] = \sprintf("closure at rule stop %s\n", $config);
498 if ($config->context === null || $config->context->hasEmptyPath()) {
499 if ($config->context === null || $config->context->isEmpty()) {
500 $configs->add($config);
505 $configs->add(new LexerATNConfig($config, $config->state, PredictionContext::empty()));
509 if ($config->context !== null && !$config->context->isEmpty()) {
510 for ($i = 0; $i < $config->context->getLength(); $i++) {
511 if ($config->context->getReturnState($i) !== PredictionContext::EMPTY_RETURN_STATE) {
512 $newContext = $config->context->getParent($i);// "pop" return state
513 $returnState = $this->atn->states[$config->context->getReturnState($i)];
514 $cfg = new LexerATNConfig($config, $returnState, $newContext);
531 if (!$config->state->epsilonOnlyTransitions) {
532 if (!$currentAltReachedAcceptState || !$config->isPassedThroughNonGreedyDecision()) {
533 $configs->add($config);
537 foreach ($config->state->getTransitions() as $trans) {
538 $cfg = $this->getEpsilonTarget($input, $config, $trans, $configs, $speculative, $treatEofAsEpsilon);
560 LexerATNConfig $config,
574 $newContext = SingletonPredictionContext::create($config->context, $t->followState->stateNumber);
575 $cfg = new LexerATNConfig($config, $t->target, $newContext);
612 $cfg = new LexerATNConfig($config, $t->target);
618 if ($config->context === null || $config->context->hasEmptyPath()) {
624 // isEmpty() is false. In this case, the config needs to be
638 $lexerActionExecutor = LexerActionExecutor::append($config->getLexerActionExecutor(), $lexerAction);
640 $cfg = new LexerATNConfig($config, $t->target, null, $lexerActionExecutor);
643 $cfg = new LexerATNConfig($config, $t->target);
649 $cfg = new LexerATNConfig($config, $t->target);
658 $cfg = new LexerATNConfig($config, $t->target);
790 foreach ($configs->elements() as $config) {
791 if ($config->state instanceof RuleStopState) {
792 $firstConfigWithRuleStopState = $config;
800 throw new \RuntimeException('Unexpected ATN config type.');