summaryrefslogtreecommitdiffhomepage
path: root/vm.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-06-08 12:58:09 +0200
committerJo-Philipp Wich <jo@mein.io>2021-06-08 13:54:50 +0200
commitce6081dbbd588fb111754f3c2c1c93d2421c6ee6 (patch)
tree30d469066e6053128cc60dbae0b6160131d4518a /vm.h
parenta363e9c5e848ad21908b66d59433ab07dffbc7f1 (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.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/vm.h b/vm.h
index c0d81d9..4e8d428 100644
--- a/vm.h
+++ b/vm.h
@@ -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) \