#include "bbtkInterpreter.h"
#include "bbtkUtilities.h"
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 23 of file bbs2cpp.cxx.
References bbtk::Utilities::ExtractScriptName(), bbtk::InterpreterVirtual::New(), and bbtk::Exception::Print().
00024 { 00025 if (argc<2) return 1; 00026 00027 std::string file,path; 00028 file = bbtk::Utilities::ExtractScriptName(argv[1],path); 00029 file += ".h"; 00030 bbtk::Interpreter::Pointer I = bbtk::Interpreter::New(file); 00031 00032 I->SetThrow(true); 00033 00034 try 00035 { 00036 I->InterpretFile(argv[1]); 00037 } 00038 catch (bbtk::Exception e) 00039 { 00040 e.Print(); 00041 } 00042 00043 return 0; 00044 }