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-19 06:25:32 -04:00
2018-10-21 19:55:09 +03:00
2018-08-27 22:10:38 -07:00
2018-10-12 10:10:06 -07:00
2018-10-12 08:22:44 -07:00
2018-09-10 16:26:49 -07:00
2017-12-06 02:23:47 +01:00
2018-09-11 17:25:00 -07:00
2018-09-10 16:26:49 -07:00
2018-10-11 16:22:27 -07:00
2018-10-06 19:47:06 -07:00
2017-05-31 21:53:00 -07:00
2018-09-01 11:31:18 -07:00
2018-07-18 02:09:15 +03:00
2016-04-04 22:33:58 -07:00
2018-04-24 17:54:08 -07:00
2017-04-29 13:32:55 -07:00
2018-10-08 23:06:09 +03:00
2017-04-29 13:32:55 -07:00
2018-10-09 21:04:23 -07:00
2018-08-11 11:14:22 -07:00
2018-09-28 15:06:00 -07:00
2018-08-23 14:41:01 -07:00
2018-10-15 20:57:25 -04:00
2018-08-23 05:16:38 -07:00
2018-05-24 08:34:14 -07:00
2018-05-14 10:13:39 -07:00
2017-05-04 10:50:15 -07:00
2017-05-04 10:50:15 -07:00
2018-08-27 22:10:38 -07:00
2018-10-23 08:06:17 +01:00
2018-10-23 08:06:17 +01:00
2018-08-15 16:11:39 -07:00
2018-06-17 06:53:13 +09:00
2018-10-23 08:06:17 +01:00
2018-10-14 15:57:14 -04:00
2018-10-07 17:50:51 +03:00
2017-04-29 13:32:55 -07:00
2018-10-13 21:41:41 -04:00
2018-10-23 08:06:17 +01:00
2018-10-21 19:55:09 +03:00
2018-10-11 16:25:02 -07:00
2018-10-11 16:25:02 -07:00
2018-10-10 06:27:21 -07:00
2018-09-29 15:23:25 -07:00
2018-08-23 05:21:08 -07:00
2018-01-31 14:47:26 +01:00
2018-02-17 19:38:52 -08:00
2017-04-29 13:32:55 -07:00
2018-09-28 15:06:00 -07:00
2018-09-28 15:06:00 -07:00
2018-04-09 11:29:43 -07:00
2018-04-09 11:29:43 -07:00
2018-08-23 05:16:38 -07:00
2018-08-23 05:16:38 -07:00
2017-04-29 13:32:55 -07:00
2017-04-29 13:32:55 -07:00
2018-06-24 20:31:14 +02:00
2018-06-24 20:31:14 +02:00
2018-09-10 16:26:49 -07:00
2018-09-10 16:26:49 -07:00
2018-10-21 19:55:09 +03:00
2018-10-21 19:55:09 +03:00
2018-07-28 15:31:25 -07:00
2018-07-28 15:31:25 -07:00
2018-10-23 08:06:17 +01:00
2018-10-04 07:37:28 +02:00
2018-09-28 15:06:00 -07:00
2018-10-23 08:06:17 +01:00
2018-10-23 08:06:17 +01:00
2018-10-23 08:06:17 +01:00
2018-08-27 22:10:38 -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
2018-10-08 00:10:29 +03:00
2018-10-06 19:47:06 -07:00
2018-10-21 19:55:09 +03:00
2018-09-24 18:51:21 +02: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
2017-04-29 13:32:55 -07:00
2018-05-14 10:13:39 -07:00
2018-10-23 08:06:17 +01: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-08-23 05:16:38 -07:00
2018-09-12 14:17:55 -07:00
2018-01-10 16:45:42 +01:00
2018-01-10 16:45:42 +01:00
2018-10-15 19:46:18 +02:00
2018-10-11 16:22:27 -07:00
2018-08-23 05:16:38 -07:00
2018-10-08 00:10:29 +03:00
2018-10-08 00:10:29 +03:00
2018-09-11 17:22:58 -07:00
2018-09-09 18:44:40 -07:00
2018-10-21 19:55:09 +03:00
2018-10-21 19:55:09 +03:00
2018-10-08 00:10:29 +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-10-08 00:10:29 +03:00
2016-04-04 22:33:58 -07:00
2016-04-04 22:33:58 -07:00
2018-05-30 21:47:07 -07:00
2018-10-07 17:50:51 +03:00
2018-10-07 17:50:51 +03:00
2017-04-29 13:32:55 -07:00
2018-05-14 10:13:39 -07:00
2018-05-14 10:13:39 -07:00
2018-09-25 15:58:17 +02:00
2017-11-25 07:41:09 -08:00
2017-05-27 11:07:20 -07:00
2017-04-29 13:32:55 -07:00
2018-10-13 21:41:41 -04:00
2018-10-13 21:41:41 -04:00
2017-04-29 13:32:55 -07:00
2018-10-06 19:47:06 -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
2018-08-27 22:10:38 -07:00
2017-04-29 13:32:55 -07:00
2016-04-04 22:33:58 -07:00
2018-07-28 15:31:25 -07:00
2018-07-28 15:31:25 -07:00
2017-04-29 13:32:55 -07:00
2018-09-03 13:29:03 -07:00
2018-07-30 13:55:23 -07:00
2018-07-30 13:55:23 -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-09-25 14:59:14 -07:00
2018-09-25 14:59:14 -07:00