Repository navigation
🚀 PLY Parser & Interpreter v1.0.0
Initial Release - Complete lexer, parser, and interpreter with GUI interface built using Python PLY and Tkinter.
✨ Features
- Complete Language Support: Variables, control flow (if/else, for, while), data types (int, float, string, boolean, list)
- Lexical Analysis: Token recognition with comprehensive error handling and line tracking
- AST Generation: Visual Abstract Syntax Tree display with hierarchical representation
- Tree-Walking Interpreter: Full program execution with variable scope and built-in functions
- Modern GUI: Professional Tkinter interface with code editor, live output, and error display
- Built-in Functions:
print()andstr()with extensible function registry - Error Handling: Multi-stage error reporting (lexical, syntactic, runtime)
🔧 Technical Stack
- Parser Generator: PLY (Python Lex-Yacc)
- GUI Framework: Tkinter with TTK themed widgets
- Language Features: 15+ AST node types, operator precedence, symbol table management
📋 System Requirements
- Python 3.7 or higher
- PLY library (
pip install ply) - Tkinter (included with Python)
📦 Installation
- Download the source code from Assets below
- Install PLY:
pip install ply - Run:
python combined.py
🎯 Example Programs
# Variables and control flow
x = 10
if x > 5: print("Greater") else: print("Smaller")
# Loops and built-ins
for i in range(0, 3): print(str(i))
while x > 8: x = x - 1; print(x)
# Data structures
my_list = [1, "hello", True]
print(my_list)Perfect for compiler theory learning, academic projects, and portfolio demonstrations