parser compiling

This commit is contained in:
Partho Bhattacharya
2025-02-27 20:28:39 -05:00
parent d609dd2dca
commit 078b059d1c
2 changed files with 8 additions and 3 deletions

View File

@ -14,7 +14,12 @@
char* cur_type; char* cur_type;
%} %}
%token ID 101 %union {
int integ;
char * words;
}
%token <words> ID 101
%token T_INTEGER %token T_INTEGER
%token T_ADDRESS 202 %token T_ADDRESS 202
%token T_BOOLEAN 203 %token T_BOOLEAN 203
@ -186,8 +191,8 @@ void yyerror(const char *err) {
} }
int main() { int main() {
cur_value[1] = ""; cur_value = NULL;
cur_type[1] = ""; cur_type = NULL;
st=CreateScope(NULL,1,1); st=CreateScope(NULL,1,1);
int a; int a;
while ((a = yyparse()) != EOF){ while ((a = yyparse()) != EOF){

BIN
parser

Binary file not shown.