summaryrefslogtreecommitdiff
path: root/src/parser/cvc
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-02-26 13:54:41 -0600
committerGitHub <noreply@github.com>2020-02-26 13:54:41 -0600
commitb320aa323923822a7702997bbca05e8512da55a4 (patch)
tree62ed510b54bbfef908296a264002052efc4fff98 /src/parser/cvc
parentf26ea8026e94252e4f1418be473d10a5f957b988 (diff)
Basic support for regular expression complement (#3437)
Fixes #3408 . Adds basic rewriter, parsing, type checking and implements the required cases in regexp_operation.cpp. It also adds some missing documentation in regexp_operation.h
Diffstat (limited to 'src/parser/cvc')
-rw-r--r--src/parser/cvc/Cvc.g3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parser/cvc/Cvc.g b/src/parser/cvc/Cvc.g
index 3fde52bbe..33ca7bcf2 100644
--- a/src/parser/cvc/Cvc.g
+++ b/src/parser/cvc/Cvc.g
@@ -240,6 +240,7 @@ tokens {
REGEXP_LOOP_TOK = 'RE_LOOP';
REGEXP_EMPTY_TOK = 'RE_EMPTY';
REGEXP_SIGMA_TOK = 'RE_SIGMA';
+ REGEXP_COMPLEMENT_TOK = 'RE_COMPLEMENT';
SETS_CARD_TOK = 'CARD';
@@ -2045,6 +2046,8 @@ stringTerm[CVC4::Expr& f]
{ f = MK_EXPR(CVC4::kind::REGEXP_RANGE, f, f2); }
| REGEXP_LOOP_TOK LPAREN formula[f] COMMA formula[f2] COMMA formula[f3] RPAREN
{ f = MK_EXPR(CVC4::kind::REGEXP_LOOP, f, f2, f3); }
+ | REGEXP_COMPLEMENT_TOK LPAREN formula[f] RPAREN
+ { f = MK_EXPR(CVC4::kind::REGEXP_COMPLEMENT, f); }
| REGEXP_EMPTY_TOK
{ f = MK_EXPR(CVC4::kind::REGEXP_EMPTY, std::vector<Expr>()); }
| REGEXP_SIGMA_TOK
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback