A comprehensive, interactive web application for learning compiler theory concepts through hands-on tools and visualizations.
Explore our interactive tools and visualizations to master compiler theory and language design.
🔗 Visit the live application: compiler-learninghub.onrender.com
- FIRST & FOLLOW Sets - Compute FIRST and FOLLOW sets for context-free grammars
- LL(1) Parsing Table - Generate LL(1) parsing tables with conflict detection
- Grammar Parser - Parse text-based grammar notation into structured format
- Ambiguity Checker - Detect grammar ambiguity through FIRST set conflicts
- Left Recursion Elimination - Remove direct and indirect left recursion
- Left Factoring - Apply left factoring to eliminate common prefixes
- Language → Regex - Convert formal language descriptions to regular expressions
- Regex → Language - Understand what regular expressions represent
- Pattern Recognition - Automatic detection of common language patterns
- LR(0) Parser - Generate LR(0) parsing tables and analyze shift-reduce conflicts
- Three Address Code - Convert expressions to TAC representation
- Control Flow Graph - Generate CFGs from TAC with basic block analysis
- Backend: Flask (Python 3.8+)
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Algorithms: Custom Python implementations for compiler theory
- Styling: Modern CSS with responsive design
- Python 3.8 or higher
- pip (Python package manager)
-
Clone the repository
git clone <https://github.com/MNR-Tushar/Compiler-Learning-Hub.git> cd compiler-learning-hub
-
Create a virtual environment
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Run the application
python app.py
-
Open your browser Navigate to
http://localhost:5000
This application helps students understand:
- Context-Free Grammars - Structure and representation
- Parsing Algorithms - LL(1), LR(0) parsing techniques
- Language Theory - Regular expressions and formal languages
- Compiler Construction - Code generation and optimization
- Algorithm Implementation - Practical coding of theoretical concepts
compiler-learning-hub/
├── app.py # Main Flask application
├── algos/
│ └── grammar_utils.py # Core grammar algorithms
├── static/
│ ├── css/
│ │ └── style.css # Main stylesheet
│ └── js/
│ ├── main.js # Common utilities
│ └── pages/ # Page-specific JavaScript
├── templates/
│ ├── base.html # Base template
│ ├── index.html # Homepage
│ └── pages/ # Individual page templates
└── requirements.txt # Python dependencies
- Responsive Design - Works on desktop, tablet, and mobile
- Modern Interface - Clean, intuitive design with smooth animations
- Interactive Results - Dynamic tables, visualizations, and downloadable reports
- Example Loading - Pre-built examples for quick learning
- Error Handling - User-friendly error messages and validation
The application is fully responsive and includes:
- Mobile-first design approach
- Flexible grid layouts
- Touch-friendly controls
- Optimized for all screen sizes
- SLR(1) Parser - Extend LR parsing capabilities
- Semantic Analysis - Type checking and symbol tables
- Code Optimization - Basic block optimization algorithms
- Visual Parsing Trees - Interactive parse tree visualization
- More Language Patterns - Extended regex and grammar support
- User Accounts - Save and share grammar configurations
- API Documentation - Swagger/OpenAPI integration
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Compiler Theory - Based on standard compiler construction principles
- Flask Framework - Web framework for Python
- Modern Web Standards - HTML5, CSS3, ES6+ JavaScript
- Educational Community - Inspired by the need for better compiler education tools
If you have any questions or need help:
- Create an issue on GitHub
- Check the documentation
- Review the example usage
** © 2025 Compiler Learning Hub. Made by Naimur & Shemanto**