Skip to content

Releases: pest-parser/pest

v2.7.1

17 Jul 09:58
ac0aed3

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.7.0...v2.7.1

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"] }

Restoration of the pest3 work effort

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: #885

v2.7.0

22 Jun 00:38
047c27e

Choose a tag to compare

What's Changed

  • bump criterion and cargo dependencies by @tomtau in #869
  • feature-guard the new grammar features with "grammar-extras" by @tomtau in #871
  • Add reference to json5-nodes by @jlyonsmith in #873
  • fix: expose the unicode emoji builtin rules by @tomtau in #874

New Contributors

Full Changelog: v2.6.1...v2.7.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.7", features = ["grammar-extras"] }

Note that MSRV was increased to 1.60 in pest 2.7.0.

v2.6.1: pest as a git dependency

17 Jun 14:11
867da2e

Choose a tag to compare

What's Changed

  • ci: fix for cargo-msrv needing at least 1.59 now by @tomtau in #850
  • Mitigate errors in reporting grammars that can cause the parser to run indefinetely by @Tartasprint in #848
  • Removed TODO about removed box syntax by @Tartasprint in #854
  • derive/examples: add a help menu grammar and parser by @e-dant in #856
  • feat: add simple Position/Span From implementations for LineColLocation by @HoloTheDrunk in #860
  • Swap precedence of negation and factorial by @SandaruKasa in #865
  • Conditional source-tree bootstrapping by @tomtau and @iptq in #866

New Contributors

Full Changelog: v2.6.0...v2.6.1

Using pest as a git dependency

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.

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 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: #849 (comment) you can try adding the older pest to explicitly force it as follows:

pest = { version = "=2.5.6" }

v2.6.0: node tags

26 Apr 13:40
6355eae

Choose a tag to compare

What's Changed

  • Add basic support for node_tag, iterator, and meta grammar by @tomtau in #832
  • Fix #838 grammar error when only have //!, /// or //, allow writing empty pest grammar. by @huacnlee in #839
  • Implement ExactSizeIterator for Pair iterators by @MucTepDayH16 in #833
  • fuzz: decrease the call limit in the json fuzzer by @tomtau in #841

New Contributors

Full Changelog: v2.5.7...v2.6.0

Introducing node tags

pest v2.6.0's grammar includes a new (optional) feature for labelling parts of rules (based on this idea posted by @oovm : #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

Warning: Semantic Versioning

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).

v2.5.7

31 Mar 02:03
f668fcc

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.5.6...v2.5.7

v2.5.6

05 Mar 01:03
f294ead

Choose a tag to compare

What's Changed

  • Fix multiple grammars not always recompile issue #789 by @huacnlee in #790
  • Update benchmark result typo (with Pest v2.5.2 as base line). by @huacnlee in #794
  • Fix grammar //// parsing error. by @huacnlee in #818
  • doc: added a note regarding the no_std support by @tomtau in #819

Full Changelog: v2.5.5...v2.5.6

pest_fmt and Visual Studio Code extension

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

v2.5.5

08 Feb 00:50
2562356

Choose a tag to compare

What's Changed

  • fix: typo in pest_debugger by @Jamalam360 in #780
  • Feature: Simple update checker for pest_debugger by @Jamalam360 in #779
  • Update validator for ignore Rule::line_doc for fix #781 "already defined" error. by @huacnlee in #782
  • Add LineIndex instead of Pairs::move_cursor for improve Pairs::next and Pair::line_col performance. by @huacnlee in #785
  • chore: added docs for semver changes in grammar + remove fast-col-line by @tomtau in #787

New Contributors

Full Changelog: v2.5.4...v2.5.5

Warning: Semantic Versioning

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): #785 (comment)

Note that the rustdoc support in 2.5.4: #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).

v2.5.4

24 Jan 14:02
ae86b62

Choose a tag to compare

What's Changed

  • Fix incorrect col calculate for pair.line_col method, and add integration test for cover it. by @huacnlee in #768
  • CI use Rust 1.62.0 for fix rustyline 10.1.0 #[default] compile error. by @huacnlee in #770
  • Add to support /// and //! syntax for add doc comment for rules. by @huacnlee in #765
  • doc: added doc comments to the meta-grammar by @tomtau in #774

Full Changelog: v2.5.3...v2.5.4

v2.5.3

11 Jan 12:32
174aae8

Choose a tag to compare

What's Changed

  • Improve line, col calculate performance by use move cursor on Pairs Iterator. by @huacnlee in #754
  • Add to support load multiple grammars for derive generator. by @huacnlee in #758
  • #763 Switches SHA1 for SHA2 by @jeramyRR in #764
  • fix: restrict the factorizer case to only atomic and compoundatomic rules by @tomtau in #766

New Contributors

Full Changelog: v2.5.2...v2.5.3

v2.5.2

23 Dec 13:47

Choose a tag to compare

What's Changed

  • Allow use of rust keywords as pest rules by @DvvCz in #750
  • Add Unicode Script into built-in rules. by @huacnlee in #751

New Contributors

  • @DvvCz made their first contribution in #750

Full Changelog: v2.5.1...v2.5.2

Happy Holidays and Best Wishes for 2023! ☃️🎄 🎆