Open a2aaron opened 7 years ago
Our intermediate representation should also be somewhat richer to enable optimizations, like
(ADD, 3) # +++
(ADD, -3) # ---
(MOV, -3) # <<<
(MOV, 3) # >>>
(SET, 2) # [-]++
(READ, None)
(WRITE, None)
(OPEN, 14) # a [ that branches 14 instructions on success
(CLOSE, 14) # a ] that branches 14 instructions back on success
etc…
This removes the annoyance of having to check for both
[
andord('[')