Repository with the compiler/examples/documentation of TAPL (Tim's Awesome Programming Language).
Two compilers are created:
- compyler: the bootstrapping compiler, written in python
- tapl/taplc/compiler: the compiler/REPL written in TAPL, compiled using compyler
Install the poetry environment for the compyler by running:
poetry install
Currently working on the tokenizer and AST generator of the compyler TAPL compiler.
Run the following command to watch the tokenizer and AST generator using the unittests and the example .tim
files in the test directory, and see the output of the tokenizing and AST generation step:
poetry run ptw
Run the following command to compile and run the example with the currently implemented functionality:
poetry run python -m src.compilers.compyler examples/current_functionality.tim
Run the following command to compile and execute any tim file:
poery run python -m src.compilers.compyler /path/to/file.tim
- fix open TODOs in
tokenizer.py
- add 0o / e number parsing
- make distinction between int and float/double numbers
- add additional expression stuff to the ast_generator
- add statements to the ast_generator
- add language server
- add public/private to classes, functions
- make everything private by default (classes, functions, members)
- implicit "python modules' class imports", example:
modules/some_module.tim
:class SomeModule: // blabla
file.tim
:from module import SomeModule
MIT License, Copyright (c) 2025 Tim Klein Nijenhuis [email protected]