From e0a291555fc4710c39a75eac19039a063c166cea Mon Sep 17 00:00:00 2001 From: Tianyi Liang Date: Tue, 13 May 2014 15:22:38 -0500 Subject: [PATCH] Reject native extended ASCII characters. It requires user to use escaped sequence for an extended ASCII character. --- src/parser/smt2/Smt2.g | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index 8dcebc5ee..b3761dfbd 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -1263,6 +1263,11 @@ str[std::string& s, bool fsmtlib] { s = AntlrInput::tokenText($STRING_LITERAL); /* strip off the quotes */ s = s.substr(1, s.size() - 2); + for(size_t i=0; i 127) { + PARSER_STATE->parseError("Extended characters are not part of SMT-LIB, and they must be encoded as esacped sequences"); + } + } if(fsmtlib) { /* handle SMT-LIB standard escapes '\\' and '\"' */ char* p_orig = strdup(s.c_str()); -- 2.30.2