2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-26 18:52:23 +00:00
Commit Graph

75 Commits

Author SHA1 Message Date
Zach Laine
515896d424 Add a test of the new paramerized rule system; fix an error. 2018-10-23 17:33:16 -05:00
Zach Laine
08a902b3d3 Get serious about printing and parser names. 2018-10-23 17:33:16 -05:00
Zach Laine
8a02ba7151 Remove testing-only header inclusions. 2018-10-23 17:33:16 -05:00
Zach Laine
985d0a1833 Sketch in initial support for parameterized rules. 2018-10-23 00:42:38 -05:00
Zach Laine
3d5f863547 Merge the implementations of debug_*parse() and *parse(). 2018-10-22 23:43:00 -05:00
Zach Laine
d57e163fe2 Remove a TODO I just don't care to implement. 2018-10-22 23:43:00 -05:00
Zach Laine
410cc05622 Automagically transcode 4-byte integral values to UTF-8 when appending them
into containers of 1-byte integral values.
2018-10-22 23:43:00 -05:00
Zach Laine
de27c0009b Grooming. 2018-10-22 23:42:19 -05:00
Zach Laine
a6a0826f22 Add bool_parser case to parser.cpp test. 2018-10-22 23:42:19 -05:00
Zach Laine
5b8c0ac658 Inverse the order of the sub-parsers in the parser returned from operator-(). 2018-10-22 16:46:33 -05:00
Zach Laine
a3c3956e60 Don't advance the parse position when evaluating expect_parser. 2018-10-22 16:46:33 -05:00
Zach Laine
c1a6a3da5c Turn off trace in the skip parser. 2018-10-22 16:46:33 -05:00
Zach Laine
6d80848c83 Fix numerous errors in debug trace. 2018-10-22 16:46:33 -05:00
Zach Laine
615ce5a2bc Get rid of the use of mutable in parser_interface. 2018-10-22 16:46:33 -05:00
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