ruleIndex = $ruleIndex; $this->predIndex = $predIndex; $this->isCtxDependent = $isCtxDependent; } public function eval(Recognizer $parser, RuleContext $parserCallStack) : bool { $localctx = $this->isCtxDependent ? $parserCallStack : null; return $parser->sempred($localctx, $this->ruleIndex, $this->predIndex); } public function hashCode() : int { return Hasher::hash($this->ruleIndex, $this->predIndex, $this->isCtxDependent); } public function equals(object $other) : bool { if ($this === $other) { return true; } if (!$other instanceof self) { return false; } return $this->ruleIndex === $other->ruleIndex && $this->predIndex === $other->predIndex && $this->isCtxDependent === $other->isCtxDependent; } public function __toString() : string { return \sprintf('{%d:%d}?', $this->ruleIndex, $this->predIndex); } }