diff options
author | Tianyi Liang <tianyi-liang@uiowa.edu> | 2015-01-09 09:40:10 -0600 |
---|---|---|
committer | Tianyi Liang <tianyi-liang@uiowa.edu> | 2015-01-09 09:40:10 -0600 |
commit | 2d0ba1036e35a6ce6cb8d5cd9e68d311ae8cde80 (patch) | |
tree | f635e802d9ccd6b2f2f28c9c2994fe55492f6d3d /src/parser | |
parent | 0f03904f2fbe4f785c697dc301f48f55919896cd (diff) |
blocked unprintable characters in string literals;
disabled string literal test case for smtlib v2.5
Diffstat (limited to 'src/parser')
-rw-r--r-- | src/parser/smt2/Smt2.g | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index 1a5442419..22b2244a0 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -1540,8 +1540,8 @@ str[std::string& s, bool 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"); } } if(fsmtlib) { @@ -1572,8 +1572,8 @@ str[std::string& s, bool 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). |