Lines Matching defs:input

51      * The line number 1..n within the input.
121 public function match(CharStream $input, int $mode) : int
132 $mark = $input->mark();
135 $this->startIndex = $input->getIndex();
141 return $this->matchATN($input);
143 return $this->execATN($input, $dfa->s0);
145 $input->release($mark);
158 protected function matchATN(CharStream $input) : int
168 $s0_closure = $this->computeStartState($input, $startState);
178 $predict = $this->execATN($input, $next);
187 protected function execATN(CharStream $input, DFAState $ds0) : int
195 $this->captureSimState($this->prevAccept, $input, $ds0);
198 $t = $input->LA(1);
227 $target = $this->computeTargetState($input, $s, $t);
234 // If this is a consumable input element, make sure to consume before
235 // capturing the accept state so the input index, line, and char
239 $this->consume($input);
243 $this->captureSimState($this->prevAccept, $input, $target);
249 $t = $input->LA(1);
253 return $this->failOrAccept($this->prevAccept, $input, $s->configs, $t);
262 * @param int $t The next input symbol
264 * @return DFAState|null The existing target DFA state for the given input symbol
287 * @param CharStream $input The input stream
289 * @param int $t The next input symbol
291 * @return DFAState The computed target DFA state for the given input symbol
295 protected function computeTargetState(CharStream $input, DFAState $s, int $t) : DFAState
301 $this->getReachableConfigSet($input, $s->configs, $reach, $t);
319 protected function failOrAccept(SimState $prevAccept, CharStream $input, ATNConfigSet $reach, int $t) : int
331 $input,
343 if ($t === IntStream::EOF && $input->getIndex() === $this->startIndex) {
351 throw new LexerNoViableAltException($this->recog, $input, $this->startIndex, $reach);
356 * we can reach upon input `t`. Parameter `reach` is a return parameter.
359 CharStream $input,
394 $lexerExecutor = $lexerExecutor->fixOffsetBeforeMatch($input->getIndex() - $this->startIndex);
401 $input,
418 CharStream $input,
430 $input->seek($index);
435 $lexerActionExecutor->execute($this->recog, $input, $startIndex);
448 protected function computeStartState(CharStream $input, ATNState $p) : OrderedATNConfigSet
456 $this->closure($input, $cfg, $configs, false, false, false);
472 CharStream $input,
516 $input,
538 $cfg = $this->getEpsilonTarget($input, $config, $trans, $configs, $speculative, $treatEofAsEpsilon);
542 $input,
559 CharStream $input,
611 if ($this->evaluatePredicate($input, $t->ruleIndex, $t->predIndex, $speculative)) {
680 * lexer state. This method should restore `input` and the simulator
684 * @param CharStream $input The input stream.
687 * @param bool $speculative `true` if the current index in `input` is
692 protected function evaluatePredicate(CharStream $input, int $ruleIndex, int $predIndex, bool $speculative) : bool
704 $index = $input->getIndex();
705 $marker = $input->mark();
708 $this->consume($input);
714 $input->seek($index);
715 $input->release($marker);
719 protected function captureSimState(SimState $settings, CharStream $input, DFAState $dfaState) : void
721 $settings->setIndex($input->getIndex());
731 * dependent on the specific input sequence, so the static edge in the
836 public function getText(CharStream $input) : string
839 return $input->getText($this->startIndex, $input->getIndex() - 1);
842 public function consume(CharStream $input) : void
844 $curChar = $input->LA(1);
853 $input->consume();