Berthold Stoeger 138f27f65d Parser: make parser (mostly) reentrant
Introduce a parser_state structure, which describes (most) of the
global parser state. Create such a structure in the entry routines
to the parser and pass it down to the individual functions. The
parser state is initialized and freed with the init_parser_state()
and free_parser_state() functions.

The main benefits are:
1) Isolation of parser state.
2) Keeping the global name space tidy.
3) Prevent memory leaks which could happen in truncated files by
   freeing all the parser state after parse.

A somewhat controversial point might be that the individual
parsing functions are split in those that need parser-state and
those that don't. This means that there are now two versions of
the MATCH macro, viz. one for the former and one for the latter.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-23 08:06:17 +01:00
..
2018-10-06 19:47:06 -07:00
2018-07-18 02:09:15 +03:00
2018-10-23 08:06:17 +01:00
2018-10-23 08:06:17 +01:00
2018-10-21 19:55:09 +03:00
2018-01-31 14:47:26 +01:00
2017-04-29 13:32:55 -07:00
2018-08-23 05:16:38 -07:00
2018-10-21 19:55:09 +03:00
2018-10-21 19:55:09 +03:00
2018-10-21 19:55:09 +03:00
2018-10-21 19:55:09 +03:00
2018-10-21 19:55:09 +03:00
2018-10-21 19:55:09 +03:00
2018-10-23 08:06:17 +01:00
2018-10-23 08:06:17 +01:00
2018-08-23 05:16:38 -07:00
2018-10-21 19:55:09 +03:00
2018-10-21 19:55:09 +03:00
2018-10-21 19:55:09 +03:00
2018-10-21 19:55:09 +03:00
2017-04-29 13:32:55 -07:00
2018-10-21 19:55:09 +03:00
2018-05-30 21:47:07 -07:00
2017-04-29 13:32:55 -07:00
2017-04-29 13:32:55 -07:00
2018-10-21 19:55:09 +03:00
2017-04-29 13:32:55 -07:00
2018-10-21 19:55:09 +03:00