%{ #include "bisonUtils.h" #include extern int yylex(); extern void yyerror(char *s); %} %error-verbose %token '=' %token '.' %token '{' %token '}' %token '(' %token ')' %token ':' %token ';' %token ',' %token KEYWORD %token NUM %token COMPOP %token SYMBOL %token THIS %token '+' '-' %token '*' '/' %type NomCompose %union { char * stringVal; } %% Programme: | Programme Element Element: KEYWORD {fprintf(stderr, "", $1); } | COMPOP {fprintf(stderr, "", $1); } | NomCompose {fprintf(stderr, "", $1);} | '+' {fprintf(stderr, "", $1);} | '-' {fprintf(stderr, "", $1);} | '/' {fprintf(stderr, "", $1);} | '*' {fprintf(stderr, "", $1);} | '=' {fprintf(stderr, "", $1);} | '{' {fprintf(stderr, "", $1);} | '}' {fprintf(stderr, "", $1);} | '(' {fprintf(stderr, "", $1);} | ')' {fprintf(stderr, "", $1);} | ':' {fprintf(stderr, "", $1);} | ';' {fprintf(stderr, "", $1);} | ',' {fprintf(stderr, "", $1);} | error NomCompose: SYMBOL {fprintf(stderr, "", $1); $$ = copy($1); } | THIS {fprintf(stderr, "", $1); $$ = copy($1); } | NomCompose '.' SYMBOL {$$ = c3($1,$2,$3); } %%