diff options
author | Dejan Jovanović <dejan.jovanovic@gmail.com> | 2010-02-03 22:10:21 +0000 |
---|---|---|
committer | Dejan Jovanović <dejan.jovanovic@gmail.com> | 2010-02-03 22:10:21 +0000 |
commit | 842fd54de1da122f4c7274796550c2fe21c11db2 (patch) | |
tree | fec6236bc8c3e3b92cd3759ed13f4acc7bc6c6d2 /src/util | |
parent | e0fc2cbe091097d95dbe6dd2eb9b6416b75be279 (diff) |
ELSEIF support and parser debugging with '-d parser'
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/command.cpp | 11 | ||||
-rw-r--r-- | src/util/command.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/util/command.cpp b/src/util/command.cpp index 06545a0a0..90204a63f 100644 --- a/src/util/command.cpp +++ b/src/util/command.cpp @@ -34,6 +34,15 @@ ostream& operator<<(ostream& out, const Command& c) { return out; } +ostream& operator<<(ostream& out, const Command* c) { + if (c == NULL) { + out << "null"; + } else { + c->toStream(out); + } + return out; +} + std::string Command::toString() const { stringstream ss; toStream(ss); @@ -111,7 +120,7 @@ void CheckSatCommand::toStream(ostream& out) const { void QueryCommand::toStream(ostream& out) const { out << "Query("; - d_expr.printAst(out, 2); + d_expr.printAst(out, 0); out << ")"; } diff --git a/src/util/command.h b/src/util/command.h index b41be4592..57edfea01 100644 --- a/src/util/command.h +++ b/src/util/command.h @@ -30,6 +30,7 @@ namespace CVC4 { namespace CVC4 { std::ostream& operator<<(std::ostream&, const Command&) CVC4_PUBLIC; +std::ostream& operator<<(std::ostream&, const Command*) CVC4_PUBLIC; class CVC4_PUBLIC Command { public: |