t1 = x + 3 t2 = t1 * 2 PRINT t2 Targets three possible back-ends:
# Input: test.bas # 10 PRINT "Hello" # 20 END tokens = lexer("test.bas") ast = parser(tokens) ast.resolve_labels() # line 10 -> label_L10 ir = gen_ir(ast) asm = gen_x86(ir) write_exe(asm) qbasic compiler
Design and Implementation Considerations for a QBASIC Compiler: Bridging Legacy Interpreters and Modern Execution Environments t1 = x + 3 t2 = t1