Hacker News new | past | comments | ask | show | jobs | submit login

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.




> see the parse tree and generated bytecode

Make that a feature!


Done! Try the hidden "X" command.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: