Since you are not printing anything with the grammar, you can't expect an output.
Plus considering the precedence from left to right in any production of YACC.
3 will be parsed as "number" (because it has the highest precedence according to your production). Then "*" will be the next token for the compiler and it won't match any, resulting in an ERROR.