add `mod' and bitwise builtins: remove infix functions

This commit is contained in:
volth 2018-05-16 06:55:24 +00:00 committed by GitHub
parent 8a6a14e1f5
commit 49b7cf1813
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -338,13 +338,6 @@ expr_op
| expr_op '-' expr_op { $$ = new ExprApp(CUR_POS, new ExprApp(new ExprVar(data->symbols.create("__sub")), $1), $3); }
| expr_op '*' expr_op { $$ = new ExprApp(CUR_POS, new ExprApp(new ExprVar(data->symbols.create("__mul")), $1), $3); }
| expr_op '/' expr_op { $$ = new ExprApp(CUR_POS, new ExprApp(new ExprVar(data->symbols.create("__div")), $1), $3); }
| expr_op '%' expr_op { $$ = new ExprApp(CUR_POS, new ExprApp(new ExprVar(data->symbols.create("__mod")), $1), $3); }
| expr_op '&' expr_op { $$ = new ExprApp(CUR_POS, new ExprApp(new ExprVar(data->symbols.create("__bin_and")), $1), $3); }
| expr_op '|' expr_op { $$ = new ExprApp(CUR_POS, new ExprApp(new ExprVar(data->symbols.create("__bin_or")), $1), $3); }
| expr_op '^' expr_op { $$ = new ExprApp(CUR_POS, new ExprApp(new ExprVar(data->symbols.create("__bin_xor")), $1), $3); }
| expr_op '<<' expr_op { $$ = new ExprApp(CUR_POS, new ExprApp(new ExprVar(data->symbols.create("__bin_shl")), $1), $3); }
| expr_op '>>>' expr_op { $$ = new ExprApp(CUR_POS, new ExprApp(new ExprVar(data->symbols.create("__bin_unsigned_shr")), $1), $3); }
| expr_op '>>' expr_op { $$ = new ExprApp(CUR_POS, new ExprApp(new ExprVar(data->symbols.create("__bin_signed_shr")), $1), $3); }
| expr_op CONCAT expr_op { $$ = new ExprOpConcatLists(CUR_POS, $1, $3); }
| expr_app
;