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

198 Commits

Author SHA1 Message Date
Zach Laine
f391c40898 Clarify comment. 2020-09-06 21:35:32 -05:00
Zach Laine
71dddaf844 Make an unconditional eps in a repeat parser an error.
Fixes #10.
2020-09-06 15:08:53 -05:00
Zach Laine
312c71c776 Cruft removal. 2020-09-06 14:48:01 -05:00
Zach Laine
322bb32b2b Warning mitigation. 2020-09-06 14:44:49 -05:00
Zach Laine
af39bd8beb ADL audit.
Fixes #12.
2020-09-06 02:58:23 -05:00
Zach Laine
0b6d631e85 Grooming. 2020-09-06 01:54:17 -05:00
Zach Laine
f843b6aeb2 foo<>::value -> foo_v 2020-09-06 01:54:17 -05:00
Zach Laine
3d23c9d1d7 Use newly-added detail::is_nope_v throughout the implementation. 2020-09-06 01:54:17 -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
68e2c6daf8 Change detail::callback_skip_parse_impl() not to turn off the use of
callbacks.

Fixes #6.
2020-09-05 17:18: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
c6ae723be3 Move the UDLs to the end of parser.hpp. 2020-09-05 17:08:32 -05:00
Zach Laine
b23d2e5f6c Add a definition of none ("struct none{};"), even when
BOOST_PARSER_NO_RUNTIME_ASSERTIONS is defined.  Otherwise, even code that uses
none properly becomes ill-formed.
2020-09-05 13:45:03 -05:00
Zach Laine
2df1e72f20 Add additional overloads of parse() to fix overload resolution when using
{callback_,}rule as a skipper.
2020-09-05 01:49:16 -05:00
Zach Laine
71f316e243 Forward declare {callback_,}rule. 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
93ad65ad1f Add BOOST_PARSER_ASSERT(), and use it in place of several static_asserts.
Fixes #9.
2020-09-01 23:03:17 -05:00
Zach Laine
0a259038cf Fix broken reordering of concepts. 2020-09-01 22:53:56 -05:00
Zach Laine
3101a42a75 Add repeat() to the parsers in "The Parsers And Their Uses", and fix several
errors elsewhere in the docs.
2020-09-01 22:41:44 -05:00
Zach Laine
6b449dff0e Add concepts section to docs. 2020-09-01 22:17:33 -05:00
Zach Laine
442a17b5d6 Remove a rethought TODO. 2020-09-01 22:04:31 -05:00
Zach Laine
1f6e62c6fb First draft of "The Parsers And Their Uses" section. 2020-09-01 22:03:01 -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
4b77624f22 Bring detection.hpp into sync with Boost.Text. 2020-09-01 01:11:12 -05:00
Zach Laine
f5244bb547 Put the contents of detection.hpp in detail. 2020-08-31 23:07:19 -05:00
Zach Laine
53542cb69a assert -> BOOST_ASSERT 2020-08-31 22:08:17 -05:00
Zach Laine
fba753eecf Finish the first draft of the attribute generation docs. 2020-08-31 22:02:39 -05:00
Zach Laine
869a9fc003 detail::container -> container 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
cb8a7043a3 Make sure lit() and _l and _p UDLs all cover char, char8_t, and char32_t. 2020-08-31 22:02:33 -05:00
Zach Laine
af661a8b43 Suppress sign comparison warnings in detail::mismatch(). 2020-08-31 22:02:33 -05:00
Zach Laine
5a7924f614 Fix the char8_t stream insertion problem throughout the printing code. 2020-08-31 22:02:27 -05:00
Zach Laine
d1cfdbe41d Flatten or and seq parsers fully. 2020-08-31 22:01:48 -05:00
Zach Laine
fec67a1dd1 Hide some of the implementation details of parser_interface from Doxygen. 2020-08-31 22:01:48 -05:00
Zach Laine
1d90a9d621 Lots of doc updates:
- Add a rationale for parser::none.
- Add a section introducing essential terminology.
- Flesh out the semantic action example.
- Add a section describing the parse context and how it works.
- Remove numerous TODOs related to documentation addressed above.
2020-08-30 15:33:56 -05:00
Zach Laine
df8aaafc87 Move nope into detail, and add a user-facing replacement "none" with semantics
more appropriate for users.
2020-08-30 15:29:26 -05:00
Zach Laine
f8191db3f5 Remove a nonsensical TODO. 2020-08-30 11:41:40 -05:00
Zach Laine
e496cbb3a9 Accomodate printing of char8_t input strings to streams. 2020-08-30 00:31:30 -05:00
Zach Laine
b43e7a354c Move a TODO within parser.hpp. 2020-08-30 00:31:30 -05:00
Zach Laine
d592a38f1f Remove addressed TODO. 2020-08-30 00:31:30 -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
532b138c77 std::mismatch -> detail::mismatch for sentinel support. 2020-08-29 19:17:04 -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
7020a9a7b3 Move parser_interface Doxygen doc to parser_fwd.hpp. 2020-08-29 19:17:04 -05:00
Zach Laine
9d72b3d1fc Silence very verbose warnings about std::is_pod being deprecated, coming from
Boost.Hana.
2020-08-29 19:17:04 -05:00
Zach Laine
7e32012482 Regularize {int,float}_parser. They were returning incorrect success results
when no input was consumed, and float_parser was never setting the success
value.
2020-08-29 19:17:04 -05:00
Zach Laine
2e8861256d detail::make_input_range -> detail::make_input_view 2020-08-29 19:17:04 -05:00
Zach Laine
7b98b97615 R range -> R r 2020-08-29 19:17:04 -05:00