diff options
author | Nadrieril | 2019-08-12 23:27:55 +0200 |
---|---|---|
committer | Nadrieril | 2019-08-12 23:27:55 +0200 |
commit | 7d17d39005531cb77d8eaf32ed7de8938c66f874 (patch) | |
tree | bd09eff4c3bb07a1eb3403d7cdac3e6c70ef8e97 | |
parent | 2c036f20f9c36a6afb602c6b6c15bc8a81412a6b (diff) |
Remove grammar workaround
m--------- | dhall-lang | 0 | ||||
-rw-r--r-- | dhall_generated_parser/build.rs | 23 | ||||
-rw-r--r-- | dhall_generated_parser/src/dhall.pest.visibility | 1 |
3 files changed, 1 insertions, 23 deletions
diff --git a/dhall-lang b/dhall-lang -Subproject 7ab25f8b089bd7e41b673a32d9330e4acb06773 +Subproject 235d2c0b11a539003d2de6110f8666e93ae1ccd diff --git a/dhall_generated_parser/build.rs b/dhall_generated_parser/build.rs index 48605b6..5275097 100644 --- a/dhall_generated_parser/build.rs +++ b/dhall_generated_parser/build.rs @@ -30,7 +30,6 @@ fn main() -> std::io::Result<()> { rules.remove("url_path"); rules.remove("simple_label"); rules.remove("nonreserved_label"); - rules.remove("expression"); let mut file = File::create(pest_path)?; writeln!(&mut file, "// AUTO-GENERATED FILE. See build.rs.")?; @@ -55,28 +54,6 @@ fn main() -> std::io::Result<()> { ~ (import_hashed | ^\"(\" ~ whsp ~ import_hashed ~ whsp ~ ^\")\"))? }}" )?; - // TODO: hack; we'll need to upstream a change to the grammar - writeln!( - &mut file, - r#"expression = {{ - lambda ~ whsp ~ ^"(" ~ whsp ~ nonreserved_label ~ whsp ~ ^":" ~ whsp1 ~ expression ~ whsp ~ ^")" ~ whsp ~ arrow ~ whsp ~ expression - | if_ ~ whsp1 ~ expression ~ whsp ~ then ~ whsp1 ~ expression ~ whsp ~ else_ ~ whsp1 ~ expression - | let_binding+ ~ in_ ~ whsp1 ~ expression - | forall ~ whsp ~ ^"(" ~ whsp ~ nonreserved_label ~ whsp ~ ^":" ~ whsp1 ~ expression ~ whsp ~ ^")" ~ whsp ~ arrow ~ whsp ~ expression - | operator_expression ~ whsp ~ arrow ~ whsp ~ expression - | merge ~ whsp1 ~ import_expression ~ whsp1 ~ import_expression ~ whsp ~ ^":" ~ whsp1 ~ application_expression - | empty_list_literal - | toMap ~ whsp1 ~ import_expression ~ whsp ~ ^":" ~ whsp1 ~ application_expression - | assert ~ whsp ~ ^":" ~ whsp1 ~ expression - | annotated_expression - }}"# - )?; - writeln!( - &mut file, - r#"empty_list_literal = {{ - ^"[" ~ whsp ~ ^"]" ~ whsp ~ ^":" ~ whsp1 ~ application_expression - }}"# - )?; // TODO: this is a cheat; properly support RFC3986 URLs instead writeln!(&mut file, "url_path = _{{ path }}")?; writeln!( diff --git a/dhall_generated_parser/src/dhall.pest.visibility b/dhall_generated_parser/src/dhall.pest.visibility index 44a52c1..6b4c974 100644 --- a/dhall_generated_parser/src/dhall.pest.visibility +++ b/dhall_generated_parser/src/dhall.pest.visibility @@ -143,6 +143,7 @@ import expression annotated_expression let_binding +empty_list_literal # operator_expression import_alt_expression or_expression |