grammar.py and friends: Improve line numbers and headers

Line numbers of parsed input are now automatically maintained. More
needed data structures are now automatically created in the API header
file.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2017-11-03 12:54:19 +01:00
commit 3cba245b77
5 changed files with 76 additions and 71 deletions

View file

@ -2,6 +2,7 @@
[white_space[
type = token
lex_extra_action = "if memchr(yytext, '\n', yyleng) context->line++;"
regex = "[ \n\t\r]+"
]