diff options
Diffstat (limited to '')
-rw-r--r-- | bin/bit.y | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/bit.y b/bin/bit.y index 583a0280..33347ff5 100644 --- a/bin/bit.y +++ b/bin/bit.y @@ -63,7 +63,9 @@ expr: | expr 'G' { $$ = $1 << 30; } | expr 'T' { $$ = $1 << 40; } | '~' expr { $$ = ~$2; } - | '-' expr { $$ = -$2; } + | '&' expr %prec '~' { $$ = MASK($2); } + | '+' expr %prec '~' { $$ = +$2; } + | '-' expr %prec '~' { $$ = -$2; } | expr '*' expr { $$ = $1 * $3; } | expr '/' expr { $$ = $1 / $3; } | expr '%' expr { $$ = $1 % $3; } |