Index: bin/expr/expr.y =================================================================== --- bin/expr/expr.y +++ bin/expr/expr.y @@ -112,6 +112,19 @@ | expr '/' expr { $$ = op_div($1, $3); } | expr '%' expr { $$ = op_rem($1, $3); } | expr ':' expr { $$ = op_colon($1, $3); } + | expr ':' '(' { $$ = op_colon($1, make_str("(")); } + | expr ':' ')' { $$ = op_colon($1, make_str(")")); } + | expr ':' '|' { $$ = op_colon($1, make_str("|")); } + | expr ':' '&' { $$ = op_colon($1, make_str("&")); } + | expr ':' '=' { $$ = op_colon($1, make_str("=")); } + | expr ':' '>' { $$ = op_colon($1, make_str(">")); } + | expr ':' '<' { $$ = op_colon($1, make_str("<")); } + | expr ':' '+' { $$ = op_colon($1, make_str("+")); } + | expr ':' '-' { $$ = op_colon($1, make_str("-")); } + | expr ':' '*' { $$ = op_colon($1, make_str("*")); } + | expr ':' '/' { $$ = op_colon($1, make_str("/")); } + | expr ':' '%' { $$ = op_colon($1, make_str("%")); } + | expr ':' ':' { $$ = op_colon($1, make_str(":")); } ; %% Index: contrib/netbsd-tests/bin/expr/t_expr.sh =================================================================== --- contrib/netbsd-tests/bin/expr/t_expr.sh +++ contrib/netbsd-tests/bin/expr/t_expr.sh @@ -105,9 +105,6 @@ atf_set "descr" "Dangling arithemtic operator" } arithmetic_ops_body() { - # Begin FreeBSD - atf_expect_fail "the following testcases fail with syntax errors on FreeBSD" - # End FreeBSD test_expr '.java_wrapper : /' '0' test_expr '4 : \*' '0' test_expr '4 : +' '0'