Lines Matching defs:context

189                 $this->context()->addErrorNode($this->createErrorNode($this->context(), $t));
228 $this->context()->addErrorNode($this->createErrorNode($this->context(), $t));
242 * upwards. When a rule exits, it returns the context but that gets garbage
344 $listener->enterEveryRule($this->context());
345 $this->context()->enterRule($listener);
359 $this->context()->exitRule($listener);
360 $listener->exitEveryRule($this->context());
526 $node = $this->context()->addErrorNode($this->createErrorNode($this->context(), $o));
534 $node = $this->context()->addTerminalNode($this->createTerminalNode($this->context(), $o));
569 $parent = $this->context()->getParent();
575 // add current context to parent if we have a parent
577 $parent->addChild($this->context());
583 * {@see Parser::$ctx} get the current context.
589 $this->context()->start = $this->tokenStream()->LT(1);
602 $this->context()->stop = $this->tokenStream()->LT(1); // LT(1) will be end of file
604 $this->context()->stop = $this->tokenStream()->LT(-1); // stop node is what we just matched
610 $this->setState($this->context()->invokingState);
612 $parent = $this->context()->getParent();
627 $parent = $this->context()->getParent();
642 * if the parser context is not nested within a precedence rule.
654 $this->context()->start = $this->tokenStream()->LT(1);
662 * Make the current context the child of the incoming `localctx`.
666 $previous = $this->context();
672 $this->context()->start = $previous->start;
675 $this->context()->addChild($previous);
685 $this->context()->stop = $this->tokenStream()->LT(-1);
686 $retctx = $this->context(); // save current ctx (return value)
693 $parent = $this->context()->getParent();
696 throw new \RuntimeException('Unexpected context type.');
733 private function context() : ParserRuleContext
736 throw new \RuntimeException('The current context is null.');
744 return $this->getRuleNames()[$this->context()->getRuleIndex()] ?? '';
757 public function inContext(string $context) : bool
766 * implemented such that the complete context-sensitive follow set does not
819 * state and context, as given by {@see #getState} and {@see #getContext},