Releases: pest-parser/pest
v2.5.4
What's Changed
- Fix incorrect
col
calculate forpair.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
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
v2.5.1
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 thememchr
feature.
New Contributors
- @dffdff2423 made their first contribution in #740
Full Changelog: v2.5.0...v2.5.1
v2.5.0: introducing `pest_debugger`
What's Changed
- chore: clippy fixes and ignores by @tomtau in #733
- ci: add CIFuzz GitHub action by @DavidKorczynski in #738
- feature: added a
pest_debugger
crate (fixes #98) by @dragostis and @tomtau in #736
New Contributors
- @DavidKorczynski made their first contribution in #738
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:
- The fiddle editor on pest.rs currently lives in the site repository and has not been updated to the latest pest version. It's also been built with the stdweb crate that is no longer maintained. It will be great to upgrade to the latest version as well as migrate from stdweb to wasm-bindgen and websys.
- The pest_debugger core functionality has been extracted to a standalone crate that could be used in frontends other than a command line. It will be cool to have something like regex101 for pest. The web-based debugger could perhaps live side-by-side with the fiddle editor on pest.rs or it could be standalone like the current online pest formatter tool.
- It can also be cool to explore if the pest_debugger functionality can be integrated within the existing Vim and IntelliJ plugins. Or create a new one for Visual Studio Code?
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!
v2.4.1
What's Changed
- Update deps and switch to 2021 edition by @lwandrebeck in #715
- feature: added http request grammar by @tomtau in #726
- Update README.md by @carnoxen in #728
- doc: improve documentation by @tomtau in #730
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
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
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
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
- @Alextopher made their first contribution in #681
- @kianmeng made their first contribution in #688
Full Changelog: v2.2.1...v2.3.0