mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 10:55:50 +00:00
add basic rewriting to strings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c04f75cdbb
commit
75359c580e
10 changed files with 323 additions and 8 deletions
|
@ -1069,7 +1069,7 @@ namespace smt2 {
|
|||
|
||||
void parse_string_const() {
|
||||
SASSERT(curr() == scanner::STRING_TOKEN);
|
||||
expr_stack().push_back(sutil().str.mk_string(curr_id()));
|
||||
expr_stack().push_back(sutil().str.mk_string(m_scanner.get_string()));
|
||||
TRACE("smt2parser", tout << "new string: " << mk_pp(expr_stack().back(), m()) << "\n";);
|
||||
next();
|
||||
}
|
||||
|
|
|
@ -171,10 +171,7 @@ namespace smt2 {
|
|||
throw scanner_exception("unexpected end of string", m_line, m_spos);
|
||||
if (c == '\"') {
|
||||
next();
|
||||
if (curr() == '\"') {
|
||||
m_string.push_back(c);
|
||||
}
|
||||
else {
|
||||
if (curr() != '\"') {
|
||||
m_string.push_back(0);
|
||||
return STRING_TOKEN;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue