#include "parser.h" #include #include static unsigned char mem[65536]; int main(void) { FILE *f = fopen("test.vb", "rb"); fseek(f, 0, SEEK_END); long fsize = ftell(f); fseek(f, 0, SEEK_SET); //same as rewind(f); char *program = (char*)malloc(fsize + 1); fread(program, fsize, 1, f); fclose(f); program[fsize] = 0; parser_parse(program, mem); free(program); return 0; }