This project is a simple interpreter for a custom programming language. It can read and execute code from a file or run an interactive prompt for executing code line by line.
- Lexical Analyzer (Lexer) ✅
- Lexemes
- Tokens
- Syntactical Analysis (Parser) ✅
- Abstract Syntax Tree
- Recursive Descent Parser
- Execution of Code ️✅
- C++ compiler (e.g., g++)
- CMake (optional, for building the project)
- Build Tools like VS Build Tools for Windows
To build the project, you can use the following commands:
mkdir build
cd build
cmake ..
makeTo run a file, use the following command:
#Linux
./src/Interpreter
#Windows
.\src\Debug\Interpreter.exe And provide the path to the file when prompted.
Here is an example of the custom language syntax:
SUGOD
MUGNA NUMERO x, y, z = 5
MUGNA LETRA a_1 = 'n'
MUGNA TINUOD t = "OO"
x=y=4
a_1='c'
--this is a comment
IPAKITA: x & t & z & $ & a_1 & [#] & "last"
KATAPUSAN
Save the example code to a file (e.g., example.txt) and run the interpreter in file mode, providing the path to the file.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.