parser generator: Remove unnecessary stuff

- We don't need no fancy ifs

Signed-off-by: Max Reitz <xanclic@niwohlos.org>
parser: Rename compound() to scope()

* compound() should not detect the compound around the given node, but
  the scope; this may be a non-compound node, therefore, rename it to
  scope()
+ Add scope_below() which is in some cases required by scope() itself

Signed-off-by: Max Reitz <xanclic@niwohlos.org>
Add asprintf() wrapper

+ Add a simple asprintf() wrapper which returns the string instead of
  storing it through a pointer parameter

Signed-off-by: Max Reitz <xanclic@niwohlos.org>
parser: Use throw format() for reporting errors

+ Much better this way.

Signed-off-by: Max Reitz <xanclic@niwohlos.org>
parser: Parse template parameters

+ At least, add them to the list of keywords etc.

Signed-off-by: Max Reitz <xanclic@niwohlos.org>
tokenizer: Use throw format() for reporting errors

+ Much better here as well

Signed-off-by: Max Reitz <xanclic@niwohlos.org>