00001
00002
00003 #include "main.h"
00004 #include "main_i.h"
00005
00006
00007 #line 9 "main.cpp"
00008
00009 int main(int argc, char** argv)
00010 {
00011 try
00012 {
00013 if (argc < 2)
00014 throw "Need filename argument";
00015
00016 Source* s = & Source::instance();
00017
00018 s->parse(argv[1]);
00019
00020
00021
00022 Translator().translate(s);
00023
00024 }
00025 catch (const char* message)
00026 {
00027 cerr << message << endl;
00028 exit (1);
00029 }
00030 catch (const string& message)
00031 {
00032 cerr << message << endl;
00033 exit (1);
00034 }
00035 catch (...)
00036 {
00037 cerr << "Catched unknown exception -- panicking" << endl;
00038 exit (1);
00039 }
00040
00041 return 0;
00042 }