summaryrefslogtreecommitdiff
path: root/i/marvin/src/interpreter/interpreter.cc
diff options
context:
space:
mode:
authorschodet2006-04-11 19:08:35 +0000
committerschodet2006-04-11 19:08:35 +0000
commitaa023b1a9f1a84323a81c8674d46a1d5a0d39629 (patch)
treec1a39a1ddd0f13432c1a26c3cefab41ec4bdb9ef /i/marvin/src/interpreter/interpreter.cc
parentfe8085484038b83d431459ac7fc3980cbbac9137 (diff)
Correction d'une erreur dans le bad_any_cast.
Ajout du support de la notation exponentielle dans le parser. Ajout du support du parser dans l'interpreter.
Diffstat (limited to 'i/marvin/src/interpreter/interpreter.cc')
-rw-r--r--i/marvin/src/interpreter/interpreter.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/i/marvin/src/interpreter/interpreter.cc b/i/marvin/src/interpreter/interpreter.cc
index a7f905c..bdc918a 100644
--- a/i/marvin/src/interpreter/interpreter.cc
+++ b/i/marvin/src/interpreter/interpreter.cc
@@ -23,6 +23,7 @@
//
// }}}
#include "interpreter.hh"
+#include "interpreter_parser.hh"
/// Destructor.
Interpreter::~Interpreter (void)
@@ -66,3 +67,19 @@ Interpreter::call (const std::string &s, const Args &a,
}
}
+/// Interpret a string.
+void
+Interpreter::interpretString (const std::string &s, bool dryrun/*false*/)
+{
+ InterpreterParser p (*this, dryrun);
+ p.parseString (s);
+}
+
+/// Interpret a file.
+void
+Interpreter::interpretFile (const std::string &file, bool dryrun/*false*/)
+{
+ InterpreterParser p (*this, dryrun);
+ p.parseFile (file);
+}
+