summaryrefslogtreecommitdiffstats
path: root/vendor/pest_derive
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/pest_derive')
-rw-r--r--vendor/pest_derive/.cargo-checksum.json2
-rw-r--r--vendor/pest_derive/Cargo.toml40
-rw-r--r--vendor/pest_derive/_README.md37
-rw-r--r--vendor/pest_derive/src/lib.rs7
-rw-r--r--vendor/pest_derive/tests/grammar.pest4
-rw-r--r--vendor/pest_derive/tests/grammar.rs31
-rw-r--r--vendor/pest_derive/tests/grammar_inline.rs4
-rw-r--r--vendor/pest_derive/tests/lists.rs4
-rw-r--r--vendor/pest_derive/tests/reporting.rs4
9 files changed, 102 insertions, 31 deletions
diff --git a/vendor/pest_derive/.cargo-checksum.json b/vendor/pest_derive/.cargo-checksum.json
index 0f484603a..b9c70e450 100644
--- a/vendor/pest_derive/.cargo-checksum.json
+++ b/vendor/pest_derive/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"3616e31e313d646dd0372ba0116b596a4c9dfc21cda88625ef00001ab13b0d68","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","_README.md":"7c31c505c267ac538b70deaa9ad95ef0cc68720c46b4d3276df8f3a278d233e2","src/lib.rs":"f343c474ce5ff5520907bd69dd52b965b4aec42750fe3bf7eaf2b5075b08cfd6","tests/grammar.pest":"3a2212c28dd560ba3169e0e1470394ae706eb9336360ecdc0f1d9934af9fc223","tests/grammar.rs":"75261bc1ba2817d59e35fa2a7c07a661f9f2200a0144cb768837d37d3c370aa0","tests/grammar_inline.rs":"675c55697df7b8d011cef7182f2b05d52b4e73d405c869b9ea361bff5f17b63a","tests/lists.pest":"96d90ad5eb7b14648fa8720f0a48e680327080b07251a4dd74e1a023625e9c1a","tests/lists.rs":"5cc0c79494685d5056ab6164bc8893e26d29810f5c5a20d895f27c1695bab31c","tests/reporting.pest":"f5bc8405ea117b76338e0003e359731a8aaf1a36672f31a6a639a4e67a65e331","tests/reporting.rs":"d1658fd9466278f80769384f4377056274bd06fff586c2422b4fe42d39967e4b"},"package":"833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0"} \ No newline at end of file
+{"files":{"Cargo.toml":"3b10f9a7d7abd7529819a9c273e1e1fe6868225f3eb14fca998ede71e81d0d9c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","_README.md":"01ba71f02581f9f5018962e083ca77bc8e8af2b6f8a73111bfa04e847a6440e2","src/lib.rs":"8a4edbd00a1ac7dddf041618bc088d095ade1647799fcb7621b71cc2660f0822","tests/grammar.pest":"23c99a141f9165d24f3c46cd40a15788056b87558398b80a757980fd6967f271","tests/grammar.rs":"1c583be001c7f627816507142324a465d6bd2c701e869a3382ff44e8c45050e9","tests/grammar_inline.rs":"349527e75a1fc10e0208d3d88cbac427dd5999b8a2a79d2b9c981e73af22da37","tests/lists.pest":"96d90ad5eb7b14648fa8720f0a48e680327080b07251a4dd74e1a023625e9c1a","tests/lists.rs":"2dc0cb9c07f5b077743ce9313488599347061ea486e0f5160bff50b3d07ca72c","tests/reporting.pest":"f5bc8405ea117b76338e0003e359731a8aaf1a36672f31a6a639a4e67a65e331","tests/reporting.rs":"8b88238dc33abff5dbc76434a7468dceeb9db3dfa8826d44c8ea1d13d52431e8"},"package":"905708f7f674518498c1f8d644481440f476d39ca6ecae83319bba7c6c12da91"} \ No newline at end of file
diff --git a/vendor/pest_derive/Cargo.toml b/vendor/pest_derive/Cargo.toml
index 47dfec41b..44212b499 100644
--- a/vendor/pest_derive/Cargo.toml
+++ b/vendor/pest_derive/Cargo.toml
@@ -3,22 +3,28 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
+# to registry (e.g., crates.io) dependencies.
#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
[package]
+edition = "2018"
+rust-version = "1.56"
name = "pest_derive"
-version = "2.1.0"
+version = "2.3.0"
authors = ["DragoČ™ Tiselice <dragostiselice@gmail.com>"]
description = "pest's derive macro"
homepage = "https://pest-parser.github.io/"
documentation = "https://docs.rs/pest"
readme = "_README.md"
-keywords = ["pest", "parser", "peg", "grammar"]
+keywords = [
+ "pest",
+ "parser",
+ "peg",
+ "grammar",
+]
categories = ["parsing"]
license = "MIT/Apache-2.0"
repository = "https://github.com/pest-parser/pest"
@@ -26,16 +32,18 @@ repository = "https://github.com/pest-parser/pest"
[lib]
name = "pest_derive"
proc-macro = true
+
[dependencies.pest]
-version = "2.1.0"
+version = "2.3.0"
+default-features = false
[dependencies.pest_generator]
-version = "2.1.0"
-[badges.codecov]
-repository = "pest-parser/pest"
-
-[badges.maintenance]
-status = "actively-developed"
+version = "2.3.0"
+default-features = false
-[badges.travis-ci]
-repository = "pest-parser/pest"
+[features]
+default = ["std"]
+std = [
+ "pest/std",
+ "pest_generator/std",
+]
diff --git a/vendor/pest_derive/_README.md b/vendor/pest_derive/_README.md
index 2c94a7222..f91188ccb 100644
--- a/vendor/pest_derive/_README.md
+++ b/vendor/pest_derive/_README.md
@@ -1,3 +1,4 @@
+
<p align="center">
<img src="https://raw.github.com/pest-parser/pest/master/pest-logo.svg?sanitize=true" width="80%"/>
</p>
@@ -8,8 +9,10 @@
[![Book](https://img.shields.io/badge/book-WIP-4d76ae.svg)](https://pest-parser.github.io/book)
[![Docs](https://docs.rs/pest/badge.svg)](https://docs.rs/pest)
-[![Build Status](https://travis-ci.org/pest-parser/pest.svg?branch=master)](https://travis-ci.org/pest-parser/pest)
+[![pest Continuous Integration](https://github.com/pest-parser/pest/actions/workflows/ci.yml/badge.svg)](https://github.com/pest-parser/pest/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/pest-parser/pest/branch/master/graph/badge.svg)](https://codecov.io/gh/pest-parser/pest)
+<a href="https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html"><img alt="Rustc Version 1.56.1+" src="https://img.shields.io/badge/rustc-1.56.1%2B-lightgrey.svg"/></a>
+
[![Crates.io](https://img.shields.io/crates/d/pest.svg)](https://crates.io/crates/pest)
[![Crates.io](https://img.shields.io/crates/v/pest.svg)](https://crates.io/crates/pest)
@@ -37,7 +40,7 @@ Other helpful resources:
## Example
-The following is an example of a grammar for a list of alpha-numeric identifiers
+The following is an example of a grammar for a list of alphanumeric identifiers
where the first identifier does not start with a digit:
```rust
@@ -99,19 +102,16 @@ fn main() {
// Because ident_list is silent, the iterator will contain idents
for pair in pairs {
-
- let span = pair.clone().into_span();
// A pair is a combination of the rule which matched and a span of input
println!("Rule: {:?}", pair.as_rule());
- println!("Span: {:?}", span);
- println!("Text: {}", span.as_str());
+ println!("Span: {:?}", pair.as_span());
+ println!("Text: {}", pair.as_str());
// A pair can be converted to an iterator of the tokens which make it up:
for inner_pair in pair.into_inner() {
- let inner_span = inner_pair.clone().into_span();
match inner_pair.as_rule() {
- Rule::alpha => println!("Letter: {}", inner_span.as_str()),
- Rule::digit => println!("Digit: {}", inner_span.as_str()),
+ Rule::alpha => println!("Letter: {}", inner_pair.as_str()),
+ Rule::digit => println!("Digit: {}", inner_pair.as_str()),
_ => unreachable!()
};
}
@@ -143,15 +143,20 @@ Digit: 2
## Projects using pest
* [pest_meta](https://github.com/pest-parser/pest/blob/master/meta/src/grammar.pest) (bootstrapped)
+* [AshPaper](https://github.com/shnewto/ashpaper)
* [brain](https://github.com/brain-lang/brain)
-* [Chelone](https://github.com/Aaronepower/chelone)
+* [cicada](https://github.com/mitnk/cicada)
* [comrak](https://github.com/kivikakk/comrak)
+* [elastic-rs](https://github.com/cch123/elastic-rs)
* [graphql-parser](https://github.com/Keats/graphql-parser)
* [handlebars-rust](https://github.com/sunng87/handlebars-rust)
* [hexdino](https://github.com/Luz/hexdino)
* [Huia](https://gitlab.com/jimsy/huia/)
+* [insta](https://github.com/mitsuhiko/insta)
+* [jql](https://github.com/yamafaktory/jql)
* [json5-rs](https://github.com/callum-oakley/json5-rs)
* [mt940](https://github.com/svenstaro/mt940-rs)
+* [Myoxine](https://github.com/d3bate/myoxine)
* [py_literal](https://github.com/jturner314/py_literal)
* [rouler](https://github.com/jarcane/rouler)
* [RuSh](https://github.com/lwandrebeck/RuSh)
@@ -160,6 +165,18 @@ Digit: 2
* [tera](https://github.com/Keats/tera)
* [ui_gen](https://github.com/emoon/ui_gen)
* [ukhasnet-parser](https://github.com/adamgreig/ukhasnet-parser)
+* [ZoKrates](https://github.com/ZoKrates/ZoKrates)
+* [Vector](https://github.com/timberio/vector)
+* [AutoCorrect](https://github.com/huacnlee/autocorrect)
+* [yaml-peg](https://github.com/aofdev/yaml-peg)
+* [qubit](https://github.com/abhimanyu003/qubit)
+* [caith](https://github.com/Geobert/caith) (a dice roller crate)
+* [Melody](https://github.com/yoav-lavi/melody)
+
+## Minimum Supported Rust Version (MSRV)
+
+This library should always compile with default features on **Rust 1.56.1**
+or **Rust 1.61** with `const_prec_climber`.
## Special thanks
diff --git a/vendor/pest_derive/src/lib.rs b/vendor/pest_derive/src/lib.rs
index f60d5d943..d980c6ae9 100644
--- a/vendor/pest_derive/src/lib.rs
+++ b/vendor/pest_derive/src/lib.rs
@@ -55,7 +55,7 @@
//!
//! Comments start with `//` and end at the end of the line.
//!
-//! ```ignore
+//! ```text
//! // a comment
//! ```
//!
@@ -152,7 +152,7 @@
//!
//! Strings and characters follow
//! [Rust's escape mechanisms](https://doc.rust-lang.org/reference/tokens.html#byte-escapes), while
-//! identifiers can contain alpha-numeric characters and underscores (`_`), as long as they do not
+//! identifiers can contain alphanumeric characters and underscores (`_`), as long as they do not
//! start with a digit.
//!
//! 2. Non-terminals
@@ -266,7 +266,7 @@
//! ```
//!
//! For historical reasons, `PEEK_ALL` matches from top to bottom, while `PEEK[start..end]` matches
-//! from bottom to top. There is currectly no syntax to match a slice of the stack top to bottom.
+//! from bottom to top. There is currently no syntax to match a slice of the stack top to bottom.
//!
//! ## `Rule`
//!
@@ -290,7 +290,6 @@
//! * `NEWLINE` - matches either "\n" or "\r\n" or "\r"
#![doc(html_root_url = "https://docs.rs/pest_derive")]
-
extern crate pest_generator;
extern crate proc_macro;
diff --git a/vendor/pest_derive/tests/grammar.pest b/vendor/pest_derive/tests/grammar.pest
index 43a7b8cfd..126f112d3 100644
--- a/vendor/pest_derive/tests/grammar.pest
+++ b/vendor/pest_derive/tests/grammar.pest
@@ -22,6 +22,7 @@ sequence_atomic_compound = @{ sequence_compound }
sequence_nested = { string ~ string }
sequence_compound_nested = ${ sequence_nested }
choice = { string | range }
+choice_prefix = { | string | range }
optional = { string? }
repeat = { string* }
repeat_atomic = @{ string* }
@@ -36,6 +37,9 @@ repeat_max = { string{, 2} }
repeat_max_atomic = @{ string{, 2} }
soi_at_start = { SOI ~ string }
repeat_mutate_stack = { (PUSH('a'..'c') ~ ",")* ~ POP ~ POP ~ POP }
+repeat_mutate_stack_pop_all = { (PUSH('a'..'c') ~ ",")* ~ POP_ALL }
+will_fail = { repeat_mutate_stack_pop_all ~ "FAIL" }
+stack_resume_after_fail = { will_fail | repeat_mutate_stack_pop_all }
peek_ = { PUSH(range) ~ PUSH(range) ~ PEEK ~ PEEK }
peek_all = { PUSH(range) ~ PUSH(range) ~ PEEK_ALL }
peek_slice_23 = { PUSH(range) ~ PUSH(range) ~ PUSH(range) ~ PUSH(range) ~ PUSH(range) ~ PEEK[1..-2] }
diff --git a/vendor/pest_derive/tests/grammar.rs b/vendor/pest_derive/tests/grammar.rs
index 799beb7e0..57bed9072 100644
--- a/vendor/pest_derive/tests/grammar.rs
+++ b/vendor/pest_derive/tests/grammar.rs
@@ -6,6 +6,9 @@
// license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. All files in the project carrying such notice may not be copied,
// modified, or distributed except according to those terms.
+#![cfg_attr(not(feature = "std"), no_std)]
+extern crate alloc;
+use alloc::{format, vec::Vec};
#[macro_use]
extern crate pest;
@@ -246,6 +249,20 @@ fn choice_range() {
}
#[test]
+fn choice_prefix() {
+ parses_to! {
+ parser: GrammarParser,
+ input: "abc",
+ rule: Rule::choice_prefix,
+ tokens: [
+ choice_prefix(0, 3, [
+ string(0, 3)
+ ])
+ ]
+ };
+}
+
+#[test]
fn optional_string() {
parses_to! {
parser: GrammarParser,
@@ -783,6 +800,20 @@ fn repeat_mutate_stack() {
}
#[test]
+fn stack_resume_after_fail() {
+ parses_to! {
+ parser: GrammarParser,
+ input: "a,b,c,cba",
+ rule: Rule::stack_resume_after_fail,
+ tokens: [
+ stack_resume_after_fail(0, 9, [
+ repeat_mutate_stack_pop_all(0, 9)
+ ])
+ ]
+ };
+}
+
+#[test]
fn checkpoint_restore() {
parses_to! {
parser: GrammarParser,
diff --git a/vendor/pest_derive/tests/grammar_inline.rs b/vendor/pest_derive/tests/grammar_inline.rs
index 2cc730afc..549a8145e 100644
--- a/vendor/pest_derive/tests/grammar_inline.rs
+++ b/vendor/pest_derive/tests/grammar_inline.rs
@@ -4,6 +4,10 @@
// option. All files in the project carrying such notice may not be copied,
// modified, or distributed except according to those terms.
+#![cfg_attr(not(feature = "std"), no_std)]
+extern crate alloc;
+use alloc::{format, vec::Vec};
+
#[macro_use]
extern crate pest;
#[macro_use]
diff --git a/vendor/pest_derive/tests/lists.rs b/vendor/pest_derive/tests/lists.rs
index 4ba0effce..3678b603b 100644
--- a/vendor/pest_derive/tests/lists.rs
+++ b/vendor/pest_derive/tests/lists.rs
@@ -7,6 +7,10 @@
// option. All files in the project carrying such notice may not be copied,
// modified, or distributed except according to those terms.
+#![cfg_attr(not(feature = "std"), no_std)]
+extern crate alloc;
+use alloc::{format, vec::Vec};
+
#[macro_use]
extern crate pest;
#[macro_use]
diff --git a/vendor/pest_derive/tests/reporting.rs b/vendor/pest_derive/tests/reporting.rs
index aa0a974e0..8a41bef72 100644
--- a/vendor/pest_derive/tests/reporting.rs
+++ b/vendor/pest_derive/tests/reporting.rs
@@ -7,6 +7,10 @@
// option. All files in the project carrying such notice may not be copied,
// modified, or distributed except according to those terms.
+#![cfg_attr(not(feature = "std"), no_std)]
+extern crate alloc;
+use alloc::vec;
+
#[macro_use]
extern crate pest;
#[macro_use]