summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-05-19 19:08:21 -0400
committerJune McEnroe <june@causal.agency>2019-05-19 19:08:21 -0400
commite33a5a661e3d0c8a0e1f605b43be6c1390392c20 (patch)
tree7c4f302fc30d5121f378f05f99bcc92c7b5c90e8
parentAdd compound assignment operators to order (diff)
downloadsrc-e33a5a661e3d0c8a0e1f605b43be6c1390392c20.tar.gz
src-e33a5a661e3d0c8a0e1f605b43be6c1390392c20.zip
Specify precedence of unary versions of operators
-rw-r--r--bin/order.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/order.y b/bin/order.y
index e6377771..25dce32b 100644
--- a/bin/order.y
+++ b/bin/order.y
@@ -80,9 +80,9 @@ expr:
 	| Dec expr { $$ = fmt("(--%s)", $2); }
 	| expr Inc { $$ = fmt("(%s++)", $1); }
 	| expr Dec { $$ = fmt("(%s--)", $1); }
-	| '-' expr { $$ = fmt("(-%s)", $2); }
-	| '*' expr { $$ = fmt("(*%s)", $2); }
-	| '&' expr { $$ = fmt("(&%s)", $2); }
+	| '-' expr %prec '!' { $$ = fmt("(-%s)", $2); }
+	| '*' expr %prec '!' { $$ = fmt("(*%s)", $2); }
+	| '&' expr %prec '!' { $$ = fmt("(&%s)", $2); }
 	| Sizeof expr { $$ = fmt("(sizeof %s)", $2); }
 	| expr '*' expr { $$ = fmt("(%s * %s)", $1, $3); }
 	| expr '/' expr { $$ = fmt("(%s / %s)", $1, $3); }
19-01-13Set PS0 in cashJune McEnroe 2019-01-13Add PS0June McEnroe 2019-01-13Change default ENV from cashrc to env.shJune McEnroe 2019-01-13Use colours in cash promptsJune McEnroe 2019-01-12Set PSlit like NetBSD shJune McEnroe 2019-01-12Install gnupg2 from pkgsrc and symlink gpgJune McEnroe 2019-01-12Reference cash builtin man pages in cash.1 SEE ALSOJune McEnroe 2019-01-12Restore cash builtin man page datesJune McEnroe 2019-01-12Use local libeditJune McEnroe 2019-01-12Replace libedit MakefileJune McEnroe 2019-01-11Import /usr/src/lib/libedit from NetBSD 8.0June McEnroe 2019-01-11Add PSlit for prompt escapesJune McEnroe 2019-01-11Don't make depend automaticallyJune McEnroe