Skip to content

Conversation

@dependabot-preview
Copy link
Contributor

Bumps peg from 0.5.7 to 0.6.1.

Release notes

Sourced from peg's releases.

0.6.1

  • Use fully qualified Result path to avoid problems if Result is shadowed (#214)
  • Update to 2018 edition for more consistent behavior when the peg name is shadowed
  • Allow crate-relative imports in grammars (#213)
  • Documentation improvements
  • Fix rule arguments on pub rule
  • Forbid #[cache] on rules with arguments

Contributors: @dario23 @kevinmehall

0.6.0

Major improvements

  • Replaced build script integration and nightly-only syntax extension with a procedural macro that works on stable Rust. This means that errors both in the PEG grammar and the Rust code embedded from it are reported with source position by rustc. It even works with RLS!
  • Add the ability to parse non-str input by implementing traits. It comes with an implementation for [T] (including [u8]), but you can define the traits for your own types. In fact, the rust-peg grammar is parsed with rust-peg via an implementation for token trees from proc-macro2.
  • Add precedence!{} block for adding a precedence-climbing expression parser integrated with the surrounding PEG source.
  • Report errors in left-recursive rules that would cause infinte loops.
  • Allow rules to accept value and type parameters, including passing closures to replace the template syntax.
  • Significant performance improvement for input that parses successfully by deferring error handling until parsing has failed.

Upgrade from 0.5.x

  1. Remove peg = "0.5" from [build_dependencies] in Cargo.toml, and add peg = "0.6" under [dependencies].
  2. If nothing else is in build.rs, delete it and remove build = "build.rs" from Cargo.toml
  3. If using the 2015 edition of Rust, add extern crate peg; to your crate root.
  4. Move your grammar from a separate .rustpeg file into a Rust source file. Remove the mod somename { include!(...) } and replace it with:
peg::parser!{grammar somename() for str {
    // grammar goes here
}}
  1. Add the rule keyword and parentheses to rule declarations.
    • foo = ... becomes rule foo() = ...
    • pub bar -> X = ... becomes pub rule bar() -> X = ....
  2. Add parentheses to expressions that invoke another rule.
    • name:ident becomes name:ident().
  3. Replace the character set syntax with the pattern matching syntax.
    • [a-zA-Z] becomes ['a'..='z' | 'A'..='Z'].
    • [^X] becomes (!['X'][_]) -- the inverted character set syntax was removed, but can be substituted with a negative lookahead followed by [_] to match and consume the character.
  4. If your grammar used templates, replace them with rule arguments.
  5. Replace
    • . with [_].
    • #position with position!()
    • #quiet<e> with quiet!{e}
    • #expected("foo") with expected!("foo").
Commits
  • e14ae68 v0.6.1
  • 72cdade Document #[cache]
  • 6763dbf Improve documentation
  • 08c7479 Add another rule-args example
  • 9d0f278 Fix rule arguments on pub rule
  • 65ca18b Forbid #[cache] on rules with arguments
  • cab5ca2 Update to 2018 edition
  • 36864da Use fully qualified Result to avoid breaking if shadowed (fixes #214)
  • d5d6ae5 Only run compile-fail tests on stable
  • bef5f06 Merge pull request #213 from dario23/allow-crate-imports
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

If all status checks pass Dependabot will automatically merge this pull request.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps [peg](https://github.com/kevinmehall/rust-peg) from 0.5.7 to 0.6.1.
- [Release notes](https://github.com/kevinmehall/rust-peg/releases)
- [Commits](kevinmehall/rust-peg@0.5.7...0.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@dependabot-preview dependabot-preview bot added dependencies rust Pull requests that update Rust code labels Jan 20, 2020
@dependabot-preview
Copy link
Contributor Author

One of your CI runs failed on this pull request, so Dependabot won't merge it.

Dependabot will still automatically merge this pull request if you amend it and your tests pass.

@dependabot-preview
Copy link
Contributor Author

Superseded by #162.

@dependabot-preview dependabot-preview bot deleted the dependabot/cargo/peg-0.6.1 branch February 17, 2020 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants