Hi, I'm currently using yacc.. But i've come across an error message that I can't seem to fix, and was wondering if any of you guys can help me on this... Well, i have a ambiguious grammer, and to fix the shift reduce i do the following:
exp : exp '+' exp {$$ = $1 + $3}
| exp '*' exp {$$ = $1 + $3}
...
and so on.. But i get this error:
$$ of 'exp' has no declared type
$1 of 'exp' has no declared type
$3 of 'exp' has no declared type
Am i doing something wrong? I don't understand what they mean by the declared type. Thanks guys~
Start Free Trial