NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #1677 most downloaded on crates.io
A simple Parsing Expression Grammar (PEG) parser generator.
Last release 5 months ago
04 May 2026
Ships fairly regularly
a new release about every 7 months
Rarely documented
notes for 10 of 52 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
52 releases · first in 2014
Add grammar-wide injected variables for more easily building syntax trees with spans
= expr at macro expansion time so that rust-analyzer can suggest a return type. (#410)#[cache] (#398)Minimum Rust version is increased to 1.82.
0.8.6 Latest
Latest
Compare
One column per quarter.
The never-documented ##method() syntax is deprecated because the ## token is not allowed by Rust edition 2024 . It will be removed in rust-peg v0.9. #…
#{|input, pos| ... } custom expr (#395)Box<dyn Operand + 'input>) in rule return types (#385)my_rule::<u32>()) when calling a rule. (#396)The never-documented ##method() syntax is deprecated because the ## token is not allowed by Rust edition 2024. It will be removed in rust-peg v0.9. ##method() can be replaced with #{|input, pos| input.method(pos) }.
Full Changelog: 0.8.4...0.8.5
Fix macro panic for parse error at end of peg::parser!{ } specification ( #376 ) by @kevinmehall
peg::parser!{ } specification (#376) by @kevinmehallr# raw idents (#378) by @A4-Tacks in #379Full Changelog: 0.8.3...0.8.4
Fix error with [x..] range pattern
[x..] range pattern (1b2da45)where clauses on rules by @A4-Tacks (#371)crate visibility modifier, which was dropped from rustc nightly in 2022Allow expected!() to accept a &'static str expression, not just a literal.
Fix type inference for generic argument in rule's return position
Return matched token/character from [ ] pattern expression
#[cache_left_rec] annotation to allow left recursion (#266)[ ] pattern expression (#234)trace feature when using infix!{} (#277)#[cache] with grammar lifetime parametersclippy::redundant_closure_call lint in generated grammar (#258)Most users will not require changes to upgrade from 0.7 to 0.8; these only affect advanced use cases.
'input lifetime parameter to ParseElem trait so implementations can return tokens by reference. (#268)Copy on ParseElem::Element to better represent the expectation that they are cheap to copy/move.Contributors: @kevinmehall @zsol @neunenak @fgasperij
Significantly improved compile-time error messages for invalid grammars
[MyToken(x)] syntax for capturing variables from pattern expressions (#245)[^ ] inverted pattern syntax#[no_eof] pub rule() = ... syntax to allow matching a prefix of the input rather than reporting a parse error if the rule does not reach end-of-file (#233)rule _ = without parentheses when defining special underscore rule (#243)PartialEq, PartialOrd, Eq, Ord, Debug, Hash for RuleResult (#217)precedence!() (#238)return and ? behave as expected (#246)is_eof() method to Parse trait (#252)mixed_site hygiene prevents action code from accessing internal parser state variables such as __input, __pos, etc.Contributors: @dario23 @kevinmehall
Contributors: @dario23 @kevinmehall
Derive PartialEq, PartialOrd, Eq, Ord, Debug, Hash for RuleResult
PartialEq, PartialOrd, Eq, Ord, Debug, Hash for RuleResult (#217)Contributors: @dario23 @kevinmehall
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →