summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dhall_core/src/parser.rs10
-rw-r--r--dhall_parser/src/dhall.abnf10
2 files changed, 10 insertions, 10 deletions
diff --git a/dhall_core/src/parser.rs b/dhall_core/src/parser.rs
index b7ac3f6..7cbe880 100644
--- a/dhall_core/src/parser.rs
+++ b/dhall_core/src/parser.rs
@@ -265,7 +265,7 @@ make_parser! {
[simple_label(l)] => l,
[quoted_label(l)] => l,
));
- rule!(unreserved_label<Label>; children!(
+ rule!(nonreserved_label<Label>; children!(
[label(l)] => {
if Builtin::parse(&String::from(&l)).is_some() {
Err(
@@ -540,7 +540,7 @@ make_parser! {
));
rule!(lambda_expression<ParsedExpr> as expression; children!(
- [unreserved_label(l), expression(typ), expression(body)] => {
+ [nonreserved_label(l), expression(typ), expression(body)] => {
bx(Expr::Lam(l, typ, body))
}
));
@@ -561,14 +561,14 @@ make_parser! {
));
rule!(let_binding<(Label, Option<ParsedExpr>, ParsedExpr)>; children!(
- [unreserved_label(name), expression(annot), expression(expr)] =>
+ [nonreserved_label(name), expression(annot), expression(expr)] =>
(name, Some(annot), expr),
- [unreserved_label(name), expression(expr)] =>
+ [nonreserved_label(name), expression(expr)] =>
(name, None, expr),
));
rule!(forall_expression<ParsedExpr> as expression; children!(
- [unreserved_label(l), expression(typ), expression(body)] => {
+ [nonreserved_label(l), expression(typ), expression(body)] => {
bx(Expr::Pi(l, typ, body))
}
));
diff --git a/dhall_parser/src/dhall.abnf b/dhall_parser/src/dhall.abnf
index 640a422..8964f44 100644
--- a/dhall_parser/src/dhall.abnf
+++ b/dhall_parser/src/dhall.abnf
@@ -170,11 +170,11 @@ quoted-label = 1*quoted-label-char
; for code obfuscation
label = ("`" quoted-label "`" / simple-label)
-; An unreserved-label cannot not be any of the reserved identifiers for builtins (unless quoted).
+; A nonreserved-label cannot not be any of the reserved identifiers for builtins (unless quoted).
; Their list can be found in semantics.md. This is not enforced by the grammar but
; should be checked by implementations. The only place where this restriction applies
; is bound variables.
-unreserved-label = label
+nonreserved-label = label
; An any-label is allowed to be one of the reserved identifiers.
any-label = label
@@ -543,7 +543,7 @@ expression =
/ annotated-expression
; "\(x : a) -> b"
-lambda-expression = lambda whsp "(" whsp unreserved-label whsp ":" whsp1 expression whsp ")" whsp arrow whsp expression
+lambda-expression = lambda whsp "(" whsp nonreserved-label whsp ":" whsp1 expression whsp ")" whsp arrow whsp expression
; "if a then b else c"
ifthenelse-expression = if whsp1 expression whsp then whsp1 expression whsp else whsp1 expression
@@ -552,10 +552,10 @@ ifthenelse-expression = if whsp1 expression whsp then whsp1 expression whsp else
; "let x = e1 in e2"
; "let x = e1 let y = e2 in e3"
let-expression = 1*let-binding in whsp1 expression
-let-binding = let whsp1 unreserved-label whsp [ ":" whsp1 expression whsp ] "=" whsp expression whsp
+let-binding = let whsp1 nonreserved-label whsp [ ":" whsp1 expression whsp ] "=" whsp expression whsp
; "forall (x : a) -> b"
-forall-expression = forall whsp "(" whsp unreserved-label whsp ":" whsp1 expression whsp ")" whsp arrow whsp expression
+forall-expression = forall whsp "(" whsp nonreserved-label whsp ":" whsp1 expression whsp ")" whsp arrow whsp expression
; "a -> b"
arrow-expression = operator-expression whsp arrow whsp expression