about summary refs log tree commit diff homepage
path: root/lib/SMT/SMTParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/SMT/SMTParser.cpp')
-rw-r--r--lib/SMT/SMTParser.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/SMT/SMTParser.cpp b/lib/SMT/SMTParser.cpp
index dee3801c..32e453f0 100644
--- a/lib/SMT/SMTParser.cpp
+++ b/lib/SMT/SMTParser.cpp
@@ -12,7 +12,8 @@
 
 #include <iostream>
 #include <fstream>
-#include <cstring>
+#include <string>
+#include <sstream>
 #include <cassert>
 #include <stack>
 
@@ -66,6 +67,16 @@ int SMTParser::Error(const string& s) {
   return 0;
 }
 
+
+int SMTParser::StringToInt(const std::string& s) {
+  std::stringstream str(s);
+  int x;
+  str >> x;
+  assert(str);
+  return x;
+}
+
+
 void SMTParser::PushVarEnv() {
   cout << "Pushing new var env\n";
   varEnvs.push(VarEnv(varEnvs.top()));