I have this in my yacc file.
var_declaration : type_specifier ID ';' {$2->args = ""; $2->value = 0; $2->arraysize = 0; $2->type = "variable";}
Everything above works.
I want to add this to it.
fn($2);
From inside the function, I want to do stuff like this.
fn(struct symtab sp)
{
sp->value = 0;
}
But when I try to compile the program I get this error:
error: invalid type argument of ‘->’ (have ‘struct symtab')