factor → ID

lw $3, offset_id($29)

expr1 → expr2 + term

code(expr2)
push($3)
code(term)
pop($8)
add $3, $3, $8

expr → term

code(term)

statement → expr1 BECOMES expr2 SEMI

code(expr2)
sw $3, offset_id($29) // overwrite the old value of expr1

test → expr1 < expr2

code(expr1)
add $5, $3, $0
code(expr2)
slt $3, $5, $3 // $3 has value 1 if condition is true

test → expr1 > expr2

code(expr2)
add $5, $3, $0
code(expr1)
slt $3, $5, $3

test → expr1 ≠ expr2

code(expr1)
add $5, $3, $0
code(expr2)
slt $6, $3, $5
slt $7, $5, $3
add $3, $6, $7

test → expr1 < expr2

code(expr1)
add $5, $3, $0
code(expr2)
slt $3, $5, $3 // $3 has value 1 if condition is true

Damn there are too many of them!
I give up so let's just review these shit from the fucking paper