mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
parent
925867dc3e
commit
d462ed3f00
|
@ -34,10 +34,14 @@ bool is_smt2_quoted_symbol(char const * s) {
|
||||||
if ('0' <= s[0] && s[0] <= '9')
|
if ('0' <= s[0] && s[0] <= '9')
|
||||||
return true;
|
return true;
|
||||||
unsigned len = static_cast<unsigned>(strlen(s));
|
unsigned len = static_cast<unsigned>(strlen(s));
|
||||||
if (len > 2 && s[0] == '|' && s[len-1] == '|') {
|
if (len >= 2 && s[0] == '|' && s[len-1] == '|') {
|
||||||
for (unsigned i = 1; i + 1 < len; i++)
|
for (unsigned i = 1; i + 1 < len; i++) {
|
||||||
if (!is_smt2_simple_symbol_char(s[i]))
|
if (s[i] == '\\' && i + 2 < len && (s[i+1] == '\\' || s[i+1] == '|')) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
else if (s[i] == '\\' || s[i] == '|')
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (unsigned i = 0; i < len; i++)
|
for (unsigned i = 0; i < len; i++)
|
||||||
|
|
Loading…
Reference in a new issue