grammar: implement error recovery strategy

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

Signed-off-by: Peter Williams <pwil3058@gmail.com>
examples: modify skip definition to reflect new regex constraints

Signed-off-by: Peter Williams <pwil3058@gmail.com>
templates: fix segmentation fault in get_next_token()

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