parser compiling
This commit is contained in:
11
grammar.y
11
grammar.y
@ -14,7 +14,12 @@
|
||||
char* cur_type;
|
||||
%}
|
||||
|
||||
%token ID 101
|
||||
%union {
|
||||
int integ;
|
||||
char * words;
|
||||
}
|
||||
|
||||
%token <words> ID 101
|
||||
%token T_INTEGER
|
||||
%token T_ADDRESS 202
|
||||
%token T_BOOLEAN 203
|
||||
@ -186,8 +191,8 @@ void yyerror(const char *err) {
|
||||
}
|
||||
|
||||
int main() {
|
||||
cur_value[1] = "";
|
||||
cur_type[1] = "";
|
||||
cur_value = NULL;
|
||||
cur_type = NULL;
|
||||
st=CreateScope(NULL,1,1);
|
||||
int a;
|
||||
while ((a = yyparse()) != EOF){
|
||||
|
Reference in New Issue
Block a user