Parses a "normal string". This method assumes that the first double quote has already been parsed.
@ignore
string $quote The type of quote to use (either ' or "):
protected function parseString($quote) {
$str = '';
while (true) {
$c = $this
->read();
if ($c == $quote) {
break;
}
elseif ($c == -1) {
throw new EasyRdf_Exception("Turtle Parse Error: unexpected end of file while reading string");
}
$str .= $c;
if ($c == '\\') {
// This escapes the next character, which might be a ' or a "
$c = $this
->read();
if ($c == -1) {
throw new EasyRdf_Exception("Turtle Parse Error: unexpected end of file while reading string");
}
$str .= $c;
}
}
return $str;
}