I have problem on Yacc/Bison. This is my code :
%{
#include <stdio.h>
%}
%union{
double val;
}
%start debut
%token <val> nombre
%left PLUS
%%
debut :
| ADDITION {printf('%f \n',$1);}
;
ADDITION : nombre PLUS nombre {$$=$1+$3;}
;
%%
void yyerror(char *s){
printf("%s \n",s);
}
int main(void){
return yyparse();
}
I get this error type : $1 of 'debut' has no declared type