summaryrefslogtreecommitdiff
path: root/dhall_generated_parser
diff options
context:
space:
mode:
Diffstat (limited to 'dhall_generated_parser')
-rw-r--r--dhall_generated_parser/build.rs15
-rw-r--r--dhall_generated_parser/src/dhall.pest.visibility21
2 files changed, 29 insertions, 7 deletions
diff --git a/dhall_generated_parser/build.rs b/dhall_generated_parser/build.rs
index eab48bf..5275097 100644
--- a/dhall_generated_parser/build.rs
+++ b/dhall_generated_parser/build.rs
@@ -26,6 +26,8 @@ fn main() -> std::io::Result<()> {
rules.get_mut(&line[2..]).map(|x| x.silent = true);
}
}
+ rules.remove("http");
+ rules.remove("url_path");
rules.remove("simple_label");
rules.remove("nonreserved_label");
@@ -41,6 +43,19 @@ fn main() -> std::io::Result<()> {
| !keyword ~ simple_label_first_char ~ simple_label_next_char*
}}"
)?;
+ // TODO: this is a cheat; actually implement inline headers instead
+ writeln!(
+ &mut file,
+ "http = {{
+ http_raw
+ ~ (whsp
+ ~ using
+ ~ whsp1
+ ~ (import_hashed | ^\"(\" ~ whsp ~ import_hashed ~ whsp ~ ^\")\"))?
+ }}"
+ )?;
+ // TODO: this is a cheat; properly support RFC3986 URLs instead
+ writeln!(&mut file, "url_path = _{{ path }}")?;
writeln!(
&mut file,
"nonreserved_label = _{{
diff --git a/dhall_generated_parser/src/dhall.pest.visibility b/dhall_generated_parser/src/dhall.pest.visibility
index 60de54d..6b4c974 100644
--- a/dhall_generated_parser/src/dhall.pest.visibility
+++ b/dhall_generated_parser/src/dhall.pest.visibility
@@ -1,4 +1,5 @@
# end_of_line
+# valid_non_ascii
# tab
# block_comment
# block_comment_char
@@ -10,6 +11,7 @@
# whsp1
# ALPHA
# DIGIT
+# ALPHANUM
# HEXDIG
# simple_label_first_char
# simple_label_next_char
@@ -21,6 +23,7 @@ label
# any_label
double_quote_chunk
double_quote_escaped
+# unicode_escape
double_quote_char
double_quote_literal
single_quote_continue
@@ -42,11 +45,14 @@ missing
# Infinity
NaN
Some_
+toMap
+assert
# keyword
builtin
Optional
Text
List
+Location
# Bool
# True
# False
@@ -66,6 +72,7 @@ List
# Natural_show
# Integer_toDouble
# Integer_show
+# Natural_subtract
# Double_show
# List_build
# List_fold
@@ -79,6 +86,7 @@ List
# Text_show
# combine
# combine_types
+# equivalent
# prefer
lambda
forall
@@ -116,7 +124,8 @@ authority
# ls32
# IPv4address
# dec_octet
-# reg_name
+# domain
+# domainlabel
# pchar
query
# pct_encoded
@@ -134,8 +143,7 @@ import
expression
annotated_expression
let_binding
-empty_collection
-non_empty_optional
+empty_list_literal
# operator_expression
import_alt_expression
or_expression
@@ -149,6 +157,7 @@ combine_types_expression
times_expression
equal_expression
not_equal_expression
+equivalent_expression
application_expression
first_application_expression
# import_expression
@@ -165,11 +174,9 @@ non_empty_record_type
record_type_entry
non_empty_record_literal
record_literal_entry
-union_type_or_literal
+union_type
empty_union_type
-non_empty_union_type_or_literal
-union_literal_variant_value
+# non_empty_union_type
union_type_entry
-union_type_or_literal_variant_type
non_empty_list_literal
# complete_expression