diff options
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/parser.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 4a59a0875eb8..d998c840e151 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -271,7 +271,8 @@ void yyerror(YYLTYPE * loc, yyscan_t scanner, ParseData * data, const char * err %nonassoc EQ NEQ %right UPDATE %left NOT -%left '+' +%left '+' '-' +%left '*' '/' %right CONCAT %nonassoc '?' %nonassoc '~' @@ -322,6 +323,9 @@ expr_op l->push_back($3); $$ = new ExprConcatStrings(false, l); } + | expr_op '-' expr_op { $$ = new ExprApp(new ExprApp(new ExprVar(data->symbols.create("__sub")), $1), $3); } + | expr_op '*' expr_op { $$ = new ExprApp(new ExprApp(new ExprVar(data->symbols.create("__mul")), $1), $3); } + | expr_op '/' expr_op { $$ = new ExprApp(new ExprApp(new ExprVar(data->symbols.create("__div")), $1), $3); } | expr_op CONCAT expr_op { $$ = new ExprOpConcatLists($1, $3); } | expr_app ; |