Tidy parser generator and generated code.

See #202.
See #183.
See #181.