Releases: pest-parser/pest
v2.8.0
What's Changed
- debugger: add long versions of the commands as well as all of their prefixes by @alpaylan in #1062
- Debugger: Fix deadlock on Windows by @zaddach in #1072
- Debugger: Fix command parsing on the debugger prompt by @zaddach in #1074
- Debugger: Allow specification of several breakpoints from cmdline args by @zaddach in #1075
- debugger: fixed cli-parsing of id command by @Giftzwerg02 in #1089
- rm some compiler warnings by @yshavit in #1093
- new rule: PUSH_LITERAL by @yshavit in #1092
A new rule PUSH_LITERAL(...)
.
PUSH_LITERAL("a")
: This rule always matches and never consumes any input, and it pushes "a"
to the stack. The argument must be a literal.
Note
You need to enable the "grammar-extras"
feature as mentioned in the semantic versioning notes below in order to use this feature.
This new rule accomplishes the goals of #880 (in a slightly different way). Instead of PUSH_OTHER("-", " ")
, this is just PUSH_LITERAL(" ")
. If you wanted to match A and then push B, you just combine them via a sequence: "-" ~ PUSH_LITERAL(" ")
.
This can be used to generalize quoted strings to a pair of matching but non-equal delimiters. For example, many programming languages let you express strings using either double or single quotes, and don't require escaping of the other:
string = ${ PUSH( "\"" | "'") ~ quoted_char* ~ POP }
quoted_char = @{!PEEK ~ ANY } // simple version without escape sequences
// will parse "a'b" or 'a"b'
This happens to work because the starting and ending char are the same, but that's not always desirable. For example, we may want to allow strings to be delimited by either (
... )
or <
... >
, with similar rules as above, such that (a>)
and <a)>
are both valid.
With PUSH_LITERAL
, this becomes:
string = ${ quote_open ~ quoted_char* ~ POP }
quote_open = @{
( "(" ~ PUSH_LITERAL(")") )
| ( "<" ~ PUSH_LITERAL(">") )
}
quoted_char = @{!PEEK ~ ANY } // simple version without escape sequences
New Contributors
- @alpaylan made their first contribution in #1062
- @zaddach made their first contribution in #1072
- @Giftzwerg02 made their first contribution in #1089
- @yshavit made their first contribution in #1093
Full Changelog: v2.7.15...v2.8.0
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule
enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.8", features = ["grammar-extras"] }
pest_debugger v2.7.15
What's Changed
- debugger: add long versions of the commands as well as all of their prefixes by @alpaylan in #1062
- bump release toolchain for pest_debugger by @tomtau in #1063
- Debugger: Fix deadlock on Windows by @zaddach in #1072
- Debugger: Fix command parsing on the debugger prompt by @zaddach in #1074
- Debugger: Allow specification of several breakpoints from cmdline args by @zaddach in #1075
New Contributors
Full Changelog: v2.7.15...v2.7.15-debugger
v2.7.15
What's Changed
- Band-Aid: fix one of the left recursion bugs (fixes #1047) by @Tartasprint in #1048
- Update
thiserror
to version 2 by @MarkusPettersson98 in #1055
New Contributors
- @MarkusPettersson98 made their first contribution in #1055
Full Changelog: v2.7.14...v2.7.15
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule
enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.7", features = ["grammar-extras"] }
v2.7.14
What's Changed
- nit: fix minor typo in usage of it's vs its in the docs by @nlopes in #1043
- update unicode to version 16 by @tomtau in #1044
New Contributors
Full Changelog: v2.7.13...v2.7.14
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule
enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.7", features = ["grammar-extras"] }
v2.7.13
What's Changed
- feat: added upstream miette support by @prsabahrami in #1038
New Contributors
- @prsabahrami made their first contribution in #1038
Full Changelog: v2.7.12...v2.7.13
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule
enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.7", features = ["grammar-extras"] }
v2.7.12
What's Changed
- fix
pest_derive
without std under a workspace in Windows by @tomtau in #1034 - add validation for tags on silent rules (fixes #1035) by @tomtau in #1036
Full Changelog: v2.7.11...v2.7.12
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule
enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.7", features = ["grammar-extras"] }
v2.7.11
What's Changed
- Avoid computing line offsets after the last token by @wabain in #1023
- fix: Remove unnecessary qualification by @austriancoder in #1024
New Contributors
- @wabain made their first contribution in #1023
- @austriancoder made their first contribution in #1024
Full Changelog: v2.7.10...v2.7.11
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule
enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.7", features = ["grammar-extras"] }
v2.7.10
What's Changed
There was a performance regression in 2.7.9 due to the overhead from tracking for better error details. This is now disabled by default, but if you wish to use it, you can enable it via the pest::set_error_detail(true)
call (before your parsing code starts).
Full Changelog: v2.7.9...v2.7.10
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule
enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.7", features = ["grammar-extras"] }
v2.7.9
What's Changed
- fix: do not generate empty docstring for Rule by @sunng87 in #987
- feat: support better error reporting by @EmirVildanov in #965
- Remove unnecessary unsafe functions by @djkoloski in #998
New Contributors
- @djkoloski made their first contribution in #998
Full Changelog: v2.7.8...v2.7.9
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule
enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.7", features = ["grammar-extras"] }
v2.7.8
What's Changed
- bump toolchain to be able to install cargo-msrv by @tomtau in #973
- fix: DebuggerContest::load_XXX accepts impl AsRef instead of &PathBuf by @aatifsyed in #976
- ci: bump toolchain for check by @tomtau in #978
- feat: add sql grammar with pratt parser and tests by @EmirVildanov in #983
- fix: adjust tag association in optional and repeat expressions by @tomtau in #985
New Contributors
- @aatifsyed made their first contribution in #976
Full Changelog: v2.7.7...v2.7.8
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule
enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.7", features = ["grammar-extras"] }