Lines Matching defs:s

41      * The current token's starting index into the character stream.
163 $this->log[] = \sprintf('matchATN mode %d start: %s', $this->mode, (string) $startState);
181 $this->log[] = \sprintf('DFA after matchATN: %s', $this->decisionToDFA[$old_mode]->toLexerString());
190 $this->log[] = \sprintf('start state closure=%s', (string) $ds0->configs);
199 $s = $ds0; // s is current/from DFA state
203 $this->log[] = \sprintf('execATN loop starting closure: %s', (string) $s->configs);
209 // be able to avoid doing a reach operation upon t. If s!=null,
211 // creating a DFA state. Once we know s!=null, we check to see if
213 // it's configuration set; there's no point in re-computing it.
223 // print("Target for:" + str(s) + " and:" + str(t))
224 $target = $this->getExistingTargetState($s, $t);
227 $target = $this->computeTargetState($input, $s, $t);
250 $s = $target; // flip; current DFA target becomes new src/from state
253 return $this->failOrAccept($this->prevAccept, $input, $s->configs, $t);
261 * @param DFAState $s The current DFA state
268 protected function getExistingTargetState(DFAState $s, int $t) : ?DFAState
270 if ($s->edges === null || $t < self::MIN_DFA_EDGE || $t > self::MAX_DFA_EDGE) {
274 $target = $s->edges[$t - self::MIN_DFA_EDGE] ?? null;
277 $this->log[] = \sprintf('reuse state %d edge to %d', $s->stateNumber, $target->stateNumber);
288 * @param DFAState $s The current DFA state
295 protected function computeTargetState(CharStream $input, DFAState $s, int $t) : DFAState
301 $this->getReachableConfigSet($input, $s->configs, $reach, $t);
304 // we got nowhere on t from s
308 $this->addDFAEdge($s, $t, ATNSimulator::error());
315 // Add an edge from s to target DFA found/created for reach
316 return $this->addDFAEdgeATNConfigSet($s, $t, $reach) ?? ATNSimulator::error();
381 "testing %s at %s\n",
426 $this->log[] = \sprintf('ACTION %s', (string) $lexerActionExecutor) . \PHP_EOL;
482 $this->log[] = \sprintf('closure(%s)', $config->toString(true));
489 "closure at %s rule stop %s\n",
494 $this->log[] = \sprintf("closure at rule stop %s\n", $config);
589 // semantically it's not used that often. One of the key elements to
688 * one character before the predicate's location.
763 $this->log[] = \sprintf('EDGE %s->%s upon %d', $from, $to, $t);
862 return \sprintf('\'%s\'', StringUtils::char($t));