2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-28 19:32:12 +00:00
Commit Graph

311 Commits

Author SHA1 Message Date
Zach Laine
0e6eeefa9b Fix lack of attribute production in rule_parser. 2018-10-22 16:46:33 -05:00
Zach Laine
3150ae2b2b Make parser_interface::globals_ mutable. 2018-10-21 20:21:39 -05:00
Zach Laine
5631c57eac Change rule_parser's handling of given attributes so that the parser always
produces results in its attribute type; also regularize the modification of
contexts for use in rules.
2018-10-21 20:21:39 -05:00
Zach Laine
e3e6178750 Add AttributeType template parameter to char_parser, and create a cp parser
that produces uint32_t code points when parseing.
2018-10-21 20:19:49 -05:00
Zach Laine
fcf22a9299 Fix parser/parser_interface confusion in {or,seq}_parser::{pre,ap}pend(). 2018-10-21 20:19:49 -05:00
Zach Laine
b3fbb13c8c Warning mitigation. 2018-10-21 20:19:49 -05:00
Zach Laine
de9dd2aeaa Initial steps toward rewriting the JSON parser using the new parsers. 2018-10-21 20:19:49 -05:00
Zach Laine
12e9941b9f Add initializer list ctor to symbol_parser. 2018-10-19 20:31:59 -05:00
Zach Laine
c7d9dc38c6 Make symbol_parser concurrency-safe to use from different calls to *parse() on
different threads.
2018-10-19 19:49:17 -05:00
Zach Laine
f8758279a6 Minor corrections to new callback_*parse() overloads. 2018-10-19 16:19:56 -05:00
Zach Laine
87a8b86450 In write_formatted_message(), transcode the characters begin parsed to UTF-8
if they are 4 bytes wide.
2018-10-19 01:54:39 -05:00
Zach Laine
3aac783330 Use code points, not chars, to limit how much of the input to print in
debugging traces.
2018-10-19 01:53:11 -05:00
Zach Laine
8fbf96811e Treat the expected value of string_parser as UTF-8 (and transcode) when
parsing a stream of 4-byte valeus.
2018-10-19 01:32:21 -05:00
Zach Laine
f378a55e08 Treat the chars in a char_("...") parser as UTF-8 (and transcode) when parsing
a stream of 4-byte values.
2018-10-19 01:18:49 -05:00
Zach Laine
08225429e9 Treat the string_view parameter to symbols::add() as UTF-8, and transcode it
to UTF-32 before insertion into the underlying trie.
2018-10-19 01:12:21 -05:00
Zach Laine
d4bc212b6c Add printing support for symbol_parser. 2018-10-19 00:12:26 -05:00
Zach Laine
cf0ff4c312 Add missing callback_parse() overloads. 2018-10-19 00:08:12 -05:00
Zach Laine
6dafeacf95 Add with_globals(). 2018-10-18 22:31:50 -05:00
Zach Laine
028cc35ad9 Remove mooted TODO. 2018-10-18 22:09:49 -05:00
Zach Laine
28faab7839 Sketch in a symbol parser. 2018-10-18 21:42:07 -05:00
Zach Laine
da64c7b52b Change callback rules to behave as normal rules when not used within
callback_*parse().
2018-10-18 20:56:52 -05:00
Zach Laine
d07dfa203c Get serious about covering all cases of assignment from nopes in parsers; add
no-attribute case support to callback rule_parser.
2018-10-18 20:56:49 -05:00
Zach Laine
ea0440f6fa Add plumbing to enable unification of the use of regular and callback rules. 2018-10-18 20:56:45 -05:00
Zach Laine
3c2c99ae73 Add callback_parse() and callback_rule. 2018-10-17 20:18:58 -05:00
Zach Laine
da5596d05f Add TODOs. 2018-10-17 00:37:35 -05:00
Zach Laine
4b9ac8073a Add parser_action test. 2018-10-17 00:19:24 -05:00
Zach Laine
1bbda8ea17 Fix more errors in generated parser tests. 2018-10-17 00:14:22 -05:00
Zach Laine
ce53bf1d41 Fix errors in seq_parser::combine and the associated logic in the parser test
generation.
2018-10-15 17:33:11 -05:00
Zach Laine
09ed907c75 Add test for rules; fix errors. 2018-10-15 00:12:07 -05:00
Zach Laine
7570418d5a Add passing and failing parses to generated test files; fix errors. 2018-10-14 17:22:45 -05:00
Zach Laine
d4266b464e Add generation of expected type to the generated parser tests; fix errors. 2018-10-14 14:40:11 -05:00
Zach Laine
038ce0a910 Add parser_name() overloads for newest parsers. 2018-10-13 22:53:27 -05:00
Zach Laine
d6934eb3af Generate attribute test cases; fix errors. 2018-10-13 21:12:12 -05:00
Zach Laine
477f95d494 Add tests of paren-grouped ors and seq. 2018-10-11 22:29:11 -05:00
Zach Laine
f5430affba Add or_parser compile tests; fix errors. 2018-10-11 21:59:45 -05:00
Zach Laine
1cc3e53a44 Add seq_parser compile tests; fix errors. 2018-10-11 01:01:11 -05:00
Zach Laine
290cfa550b Initial add of a parser to use instead of Spirit. 2018-10-10 19:34:23 -05:00
Zach Laine
0fdf259c0c Sketch in a lot more of the new X3 YAML parser. 2018-10-01 21:46:05 -05:00
Zach Laine
6d8606cd80 Add the start of a Spirit X3-based parser for YAML. 2018-10-01 00:36:54 -05:00
Zach Laine
f48336c2a8 Major refactor of the JSON value code for better reuse; introduce a sketch of a similarly-designed YAML value. 2018-09-29 19:08:26 -05:00
Zach Laine
1a67c5d94f Add hashing of json::value. 2018-09-29 12:05:40 -05:00
Zach Laine
4f0c270483 Regular null_t. 2018-09-29 12:05:40 -05:00
Zach Laine
bf75157cd3 Add a TODO. 2018-09-29 12:05:40 -05:00
Zach Laine
6feae9fdca Fix misplaced lexeme[] directive in JSON string parsing. 2018-09-29 12:05:40 -05:00
Zach Laine
2bdda1d54a Allow exceptions to escape from scoped_multipart_error_t's dtor. 2018-09-28 19:27:39 -05:00
Zach Laine
1cc351aa29 Add a limit on the number of open arrays and/or object to prevent stack
overflows.
2018-09-28 00:09:17 -05:00
Zach Laine
0d5af80dbe Switch the JSON parsing tests to use the new JSON parser; tighten up number
parsing in same.
2018-09-28 00:08:11 -05:00
Zach Laine
9240f9d124 Stylistic changeds to x3_error_reporting, including its output. 2018-09-27 20:29:16 -05:00
Zach Laine
c5eb6f9eef Remove position cache from x3_error_handler. 2018-09-27 20:29:16 -05:00
Zach Laine
5be1c00730 Emit parse errors via callback instead of just dumping them to the console. 2018-09-27 20:29:16 -05:00