diff options
Diffstat (limited to 'subprojects/frontend/src/language/problem.grammar')
-rw-r--r-- | subprojects/frontend/src/language/problem.grammar | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/subprojects/frontend/src/language/problem.grammar b/subprojects/frontend/src/language/problem.grammar index 1ace2872..6fb188d8 100644 --- a/subprojects/frontend/src/language/problem.grammar +++ b/subprojects/frontend/src/language/problem.grammar | |||
@@ -18,14 +18,14 @@ statement { | |||
18 | (EnumBody { "{" sep<",", IndividualNodeName> "}" } | ".") | 18 | (EnumBody { "{" sep<",", IndividualNodeName> "}" } | ".") |
19 | } | | 19 | } | |
20 | PredicateDefinition { | 20 | PredicateDefinition { |
21 | (ckw<"error"> ckw<"pred">? | ckw<"direct">? ckw<"pred">) | 21 | (ckw<"error"> ckw<"pred">? | ckw<"pred">) |
22 | RelationName ParameterList<Parameter>? | 22 | RelationName ParameterList<Parameter>? |
23 | PredicateBody { ("<->" sep<OrOp, Conjunction>)? "." } | 23 | PredicateBody { ("<->" sep<OrOp, Conjunction>)? "." } |
24 | } | | 24 | } | |
25 | RuleDefinition { | 25 | RuleDefinition { |
26 | ckw<"direct">? ckw<"rule"> | 26 | ckw<"rule"> |
27 | RuleName ParameterList<Parameter>? | 27 | RuleName ParameterList<Parameter>? |
28 | RuleBody { ":" sep<OrOp, Conjunction> "~>" sep<OrOp, Action> "." } | 28 | RuleBody { ":" sep<OrOp, Conjunction> "==>" sep<OrOp, Consequent> "." } |
29 | } | | 29 | } | |
30 | Assertion { | 30 | Assertion { |
31 | kw<"default">? (NotOp | UnknownOp)? RelationName | 31 | kw<"default">? (NotOp | UnknownOp)? RelationName |
@@ -57,14 +57,14 @@ Conjunction { ("," | Literal)+ } | |||
57 | 57 | ||
58 | OrOp { ";" } | 58 | OrOp { ";" } |
59 | 59 | ||
60 | Literal { NotOp? Atom (("=" | ":") sep1<"|", LogicValue>)? } | 60 | Literal { Modality? NotOp? Modality? Atom ((":" | "=") LogicValue)? } |
61 | 61 | ||
62 | Atom { RelationName "+"? ParameterList<Argument> } | 62 | Atom { RelationName "+"? ParameterList<Argument> } |
63 | 63 | ||
64 | Action { ("," | ActionLiteral)+ } | 64 | Consequent { ("," | Action)+ } |
65 | 65 | ||
66 | ActionLiteral { | 66 | Action { |
67 | ckw<"new"> VariableName | | 67 | ckw<"new"> VariableName (":" VariableName)? | |
68 | ckw<"delete"> VariableName | | 68 | ckw<"delete"> VariableName | |
69 | Literal | 69 | Literal |
70 | } | 70 | } |
@@ -79,6 +79,10 @@ LogicValue { | |||
79 | ckw<"true"> | ckw<"false"> | ckw<"unknown"> | ckw<"error"> | 79 | ckw<"true"> | ckw<"false"> | ckw<"unknown"> | ckw<"error"> |
80 | } | 80 | } |
81 | 81 | ||
82 | Modality { | ||
83 | ckw<"must"> | ckw<"may"> | ckw<"current"> | ||
84 | } | ||
85 | |||
82 | ScopeElement { RelationName ("=" | "+=") Multiplicity } | 86 | ScopeElement { RelationName ("=" | "+=") Multiplicity } |
83 | 87 | ||
84 | Multiplicity { (IntMult "..")? (IntMult | StarMult)} | 88 | Multiplicity { (IntMult "..")? (IntMult | StarMult)} |