#ifndef FVM_AS_PARSER_H_ #define FVM_AS_PARSER_H_ #include "as_tokenizer.h" #include "utils.h" #include "as_op.h" struct arg { int64_t ival; double fval; }; typedef struct arg arg; struct instr { enum op op; arg* arg; const char* tag_name; int lineno; }; typedef struct instr instr; struct label { const char* name; }; typedef struct label label; struct stmt { struct label * label; struct instr * instr; }; typedef struct stmt stmt; struct stmts { struct stmt ** stmts; }; typedef struct stmts stmts; struct prog { struct stmts * stmts; }; typedef struct prog prog; // result result parse_prog(allocator* alct, token_stream* ts); // result result parse_stmt(allocator* alct, token_stream* ts); // result result parse_stmts(allocator* alct, token_stream* ts); // result result parse_instr(allocator* alct, token_stream* ts); // result