Hacker News new | ask | show | jobs
by lkesteloot 4629 days ago
Thanks! The code is on GitHub: https://github.com/lkesteloot/turbopascal

It's a two-pass compiler. The first pass runs the code through the Stream, Lexer, and Parser classes to generate a parse tree (with type information). The second pass generates bytecode using the Compiler class. The compiled bytecode is then handed to Machine to execute. Start in IDE.js in the _run() function. Also go into turbo.css and comment out the "display:none" line in the .debug-output block. That'll let you see the parse tree and generated bytecode.

1 comments

> see the parse tree and generated bytecode

Make that a feature!

Done! Try the hidden "X" command.