A PHP/Python-based parser and interpreter for IPPcode24 (An educational programming language)
This project consists of two main components:
-
Parser (Python-based)
- Located in the
parser/
directory - Handles parsing and validation of IPPcode24
- Generates XML representation of the code
- Located in the
-
Interpreter (PHP-based)
- Located in the
ipp-core/
directory - Interprets the XML representation
- Executes the IPPcode24 instructions
- Built with robust error handling and extensible architecture
- Located in the
ipp-parser-interpreter/
├── ipp-core/ # PHP Interpreter component
│ ├── core/ # Core framework classes
│ └── student/ # Implementation classes
└── parser/ # Python Parser component
├── modules/ # Parser modules
└── doc/ # Documentation
- Modular architecture separating core framework from implementation
- Comprehensive exception handling system
- Support for various instruction types:
- Arithmetic operations
- Control flow
- Memory management
- String operations
- I/O operations
- Debug capabilities
- Frame-based memory management
- Stack-based operations
- Written in Python
- Modules:
parse_utils.py
: Parsing utilitiesxml_generator.py
: XML output generationenums.py
: Enumeration definitions
- Written in PHP 8.3
- Object-oriented design
- Key components:
- Frame management system
- Data stack implementation
- Call stack handling
- Instruction factory pattern
- XML parsing capabilities
-
Prerequisites
- PHP 8.3 or higher
- Python 3.x
- Composer (included as composer.phar)
-
Installation
# Install PHP dependencies php composer.phar install
-
Development Tools
- PHPStan for static analysis
- VS Code with PHP Intelephense recommended
- Development container support available
This project is licensed under the MIT License - see the LICENSE file for details.
Core Framework by:
- Radim Kocman
- Zbynek Krivka
Implementation by:
- xvsete00
-
Development Container
- Recommended for consistent development environment
- Includes all necessary tools and extensions
-
Merlin Server
- Compatible with the student server environment
- Use PHP 8.3 specifically
-
Custom Setup
- Ensure compatibility with Merlin server
- Match PHP 8.3 configuration
- PSR-4 autoloading compliance
- Comprehensive static analysis (PHPStan level 9)
- MIT licensed for academic and personal use