diff --git a/DSL-langium/language-configuration.json b/DSL-langium/language-configuration.json index e2273c70d..92d75bae8 100644 --- a/DSL-langium/language-configuration.json +++ b/DSL-langium/language-configuration.json @@ -7,14 +7,12 @@ ["{", "}"], ["[", "]"], ["(", ")"], - ["<", ">"], ["»", "«"] ], "autoClosingPairs": [ ["{", "}"], ["[", "]"], ["(", ")"], - ["<", ">"], ["»", "«"], ["\"", "\""], ["`", "`"] diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than or equal without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than or equal without left operator.sdstest new file mode 100644 index 000000000..0f192c492 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than or equal without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + >= 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than or equal without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than or equal without right operator.sdstest new file mode 100644 index 000000000..5985c39bc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than or equal without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 >=; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than without left operator.sdstest new file mode 100644 index 000000000..0a66c978b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + > 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than without right operator.sdstest new file mode 100644 index 000000000..bb733c942 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-greater than without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 >; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than or equal without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than or equal without left operator.sdstest new file mode 100644 index 000000000..7e6d04167 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than or equal without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + <= 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than or equal without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than or equal without right operator.sdstest new file mode 100644 index 000000000..1beda50d3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than or equal without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 <=; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than without left operator.sdstest new file mode 100644 index 000000000..4fe727927 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + < 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than without right operator.sdstest new file mode 100644 index 000000000..da8a9126c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/bad-less than without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 <; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-greater than or equal.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-greater than or equal.sdstest new file mode 100644 index 000000000..b307ff910 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-greater than or equal.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 >= 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-greater than.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-greater than.sdstest new file mode 100644 index 000000000..72d16eac6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-greater than.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 > 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-less than or equal.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-less than or equal.sdstest new file mode 100644 index 000000000..27e5caf27 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-less than or equal.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 <= 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparisonOperator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-less than vs. type parameter list.sdstest similarity index 63% rename from DSL-langium/tests/resources/grammar/expressions/comparisonOperator.sdstest rename to DSL-langium/tests/resources/grammar/expressions/comparison operator/good-less than vs. type parameter list.sdstest index 2ada6b0ce..084283794 100644 --- a/DSL-langium/tests/resources/grammar/expressions/comparisonOperator.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-less than vs. type parameter list.sdstest @@ -1,15 +1,6 @@ // $TEST$ no_syntax_error pipeline myPipeline { - 1 < 2; - 1 <= 2; - 1 == 2; - 1 === 2; - 1 != 2; - 1 !== 2; - 1 >= 2; - 1 > 2; - // The start of a type argument list of a call could be confused with the less than operator 1 < a(); } diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-less than.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-less than.sdstest new file mode 100644 index 000000000..fc782e89a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operator/good-less than.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 < 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-equal without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-equal without left operator.sdstest new file mode 100644 index 000000000..6f529e441 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-equal without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + == 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-equal without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-equal without right operator.sdstest new file mode 100644 index 000000000..37613704c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-equal without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 ==; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-identical without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-identical without left operator.sdstest new file mode 100644 index 000000000..7c15456a2 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-identical without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + === 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-identical without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-identical without right operator.sdstest new file mode 100644 index 000000000..333baa79c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-identical without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 ===; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not equal without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not equal without left operator.sdstest new file mode 100644 index 000000000..c75d3f48d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not equal without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + != 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not equal without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not equal without right operator.sdstest new file mode 100644 index 000000000..6fbeaccef --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not equal without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 !=; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not identical without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not identical without left operator.sdstest new file mode 100644 index 000000000..2e92a0311 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not identical without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 !==; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not identical without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not identical without right operator.sdstest new file mode 100644 index 000000000..2e92a0311 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/bad-not identical without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 !==; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/good-equal.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/good-equal.sdstest new file mode 100644 index 000000000..ab6082945 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/good-equal.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 == 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/good-identical.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/good-identical.sdstest new file mode 100644 index 000000000..cc17d2bf3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/good-identical.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 === 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/good-not equal.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/good-not equal.sdstest new file mode 100644 index 000000000..66b7ffebc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/good-not equal.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 != 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operator/good-not identical.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operator/good-not identical.sdstest new file mode 100644 index 000000000..1f8971705 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operator/good-not identical.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 !== 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/reference.sdstest b/DSL-langium/tests/resources/grammar/expressions/good-reference.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/expressions/reference.sdstest rename to DSL-langium/tests/resources/grammar/expressions/good-reference.sdstest diff --git a/DSL-langium/tests/resources/grammar/expressions/indexed access/bad-no receiver.sdstest b/DSL-langium/tests/resources/grammar/expressions/indexed access/bad-no receiver.sdstest new file mode 100644 index 000000000..54b43fcac --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/indexed access/bad-no receiver.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline test { + [1]; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/indexed access/bad-unclosed square bracket.sdstest b/DSL-langium/tests/resources/grammar/expressions/indexed access/bad-unclosed square bracket.sdstest index 9043c783d..7248c7b52 100644 --- a/DSL-langium/tests/resources/grammar/expressions/indexed access/bad-unclosed square bracket.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/indexed access/bad-unclosed square bracket.sdstest @@ -1,5 +1,5 @@ // $TEST$ syntax_error pipeline test { - a[; + a[1; } diff --git a/DSL-langium/tests/resources/grammar/expressions/parenthesized expression/bad-unclosed parenthesis.sdstest b/DSL-langium/tests/resources/grammar/expressions/parenthesized expression/bad-unclosed parenthesis.sdstest new file mode 100644 index 000000000..96a1dce5a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/parenthesized expression/bad-unclosed parenthesis.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + (1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/parenthesized expression/good-nested.sdstest b/DSL-langium/tests/resources/grammar/expressions/parenthesized expression/good-nested.sdstest new file mode 100644 index 000000000..5b210c27a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/parenthesized expression/good-nested.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + ((1 + 2)); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/parenthesizedExpression.sdstest b/DSL-langium/tests/resources/grammar/expressions/parenthesized expression/good-one level.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/expressions/parenthesizedExpression.sdstest rename to DSL-langium/tests/resources/grammar/expressions/parenthesized expression/good-one level.sdstest