diff options
author | June McEnroe <june@causal.agency> | 2020-12-30 18:31:36 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-12-30 18:31:36 -0500 |
commit | dc1bb39579d2bdfedc7f5a99315b9f0dc95d15f0 (patch) | |
tree | c9309d145db163fdb5842fc9a4986e9cd8d94fac /bin/bit.y | |
parent | Add make lexer (diff) | |
download | src-dc1bb39579d2bdfedc7f5a99315b9f0dc95d15f0.tar.gz src-dc1bb39579d2bdfedc7f5a99315b9f0dc95d15f0.zip |
Add postfix $ operator to bit
Diffstat (limited to '')
-rw-r--r-- | bin/bit.y | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/bit.y b/bin/bit.y index 0a9bc7ce..61b6f465 100644 --- a/bin/bit.y +++ b/bin/bit.y @@ -35,6 +35,7 @@ static uint64_t vars[128]; %} +%left '$' %right '=' %left '|' %left '^' @@ -75,6 +76,7 @@ expr: | expr '^' expr { $$ = $1 ^ $3; } | expr '|' expr { $$ = $1 | $3; } | Var '=' expr { $$ = vars[$1] = $3; } + | expr '$' { $$ = $1; } ; %% |