Mercurial > hg > Members > nobuyasu > myCompiler
view Bison-Flex/Compiler-StackBase/UTF8/script.cpp @ 5:caede627f691
chage encoding
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 17 May 2011 12:45:07 +0900 |
parents | 805d39d28230 |
children | 86c0a38332fe |
line wrap: on
line source
#include <iostream> #include "compiler.h" #include "vm.h" int main(int argc, char *argv[]) { for (++argv; argv[0]; ++argv) { vm::data data; bool compile_result; { compiler driver; compile_result = driver.compile(*argv, data); #ifdef _DEBUG if (compile_result) driver.debug_dump(); #endif } if (compile_result) { vm::vcpu machine(data); int result = machine.run(); std::cout << "result = " << result << std::endl; } } return 0; }