Zach Laine
5bed6f9776
Make dependency on Boost.Preprocessor optional.
2020-09-19 21:37:45 -05:00
Zach Laine
113270d6f6
Remove dependency on Boost.Any.
2020-09-19 20:43:12 -05:00
Zach Laine
1ed37641e9
Remove dependency on the Spirit headers, via extensive copy/pasta.
2020-09-19 19:55:52 -05:00
Zach Laine
b88e33cc88
Fix narrowing conversion error.
2020-09-10 00:15:42 -05:00
Zach Laine
d8a323a5fb
Fix VC2019 test failures.
2020-09-09 23:42:04 -05:00
Zach Laine
3ac30663b4
Add support for C++17.
2020-09-09 02:45:19 -05:00
Zach Laine
93f4ab246a
Add an empty-input test that covers every parser.
...
Fixes #1 .
2020-09-09 02:45:17 -05:00
Zach Laine
32ebd38270
Exercise the sentinel code path for every parser; fix errors.
...
Fixes #3 .
2020-09-09 02:45:17 -05:00
Zach Laine
19d441743a
Fix the constraints on {callback_,}parse() when called with a pointer to a
...
null-terminated string.
2020-09-09 02:45:15 -05:00
Zach Laine
322bb32b2b
Warning mitigation.
2020-09-06 14:44:49 -05:00
Zach Laine
673fa56bc6
Remove hana::map as the implementation strategy for the parse context. Use a
...
plain ol' struct instead.
Fixes #13 .
2020-09-06 01:54:17 -05:00
Zach Laine
f616d38642
Drop support for hna::map as a calblacks parameter to parse(), and change the
...
passing of tags to callbacks from hana::type<tag> to just tag.
Fixes #5 .
2020-09-05 17:09:13 -05:00
Zach Laine
0348ed2b69
First draft of section on rules.
2020-09-05 01:49:16 -05:00
Zach Laine
24d3003352
Rework the tracing code quite a bit, to fill in gaps and correct misleading
...
output.
Fixes #11 .
2020-09-03 22:46:02 -05:00
Zach Laine
c8a0bab822
First draft of "The parse() API" section.
2020-09-03 00:56:59 -05:00
Zach Laine
711bc9e2b3
- eol_parser -> ws_parser
...
- ws_parser does all whitespace (according to the Unicode White_Space
property) or just eol, depending on parameterization.
- Add ws, a parser object that uses the all-whitespace mode of ws_parser.
- Fix an error in the constraints on *parse(); iterators over char8_t (and not
just pointers) now properly fall under the Unicode parsing path.
Fixes #4 .
2020-09-01 21:52:28 -05:00
Zach Laine
852559ce67
static_assert inside the prase() overloads that take an attr out-param that
...
the parser generates an attribute.
Fixes #2 .
2020-09-01 01:24:12 -05:00
Zach Laine
12c4f61a6b
Add ill_formed.hpp.
2020-09-01 01:10:28 -05:00
Zach Laine
fba753eecf
Finish the first draft of the attribute generation docs.
2020-08-31 22:02:39 -05:00
Zach Laine
ac29f85e15
Address TODOs in compile_attribute.cpp.
2020-08-31 22:02:39 -05:00
Zach Laine
07daa697f4
Make it an error to put eps in an or_parser anywhere but at the end.
...
Fixes #7 .
2020-08-31 22:02:37 -05:00
Zach Laine
9064d46641
Add a compile test that covers all the standalone parsers, and fix errors
...
related to deducing uses of the Unicode vs. non-Unicode parsing code paths.
2020-08-31 22:02:35 -05:00
Zach Laine
d1cfdbe41d
Flatten or and seq parsers fully.
2020-08-31 22:01:48 -05:00
Zach Laine
b33992719c
Add symbol parser example.
2020-08-30 18:06:50 -05:00
Zach Laine
bf6c5c605f
Add a test of code-point matching when using UTF-8.
2020-08-30 00:31:30 -05:00
Zach Laine
97c273e0c3
Replace a TODO in test/CMakeLists.txt with an indication of the "fix" for the
...
affected tests.
2020-08-29 21:09:50 -05:00
Zach Laine
950065b5d2
Range-parse overloads now indicated failure when the entire input is not
...
consumed.
2020-08-29 21:09:50 -05:00
Zach Laine
678f666785
Remove "skip_" from all parse function names, and reorder the parse API
...
functions for clarity. Also, drive-by cleanups in parser_{,api}.cpp.
2020-08-29 19:17:04 -05:00
Zach Laine
c2374adf12
Warning mitigation in test/.
2020-08-29 19:17:04 -05:00
Zach Laine
f96b6bb0ad
Trim all the YAML and JSON stuff, leaving only the parsing library.
2020-08-28 19:10:00 -05:00
Zach Laine
4b516b9047
Make parser::range a proper view (called "parser::view"), via
...
view_interface. Some drive-by grooming.
2020-08-28 19:09:58 -05:00
Zach Laine
46a2acd18d
Largish changes to get things going again after a long break:
...
- Update text and stl_interface files.
- Flesh out concepts constraints, using C++20 proper instead of cmcstl2.
Remove SFINAE constraints (though SFINAE may make a comback for C++17
support).
- Remove parser concept entirely. Matching parser_interface<...> should
suffice.
- Add CXX_STD to CMake files, a la text and stl_interfaces.
2020-08-28 19:09:45 -05:00
Zach Laine
03e01b9810
Add an API test for the parser API, using the new standalone CMake parser
...
library; fix errors.
2019-11-27 22:28:56 -06:00
Zach Laine
84eedfe4f9
detail::nope -> nope
2019-11-16 19:34:03 -06:00
Zach Laine
f39e309118
Add Windows-only support for std::wstring_view file names.
2019-11-16 14:06:18 -06:00
Zach Laine
89e08daec7
string_view -> range in the parse API.
2019-11-16 13:44:33 -06:00
Zach Laine
5f33a6a1e9
Upgrade to the latest version of Boost.Text transcoding code.
2019-11-16 08:14:30 -06:00
Zach Laine
f802b967da
boost::optional -> std::optional
2019-10-30 20:24:30 -05:00
Zach Laine
f3c33af01b
boost::variant -> std::variant
2019-10-30 20:12:23 -05:00
Zach Laine
b56461684b
Add yaml::value test.
2019-10-30 19:39:24 -05:00
Zach Laine
9f8c121731
Add json::value test.
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
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
489f8f69d9
Zach Laine -> T. Zachary Laine
2018-10-23 23:52:05 -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
a6a0826f22
Add bool_parser case to parser.cpp test.
2018-10-22 23:42:19 -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
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