From 92f5835e86e6741eb6b273047e0a003212a8b638 Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Thu, 20 Feb 2020 09:02:58 -0800 Subject: Remove parser from bindings (#3779) --- src/smt/command.i | 72 ------------------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 src/smt/command.i (limited to 'src/smt/command.i') diff --git a/src/smt/command.i b/src/smt/command.i deleted file mode 100644 index bd28fa8e5..000000000 --- a/src/smt/command.i +++ /dev/null @@ -1,72 +0,0 @@ -%{ -#include "smt/command.h" - -#ifdef SWIGJAVA - -#include "bindings/java_iterator_adapter.h" -#include "bindings/java_stream_adapters.h" - -#endif /* SWIGJAVA */ -%} - -%ignore CVC4::operator<<(std::ostream&, const Command&); -%ignore CVC4::operator<<(std::ostream&, const Command*); -%ignore CVC4::operator<<(std::ostream&, const CommandStatus&); -%ignore CVC4::operator<<(std::ostream&, const CommandStatus*); -%ignore CVC4::operator<<(std::ostream&, BenchmarkStatus status); -%ignore CVC4::operator<<(std::ostream&, CommandPrintSuccess); - -%ignore CVC4::GetProofCommand; - -#ifdef SWIGJAVA - -// Instead of CommandSequence::begin() and end(), create an -// iterator() method on the Java side that returns a Java-style -// Iterator. -%ignore CVC4::CommandSequence::begin(); -%ignore CVC4::CommandSequence::end(); -%ignore CVC4::CommandSequence::begin() const; -%ignore CVC4::CommandSequence::end() const; -%extend CVC4::CommandSequence { - CVC4::JavaIteratorAdapter iterator() - { - return CVC4::JavaIteratorAdapter( - *$self); - } -} - -// CommandSequence is "iterable" on the Java side -%typemap(javainterfaces) CVC4::CommandSequence "java.lang.Iterable"; - -// the JavaIteratorAdapter should not be public, and implements Iterator -%typemap(javaclassmodifiers) CVC4::JavaIteratorAdapter "class"; -%typemap(javainterfaces) CVC4::JavaIteratorAdapter "java.util.Iterator"; -// add some functions to the Java side (do it here because there's no way to do these in C++) -%typemap(javacode) CVC4::JavaIteratorAdapter " - public void remove() { - throw new java.lang.UnsupportedOperationException(); - } - - public edu.stanford.CVC4.Command next() { - if(hasNext()) { - return getNext(); - } else { - throw new java.util.NoSuchElementException(); - } - } -" -// getNext() just allows C++ iterator access from Java-side next(), make it private -%javamethodmodifiers CVC4::JavaIteratorAdapter::getNext() "private"; - -#endif /* SWIGJAVA */ - -%include "smt/command.h" - -#ifdef SWIGJAVA - -%include "bindings/java_iterator_adapter.h" -%include "bindings/java_stream_adapters.h" - -%template(JavaIteratorAdapter_CommandSequence) CVC4::JavaIteratorAdapter; - -#endif /* SWIGJAVA */ -- cgit v1.2.3