next up previous
Next: From a Regular Language Up: No Title Previous: Lexical Analysis / Syntactic


Assume you have

Write a function void readBinNumber() which reads a binary number.
\\ BinDigit~~\\ gt=~''0''~$\vert$~''1''.\end{program}

At the beginning the first character is already in ch. After the function returns, the first character after the binary number should be in ch.

Did the grammar for numbers help you in writing the function?

Christoph Zenger