Lines Matching defs:input

13  * A lexer is recognizer that draws input symbols from a character stream.
30 public $input;
105 * input char buffer. Use {@see Lexer::setText()} or can set this instance var.
114 public function __construct(?CharStream $input = null)
118 $this->input = $input;
120 $this->tokenFactorySourcePair = new Pair($this, $input);
129 if ($this->input !== null) {
130 $this->input->seek(0);// rewind the input
155 if ($this->input === null) {
156 throw new \RuntimeException('NextToken requires a non-null input stream.');
161 $tokenStartMarker = $this->input->mark();
177 $this->tokenStartCharIndex = $this->input->getIndex();
187 $ttype = $this->interp->match($this->input, $this->mode);
193 if ($this->input->LA(1) === Token::EOF) {
225 $this->input->release($tokenStartMarker);
271 return $this->input === null ? '' : $this->input->getSourceName();
276 return $this->input;
289 public function setInputStream(IntStream $input) : void
291 $this->input = null;
292 $this->tokenFactorySourcePair = new Pair($this, $this->input);
296 if (!$input instanceof CharStream) {
300 $this->input = $input;
301 $this->tokenFactorySourcePair = new Pair($this, $this->input);
342 if ($this->input === null) {
353 $this->input->getIndex(),
354 $this->input->getIndex() - 1,
405 if ($this->input === null) {
409 return $this->input->getIndex();
425 return $this->input === null ? '' : $this->interp->getText($this->input);
486 * Return a list of all Token objects in input char stream.
512 if ($this->input !== null && $this->input->LA(1) !== Token::EOF) {
515 $this->interp->consume($this->input);
518 $this->input->consume();
527 if ($this->input === null) {
530 $stop = $this->input->getIndex();
531 $text = $this->input->getText($start, $stop);