continuing. need fix of makefile

This commit is contained in:
Partho
2025-03-28 18:02:40 -04:00
parent f217500b55
commit 227cec0b73
3 changed files with 144 additions and 90 deletions

View File

@ -219,8 +219,11 @@ declaration:
;
id_or_types:
ID {printf("string of id in id_or_type is %s\n",$<words>1); $$ = getType(look_up(cur,$1));}
| types {printf("string of type in id_or_type is %s\n",$<words>1);} {$$ = $<words>1;}
ID {printf("string of id is %s in ID pattern of id_or_type rule.\n"); $$ = $1;}
//{printf("string of id is %s in ID pattern of id_or_type rule. Type passed up the tree is %s.\n",$1,getType(look_up(cur,$1))); $$ = getType(look_up(cur,$1));}
| types {printf("string of type is %s in types pattern of id_or_type rule.\n",$1);} {$$ = $1;}
//{printf("string of type is %s in types pattern of id_or_type rule. That is passed up the tree.\n",$<words>1);} {$$ = $<words>1;}
;
;
statement_list:
@ -247,7 +250,7 @@ simple_statement:
assignable:
ID {$$ = getType(look_up(cur,$1));}
| assignable ablock {$$ = getName(getReturn(look_up(cur, $1)));}
| assignable ablock {$$ = getName(getReturn(look_up(cur, $1)));} //add array case here
| assignable rec_op ID {if(undefined != table_lookup(getRecList(look_up(cur, $1)), $3)){
{$$ = getName(table_lookup(getRecList(look_up(cur, $1)), $3));}};}
;
@ -360,10 +363,10 @@ constant:
types:
// Commented out T_String below
// T_STRING {printf("string of T_STRING in types is %s\n",$<words>1);} {$$ = $<words>1;}
T_INTEGER {printf("string of T_INTEGER in types is %s\n",$<words>1);} {$$ = $<words>1;}
| T_ADDRESS {printf("string of T_ADDRESS in types is %s\n",$<words>1);} {$$ = $<words>1;}
| T_CHARACTER {printf("string of T_CHARACTER in types is %s\n",$<words>1);} {$$ = $<words>1;}
| T_BOOLEAN {printf("string of T_BOOLEAN in types is %s\n",$<words>1);} {$$ = $<words>1;}
T_INTEGER {printf("string of T_INTEGER in types is %s\n",$<words>1);} {$$ = $1;}
| T_ADDRESS {printf("string of T_ADDRESS in types is %s\n",$<words>1);} {$$ = $1;}
| T_CHARACTER {printf("string of T_CHARACTER in types is %s\n",$<words>1);} {$$ = $1;}
| T_BOOLEAN {printf("string of T_BOOLEAN in types is %s\n",$<words>1);} {$$ = $1;}
;
%%