2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-28 07:22:29 +00:00
Commit Graph

106 Commits

Author SHA1 Message Date
Zach Laine
b56461684b Add yaml::value test. 2019-10-30 19:39:24 -05:00
Zach Laine
3bb0517391 Sketch in space-optimized yaml::value; fix constexpr-related build issues on
Clang.
2019-10-30 19:39:24 -05:00
Zach Laine
ee93a67f6c Cruft removal. 2019-10-29 23:28:40 -05:00
Zach Laine
9f8c121731 Add json::value test. 2019-10-29 23:28:40 -05:00
Zach Laine
d0135f445e Sketch in space-optimized json::value. 2019-10-29 23:28:40 -05:00
Zach Laine
af7f88b677 Make parse API 4x smaller by:
- making trace (formerly debug) mode a runtime parameter; and

- adding a with_error_handler() (a la with_globals()) fundiotn, and using that
  instead of passing an optional error_handler parameter to the parse
  functions.
2019-10-28 21:13:07 -05:00
Zach Laine
e7da42cff1 boost::parser::param -> boost::parser::_p 2019-10-28 19:19:04 -05:00
Zach Laine
9eec9a1660 Sketch the remaining Block Sequences rules. 2019-10-28 15:30:59 -05:00
Zach Laine
f1053eaa81 Add inline variable template for param<N> callables. 2019-10-27 21:05:35 -05:00
Zach Laine
ee6638a544 Add a TODO. 2019-10-27 16:10:13 -05:00
Zach Laine
65813d153d Comment typo. 2019-10-26 21:12:45 -05:00
Zach Laine
6af5a973b5 Ensure all attributes are initializes in parsers. 2018-11-05 10:17:20 -06:00
Zach Laine
5380b02b06 When making a locals_type object in rule_parser, construct it from the context
object if possible.
2018-10-28 13:59:49 -05:00
Zach Laine
5258fd84a5 Print "[[UNPRINTABLE]]" in yaml::value_impl::to_yaml() for un-YAML-able types. 2018-10-27 18:11:38 -05:00
Zach Laine
31580e74ba Fix missing AttribureType template param in parts of char_parser::operator(). 2018-10-26 17:45:01 -05:00
Zach Laine
3402e9f5f5 Set success to false if no or_parser alternative succeeds. 2018-10-26 17:45:01 -05:00
Zach Laine
c1ea9879b4 Copy attr_parser's attribute instead of moving it. 2018-10-26 17:45:01 -05:00
Zach Laine
1a05ee1c09 Add cu. 2018-10-26 01:05:52 -05:00
Zach Laine
bfcad8d415 Preserve the Attribute template parameter in char_parser::operator(). 2018-10-26 01:05:52 -05:00
Zach Laine
c375492e82 Add where_ to the context before evaluating eps predicates. 2018-10-25 23:45:27 -05:00
Zach Laine
ce5d6b5adb Add missing nope overloads of detail::append(). 2018-10-25 23:45:27 -05:00
Zach Laine
28cdcf3e82 Add find() and erase() to symbol parser. 2018-10-25 19:49:07 -05:00
Zach Laine
ce0c7fb789 Fix horrible operator|() copy pasta. 2018-10-25 19:47:22 -05:00
Zach Laine
d1401e6b56 symbol_parser::elements -> symbol_parser::initial_elements 2018-10-25 19:46:03 -05:00
Zach Laine
0d583b96b0 Add if_ and switch_, and tests for same. 2018-10-24 22:54:07 -05:00
Zach Laine
4d8239fa06 Add test of new lazy param handling; fix numerous errors. 2018-10-24 22:53:56 -05:00
Zach Laine
2ecfea23e5 Sketch in lazy parameter handling (e.g. for expected values of parsers). 2018-10-23 23:48:12 -05:00
Zach Laine
fde9ec9f20 Start the process of providing C++14 portability (by removing a couple of if
constexprs).
2018-10-23 20:30:50 -05:00
Zach Laine
1dbdbc1c79 Move excessive_nesting to a common header. 2018-10-23 20:28:52 -05:00
Zach Laine
461a19a175 Adjust detail::sequence_of_impl to make the implementation of
repeat_parser:call() simpler.
2018-10-23 20:27:17 -05:00
Zach Laine
d85ac10156 Use detail::trace_input() in write_formatted_message(). 2018-10-23 17:33:16 -05:00
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