19 lines
431 B
C
19 lines
431 B
C
|
#include <stdio.h>
|
||
|
#include "rust.h"
|
||
|
#include "grammar.tab.h"
|
||
|
|
||
|
Frame* current_frame;
|
||
|
Frame* main_frame;
|
||
|
Functions* global_functions;
|
||
|
|
||
|
int main() {
|
||
|
main_frame = make_frame(yytext_from_cstr("main"));
|
||
|
current_frame = main_frame;
|
||
|
global_functions = make_global_functions();
|
||
|
|
||
|
if (yyparse() != 0)
|
||
|
fprintf(stderr, "error found.\n");
|
||
|
|
||
|
destroy_frame(main_frame);
|
||
|
destroy_global_functions(global_functions);
|
||
|
}
|