diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-06-08 12:58:09 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-06-08 13:54:50 +0200 |
commit | ce6081dbbd588fb111754f3c2c1c93d2421c6ee6 (patch) | |
tree | 30d469066e6053128cc60dbae0b6160131d4518a /vm.h | |
parent | a363e9c5e848ad21908b66d59433ab07dffbc7f1 (diff) |
lexer, vm: reorder token and instruction numbers
Ensure that relational operators in the lexer token and vm instruction
lists are both ordered in the same way according to the general operator
precedence of the grammar.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'vm.h')
-rw-r--r-- | vm.h | 30 |
1 files changed, 16 insertions, 14 deletions
@@ -56,27 +56,29 @@ __insn(MARR) \ __insn(NOBJ) \ __insn(SOBJ) \ __insn(MOBJ) \ -__insn(PLUS) \ -__insn(MINUS) \ -__insn(ADD) \ -__insn(SUB) \ -__insn(MUL) \ -__insn(DIV) \ -__insn(MOD) \ -__insn(LSHIFT) \ -__insn(RSHIFT) \ -__insn(BAND) \ -__insn(BXOR) \ __insn(BOR) \ -__insn(COMPL) \ -__insn(EQ) \ -__insn(NE) \ +__insn(BXOR) \ +__insn(BAND) \ __insn(EQS) \ __insn(NES) \ +__insn(EQ) \ +__insn(NE) \ __insn(LT) \ +__insn(LE) \ __insn(GT) \ +__insn(GE) \ __insn(IN) \ +__insn(LSHIFT) \ +__insn(RSHIFT) \ +__insn(ADD) \ +__insn(SUB) \ +__insn(MUL) \ +__insn(DIV) \ +__insn(MOD) \ __insn(NOT) \ +__insn(COMPL) \ +__insn(PLUS) \ +__insn(MINUS) \ __insn(JMP) \ __insn(JMPZ) \ __insn(COPY) \ |