This is Math Interpreter build using Python programming language. An interpreter works in a sequential manner. Similarly, this math interpreter works in a sequential manner. Math interpreter is a simple interpreter which takes input (mathematical expressions sequentially and generate output in the form of tokens, parse tree and the value of that mathematical expression. In this project, there are four major parts:
- File Handling: File handling in Python where input and output text files are used.
- Lexical Analysis: Lexical analysis using lexer.py file.
- Parsing: Tokenization using the _parser.py file.
- Interpreter: Interpreter to evaluate the value of a mathematical expression.
The more details about the project are in the Report of this project. This is the course project for course System Programming. System Programming is the art of designing and implementing the system programs.
To run this project in your Computer or Laptop, the following prerequisites are there:
- Python 3.6 should be installed. It will support the modules imported in the project.
- Need an editor to run python files. Example: Visual Studio Code, Pycharm, etc.
Clone this repository and go in the project folder. There are two methods to run:
After running main.py file, the output will look like:
Terminal Image
After running gui.py file, the output will look like:
GUI Input
GUI Output