I create a Yacc parsing Boolean expression:
boolean { $$ = $1; }
| expr '*' expr { $$ = $1 * $3; }
| expr '+' expr { $$ = $1 + $3; }
| '(' expr ')' { $$ = $2;}
;
But it is not enough for the expression like !(T+F)*F+!T. How to modify it in a simple way?
Thanks a lot!
add one line
'!' expr {$$=!($2);}