projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e93990
)
Reject native extended ASCII characters. It requires user to use escaped sequence...
author
Tianyi Liang
<tianyi-liang@uiowa.edu>
Tue, 13 May 2014 20:22:38 +0000
(15:22 -0500)
committer
Tianyi Liang
<tianyi-liang@uiowa.edu>
Tue, 13 May 2014 20:22:38 +0000
(15:22 -0500)
src/parser/smt2/Smt2.g
patch
|
blob
|
history
diff --git
a/src/parser/smt2/Smt2.g
b/src/parser/smt2/Smt2.g
index 8dcebc5ee0b568d5020e2252d538815fc048baf1..b3761dfbd0a6bc78c3ba6eee02b72592e272c3cb 100644
(file)
--- 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<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(fsmtlib) {
/* handle SMT-LIB standard escapes '\\' and '\"' */
char* p_orig = strdup(s.c_str());