private function guardContextIsRegistered() { if (!$this->context instanceof ParserContext) { throw new RuntimeException('The parser context is not set. Please register it to the configurator!'); } }