1# Sanity Parser
The parser accepts the following syntax:
push1 reg - Append "1" onto register 'reg'
push# reg - Append "#" onto register 'reg'
jump amt - Jump forward by 'amt' instructions
jumpb amt - Jump backward by 'amt' instructions
case reg - perform a case operation on 'reg'
goto name - Jump to line identified by 'name'
label name - Identifies a line as 'name'
For example, Move
1,2 can be expressed as:
case 1
jump 6
jump 3
push# 2
jumpb 4
push1 2
jumpb 6
goto end
label end
Notes on Sanity can be found here.
Notes on 1#, the output language, can be found here.