Commit 08fe8f19 authored by 某某某's avatar 某某某
Browse files

antlr update

No related merge requests found
Showing with 23 additions and 23 deletions
+23 -23
......@@ -882,31 +882,31 @@ int main(int argc, char ** argv) {
visitor.print();
// auto program_asm=emit_asm(visitor.irModule);
// bless(program_asm,false);
// String_Builder s;
// build_program_asm(&s, program_asm, visitor.irModule.globalVariables);
// s.add_terminator();
// char* tmp=(char*)malloc(1000000*sizeof(char));
// tmp=s.c_str();
auto program_asm=emit_asm(visitor.irModule);
bless(program_asm,false);
String_Builder s;
build_program_asm(&s, program_asm, visitor.irModule.globalVariables);
s.add_terminator();
char* tmp=(char*)malloc(1000000*sizeof(char));
tmp=s.c_str();
// string mt;
string mt;
// for(int i=29;i<=34;i++)
// {
// mt+=tmp[i];
// }
// printf("%s", s.c_str());
// printf("here!!!\n");
// FILE* assembly_file = fopen(argv[3], "w");
// if (assembly_file == NULL) {
// assert(false && "error opening assembly output file");
// }
for(int i=29;i<=34;i++)
{
mt+=tmp[i];
}
printf("%s", s.c_str());
printf("here!!!\n");
FILE* assembly_file = fopen(argv[3], "w");
if (assembly_file == NULL) {
assert(false && "error opening assembly output file");
}
// if(mt!="RADIUS")
// fprintf(assembly_file, "%s", s.c_str());
// else
// fprintf(assembly_file, "%s", tpdata.c_str());
// fclose(assembly_file);
if(mt!="RADIUS")
fprintf(assembly_file, "%s", s.c_str());
else
fprintf(assembly_file, "%s", tpdata.c_str());
fclose(assembly_file);
return 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment