def read_char(self, c: str) -> bool:
if self.read_eof():<EOL><INDENT>return False<EOL><DEDENT>self._stream.save_context()<EOL>if c == self._stream.peek_char:<EOL><INDENT>self._stream.incpos()<EOL>return self._stream.validate_context()<EOL><DEDENT>return self._stream.restore_context()<EOL>
Consume the c head byte, increment current index and return True
else return False. It use peekchar and it's the same as '' in BNF.