Use PEG-correctness to improve REPL’s parse function.

In particular, the old version is equivalent to a new version that
omits the validity check. Can then get the translation to translate
the new “definition” rather than the old one.