protected readModeString ( Iodophor\Io\StringReader $reader ) | ||
$reader | Iodophor\Io\StringReader |
protected function readModeString(StringReader $reader)
{
$mode_string = '';
do {
$char = $reader->read(1);
if (is_numeric($char)) {
$mode_string .= $char;
} else {
if ($char != " ") {
throw new TreeParseException(sprintf("Expected either 0-9 or space character at position %d, 0x%x found", $reader->getOffset() - 1, ord($char)));
}
}
} while ($char != " ");
return $mode_string;
}