diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2017-10-18 12:11:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-18 12:11:50 -0500 |
commit | 6f18015fdcb824f46b969882aa45187b46306e97 (patch) | |
tree | 8d04dcb3fa263a359886aa156851d4dec3e2c7e8 /src/printer | |
parent | 382813c77025e05550876bf02f2782b72d6c8927 (diff) |
Strings API escape sequences (#1245)
* Argument for strings class to specify whether to process escape sequences.
* Change default value on string constructor.
* Make CVC4::String::toString symmetric to the constructor for CVC4::String, document.
* Clang format.
Diffstat (limited to 'src/printer')
-rw-r--r-- | src/printer/smt2/smt2_printer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index 0a8020651..9c9d1fb76 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -94,7 +94,7 @@ static std::string maybeQuoteSymbol(const std::string& s) { static bool stringifyRegexp(Node n, stringstream& ss) { if(n.getKind() == kind::STRING_TO_REGEXP) { - ss << n[0].getConst<String>().toString(); + ss << n[0].getConst<String>().toString(true); } else if(n.getKind() == kind::REGEXP_CONCAT) { for(unsigned i = 0; i < n.getNumChildren(); ++i) { if(!stringifyRegexp(n[i], ss)) { @@ -256,7 +256,7 @@ void Smt2Printer::toStream(std::ostream& out, TNode n, case kind::CONST_STRING: { //const std::vector<unsigned int>& s = n.getConst<String>().getVec(); - std::string s = n.getConst<String>().toString(); + std::string s = n.getConst<String>().toString(true); out << '"'; for(size_t i = 0; i < s.size(); ++i) { //char c = String::convertUnsignedIntToChar(s[i]); |