From: Tianyi Liang Date: Sun, 11 Jan 2015 18:00:10 +0000 (-0600) Subject: adjusted to both v2.0 and v2.5 string literals X-Git-Tag: cvc5-1.0.0~6448 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d8ed81bcb817139a50404646b753192de787576;p=cvc5.git adjusted to both v2.0 and v2.5 string literals --- diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index e72de92fd..72a64ab78 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -223,13 +223,13 @@ void Smt2Printer::toStream(std::ostream& out, TNode n, char c = s[i]; if(c == '"') { if(d_variant == z3str_variant || d_variant == smt2_0_variant) { - out << c; //out << "\\\""; + out << "\\\""; } else { out << "\"\""; } - } /*else if(c == '\\' && (d_variant == z3str_variant || d_variant == smt2_0_variant)) { + } else if(c == '\\' && (d_variant == z3str_variant || d_variant == smt2_0_variant)) { out << "\\\\"; - }*/ else { + } else { out << c; } } diff --git a/src/util/regexp.cpp b/src/util/regexp.cpp index 24e894678..6bbdcb36a 100644 --- a/src/util/regexp.cpp +++ b/src/util/regexp.cpp @@ -117,9 +117,11 @@ std::string String::toString() const { if(isprint( c )) { if(c == '\\') { str += "\\\\"; - } else if(c == '\"') { - str += "\\\""; - } else { + } + //else if(c == '\"') { + // str += "\\\""; + //} + else { str += c; } } else { diff --git a/test/regress/regress0/parser/Makefile.am b/test/regress/regress0/parser/Makefile.am index 3808bd54d..eb27e797b 100644 --- a/test/regress/regress0/parser/Makefile.am +++ b/test/regress/regress0/parser/Makefile.am @@ -20,9 +20,8 @@ MAKEFLAGS = -k # put it below in "TESTS +=" TESTS = \ declarefun-emptyset-uf.smt2 \ - strings20.smt2 - -# strings25.smt2 + strings20.smt2 \ + strings25.smt2 EXTRA_DIST = $(TESTS)