Input
We provide a structure [[Read]] that contains a modified form of the
input reader used on the Scheme interpreter.
It satisfies the signature:
<>=
signature READ = sig
datatype ipt = INT of int
| SYMBOL of string
| PARENS of ipt list
exception EOF
exception PrematureEOF of string
val prompt_read : string -> ipt list
val read : (unit -> string) -> string -> ipt list
end
@ %def prompt_read READ read ipt EOF PrematureEOF
You will want to use [[prompt_read]] to prompt for a move and
implement [[readmove]]. Be sure to handle the exceptions properly.