Mon, 01 Sep 2025 00:14:59 +0800
Initial Lexer/Parser
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/queue.h> #include "tlvast.h" #include "tlvc.tab.h" struct tlv_list_head g_tlvs; void yyerror(YYLTYPE *yylloc, const char *s) { fprintf(stderr, "Synatx error (%d:%d): %s\n", yylloc->first_line, yylloc->first_column, s); } int main(int argc, char **argv) { TAILQ_INIT(&g_tlvs); yyparse(); return 0; }