Verifies that the supplied character $c is one of the expected characters specified in $expected. This method will throw a exception if this is not the case. @ignore
protected function verifyCharacter($c, $expected) {
if ($c == -1) {
throw new EasyRdf_Exception("Turtle Parse Error: unexpected end of file");
}
elseif (strpbrk($c, $expected) === false) {
$msg = 'expected ';
for ($i = 0; $i < strlen($expected); $i++) {
if ($i > 0) {
$msg .= " or ";
}
$msg .= '\'' . $expected[$i] . '\'';
}
$msg .= ", found '{$c}'";
throw new EasyRdf_Exception("Turtle Parse Error: {$msg}");
}
}