summaryrefslogtreecommitdiff
path: root/src/parser/input.cpp
diff options
context:
space:
mode:
authorChristopher L. Conway <christopherleeconway@gmail.com>2010-05-04 19:31:24 +0000
committerChristopher L. Conway <christopherleeconway@gmail.com>2010-05-04 19:31:24 +0000
commit67a3ba16218ca0a936a6f2430dce721a076885f3 (patch)
treedff41999a0fb7a043c3421272e451cb2718010a4 /src/parser/input.cpp
parent437686e2050a622a3f7e68077aff46fd6af83cbd (diff)
Adding general support for SMT2 set-info command
Diffstat (limited to 'src/parser/input.cpp')
-rw-r--r--src/parser/input.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/parser/input.cpp b/src/parser/input.cpp
index 3c1747759..9ee167897 100644
--- a/src/parser/input.cpp
+++ b/src/parser/input.cpp
@@ -31,12 +31,16 @@ using namespace CVC4::kind;
namespace CVC4 {
namespace parser {
+InputStreamException::InputStreamException(const std::string& msg) :
+ Exception(msg) {
+}
+
const std::string InputStream::getName() const {
return d_name;
}
-Input::Input(InputStream *inputStream) :
- d_inputStream( inputStream ) {
+Input::Input(InputStream& inputStream) :
+ d_inputStream( &inputStream ) {
}
Input::~Input() {
@@ -48,15 +52,19 @@ InputStream *Input::getInputStream() {
}
Input* Input::newFileInput(InputLanguage lang,
- const std::string& filename, bool useMmap) {
+ const std::string& filename,
+ bool useMmap)
+ throw (InputStreamException) {
AntlrInputStream *inputStream = AntlrInputStream::newFileInputStream(filename,useMmap);
- return AntlrInput::newInput(lang,inputStream);
+ return AntlrInput::newInput(lang,*inputStream);
}
Input* Input::newStringInput(InputLanguage lang,
- const std::string& str, const std::string& name) {
+ const std::string& str,
+ const std::string& name)
+ throw (InputStreamException) {
AntlrInputStream *inputStream = AntlrInputStream::newStringInputStream(str,name);
- return AntlrInput::newInput(lang,inputStream);
+ return AntlrInput::newInput(lang,*inputStream);
}
}/* CVC4::parser namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback