The Elegant Parser
pest_debugger
crate (fixes #98) by @dragostis and @tomtau in https://github.com/pest-parser/pest/pull/736
Full Changelog: https://github.com/pest-parser/pest/compare/v2.4.1...v2.5.0
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,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!
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! 🙏
Full Changelog: https://github.com/pest-parser/pest/compare/v2.3.1...v2.4.0
sha-1
package name by @davidkna in https://github.com/pest-parser/pest/pull/704
Position::line_col
for large inputs using SIMD by @tomtau in https://github.com/pest-parser/pest/pull/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.
Full Changelog: https://github.com/pest-parser/pest/compare/v2.3.0...v2.3.1
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
Full Changelog: https://github.com/pest-parser/pest/compare/v2.2.0...v2.2.1
Full Changelog: https://github.com/pest-parser/pest/compare/v2.1.0...v2.2.0
Made secondary grammar include relative.
Fixed compile warnings and fix non-reproducible builds.
Fixed compile warnings.