diff options
Diffstat (limited to '')
-rw-r--r-- | dhall_generated_parser/Cargo.toml | 18 | ||||
-rw-r--r-- | dhall_generated_parser/src/lib.rs | 22 | ||||
-rw-r--r-- | dhall_syntax/.gitignore (renamed from dhall_generated_parser/.gitignore) | 0 | ||||
-rw-r--r-- | dhall_syntax/Cargo.toml | 4 | ||||
-rw-r--r-- | dhall_syntax/build.rs (renamed from dhall_generated_parser/build.rs) | 0 | ||||
l--------- | dhall_syntax/src/dhall.abnf (renamed from dhall_generated_parser/src/dhall.abnf) | 0 | ||||
-rw-r--r-- | dhall_syntax/src/dhall.pest.visibility (renamed from dhall_generated_parser/src/dhall.pest.visibility) | 0 | ||||
-rw-r--r-- | dhall_syntax/src/parser.rs | 2 |
8 files changed, 5 insertions, 41 deletions
diff --git a/dhall_generated_parser/Cargo.toml b/dhall_generated_parser/Cargo.toml deleted file mode 100644 index b1f0d02..0000000 --- a/dhall_generated_parser/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "dhall_generated_parser" -version = "0.1.0" -authors = ["Nadrieril <nadrieril@users.noreply.github.com>"] -license = "BSD-2-Clause" -edition = "2018" -build = "build.rs" - -[lib] -test = false -doctest = false - -[build-dependencies] -abnf_to_pest = { version = "0.1.1", path = "../abnf_to_pest" } - -[dependencies] -pest = "2.1" -pest_derive = "2.1" diff --git a/dhall_generated_parser/src/lib.rs b/dhall_generated_parser/src/lib.rs deleted file mode 100644 index fbb9ccd..0000000 --- a/dhall_generated_parser/src/lib.rs +++ /dev/null @@ -1,22 +0,0 @@ -//! This crate only contains a [pest][pest]-generated parser for the [dhall][dhall] language. -//! It is part of the [dhall-rust][dhall-rust] crate. -//! -//! [pest]: https://pest.rs -//! [dhall]: https://dhall-lang.org/ -//! [dhall-rust]: https://github.com/Nadrieril/dhall-rust - -// This crate only contains the grammar-generated parser. The rest of the -// parser is in dhall_syntax. This separation is because compiling the -// grammar-generated parser is extremely slow. -// See the https://pest.rs documentation for details on what this crate contains. -// The pest file is auto-generated and is located at ./dhall.pest. -// It is generated from grammar.abnf in a rather straightforward manner. Some -// additional overrides are done in ../build.rs. -// The lines that are commented out in ./dhall.pest.visibility are marked as -// silent (see pest docs for what that means) in the generated pest file. - -use pest_derive::Parser; - -#[derive(Parser)] -#[grammar = "dhall.pest"] -pub struct DhallParser; diff --git a/dhall_generated_parser/.gitignore b/dhall_syntax/.gitignore index 8a0bac6..8a0bac6 100644 --- a/dhall_generated_parser/.gitignore +++ b/dhall_syntax/.gitignore diff --git a/dhall_syntax/Cargo.toml b/dhall_syntax/Cargo.toml index d732bff..7708954 100644 --- a/dhall_syntax/Cargo.toml +++ b/dhall_syntax/Cargo.toml @@ -4,10 +4,14 @@ version = "0.1.0" authors = ["NanoTech <nanotech@nanotechcorp.net>", "Nadrieril <nadrieril@users.noreply.github.com>"] license = "BSD-2-Clause" edition = "2018" +build = "build.rs" [lib] doctest = false +[build-dependencies] +abnf_to_pest = { version = "0.1.1", path = "../abnf_to_pest" } + [dependencies] itertools = "0.8.0" percent-encoding = "2.1.0" diff --git a/dhall_generated_parser/build.rs b/dhall_syntax/build.rs index d846f92..d846f92 100644 --- a/dhall_generated_parser/build.rs +++ b/dhall_syntax/build.rs diff --git a/dhall_generated_parser/src/dhall.abnf b/dhall_syntax/src/dhall.abnf index ce13b8e..ce13b8e 120000 --- a/dhall_generated_parser/src/dhall.abnf +++ b/dhall_syntax/src/dhall.abnf diff --git a/dhall_generated_parser/src/dhall.pest.visibility b/dhall_syntax/src/dhall.pest.visibility index 17c1edc..17c1edc 100644 --- a/dhall_generated_parser/src/dhall.pest.visibility +++ b/dhall_syntax/src/dhall.pest.visibility diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs index 3ea766f..044d3f1 100644 --- a/dhall_syntax/src/parser.rs +++ b/dhall_syntax/src/parser.rs @@ -146,7 +146,7 @@ lazy_static::lazy_static! { } #[derive(Parser)] -#[grammar = "../../dhall_generated_parser/src/dhall.pest"] +#[grammar = "dhall.pest"] struct DhallParser; #[pest_consume::parser(parser = DhallParser, rule = Rule)] |