Releases: foonathan/lexy
Releases Β· foonathan/lexy
Release 2022.12.1
- Add constructor to
lexy::input_location
. lexy::error_context::production
will not be a transparent production.- Fix
lexy::production_info::operator==
when the compiler doesn't merge string literals. - Fix SWAR matching of
dsl::ascii::print
anddsl::ascii::graph
. - Fix CMake target installation (#108).
New Contributors
Full Changelog: v2022.12.0...v2022.12.1
Release 2022.12.0
Headline: Unicode 15 support, ability to split a grammar into multiple translation units using lexy::dsl::subgrammar
, and significant performance improvements.
Potential breaking changes
- Change [
lexy::dsl::peek_not()
error recovery behavior:
it will now consume the input it matched to recover, which is more useful. - Remove
Production
parameter fromlexy::error_context
.
It is replaced by a type-erasedlexy::production_info
. lexy::validate
,lexy::parse
, andlexy::parse_as_tree
now type-erase generic error tags prior to invoking the callback.- Use type-erased
lexy::production_info
instead ofProduction
type inlexy::parse_tree
.
This is technically a breaking change, as it may affect overload resolution.
New features
- Update Unicode database to Unicode 15.
- Use SWAR (SIMD within a register) techniques to optimize token parsing.
- Add
lexy::dsl::subgrammar
to split a grammar into multiple translation units. - Add
lexy::dsl::flags
andlexy::dsl::flag
to parse enum flags. - Add overload of
lexy::dsl::position
that parses a rule.
This allows using it as branch conditions. - Add
lexy::dsl::effect
to trigger side-effects during parsing. - Add
lexy::subexpression_production
to parse a subexpression. - Add
lexy::utf8_char_encoding
. - Add
lexy::parse_tree::remaining_input()
and populate it bylexy::parse_as_tree
. - Add
lexy::make_buffer_from_input
function. - Add type-erased version of
lexy::error
. - Support non-
const
parse state.
Bugfixes
- Fix bug where
lexy::bind
callback does not forward rvalue arguments; they got turned into lvalues instead. - Fix bug where callback composition was not allowed if the final callback returns
void
. - Fix bug where
dsl::quoted(cc.error<foo>)
did not usefoo
as the error.
New Contributors
- @Xottab-DUTY made their first contribution in #92
Full Changelog: v2022.05.1...v2022.12.0
Release 2022.05.1
- Change
dsl::scan
: it will now be invoked with the previously produced values. - Add
dsl::parse_as
to ensure that a rule always produces a value (e.g. when combined with thedsl::scan
change above). - Add
lexy::lexeme_input
to support multi-pass parsing. - Turn
dsl::terminator(term)(branch)
into a branch rule, as opposed to being a plain rule (#74). - Add
dsl::ignore_trailing_sep()
separator. - Add
lexy::bounded<T, Max>
for bounded integer parsing (#72). - Add
dsl::code_unit_id
rule. - Turn
lexy::forward<void>
into a sink. - Support references in
lexy::parse_result
andlexy::scan_result
- Fix bug that prevented
lexy::parse
with a root production whose value isvoid
. - Fix bug that caused infinite template instantiations for recursive scans.
- Fix bug that didn't skip whitespace in
lexy::scanner
for token productions.
Release 2022.05.0-beta
Initial release.