parser: move recording of last error recovery state into ParseStack

Signed-off-by: Peter Williams <pwil3058@gmail.com>
parser: move error recovery code inside the main switch statement.

Previous modifications enable the error recovery code to be sufficiently
concise for inclusion in the main switch statement.  The whole parse
process is now in the one place making it easier to understand.

Signed-off-by: Peter Williams <pwil3058@gmail.com>
parser: remove all external references to ParseStack internals

Signed-off-by: Peter Williams <pwil3058@gmail.com>
parser: create DDTokenStream as wrapper around lexical analyser

Signed-off-by: Peter Williams <pwil3058@gmail.com>
parser: get rid of class DDParser in favour of a single function

Generating the DDParser class unnecessarily complicates use of the
generated parser so it is now replaced by a single function.

Signed-off-by: Peter Williams <pwil3058@gmail.com>