diff options
Diffstat (limited to 'dhall/build.rs')
-rw-r--r-- | dhall/build.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dhall/build.rs b/dhall/build.rs index 70389bf..981e558 100644 --- a/dhall/build.rs +++ b/dhall/build.rs @@ -414,12 +414,20 @@ fn convert_abnf_to_pest() -> std::io::Result<()> { rules.remove("url_path"); writeln!(&mut file, "url_path = _{{ path }}")?; + // Work around some greediness issue in the grammar. rules.remove("missing"); writeln!( &mut file, r#"missing = {{ "missing" ~ !simple_label_next_char }}"# )?; + // Prefer my nice error message to illegible parse errors. + rules.remove("unicode_escape"); + writeln!( + &mut file, + r#"unicode_escape = _{{ HEXDIG{{4}} | "{{" ~ HEXDIG+ ~ "}}" }}"# + )?; + rules.remove("simple_label"); writeln!( &mut file, |