NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #367 most downloaded on crates.io
The Elegant Parser
Latest stable
2.9.6
Last release 12 days ago
10 Nov 2026
Release timing varies
gaps range from 2 weeks to 5 months
Most releases are documented
notes for 48 of the last 60 stable releases
6 versions withdrawn
withdrawn after publishing
11 years old
99 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
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…
Full Changelog: v2.9.5...v2.9.6
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.9", features = ["grammar-extras"] }
pest 2.9.3 and 2.9.4 required a stacker dependency which relies on a C compiler toolchain; this was made optional for non-native targets and can be opt-in enabled with the feature flag in those targets (see native stack guard notes in README):
...
pest = { version = "2.9.5", features = ["stack-guard"] }
Your coding agent can read these notes before it upgrades. Set up the MCP server →
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…
Full Changelog: v2.9.4...v2.9.5
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.9", features = ["grammar-extras"] }
pest 2.9.3 and 2.9.4 required a stacker dependency which relies on a C compiler toolchain; this was made optional for non-native targets and can be opt-in enabled with the feature flag in those targets (see native stack guard notes in README):
...
pest = { version = "2.9.5", features = ["stack-guard"] }
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…
Full Changelog: v2.9.3...v2.9.4
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.9", features = ["grammar-extras"] }
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…
Full Changelog: v2.9.2...v2.9.3
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.9", features = ["grammar-extras"] }
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…
Full Changelog: v2.9.1...v2.9.2
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.9", features = ["grammar-extras"] }
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…
Full Changelog: v2.9.0...v2.9.1
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.9", features = ["grammar-extras"] }
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…
Full Changelog: v2.8.8...v2.9.0
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.9", features = ["grammar-extras"] }
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…
Full Changelog: v2.8.7...v2.8.8
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"] }
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…
grammar.rs in tree by @konstin in #1159Full Changelog: v2.8.6...v2.8.7
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"] }
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…
Full Changelog: v2.8.5...v2.8.6
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.8.4...v2.8.5
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.8.3...v2.8.4
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"] }
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…
thiserror for a manual impl by @CosmicHorrorDev in https://github.com/pest-parser/pest/pull/1120Full Changelog: https://github.com/pest-parser/pest/compare/v2.8.2...v2.8.3
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"] }
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…
Pair::as_span by @jieyouxu in https://github.com/pest-parser/pest/pull/1112Full Changelog: https://github.com/pest-parser/pest/compare/v2.8.1...v2.8.2
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"] }
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…
The Minimum Supported Rust Version (MSRV) for default features is 1.80.0 now.
Full Changelog: https://github.com/pest-parser/pest/compare/v2.8.0...v2.8.1
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"] }
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…
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 pest-parser/pest#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
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.15...v2.8.0
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"] }
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…
thiserror to version 2 by @MarkusPettersson98 in https://github.com/pest-parser/pest/pull/1055Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.14...v2.7.15
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.13...v2.7.14
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.12...v2.7.13
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"] }
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…
pest_derive without std under a workspace in Windows by @tomtau in https://github.com/pest-parser/pest/pull/1034Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.11...v2.7.12
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.10...v2.7.11
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"] }
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…
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: https://github.com/pest-parser/pest/compare/v2.7.9...v2.7.10
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.8...v2.7.9
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.7...v2.7.8
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.6...v2.7.7
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.5...v2.7.6
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.4...v2.7.5
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.3...v2.7.4
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"] }
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.2...v2.7.3
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"] }
We started a new discussion thread to brainstorm ideas for pest3, both in terms of breaking grammar and API changes. You can check it out here: https://github.com/pest-parser/pest/discussions/885
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…
Cow module paths by @veeenu in https://github.com/pest-parser/pest/pull/900match_range by @LeoDog896 in https://github.com/pest-parser/pest/pull/906Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.1...v2.7.2
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"] }
We started a new discussion thread to brainstorm ideas for pest3, both in terms of breaking grammar and API changes. You can check it out here: https://github.com/pest-parser/pest/discussions/885
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.7.0...v2.7.1
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"] }
We started a new discussion thread to brainstorm ideas for pest3, both in terms of breaking grammar and API changes. You can check it out here: https://github.com/pest-parser/pest/discussions/885
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.6.1...v2.7.0
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"] }
Note that MSRV was increased to 1.60 in pest 2.7.0.
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…
Full Changelog: https://github.com/pest-parser/pest/compare/v2.6.0...v2.6.1
pest v2.6.1 contains a patch for the longstanding problem that pest couldn't be used as a git dependency due to the bootstrapping process. It should be possible now with a special feature flag as follows:
pest = { git = "https://github.com/.../pest.git", rev = "..." }
pest_derive = { git = "https://github.com/.../pest.git", rev = "...", features = ["not-bootstrap-in-src"]}
Note that the compilation time will be higher due to the cargo library dependency. If that becomes an issue, you can still use the old workarounds, e.g. cloning the repo, running cargo bootstrap there and specifying the dependency as a path to the locally cloned repo instead of git.
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 is a known issue and will be fixed in the future (e.g. by increasing MSRV and non_exhaustive annotations).
If you face a dependency problem where Cargo mixes different versions of pest due to transitive dependencies: https://github.com/pest-parser/pest/issues/849#issuecomment-1525505256 you can try adding the older pest to explicitly force it as follows:
pest = { version = "=2.5.6" }
Note that the node tag feature in 2.6.0 is a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the…
node_tag, iterator, and meta grammar by @tomtau in https://github.com/pest-parser/pest/pull/832//!, /// or //, allow writing empty pest grammar. by @huacnlee in https://github.com/pest-parser/pest/pull/839ExactSizeIterator for Pair iterators by @MucTepDayH16 in https://github.com/pest-parser/pest/pull/833Full Changelog: https://github.com/pest-parser/pest/compare/v2.5.7...v2.6.0
pest v2.6.0's grammar includes a new (optional) feature for labelling parts of rules (based on this idea posted by @oovm : https://github.com/pest-parser/pest/discussions/550 ), e.g.:
add = {#lhs = expr ~ "+" ~ #rhs = epxr}
This feature can help to distinguish tokens by labels instead of positions (which can help to reduce boilerplate code). You can read more about it here: https://pest.rs/book/grammars/syntax.html#tags
Note that the node tag feature in 2.6.0 is 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 is a known issue and will be fixed in the future (e.g. by increasing MSRV and non_exhaustive annotations).
Fixup lifetimes of PrattParser by @matanui159 in https://github.com/pest-parser/pest/pull/824
Full Changelog: https://github.com/pest-parser/pest/compare/v2.5.6...v2.5.7
Fix multiple grammars not always recompile issue #789 by @huacnlee in https://github.com/pest-parser/pest/pull/790
//// parsing error. by @huacnlee in https://github.com/pest-parser/pest/pull/818Full Changelog: https://github.com/pest-parser/pest/compare/v2.5.5...v2.5.6
Thanks to the great work of @huacnlee , @Jamalam360 and others, the new version of pest_fmt was published and the Visual Studio Code extension for pest was released on the Marketplace: https://marketplace.visualstudio.com/items?itemName=pest.pest-ide-tools
Note that the rustdoc support in 2.5.4: https://github.com/pest-parser/pest/pull/765 was a semver-breaking change even though it was a backwards-compa…
Rule::line_doc for fix #781 "already defined" error. by @huacnlee in https://github.com/pest-parser/pest/pull/782LineIndex instead of Pairs::move_cursor for improve Pairs::next and Pair::line_col performance. by @huacnlee in https://github.com/pest-parser/pest/pull/785Full Changelog: https://github.com/pest-parser/pest/compare/v2.5.4...v2.5.5
The "fast-col-line" feature was removed, because it's superseded by the line_col method on Pairs (which has a better or similar performance): https://github.com/pest-parser/pest/pull/785#issuecomment-1413604569
Note that the rustdoc support in 2.5.4: https://github.com/pest-parser/pest/pull/765 was a semver-breaking change even though it was 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 is a known issue and will be fixed in the future (e.g. by increasing MSRV and non_exhaustive annotations).
Fix incorrect col calculate for pair.line_col method, and add integration test for cover it. by @huacnlee in https://github.com/pest-parser/pest/pull/
col calculate for pair.line_col method, and add integration test for cover it. by @huacnlee in https://github.com/pest-parser/pest/pull/768#[default] compile error. by @huacnlee in https://github.com/pest-parser/pest/pull/770/// and //! syntax for add doc comment for rules. by @huacnlee in https://github.com/pest-parser/pest/pull/765Full Changelog: https://github.com/pest-parser/pest/compare/v2.5.3...v2.5.4
Improve line, col calculate performance by use move cursor on Pairs Iterator. by @huacnlee in https://github.com/pest-parser/pest/pull/754
Full Changelog: https://github.com/pest-parser/pest/compare/v2.5.2...v2.5.3
Allow use of rust keywords as pest rules by @DvvCz in https://github.com/pest-parser/pest/pull/750
Full Changelog: https://github.com/pest-parser/pest/compare/v2.5.1...v2.5.2
Fix unexpected argument panic in pest_debugger by @dffdff2423 in https://github.com/pest-parser/pest/pull/740
pest_debugger by @dffdff2423 in https://github.com/pest-parser/pest/pull/740skip_until using SIMD memchr by @tomtau in https://github.com/pest-parser/pest/pull/745
it can be enabled by using the memchr feature.Full Changelog: https://github.com/pest-parser/pest/compare/v2.5.0...v2.5.1
We found out that, in addition to a breaking change in `pest` that was reverted, there were a few breaking changes in pest_meta in v2.2.0:
pest_debugger crate (fixes #98) by @dragostis and @tomtau in https://github.com/pest-parser/pest/pull/736Full Changelog: https://github.com/pest-parser/pest/compare/v2.4.1...v2.5.0
pest_metaWe found out that, in addition to a breaking change in pest that was reverted, there were a few breaking changes in pest_meta in v2.2.0:
pest_meta::validator::validate_undefined now takes 2 parameters instead of 3,pest_meta::validator::validate_pest_keywords now takes 1 parameter instead of 2,pest_meta::validator::validate_rust_keywords now takes 1 parameter instead of 2.Given pest_meta is primarily used within pest's own crates[^1] and no one opened an issue regarding these breaking changes, we decided not to revert the post-2.2.0 releases and keep those functions as they are now in 2.5.0[^2].
Having said that, we now have a CI action to check for semantic versioning, so we should be able to avoid accidental breaking changes in the future.
[^1]: Those three pest_meta functions are rather internal and perhaps did not need to be made public early on.
[^2]: If these accidental pest_meta breaking changes cause any trouble in your code, please feel free to open an issue though!
pest_debugger)While pest's focus is on accessibility, developers can sometimes struggle to understand what is going under the hood and why a particular input is parsed in a particular way (or fails to parse). A long time ago, @dragostis implemented a simple CLI debugger that could help in this aspect, but this effort was not finished. This implementation was revived and you are now welcome to use it. You should be able to install it using:
cargo install pest_debugger
You can then run the interactive debugger by calling pest_debugger and view its help by typing h in its prompt:
> h
Use the following commands:
g <grammar filename> - load .pest grammar
i <input filename> - load input from a file
id <input text> - load input directly from a single-line input
ba - add breakpoints at all rules
b <rule> - add a breakpoint at a rule
d <rule> - delete a breakpoint at a rule
da - delete all breakpoints
r <rule> - run a rule
c - continue
l - list breakpoints
h - help
The commands are self-explanatory; for a quick reference, the basic usage is:
> g ...file path to your grammar...
> i ...file path to your input...
> b ...name of the rule you want to stop at...
> r ...the rule to start running at...
:bulb: There is a tab completion for file paths and command history.
And then, once the debugger hits a breakpoint, you can continue the execution by typing:
> c
:bulb: You can also start up the debugger with command-line arguments that will do those steps during initialisation:
Usage: pest_debugger [options]
Options:
-g, --grammar <grammar file> - load .pest grammar
-i, --input <input file> - load input file
-r, --rule <rule> - run rule
-b, --breakpoint <rule> - breakpoint at rule
-s, --session <session file> - load session history file
-h, --help - print this help menu
If you are using pest in your projects and would like to contribute to its development by organising its issues, reviewing its pull requests etc., please feel free to comment on this post to join the triage team!
In addition to that, here are also a few potential ideas for work that can help anyone who would like to get familiar with pest's implementation:
Does any of these ideas sound interesting to you and would like to work on them? Or do you have other pest-related ideas you are working on or would like to explore? Please don't hesitate to share them in the comments below the announcement!
Update deps and switch to 2021 edition by @lwandrebeck in https://github.com/pest-parser/pest/pull/715
Full Changelog: https://github.com/pest-parser/pest/compare/v2.4.0...v2.4.1
Big thanks to all contributors on GitHub Sponsors and on Open Collective! 🙏
chore: update to unicode 15 by @tomtau in https://github.com/pest-parser/pest/pull/709
Full Changelog: https://github.com/pest-parser/pest/compare/v2.3.1...v2.4.0
fix: Search for grammar file from CARGO_MANIFEST_DIR by @Nukesor in https://github.com/pest-parser/pest/pull/702
sha-1 package name by @davidkna in https://github.com/pest-parser/pest/pull/704Position::line_col for large inputs using SIMD by @tomtau in https://github.com/pest-parser/pest/pull/707pest crate now has an optional fast-line-col feature flag which will speed up Position::line_col calculations. Note that this feature brings two extra dependencies and may incur extra overheads on small inputs.
Full Changelog: https://github.com/pest-parser/pest/compare/v2.3.0...v2.3.1
A breaking change of v2.2.x from v2.1.x was fixed, i.e. a trait bound was removed from Error type
Span (https://github.com/pest-parser/pest/pull/681 https://github.com/pest-parser/pest/pull/682)Full Changelog: https://github.com/pest-parser/pest/compare/v2.2.1...v2.3.0
reverted https://github.com/pest-parser/pest/pull/522 by @tomtau in https://github.com/pest-parser/pest/pull/673
Full Changelog: https://github.com/pest-parser/pest/compare/v2.2.0...v2.2.1
sha-1 upgraded and unnecessary dependencies removed
Full Changelog: https://github.com/pest-parser/pest/compare/v2.1.0...v2.2.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
more robust error reporting around new lines
This release includes:
Nothing published for this version
Nothing published for this version
We're happy to release pest 2.0!
We're happy to release pest 2.0!
While there are a lot of changes that came into this release, here are some of the highlights:
const _GRAMMAR paper-cutEOI non-silent for better error reportingANY, WHITESPACE)fixes #201 where a bug in parser generation caused exponential parse times
Nothing published for this version
Nothing published for this version
Nothing published for this version
* small docs fix * licenses included in crates
One column per quarter.