fix an oversight in the language printers
authorMorgan Deters <mdeters@gmail.com>
Fri, 16 Sep 2011 20:49:58 +0000 (20:49 +0000)
committerMorgan Deters <mdeters@gmail.com>
Fri, 16 Sep 2011 20:49:58 +0000 (20:49 +0000)
src/printer/cvc/cvc_printer.cpp
src/printer/smt2/smt2_printer.cpp

index 0f3d635bd8d0d1177726a60672d1010d4fec8725..fa1855ebe023a6608d5d56af5b56034f3c11213e 100644 (file)
@@ -393,7 +393,8 @@ void CvcPrinter::toStream(std::ostream& out, const Command* c,
      tryToStream<SetOptionCommand>(out, c) ||
      tryToStream<GetOptionCommand>(out, c) ||
      tryToStream<DatatypeDeclarationCommand>(out, c) ||
-     tryToStream<CommentCommand>(out, c)) {
+     tryToStream<CommentCommand>(out, c) ||
+     tryToStream<EmptyCommand>(out, c)) {
     return;
   }
 
@@ -550,6 +551,9 @@ static void toStream(std::ostream& out, const CommentCommand* c) {
   out << "% " << c->getComment();
 }
 
+static void toStream(std::ostream& out, const EmptyCommand* c) {
+}
+
 template <class T>
 static bool tryToStream(std::ostream& out, const Command* c) {
   if(typeid(*c) == typeid(T)) {
index 5758b1101d8dece63f6a8dd7d81901824650f607..e926c350fc1906e3363b738982807c3fd9c1c76f 100644 (file)
@@ -291,7 +291,8 @@ void Smt2Printer::toStream(std::ostream& out, const Command* c,
      tryToStream<SetOptionCommand>(out, c) ||
      tryToStream<GetOptionCommand>(out, c) ||
      tryToStream<DatatypeDeclarationCommand>(out, c) ||
-     tryToStream<CommentCommand>(out, c)) {
+     tryToStream<CommentCommand>(out, c) ||
+     tryToStream<EmptyCommand>(out, c)) {
     return;
   }
 
@@ -462,6 +463,9 @@ static void toStream(std::ostream& out, const CommentCommand* c) {
   out << "(set-info :notes \"" << c->getComment() << "\")";
 }
 
+static void toStream(std::ostream& out, const EmptyCommand* c) {
+}
+
 template <class T>
 static bool tryToStream(std::ostream& out, const Command* c) {
   if(typeid(*c) == typeid(T)) {