Building my own programming language using Python - To understand more about interpreters, and compilers. It includes a lexer to tokenize the input code and provide error handling for illegal characters. Zenscript is a dynamically types interpreted language written in python.
The project is organized into separate modules for different functionality:
constants.py
: Defines constants used in the project.errors.py
: Contains error handling classes for the interpreter.position.py
: Manages position tracking within the input text.tokens.py
: Defines token types and the Token class.lexer.py
: Contains the Lexer class responsible for tokenizing the input code.main.py
: The entry point to the interpreter with therun
function.
-
Clone or download the project to your local machine.
-
Ensure you have Python installed.
-
Run the shell.py file.
python3 shell.py
- If-Else statements
- Adding functions
- Write documentation