From 72ad56209fe10e3120c19ca5b820ff267423ab1d Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 11 Apr 2020 15:41:21 +0100 Subject: spec: fix precedence of `===` and `with` --- dhall/tests/parser/failure/unit/WithPrecedence1.txt | 6 ++++++ dhall/tests/parser/failure/unit/WithPrecedence2.txt | 6 ++++++ dhall/tests/parser/failure/unit/WithPrecedence3.txt | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 dhall/tests/parser/failure/unit/WithPrecedence1.txt create mode 100644 dhall/tests/parser/failure/unit/WithPrecedence2.txt create mode 100644 dhall/tests/parser/failure/unit/WithPrecedence3.txt (limited to 'dhall/tests/parser/failure') diff --git a/dhall/tests/parser/failure/unit/WithPrecedence1.txt b/dhall/tests/parser/failure/unit/WithPrecedence1.txt new file mode 100644 index 0000000..a1dfd31 --- /dev/null +++ b/dhall/tests/parser/failure/unit/WithPrecedence1.txt @@ -0,0 +1,6 @@ + --> 1:24 + | +1 | { x = 0 } // { y = 1 } with x = 1␊ + | ^--- + | + = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression diff --git a/dhall/tests/parser/failure/unit/WithPrecedence2.txt b/dhall/tests/parser/failure/unit/WithPrecedence2.txt new file mode 100644 index 0000000..fefd172 --- /dev/null +++ b/dhall/tests/parser/failure/unit/WithPrecedence2.txt @@ -0,0 +1,6 @@ + --> 1:15 + | +1 | foo { x = 0 } with x = 1␊ + | ^--- + | + = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression diff --git a/dhall/tests/parser/failure/unit/WithPrecedence3.txt b/dhall/tests/parser/failure/unit/WithPrecedence3.txt new file mode 100644 index 0000000..418c669 --- /dev/null +++ b/dhall/tests/parser/failure/unit/WithPrecedence3.txt @@ -0,0 +1,6 @@ + --> 1:22 + | +1 | { x = 0 } with x = 1 : T␊ + | ^--- + | + = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, import_hashed, or primitive_expression -- cgit v1.2.3 From e3cdf3f386b6a682981e6bdf6ca6d215b0d0788d Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 25 Jun 2020 14:06:24 +0100 Subject: spec: not all ABNF parsers like empty rules --- dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dhall/tests/parser/failure') diff --git a/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt b/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt index 0e1a879..051ff49 100644 --- a/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt +++ b/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt @@ -3,4 +3,4 @@ 1 | { x :T }␊ | ^--- | - = expected missing, if_, merge, NaN, Some_, toMap, assert, forall, empty_record_literal, or record_type_entry + = expected missing, record_type_entry, if_, merge, NaN, Some_, toMap, assert, forall, or empty_record_literal -- cgit v1.2.3 From 812fb88102082493d1176aab7ee61b5339821492 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 25 Jun 2020 14:09:24 +0100 Subject: spec: ensure `keyword` rule only matches keywords --- dhall/tests/parser/failure/ProjectionByTypeNeedsParens.txt | 2 +- dhall/tests/parser/failure/annotation.txt | 2 +- dhall/tests/parser/failure/spacing/ForallNoSpace.txt | 2 +- dhall/tests/parser/failure/spacing/LambdaNoSpace.txt | 2 +- dhall/tests/parser/failure/spacing/LetAnnotNoSpace.txt | 2 +- dhall/tests/parser/failure/spacing/MergeNoSpace2.txt | 2 +- dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt | 2 +- dhall/tests/parser/failure/spacing/UnionTypeNoSpace.txt | 2 +- dhall/tests/parser/failure/unit/OldUnionLitSyntax.txt | 2 +- dhall/tests/parser/failure/unit/RecordLitPunDotted.txt | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'dhall/tests/parser/failure') diff --git a/dhall/tests/parser/failure/ProjectionByTypeNeedsParens.txt b/dhall/tests/parser/failure/ProjectionByTypeNeedsParens.txt index 0586abb..3ce3b45 100644 --- a/dhall/tests/parser/failure/ProjectionByTypeNeedsParens.txt +++ b/dhall/tests/parser/failure/ProjectionByTypeNeedsParens.txt @@ -3,4 +3,4 @@ 1 | r.{ x: T }␊ | ^--- | - = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall + = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall_keyword diff --git a/dhall/tests/parser/failure/annotation.txt b/dhall/tests/parser/failure/annotation.txt index 3390d3e..648ef2b 100644 --- a/dhall/tests/parser/failure/annotation.txt +++ b/dhall/tests/parser/failure/annotation.txt @@ -3,4 +3,4 @@ 1 | let a:Natural = 1 in a␊ | ^--- | - = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall + = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall_keyword diff --git a/dhall/tests/parser/failure/spacing/ForallNoSpace.txt b/dhall/tests/parser/failure/spacing/ForallNoSpace.txt index 697d400..6bd7fbc 100644 --- a/dhall/tests/parser/failure/spacing/ForallNoSpace.txt +++ b/dhall/tests/parser/failure/spacing/ForallNoSpace.txt @@ -3,4 +3,4 @@ 1 | forall(x :T) -> x␊ | ^--- | - = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall + = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall_keyword diff --git a/dhall/tests/parser/failure/spacing/LambdaNoSpace.txt b/dhall/tests/parser/failure/spacing/LambdaNoSpace.txt index adb0f1f..e5d1089 100644 --- a/dhall/tests/parser/failure/spacing/LambdaNoSpace.txt +++ b/dhall/tests/parser/failure/spacing/LambdaNoSpace.txt @@ -3,4 +3,4 @@ 1 | \(x :T) -> x␊ | ^--- | - = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall + = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall_keyword diff --git a/dhall/tests/parser/failure/spacing/LetAnnotNoSpace.txt b/dhall/tests/parser/failure/spacing/LetAnnotNoSpace.txt index 577f157..06aef2d 100644 --- a/dhall/tests/parser/failure/spacing/LetAnnotNoSpace.txt +++ b/dhall/tests/parser/failure/spacing/LetAnnotNoSpace.txt @@ -3,4 +3,4 @@ 1 | let x :T = y in e␊ | ^--- | - = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall + = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall_keyword diff --git a/dhall/tests/parser/failure/spacing/MergeNoSpace2.txt b/dhall/tests/parser/failure/spacing/MergeNoSpace2.txt index 77314e0..0fba8c0 100644 --- a/dhall/tests/parser/failure/spacing/MergeNoSpace2.txt +++ b/dhall/tests/parser/failure/spacing/MergeNoSpace2.txt @@ -3,4 +3,4 @@ 1 | merge x(y)␊ | ^--- | - = expected missing, non_empty_list_literal, double_quote_literal, single_quote_literal, if_, merge, NaN, Some_, toMap, assert, forall, numeric_double_literal, minus_infinity_literal, plus_infinity_literal, natural_literal, integer_literal, or import_hashed + = expected missing, non_empty_list_literal, double_quote_literal, single_quote_literal, if_, merge, NaN, Some_, toMap, assert, forall_keyword, numeric_double_literal, minus_infinity_literal, plus_infinity_literal, natural_literal, integer_literal, or import_hashed diff --git a/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt b/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt index 051ff49..759dd6f 100644 --- a/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt +++ b/dhall/tests/parser/failure/spacing/RecordTypeNoSpace.txt @@ -3,4 +3,4 @@ 1 | { x :T }␊ | ^--- | - = expected missing, record_type_entry, if_, merge, NaN, Some_, toMap, assert, forall, or empty_record_literal + = expected missing, record_type_entry, if_, merge, NaN, Some_, toMap, assert, forall_keyword, or empty_record_literal diff --git a/dhall/tests/parser/failure/spacing/UnionTypeNoSpace.txt b/dhall/tests/parser/failure/spacing/UnionTypeNoSpace.txt index 0a83dc8..8ff406c 100644 --- a/dhall/tests/parser/failure/spacing/UnionTypeNoSpace.txt +++ b/dhall/tests/parser/failure/spacing/UnionTypeNoSpace.txt @@ -3,4 +3,4 @@ 1 | < x :T >␊ | ^--- | - = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall + = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall_keyword diff --git a/dhall/tests/parser/failure/unit/OldUnionLitSyntax.txt b/dhall/tests/parser/failure/unit/OldUnionLitSyntax.txt index 8475bb9..552a7c3 100644 --- a/dhall/tests/parser/failure/unit/OldUnionLitSyntax.txt +++ b/dhall/tests/parser/failure/unit/OldUnionLitSyntax.txt @@ -3,4 +3,4 @@ 1 | < x = 3 | y : Bool >␊ | ^--- | - = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall + = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall_keyword diff --git a/dhall/tests/parser/failure/unit/RecordLitPunDotted.txt b/dhall/tests/parser/failure/unit/RecordLitPunDotted.txt index 2e0ac22..429aa05 100644 --- a/dhall/tests/parser/failure/unit/RecordLitPunDotted.txt +++ b/dhall/tests/parser/failure/unit/RecordLitPunDotted.txt @@ -3,4 +3,4 @@ 1 | { x.y.z }␊ | ^--- | - = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall + = expected missing, if_, merge, NaN, Some_, toMap, assert, or forall_keyword -- cgit v1.2.3 From 8fd2fb4871335c72b9448da4a66144fd7f986f09 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 25 Jun 2020 14:21:02 +0100 Subject: spec!: remove the ability to quote paths in URLs --- dhall/tests/parser/failure/unit/UrlWithQuotedPath.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 dhall/tests/parser/failure/unit/UrlWithQuotedPath.txt (limited to 'dhall/tests/parser/failure') diff --git a/dhall/tests/parser/failure/unit/UrlWithQuotedPath.txt b/dhall/tests/parser/failure/unit/UrlWithQuotedPath.txt new file mode 100644 index 0000000..0b51f38 --- /dev/null +++ b/dhall/tests/parser/failure/unit/UrlWithQuotedPath.txt @@ -0,0 +1,6 @@ + --> 1:21 + | +1 | https://example.com/"a%20b"/c␊ + | ^--- + | + = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, or arrow -- cgit v1.2.3 From 61ad94761e8428c19ca06ebb100cd4ee06c02f5a Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 25 Jun 2020 14:35:25 +0100 Subject: spec: support Dhall v17.0.0 --- dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword00.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword01.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword02.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword03.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword04.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword05.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword06.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword07.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword08.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword09.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword10.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword11.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword12.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword13.txt | 6 ++++++ dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword14.txt | 6 ++++++ 15 files changed, 90 insertions(+) create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword00.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword01.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword02.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword03.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword04.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword05.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword06.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword07.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword08.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword09.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword10.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword11.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword12.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword13.txt create mode 100644 dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword14.txt (limited to 'dhall/tests/parser/failure') diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword00.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword00.txt new file mode 100644 index 0000000..9a8747b --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword00.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { if: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword01.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword01.txt new file mode 100644 index 0000000..d041384 --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword01.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { then: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword02.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword02.txt new file mode 100644 index 0000000..2cdce47 --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword02.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { else: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword03.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword03.txt new file mode 100644 index 0000000..b8dd809 --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword03.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { let: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword04.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword04.txt new file mode 100644 index 0000000..4b2df06 --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword04.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { in: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword05.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword05.txt new file mode 100644 index 0000000..23d4f75 --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword05.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { using: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword06.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword06.txt new file mode 100644 index 0000000..4e715eb --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword06.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { missing: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword07.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword07.txt new file mode 100644 index 0000000..420dc77 --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword07.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { assert: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword08.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword08.txt new file mode 100644 index 0000000..159e243 --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword08.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { as: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword09.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword09.txt new file mode 100644 index 0000000..f5b7130 --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword09.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { Infinity: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword10.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword10.txt new file mode 100644 index 0000000..dd6f552 --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword10.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { NaN: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword11.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword11.txt new file mode 100644 index 0000000..ccf18aa --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword11.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { merge: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword12.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword12.txt new file mode 100644 index 0000000..f91f9dd --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword12.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { toMap: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword13.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword13.txt new file mode 100644 index 0000000..be64d1f --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword13.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { with: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal diff --git a/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword14.txt b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword14.txt new file mode 100644 index 0000000..9e2b836 --- /dev/null +++ b/dhall/tests/parser/failure/unit/RecordFieldMustNotBeKeyword14.txt @@ -0,0 +1,6 @@ + --> 1:3 + | +1 | { forall: Text }␊ + | ^--- + | + = expected any_label_or_some or empty_record_literal -- cgit v1.2.3