summaryrefslogtreecommitdiff
path: root/src/printer
diff options
context:
space:
mode:
Diffstat (limited to 'src/printer')
-rw-r--r--src/printer/cvc/cvc_printer.cpp7
-rw-r--r--src/printer/smt2/smt2_printer.cpp7
2 files changed, 12 insertions, 2 deletions
diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp
index 1df59adc4..f779a1bdc 100644
--- a/src/printer/cvc/cvc_printer.cpp
+++ b/src/printer/cvc/cvc_printer.cpp
@@ -597,7 +597,8 @@ void CvcPrinter::toStream(std::ostream& out, const Command* c,
tryToStream<GetOptionCommand>(out, c) ||
tryToStream<DatatypeDeclarationCommand>(out, c) ||
tryToStream<CommentCommand>(out, c) ||
- tryToStream<EmptyCommand>(out, c)) {
+ tryToStream<EmptyCommand>(out, c) ||
+ tryToStream<EchoCommand>(out, c)) {
return;
}
@@ -807,6 +808,10 @@ static void toStream(std::ostream& out, const CommentCommand* c) throw() {
static void toStream(std::ostream& out, const EmptyCommand* c) throw() {
}
+static void toStream(std::ostream& out, const EchoCommand* c) throw() {
+ out << "ECHO \"" << c->getOutput() << "\";";
+}
+
template <class T>
static bool tryToStream(std::ostream& out, const Command* c) throw() {
if(typeid(*c) == typeid(T)) {
diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp
index 25d3bf35a..a1ee99d8f 100644
--- a/src/printer/smt2/smt2_printer.cpp
+++ b/src/printer/smt2/smt2_printer.cpp
@@ -423,7 +423,8 @@ void Smt2Printer::toStream(std::ostream& out, const Command* c,
tryToStream<GetOptionCommand>(out, c) ||
tryToStream<DatatypeDeclarationCommand>(out, c) ||
tryToStream<CommentCommand>(out, c) ||
- tryToStream<EmptyCommand>(out, c)) {
+ tryToStream<EmptyCommand>(out, c) ||
+ tryToStream<EchoCommand>(out, c)) {
return;
}
@@ -661,6 +662,10 @@ static void toStream(std::ostream& out, const CommentCommand* c) throw() {
static void toStream(std::ostream& out, const EmptyCommand* c) throw() {
}
+static void toStream(std::ostream& out, const EchoCommand* c) throw() {
+ out << "(echo \"" << c->getOutput() << "\")";
+}
+
template <class T>
static bool tryToStream(std::ostream& out, const Command* c) throw() {
if(typeid(*c) == typeid(T)) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback