diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-10-31 02:06:07 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2021-10-31 19:26:15 +0100 |
commit | d933f00be208a586143b35d06e689f94a6a6f7e6 (patch) | |
tree | d9d1eddd6058a48f5c5189a2d8bb1b77f2ab5579 /language-web/src/main/js/language/problem.grammar | |
parent | fix(web): fix server-side content assist filtering (diff) | |
download | refinery-d933f00be208a586143b35d06e689f94a6a6f7e6.tar.gz refinery-d933f00be208a586143b35d06e689f94a6a6f7e6.tar.zst refinery-d933f00be208a586143b35d06e689f94a6a6f7e6.zip |
feat(web): client support for transformation rules
Diffstat (limited to 'language-web/src/main/js/language/problem.grammar')
-rw-r--r-- | language-web/src/main/js/language/problem.grammar | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/language-web/src/main/js/language/problem.grammar b/language-web/src/main/js/language/problem.grammar index cf940698..c242a4ba 100644 --- a/language-web/src/main/js/language/problem.grammar +++ b/language-web/src/main/js/language/problem.grammar | |||
@@ -14,9 +14,15 @@ statement { | |||
14 | (EnumBody { "{" sep<",", UniqueNodeName> "}" } | ".") | 14 | (EnumBody { "{" sep<",", UniqueNodeName> "}" } | ".") |
15 | } | | 15 | } | |
16 | PredicateDefinition { | 16 | PredicateDefinition { |
17 | (ckw<"error"> ckw<"pred">? | ckw<"pred">) RelationName ParameterList<Parameter>? | 17 | (ckw<"error"> ckw<"pred">? | ckw<"direct">? ckw<"pred">) |
18 | RelationName ParameterList<Parameter>? | ||
18 | PredicateBody { ("<->" sep<OrOp, Conjunction>)? "." } | 19 | PredicateBody { ("<->" sep<OrOp, Conjunction>)? "." } |
19 | } | | 20 | } | |
21 | RuleDefinition { | ||
22 | ckw<"direct">? ckw<"rule"> | ||
23 | RuleName ParameterList<Parameter>? | ||
24 | RuleBody { ":" sep<OrOp, Conjunction> "~>" sep<OrOp, Action> "." } | ||
25 | } | | ||
20 | Assertion { | 26 | Assertion { |
21 | ckw<"default">? (NotOp | UnknownOp)? RelationName | 27 | ckw<"default">? (NotOp | UnknownOp)? RelationName |
22 | ParameterList<AssertionArgument> (":" LogicValue)? "." | 28 | ParameterList<AssertionArgument> (":" LogicValue)? "." |
@@ -47,9 +53,17 @@ Conjunction { ("," | Literal)+ } | |||
47 | 53 | ||
48 | OrOp { ";" } | 54 | OrOp { ";" } |
49 | 55 | ||
50 | Literal { NotOp? Atom } | 56 | Literal { NotOp? Atom (("=" | ":") sep1<"|", LogicValue>)? } |
57 | |||
58 | Atom { RelationName "+"? ParameterList<Argument> } | ||
51 | 59 | ||
52 | Atom { RelationName ParameterList<Argument>? } | 60 | Action { ("," | ActionLiteral)+ } |
61 | |||
62 | ActionLiteral { | ||
63 | ckw<"new"> VariableName | | ||
64 | ckw<"delete"> VariableName | | ||
65 | Literal | ||
66 | } | ||
53 | 67 | ||
54 | Argument { VariableName | Constant } | 68 | Argument { VariableName | Constant } |
55 | 69 | ||
@@ -67,6 +81,8 @@ Multiplicity { (IntMult "..")? (IntMult | StarMult)} | |||
67 | 81 | ||
68 | RelationName { QualifiedName } | 82 | RelationName { QualifiedName } |
69 | 83 | ||
84 | RuleName { QualifiedName } | ||
85 | |||
70 | UniqueNodeName { QualifiedName } | 86 | UniqueNodeName { QualifiedName } |
71 | 87 | ||
72 | VariableName { QualifiedName } | 88 | VariableName { QualifiedName } |
@@ -83,7 +99,7 @@ ParameterList<content> { "(" sep<",", content> ")" } | |||
83 | 99 | ||
84 | sep<separator, content> { sep1<separator, content>? } | 100 | sep<separator, content> { sep1<separator, content>? } |
85 | 101 | ||
86 | sep1<separator, content> { content (separator content?)* } | 102 | sep1<separator, content> { content (separator content)* } |
87 | 103 | ||
88 | @skip { LineComment | BlockComment | whitespace } | 104 | @skip { LineComment | BlockComment | whitespace } |
89 | 105 | ||
@@ -123,7 +139,7 @@ sep1<separator, content> { content (separator content?)* } | |||
123 | 139 | ||
124 | StarArgument { "*" } | 140 | StarArgument { "*" } |
125 | 141 | ||
126 | "{" "}" "(" ")" "[" "]" "." ".." "," ":" "<->" | 142 | "{" "}" "(" ")" "[" "]" "." ".." "," ":" "<->" "~>" |
127 | } | 143 | } |
128 | 144 | ||
129 | @detectDelim | 145 | @detectDelim |