From aa023b1a9f1a84323a81c8674d46a1d5a0d39629 Mon Sep 17 00:00:00 2001 From: schodet Date: Tue, 11 Apr 2006 19:08:35 +0000 Subject: 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. --- i/marvin/src/interpreter/interpreter.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'i/marvin/src/interpreter/interpreter.cc') 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); +} + -- cgit v1.2.3