hi there, i have these rules for a pascal comp:
open_if_statement : IF boolean_expression THEN statement
|IF boolean_expression THEN closed_statement ELSE
open_statement;
closed_if_statement : IF boolean_expression THEN closed_statement ELSE
closed_statement;
i want to add some semantic actions after the then ,but i get conflicts,
which is pretty understable, as what i would like to do is this.
open_if_statement : IF boolean_expression THEN {} statement
|IF boolean_expression THEN {}closed_statement ELSE
open_statement;
closed_if_statement : IF boolean_expression THEN {}closed_statement ELSE
closed_statement;
can anyone tell me how could i add some rules there? i have tried this:
open_if_statement : IF boolean_expression {sifthen($2);}THEN statement;
open_if_else_statement: IF boolean_expression {sifthen($2);}THEN
closed_statement ELSE open_statement;
and this
open_if_statement : IF boolean_expression THEN cosa statement;
cosa:{sifthen($2);} I know cosa will fail with the $2, but what i want
to know i swhat else could i do so i do not get a conflict.
thank u in advance!
______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es
_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison