since only `tokens` is actually mutable we can make that field mutable,
and hence not have to deal with `state ref`s, and only have a single
mutating function, i.e. `advance`.
Parser.parse now return list of statements or list of errors.
parsing continues until EOF, even when errors are found; but after the
first error the result can only be Error.
Also implemented Print and Expr statements.
now based around result; since each parsing step can emit at most one
error until synchronisation is triggered we can store the errors in the
result.
also state is now stored in a ref variable. the copy-and-update is more
pure, but really messes up the let* expression for the expr/error
results.