A language compiler built using C. For learning and fun!
The goal of this language was to compile FizzBuzz entirely, which meant writing to stdout, loops, mod operator, and if statements were required, which were all implemented.
Quick Start:
Dependencies: gcc, nasm
Join me on this wild ride as I attempt to build a compiler from scratch. Here are the steps I've taken so far:
- The First Step: The Janky Lexer
- The Second Step: The Janky Lexer
- Implemented the Parser..not quiet there yet but on-track.
- The parser works at least..not easy ngl!!
- Moving on to the code gen part, but had to first figure out assembly code -> linker to executable so spent couple hours (days) trying many stuff out until it works yay!..moving on now to the code gen..
- Implemented the code gen basically..currently can fully compile an exit syscall (using arm64 architecture)..
- Implemented arithmetic operation (addition and subtraction) into the codegen..
- Update codegen to handle multiple operations all at once..
- Multiplication working in codegen..
- Multiple operations without the order of operation..working on variables and all..
- variables and scoping..
- Optimized operators code..moving to if statements..
- Added the if statements implementation, but need further more work to be fully working..
- ... (more steps to come)