Lightweight modular Pascal compiler with an interpreter and C code generator.
- Lexer - Converting a sequence of characters into a sequence of token-value pairs
- Parser - Building the AST while conforming to the rules of a formal grammar
- Symbolizer - Visits the AST and forms symbols table
- Generator - Produces C code using the symbols and AST
- Runner - Interpreting AST
-
Choose the test file from [01-11] in
main.py
-
Compile and run example Pascal code
python3 main.py
-
Runner will be executed. Enter the input values from the specified test folder or any other you'd like to try.
-
Generated code with be placed inside the specified test folder.