public function rdfLiteral() { $value = null; $LANGTAG48 = null; $string47 = null; $iriRef49 = null; try { $this->pushFollow(self::$FOLLOW_string_in_rdfLiteral2838); $string47 = $this->string(); $this->state->_fsp--; $value = new Erfurt_Sparql_Query2_RDFLiteral($string47 != null ? $this->input->toStringBetweenTokens($string47->start, $string47->stop) : null, null, ""); // Sparql10.g:412:9: ( LANGTAG | ( REFERENCE iriRef ) )? $alt67 = 3; $alt67 = $this->dfa67->predict($this->input); switch ($alt67) { case 1: $LANGTAG48 = $this->match($this->input, $this->getToken('LANGTAG'), self::$FOLLOW_LANGTAG_in_rdfLiteral2852); $value->setLanguageTag($LANGTAG48 != null ? $LANGTAG48->getText() : null); break; case 2: $this->match($this->input, $this->getToken('REFERENCE'), self::$FOLLOW_REFERENCE_in_rdfLiteral2869); $this->pushFollow(self::$FOLLOW_iriRef_in_rdfLiteral2871); $iriRef49 = $this->iriRef(); $this->state->_fsp--; $value->setDatatype($iriRef49); break; } } catch (RecognitionException $re) { $this->reportError($re); $this->recover($this->input, $re); } catch (Exception $e) { throw $e; } return $value; }