Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (21 sloc) 568 Bytes
#include <iostream>
#include "codegen.h"
#include "node.h"
using namespace std;
extern int yyparse();
extern NBlock* programBlock;
void createCoreFunctions(CodeGenContext& context);
int main(int argc, char **argv)
{
yyparse();
cout << programBlock << endl;
// see http://comments.gmane.org/gmane.comp.compilers.llvm.devel/33877
InitializeNativeTarget();
InitializeNativeTargetAsmPrinter();
InitializeNativeTargetAsmParser();
CodeGenContext context;
createCoreFunctions(context);
context.generateCode(*programBlock);
context.runCode();
return 0;
}