#include "all.h" #include "str.h" int main(void) { str input = {0}; str_append_fread(&input, stdin); lexer_t lexer = lex_init(&input); lex_run(&lexer); parser_t p = parser_init(&lexer); ast_node_t *ast = parse_program(&p); str c_code = gen_code(ast); ast_free(ast); printf("%s", c_code.data); free_str(&input); return 0; }