| summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'instr-to-kodkod/parser')
| -rw-r--r-- | instr-to-kodkod/parser/PropertyLexer.g4 | 4 | ||||
| -rw-r--r-- | instr-to-kodkod/parser/PropertyParser.g4 | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/instr-to-kodkod/parser/PropertyLexer.g4 b/instr-to-kodkod/parser/PropertyLexer.g4 index ec01c88..f5b553e 100644 --- a/instr-to-kodkod/parser/PropertyLexer.g4 +++ b/instr-to-kodkod/parser/PropertyLexer.g4 @@ -4,8 +4,8 @@ fragment SEP: [ \t\r\n]+; L_PAREN : '('; R_PAREN : ')'; -L_BRAKT: ']'; -R_BRAKT: '['; +L_BRAKT: '['; +R_BRAKT: ']'; TAG_EXISTING_KW: '(tag_existing' SEP; diff --git a/instr-to-kodkod/parser/PropertyParser.g4 b/instr-to-kodkod/parser/PropertyParser.g4 index 3e5634f..e6cd164 100644 --- a/instr-to-kodkod/parser/PropertyParser.g4 +++ b/instr-to-kodkod/parser/PropertyParser.g4 @@ -323,7 +323,7 @@ regex_special_predicate [Variable current_node] (WS)* REGEX_SPECIAL_PREDICATE_KW id_or_string_or_fun[current_node] - STRING + (WS)+ STRING (WS)* R_PAREN { @@ -1303,6 +1303,11 @@ formula [Variable current_node] $result = ($predicate.result); } + | regex_special_predicate[current_node] + { + $result = ($regex_special_predicate.result); + } + | and_operator[current_node] { $result = ($and_operator.result); |


