Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 13, 2025

Bumps pest from 2.7.15 to 2.8.0.

Release notes

Sourced from pest's releases.

v2.8.0

What's Changed

A new rule PUSH_LITERAL(...).

PUSH_LITERAL("a"): This rule always matches and never consumes any input, and it pushes "a" to the stack. The argument must be a literal.

[!note] You need to enable the "grammar-extras" feature as mentioned in the semantic versioning notes below in order to use this feature.

This new rule accomplishes the goals of pest-parser/pest#880 (in a slightly different way). Instead of PUSH_OTHER("-", " "), this is just PUSH_LITERAL(" "). If you wanted to match A and then push B, you just combine them via a sequence: "-" ~ PUSH_LITERAL(" ").

This can be used to generalize quoted strings to a pair of matching but non-equal delimiters. For example, many programming languages let you express strings using either double or single quotes, and don't require escaping of the other:

string = ${ PUSH( "\"" | "'") ~ quoted_char* ~ POP }
quoted_char = @{!PEEK ~ ANY } // simple version without escape sequences

// will parse "a'b" or 'a"b'

This happens to work because the starting and ending char are the same, but that's not always desirable. For example, we may want to allow strings to be delimited by either ( ... ) or < ... >, with similar rules as above, such that (a>) and <a)> are both valid.

With PUSH_LITERAL, this becomes:

string = ${ quote_open ~ quoted_char* ~ POP }
quote_open = @{
  ( "(" ~ PUSH_LITERAL(")") )
| ( "<" ~ PUSH_LITERAL(">") )
}
quoted_char = @{!PEEK ~ ANY } // simple version without escape sequences

New Contributors

Full Changelog: pest-parser/pest@v2.7.15...v2.8.0

Warning: Semantic Versioning

Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule enum.

... (truncated)

Commits

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.


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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @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 dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels May 13, 2025
@ansasaki
Copy link
Contributor

@dependabot rebase

Bumps [pest](https://github.com/pest-parser/pest) from 2.7.15 to 2.8.0.
- [Release notes](https://github.com/pest-parser/pest/releases)
- [Commits](pest-parser/pest@v2.7.15...v2.8.0)

---
updated-dependencies:
- dependency-name: pest
  dependency-version: 2.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/cargo/pest-2.8.0 branch from 2e46bad to 3c367ce Compare May 14, 2025 09:05
@ansasaki ansasaki merged commit 82b7dc0 into master May 15, 2025
11 checks passed
@dependabot dependabot bot deleted the dependabot/cargo/pest-2.8.0 branch May 15, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants