Lines Matching defs:input

47  * complete the DFA path for the current input (until it finds a conflict state
61 * When SLL yields a configuration set with conflict, we rewind the input and
65 * definitively say we have a true ambiguity for that input sequence. If we
73 * ATN each time we get that input.
87 * There is no strict ordering between the amount of input used by SLL vs LL,
89 * we have input A B C that leads to an SLL conflict with full context X. That
92 * in the input and A B C E could predict alternative 2 in another position in
93 * input. The conflicting SLL configurations could still be non-unique in the
94 * full context prediction, which would lead us to requiring more input than the
96 * input used during the previous prediction. That amounts to a cache that maps
208 * grammar is SLL (at least for that input set). If there is an SLL conflict,
213 * is truly ambiguous on the current input. If the LL set is smaller, then the
229 * Of course, if the input is invalid, then we will get an error for sure in
230 * both SLL and LL parsing. Erroneous input will therefore require 2 passes over
231 * the input.
269 * parser/atnsim object because it can only handle one input at a time.
283 protected $input;
324 public function adaptivePredict(TokenStream $input, int $decision, ParserRuleContext $outerContext) : int
327 $token = $input->LT(1);
332 $this->getLookaheadName($input),
338 $this->input = $input;
339 $this->startIndex = $input->getIndex();
345 $m = $input->mark();
365 $this->getLookaheadName($input),
408 $alt = $this->execATN($dfa, $s0, $input, $index, $outerContext);
418 $input->seek($index);
419 $input->release($m);
425 * upon the remaining input, but also updates the DFA cache to avoid
426 * having to traverse the ATN again for the same input sequence.
441 * - consuming an input symbol
457 TokenStream $input,
462 $token = $input->LT(1);
467 $this->getLookaheadName($input),
479 $t = $input->LA(1);
494 * means that input up to t actually finished entry rule
504 $e = $this->noViableAlt($input, $outerContext, $previousD->configs, $startIndex);
506 $input->seek($startIndex);
530 $conflictIndex = $input->getIndex();
533 $input->seek($startIndex);
550 $input->seek($conflictIndex);
573 $input->getIndex()
576 return $this->execATNWithFullContext($dfa, $D, $s0_closure, $input, $startIndex, $outerContext);
584 $stopIndex = $input->getIndex();
585 $input->seek($startIndex);
590 throw $this->noViableAlt($input, $outerContext, $D->configs, $startIndex);
607 $input->consume();
608 $t = $input->LA(1);
619 * @param int $t The next input symbol
621 * @return DFAState|null The existing target DFA state for the given input
642 * @param int $t The next input symbol
644 * @return DFAState|null The computed target DFA state for the given input
756 TokenStream $input,
768 $input->seek($startIndex);
769 $t = $input->LA(1);
777 * means that input up to t actually finished entry rule
787 $e = $this->noViableAlt($input, $outerContext, $previous, $startIndex);
789 $input->seek($startIndex);
844 $input->consume();
845 $t = $input->LA(1);
852 $this->reportContextSensitivity($dfa, $predictedAlt, $reach, $startIndex, $input->getIndex());
880 * looking for input because no amount of further lookahead will alter
885 $this->reportAmbiguity($dfa, $D, $startIndex, $input->getIndex(), $foundExactAmbig, null, $reach);
911 * chosen when multiple such configurations can match the input.
915 // First figure out where we can reach on input t
995 /* After consuming EOF no additional input is possible, so we are
1133 * or exit decision, which is what concerns us here. At the 1st + of input
1173 * resolves conflicts according to precedence levels. For example, for input
1489 * Assumption: the input stream has been restored to the starting point
1863 * upon remaining input +b (in, say, a+b). Either paths lead to
1872 * remaining input during a lookahead operation. If the next token
1885 * that an input, say, a+b+c; begins with any valid interpretation
2097 $currentPosition = $this->input->getIndex();
2099 $this->input->seek($this->startIndex);
2105 $this->input->seek($currentPosition);
2156 $currentPosition = $this->input->getIndex();
2158 $this->input->seek($this->startIndex);
2164 $this->input->seek($currentPosition);
2243 After matching input A, we reach the stop state for rule A, state 1.
2250 looking for input reasonably, I don't declare the state done. We
2283 public function getLookaheadName(TokenStream $input) : string
2285 return $this->getTokenName($input->LA(1));
2289 TokenStream $input,
2296 $input,
2297 $input->get($startIndex),
2298 $input->LT(1),
2332 * @param int $t The input symbol
2426 'reportAttemptingFullContext decision = %d:%s, input = %s',
2457 'reportContextSensitivity decision = %d:%s, input = %s',
2493 'reportAmbiguity %s:%s, input = %s',