Skip to content

Releases: pest-parser/pest

v2.5.5

08 Feb 00:50
2562356
Compare
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
Compare
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
Compare
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
Compare
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

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

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

v2.5.1

02 Dec 12:02
1e40766
Compare
Choose a tag to compare

What's Changed

  • Fix unexpected argument panic in pest_debugger by @dffdff2423 in #740
  • ci: add pest_debugger to semver checks by @tomtau in #741
  • doc: fix tables of (non-)terminals by @birkenfeld in #743
  • doc: explain that matching is greedy without backtracking by @birkenfeld in #744
  • perf: add a faster skip_until using SIMD memchr by @tomtau in #745
    it can be enabled by using the memchr feature.

New Contributors

Full Changelog: v2.5.0...v2.5.1

v2.5.0: introducing `pest_debugger`

24 Nov 14:00
8c602d8
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.4.1...v2.5.0

Accidental breakage of semantic versioning since v2.2.0 in pest_meta

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_meta::validator::validate_undefined now takes 2 parameters instead of 3,
  • pest_meta::validator::validate_pest_keywords now takes 1 parameter instead of 2,
  • and pest_meta::validator::validate_rust_keywords now takes 1 parameter instead of 2.

Given pest_meta is primarily used within pest's own crates1 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.02.

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.

Introducing a new grammar debugger CLI and crate (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...

💡 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

💡 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

Looking for a side project?

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!

  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!

v2.4.1

04 Nov 15:03
bd3b18a
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.4.0...v2.4.1

pest.rs domain is back!

Big thanks to all contributors on GitHub Sponsors and on Open Collective! 🙏

v2.4.0

01 Oct 14:32
9f7e4f7
Compare
Choose a tag to compare

What's Changed

  • chore: update to unicode 15 by @tomtau in #709
  • feature: unary prefix/suffix operator support via PrattParser by @segeljakt in #710

Full Changelog: v2.3.1...v2.4.0

v2.3.1

12 Sep 05:51
bfbdc4b
Compare
Choose a tag to compare

What's Changed

  • fix: Search for grammar file from CARGO_MANIFEST_DIR by @Nukesor in #702
  • Use new sha-1 package name by @davidkna in #704
  • fix: speed up Position::line_col for large inputs using SIMD by @tomtau in #707

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

New Contributors

Full Changelog: v2.3.0...v2.3.1

v2.3.0

21 Aug 06:31
ebee1fc
Compare
Choose a tag to compare

What's Changed

  • More ways for users to manipulate Span (#681 #682)
  • An optional call limit setting for parser state execution (#684)
  • A breaking change of v2.2.x from v2.1.x was fixed, i.e. a trait bound was removed from Error type (#694)

New Contributors

Full Changelog: v2.2.1...v2.3.0