diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-08-10 01:00:09 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-08-10 01:00:09 +0200 |
commit | 10b6c4fa59abcde40dfd3c548c4df4a8b08a21d8 (patch) | |
tree | 95ebb690ff1da41033891cdeb85a799f0cfc53f3 /subprojects/frontend/src/language/problem.grammar | |
parent | refactor: direct predicates (diff) | |
download | refinery-10b6c4fa59abcde40dfd3c548c4df4a8b08a21d8.tar.gz refinery-10b6c4fa59abcde40dfd3c548c4df4a8b08a21d8.tar.zst refinery-10b6c4fa59abcde40dfd3c548c4df4a8b08a21d8.zip |
feat(language): add support for count operator
Diffstat (limited to 'subprojects/frontend/src/language/problem.grammar')
-rw-r--r-- | subprojects/frontend/src/language/problem.grammar | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/subprojects/frontend/src/language/problem.grammar b/subprojects/frontend/src/language/problem.grammar index 6fb188d8..58c398a3 100644 --- a/subprojects/frontend/src/language/problem.grammar +++ b/subprojects/frontend/src/language/problem.grammar | |||
@@ -57,7 +57,12 @@ Conjunction { ("," | Literal)+ } | |||
57 | 57 | ||
58 | OrOp { ";" } | 58 | OrOp { ";" } |
59 | 59 | ||
60 | Literal { Modality? NotOp? Modality? Atom ((":" | "=") LogicValue)? } | 60 | Literal { |
61 | Modality? ( | ||
62 | NotOp? Modality? Atom ((":" | "=") LogicValue)? | | ||
63 | ckw<"count"> "{" Modality? Atom "}" ComparisonOp int | ||
64 | ) | ||
65 | } | ||
61 | 66 | ||
62 | Atom { RelationName "+"? ParameterList<Argument> } | 67 | Atom { RelationName "+"? ParameterList<Argument> } |
63 | 68 | ||
@@ -141,6 +146,8 @@ sep1<separator, content> { content (separator content)* } | |||
141 | "\"" (![\\"\n] | "\\" (![\n] | "\n"))* "\"" | 146 | "\"" (![\\"\n] | "\\" (![\n] | "\n"))* "\"" |
142 | } | 147 | } |
143 | 148 | ||
149 | ComparisonOp { ">" | ">=" | "<" | "<=" | "=:=" | "=!=" } | ||
150 | |||
144 | NotOp { "!" } | 151 | NotOp { "!" } |
145 | 152 | ||
146 | UnknownOp { "?" } | 153 | UnknownOp { "?" } |