B2C Transpiler is a lightweight and minimalistic compiler designed to process a BASIC dialect using a clean and simple syntax for better readability and ease of use. The compiler is built using a three-stage architecture:
-
Lexing: Tokenizes the input code, breaking it into meaningful elements.
-
Parsing: Validates the syntax structure according to the rules of the BASIC dialect.
-
Emitting: Generates C code output, ensuring compatibility with a widely-used language for practical deployment.
- Python 3.x
- GCC
/emitter
python3 main.py hello.txt
-> in /parsing & /emitterpython3 main.py hello.txt && gcc out.c && ./a.out
-> in /emitter