tlvc.c

Mon, 01 Sep 2025 00:14:59 +0800

author
Gong Zhile <gongzl@stu.hebust.edu.cn>
date
Mon, 01 Sep 2025 00:14:59 +0800
changeset 0
59c92fa19678
permissions
-rw-r--r--

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;
}

mercurial