factor → ID
expr1 → expr2 + term
code(expr2)
push($3)
code(term)
pop($8)
add $3, $3, $8
expr → term
statement → expr1 BECOMES expr2 SEMI
code(expr2)
sw $3, offset_id($29)
test → expr1 < expr2
code(expr1)
add $5, $3, $0
code(expr2)
slt $3, $5, $3
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
Damn there are too many of them!
I give up so let's just review these shit from the fucking paper