grammar: generate code to create lexical analyser specification

Signed-off-by: Peter Williams <pwil3058@gmail.com>
bespoke: generate compilable code

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