This project implements a syntax and semantic analyzer for a custom programming language. It parses input source code to ensure it follows syntactic and semantic rules and outputs relevant data for debugging and analysis.
- Syntax Parsing: Verifies the structure of the code using a formal grammar.
- Semantic Analysis: Ensures proper usage of identifiers, types, and operations.
- Symbol Table Management: Tracks variables, functions, and their scopes.
- Graphical User Interface (GUI):
- A menu with examples of correct and incorrect code is available for testing.
- Users can load these examples directly to evaluate the functionality of the analyzer.
Detailed Outputs:
- Advertisements: Displays all the advertisements generated by the code.
- Reduction Steps: Shows the sequence of grammar reductions.
- Symbol Table Updates: Logs changes to the symbol table.
Ensure you have the following installed:
- Python 3.8
The following libraries:
- tkinter
- time
- pathlib
- math
- ply
You can install ply using pip
Navigate to the App Directory
Run the Main.py Script
All outputs are saved in the outputs folder:
- Advertisements: Details the advertisements generated by the code.
- reductions_log.txt: Details the step-by-step grammar reductions.
- symbol_table_updates.txt: Logs modifications made to the symbol table during analysis.