Parses an RDF value. This method parses uriref, qname, node ID, quoted literal, integer, double and boolean. @ignore
protected function parseValue() {
$c = $this
->peek();
if ($c == '<') {
// uriref, e.g. <foo://bar>
return $this
->parseURI();
}
elseif ($c == ':' || self::isPrefixStartChar($c)) {
// qname or boolean
return $this
->parseQNameOrBoolean();
}
elseif ($c == '_') {
// node ID, e.g. _:n1
return $this
->parseNodeID();
}
elseif ($c == '"' or $c == "'") {
// quoted literal, e.g. "foo" or """foo""" or 'foo' or '''foo'''
return $this
->parseQuotedLiteral($c);
}
elseif (ctype_digit($c) || $c == '.' || $c == '+' || $c == '-') {
// integer or double, e.g. 123 or 1.2e3
return $this
->parseNumber();
}
elseif ($c == -1) {
throw new EasyRdf_Exception("Turtle Parse Error: unexpected end of file while reading value");
}
else {
throw new EasyRdf_Exception("Turtle Parse Error: expected an RDF value here, found '{$c}'");
}
}