Suggestions for how to proceed are given at the end. The assignment is due before class on Tuesday April 3. The language is IMP modified as follows. Expression read is a function, in the C sense, which returns the next value of the input stream, and moved the input pointer one place forward. In if and while commands, the conditions are arithmetic expressions, using 0 for false and everything else for true.
Command write a writes the value of a on the output stream.
All variables must be declared before used. You must do the implementation using Java. Test your interpreter on the examples below and at least one more small example that does something more interesting. For each example, build a particular input stream for it too. For each example, turn in a printout of the example program and the input, output, and error streams.