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
9a958224e4
Remove mooted TODOs.
2024-12-07 21:57:53 -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
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
8f8791244a
Adapt symbol_parser for use in token_parsing.
...
See #202 .
2024-12-02 21:46:07 -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
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
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
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
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
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
7566dbdde1
Remove the pointer case from detail::make_input_range().
2024-11-29 16:29:55 -06:00
Zach Laine
298bae0058
Sketch in the printing implemetnation for token_parser.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
b6c1229c54
Reorganize the lexer-related header inclusion scheme slightly. lexer.hpp is
...
now required to come before parser.hpp.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
416607c954
Add token_parser::operator()(range) to support matchign against tokens that
...
producestring_views.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
e419ef2a60
Completely rethink the relationship among token_parser, token_spec_t, and
...
parser_interface. token_spec is now a variable template that generates a
parser_interface wrapping a token_parser, which parameterized on the
token_spec_t. This way, a single token_spec use can be used to specify how to
lex, and how to parse.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
f00f4dfa75
Initial, partial sketch of token_parser.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
358adf247a
Address the remaining non-documentation TODOs in the lexer header and tests.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
ee8ab13779
Extend the lexer tests, addressing some of the testing TODOs; fix errors.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
391bb2b5b0
Factor out a lot of the lexer.cpp tests into a separate file.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
6ed1152390
Switch from double to long double as token's floating point representation.
...
Therer's room for it, since it's in a union with a string_view anyway.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
bf336fb096
Add much longer lexing test; fix errors.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
63483cb284
Specify the true/false and number token_specs in the adobe lexer test code to
...
use a bool and a double as its value, repsectively, instead of a string_view.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
49213c428e
Change all the existing lex runs to compare their output against an expected
...
sequence of tokens.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
79f34ef252
Add support for an externally-supplied token cache.
...
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
cd9c7492dd
Add a range adaptor for token_view; token_view -> tokens_view. Break
...
detail::make_input_subrange() out into its own header for reuse.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
e5c101378b
Initial sketch of a lexer for Boost.Parser, based on using CTRE as an external
...
dependency. Lots of TODOs, somewhat thin testing, but the basics work.
See #202 .
2024-11-29 16:29:55 -06:00
Zach Laine
94a9daec40
Change the way that the pending operations are applied to symbol table
...
parsers. Instead of trying to find all of them at the start of the top-level
parse, they are recorded in the context, and then applied at the end of the
top-level parse. The previous technique did not work, simplt because the
top-level parse cannot see all the parser involded -- some are behind rule
firewalls, by design.
Related to #183 .
Fixes #204 .
2024-10-31 23:07:17 -05:00
Zach Laine
4344dd3f47
Remove mooted TODOs.
2024-10-31 23:07:17 -05:00
Zach Laine
1e64b6e416
Add insert/erase/clear operations on symbol tables for the current parse and
...
subsequent parses both. Add better tests for the added API and the previous
subset of the operations already present. Fix errors revealed by the tests.
Fixes #183 .
2024-10-03 17:56:00 -05:00
Zach Laine
23017af526
Remove support for direct use of null-terminated strings with the parser APIs.
...
Fixes #175 .
Fixes #190 .
2024-10-02 20:28:50 -05:00
Zach Laine
8f5b84ded5
Fix __clang__/__clang_major__ confusion when trying to define language feature
...
macros in terms of Clang major version number.
Fixes #168 .
2024-09-30 18:10:05 -05:00
Zach Laine
8accdd922f
Fix ignored USE_{A,UB}SAN in CMake files.
2024-09-30 18:08:09 -05:00
Zach Laine
71eeb36272
Remove the broken use of alias CTAD from the transcoding views.
...
Fixes #193 .
2024-09-30 18:06:46 -05:00
Zach Laine
7ae86c1a0c
Fix macro guard on s1_boost_variant2 tuple_aggregate test.
...
Fixes #179 .
2024-09-30 17:44:28 -05:00
Jannik Glückert
5864eee3be
fix CI clang warnings in tests
2024-04-01 15:58:58 -05:00
Zach Laine
d774edc0e6
Add the condition that BOOST_PARSER_USE_CONCEPTS is true to/in place of many
...
places that used __cpp_lib{concepts,ranges} previously. This is often
necessary when concepts are disabled, since the user might have a broken
implementation of concepts.
2024-03-31 19:55:28 -05:00
Zach Laine
5dce167bf9
Disable some of the compile tests that spuriously fail on older Apple Clangs.
2024-03-27 19:26:41 -05:00
Zach Laine
072a812bcc
Add <library>/boost/charconv//boost_charconv project requirement to the b2
...
build.
2024-03-27 02:30:05 -05:00
Tobias Loew
56d043b3a4
Add VS debugger output error_handler and trace support.
...
Fixes #124 .
2024-03-26 04:14:17 -05:00
Zach Laine
d34cc345bb
Add/update b2 build for docs and tests.
2024-03-24 22:29:10 -05:00
Zach Laine
d88e47cf17
Fix deficiencies in the CMake build:
...
- Clone minimal Boost dependencies so that the minimal Boost.Test header is
available.
- Add boostdep-generated CMake code to the top of the top-level
CMakeLists.txt.
Fixes #127 .
2024-03-24 22:29:10 -05:00
Zach Laine
8e39ad067b
Change tests from GTest to Boost.Test. Remove Goolge.{Test,Benchmark}.
...
Fixes #165 .
2024-03-24 22:29:10 -05:00
Zach Laine
abbab9017f
Address gaps in code coverage; fix a couple of small errors in the trace code.
2024-03-23 23:40:08 -05:00
Zach Laine
889be318f8
Add code coverage generation and reporting.
...
Fixes #146 .
2024-03-23 23:40:08 -05:00
Zach Laine
744fd1bdc0
Add diagnostic text to symbols, like that for rules.
...
Fixes #164 .
2024-03-20 03:18:09 -05:00