Zach Laine
e22eb76f13
Update docs.
2024-12-08 17:19:48 -06:00
Zach Laine
05327b94c4
Merge branch 'ctre' into ctre_doc
2024-12-08 17:19:00 -06:00
Zach Laine
c6d35e8791
Address TODOs about resolving the value used in detail::token_with_value, and
...
doing transcoding for the match in detail::token_with_string_view.
See #202 .
2024-12-08 17:16:15 -06:00
Zach Laine
ff1059695d
Complete initial pass on token parsing documentation.
...
See #202 .
2024-12-07 23:50:27 -06:00
Zach Laine
bd3695bb94
Restore old Jamfile.v2.
2024-12-07 22:17:39 -06:00
Zach Laine
9a958224e4
Remove mooted TODOs.
2024-12-07 21:57:53 -06:00
Zach Laine
0463ecb4f6
Add Doxygen comments to all normalize_iterators() overloads, and indicate
...
which error handling function apply this function to their inputs and which do
not.
See #202 .
2024-12-07 19:02:08 -06:00
Zach Laine
5c036a778a
Add lexer_and_parser_terminals.cpp, based on parser.cpp, to more fully
...
exercise the token parsing code; fix errors.
See #202 .
2024-12-07 18:40:08 -06:00
Zach Laine
c3667f5265
Add proper const/non-const interop to tokens_view::iterator.
...
See #202 .
2024-12-06 17:29:38 -06:00
Zach Laine
e2f015991c
Pull the single-character-fetching logic of the token parsing modes of the
...
character parsers out into a standalone detail:: function; use it in all the
character parsers.
See #202 .
2024-12-05 18:27:52 -06:00
Zach Laine
2b48b8656e
Fix behavior of tokens_view::iterator::base() in the non-common_range case.
...
See #202 .
2024-12-04 23:44:18 -06:00
Zach Laine
df966c78f6
Use a move instead of a copy in detail::make_parse_result().
2024-12-02 21:46:51 -06:00
Zach Laine
9733445118
Trim trailing null from array ranges adapted by the to_tokens range adaptor.
...
See #202 .
2024-12-02 21:46:51 -06:00
Zach Laine
b1c5c4b487
Add char to the set of types that can be used as token attributes.
...
See #202 .
2024-12-02 21:46:51 -06:00
Zach Laine
96824b2013
Add a TODO.
2024-12-02 21:46:51 -06:00
Zach Laine
19952581f0
Extend support for token parsing to the prefix*parse() API. Add tests for the
...
full set of *parse() functions that support token parsing; fix errors.
See #202 .
2024-12-02 21:46:36 -06:00
Zach Laine
06816abc62
Initial sketch of adapting lexeme and skip directives for use in token
...
parsing.
See #202 .
2024-12-02 21:46:15 -06:00
Zach Laine
8f8791244a
Adapt symbol_parser for use in token_parsing.
...
See #202 .
2024-12-02 21:46:07 -06:00
Zach Laine
05a110c54d
Initial sketch of adapting string_view_parser for use in token parsing.
...
See #202 .
2024-12-01 20:36:42 -06:00
Zach Laine
cafd04c391
Fix return statement on the wrong side of macro guard.
...
See #202 .
2024-12-01 20:27:27 -06:00
Zach Laine
3fd285c014
Correct memory safety issue in converting token iteratos to underlying
...
iterators.
See #202 .
2024-12-01 20:26:22 -06:00
Zach Laine
bc6e9e3447
Grooming.
2024-11-30 17:35:06 -06:00
Zach Laine
eab7e82988
Slight simplification of code trying to detect token iterators.
...
See #202 .
2024-11-30 17:24:05 -06:00
Zach Laine
655870000b
Remove a mootetd TODO.
2024-11-29 20:17:49 -06:00
Zach Laine
039453079e
Cruft removal.
2024-11-29 20:11:50 -06:00
Zach Laine
a908e950d5
Address TODO about removing detail::defulat_flags().
2024-11-29 20:10:46 -06:00
Zach Laine
87e00a173d
Add static_assert(std::integral<T> || std::floating_point<T>) to
...
detail::token_with_value, just in case.
See #202 .
2024-11-29 20:03:39 -06:00
Zach Laine
3176c6f823
Fix error detected in tests of token caching introduced in doc examples. Make
...
sure not to copy tokens_view within the *parse() call graph.
See #202 .
2024-11-29 20:00:28 -06:00
Zach Laine
92c4993b87
Documentation pass on the changes made so far to support token parsing.
...
See #202 .
2024-11-29 20:00:28 -06:00
Zach Laine
9d67b0df7f
Cruft removal.
2024-11-29 17:17:49 -06:00
Zach Laine
d4f4589ead
Add TODOs.
2024-11-29 16:29:55 -06:00
Zach Laine
178d62a250
Preclude skipper *parse() overloads from token parsing with a static_assert.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
e654c9fda7
Macro guard private members of tokens_view from inclusion in Doxygen reference
...
entry.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
9dbf30241d
Plumb a pointer to the tokens_view through to the parse context; change
...
seq_parser to use the tokens_view pointer from the contet to trim the cache at
an expectation point.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
f298bfe59b
Remove the support for token_view::iterator -> underlying iterator translation
...
in *parse_impl(); add support to the error handlers and their support
functions directly instead. There are simply too many APIs there that need
the translation to leave it to other code.
Add lex_error exception type, and add support for all the APIs that used to
take a parse_error param to now take either a parse_error or a lex_error.
Throw lex_error from failed parsing of lexed tokens in detail::make_token().
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
07cd667a91
Add TODOs.
2024-11-29 16:29:55 -06:00
Zach Laine
00510ed962
Add cases to tracing.cpp to cover the printing of token parsers; fix errors.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
1a5b7467ca
Add a TODO.
2024-11-29 16:29:55 -06:00
Zach Laine
13a52e10f9
Cruft removal.
2024-11-29 16:29:55 -06:00
Zach Laine
67c3ec180c
Add a smoke test for using token views as input to parse(); fix errors.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
8658f8cd6b
Unify the implementations of the callback parse() API.
2024-11-29 16:29:55 -06:00
Zach Laine
f69d7acdd9
Unify the implementations of the non-callback parse() API, to make it posible
...
for the new token parsingcode path to use that one unified implementation too.
The previous implementation dispatched like parse() -> prefix_parse(), the
latter of which is incompatible with token parsing.
2024-11-29 16:29:55 -06:00
Zach Laine
542bdb0e0e
Unify the detail::{skip_,}parse_impl overloads.
2024-11-29 16:29:55 -06:00
Zach Laine
f3e326e344
Unify the two detail::skip_parse_impl overloads.
2024-11-29 16:29:55 -06:00
Zach Laine
027d861b08
Unify the two detail::callback_*parse_impl overloads.
2024-11-29 16:29:55 -06:00
Zach Laine
6ab8f96e19
Unify the two detail::parse_impl overloads.
2024-11-29 16:29:55 -06:00
Zach Laine
2b518bc74d
Fix multiple thinkos in tokens_view.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
1421592876
Add a std::string data member, and an override of what() to parser_error, to
...
ensure that the messge is preserved exactly when translating exceptions in
failed lexer parsing.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
092a76173b
Change token<> to include the position of the start of the token in the
...
underlying sequence, and change the way that the error handler is invoked, so
that it detects token iterators, and passes iterators into the underlying
range to the error handler, instead of the token iterators.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
8830dfed02
Alter detail::make_input_subrange() to return its input unchanged when the
...
range's value type is a specializtion of token.
See #202 .
2024-11-29 16:29:55 -06:00