Skip to content

Conversation

@dependabot-preview
Copy link
Contributor

Bumps peg from 0.5.7 to 0.6.0.

Release notes

Sourced from peg's releases.

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.
  3. Replace the character set syntax with the pattern matching syntax.
    • [a-zA-Z] becomes ['a'..='z' | 'A'..='Z'].
  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
  • 4156871 Lock exact versions of internal crates
  • c08ff13 Don't test bootstrap on nightly to avoid rustfmt breakage
  • 04774f0 Move documentation to rustdoc
  • d7bf226 Add test for mismatched action return type
  • f7dd29f Fix trace feature
  • 8d530e8 Merge peg-syntax-ext and peg-codegen crates into peg-macros
  • 7bc597e Add a syntax to capture span information in precedence!{} blocks
  • c78edc0 Emit only "duplicate rule" error message, not duplicate rules themselves
  • b8a45aa Add parameters to rule functions
  • 8b17f4d Special case rules _, __, ___ to be called without parentheses
  • 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.0.
- [Release notes](https://github.com/kevinmehall/rust-peg/releases)
- [Commits](kevinmehall/rust-peg@0.5.7...0.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@dependabot-preview dependabot-preview bot added dependencies rust Pull requests that update Rust code labels Oct 7, 2019
@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 #154.

@dependabot-preview dependabot-preview bot deleted the dependabot/cargo/peg-0.6.0 branch January 20, 2020 05:27
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