I have written a simple grammer:
expr: INT { $$ = intc($1); } | FLOAT { $$ = floatc($1); } | STR { $$ = strc($1); } | ID { $$ = id($1, false); }