/* strip off the quotes */
s = s.substr(1, s.size() - 2);
for(size_t i=0; i<s.size(); i++) {
- if((unsigned)s[i] > 127) {
- PARSER_STATE->parseError("Extended characters are not part of SMT-LIB, and they must be encoded as esacped sequences");
+ if((unsigned)s[i] > 127 && !isprint(s[i])) {
+ PARSER_STATE->parseError("Extended/unprintable characters are not part of SMT-LIB, and they must be encoded as esacped sequences");
}
}
if(fsmtlib) {
/* strip off the quotes */
s = s.substr(1, s.size() - 2);
for(size_t i=0; i<s.size(); i++) {
- if((unsigned)s[i] > 127) {
- PARSER_STATE->parseError("Extended characters are not part of SMT-LIB, and they must be encoded as esacped sequences");
+ if((unsigned)s[i] > 127 && !isprint(s[i])) {
+ PARSER_STATE->parseError("Extended/unprintable characters are not part of SMT-LIB, and they must be encoded as esacped sequences");
}
}
// In the 2.5 version, always handle escapes (regardless of fsmtlib flag).
char c = s[i];
if(c == '"') {
if(d_variant == z3str_variant || d_variant == smt2_0_variant) {
- out << "\\\"";
+ out << c; //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;
}
}