Hello, I've developed an interpreter using Python and PLY (Python Lex-Yacc) that can parse and execute a custom programming language. The project is called Esengo because it means joy in my mother tongue; which is waht i felt when I finally understood what I was doing and how magic it was. I really felt like a genius haha. This language supports basic arithmetic operations, variable assignments, conditional statements (if-else), loops (while, for), function definitions with parameters, return statements, and array manipulations (including pop, append, count, sort, and reverse functions). The project includes defining the grammar for this language, parsing expressions, statements, and function calls, and evaluating them within a defined scope.
Here is a quick example of how it looks :
I wrote a function, affected the function into a variable and then called the variable :
Here is the result :
After every call, a syntax tree is created, here is the function's tree :
Here is another example of the grammar :
Here is eveyrthing you can do with it ! Enjoy ! Don't forget to uncomment the "s=" if you want it to work.