adjusted to both v2.0 and v2.5 string literals
authorTianyi Liang <tianyi-liang@uiowa.edu>
Sun, 11 Jan 2015 18:00:10 +0000 (12:00 -0600)
committerTianyi Liang <tianyi-liang@uiowa.edu>
Sun, 11 Jan 2015 18:00:10 +0000 (12:00 -0600)
src/printer/smt2/smt2_printer.cpp
src/util/regexp.cpp
test/regress/regress0/parser/Makefile.am

index e72de92fde0aff1f86d45e05708a99aafc7d32a9..72a64ab78fe05fe25f06604ec260ff9d53f24269 100644 (file)
@@ -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;
         }
       }
index 24e894678d60f810f083e813b9b036adb1ea920d..6bbdcb36a154f2d6ae2bd5b9de609901ca584be8 100644 (file)
@@ -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 {
index 3808bd54daaaaeb9204b7881026ca13678cee199..eb27e797be3c2560d53775f8a8849d209699c708 100644 (file)
@@ -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)