aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src')
-rw-r--r--subprojects/frontend/src/language/problem.grammar16
1 files changed, 12 insertions, 4 deletions
diff --git a/subprojects/frontend/src/language/problem.grammar b/subprojects/frontend/src/language/problem.grammar
index a7b1fb0a..ce3baa02 100644
--- a/subprojects/frontend/src/language/problem.grammar
+++ b/subprojects/frontend/src/language/problem.grammar
@@ -9,14 +9,14 @@
9@external prop implicitCompletion from './props' 9@external prop implicitCompletion from './props'
10 10
11@precedence { 11@precedence {
12 reference @cut,
13 prefix, 12 prefix,
14 exponential @right, 13 exponential @right,
15 multiplicative @left, 14 multiplicative @left,
16 additive @left, 15 additive @left,
17 range @left, 16 range @left,
18 lattice @left, 17 lattice @left,
19 comparison @left 18 comparison @left,
19 feature @cut
20} 20}
21 21
22@top Problem { statement* } 22@top Problem { statement* }
@@ -65,8 +65,16 @@ statement {
65} 65}
66 66
67FeatureDeclaration { 67FeatureDeclaration {
68 // The @cut helps disambiguate silly cases like `contains contains` 68 // Prefer parsing `contains` as a contextual keyword.
69 (ReferenceKind !reference | PrimitiveType | kw<"bool">)? RelationName 69 (
70 FeatureDeclarationHeadWithKind[@dynamicPrecedence=1] {
71 ReferenceKind !feature ~featureHead
72 } |
73 FeatureDeclarationHeadWithoutKind {
74 (PrimitiveType | kw<"bool">)? ~featureHead
75 }
76 )
77 RelationName
70 ("[" Multiplicity? "]")? 78 ("[" Multiplicity? "]")?
71 RelationName 79 RelationName
72 (kw<"opposite"> RelationName)? 80 (kw<"opposite"> RelationName)?