Prerequisites
The Mini-Compilador Educativo requires Python 3.x and uses only standard library modules, making installation straightforward.
System Requirements
Python Version
Python 3.6 or higher
Operating System
Windows, macOS, or Linux
Disk Space
Less than 1 MB
Memory
Minimal (standard Python runtime)
Installation Steps
Verify Python Installation
First, check that you have Python 3.x installed:You should see output like
Python 3.8.10 or higher.Download the Compiler
Clone the repository or download the source code:Alternatively, download the ZIP file from GitHub and extract it.
Verify File Structure
Ensure you have the main compiler file:The file should be approximately 86 KB (~2115 lines).
No Dependencies Required!
Unlike many compiler projects, this compiler uses only Python standard library modules. No external dependencies need to be installed!
enum- For token type enumerationdataclasses- For AST node definitionstyping- For type hintstkinter- For the graphical interfacesys,io,time- For system operations
Running the Compiler
GUI Mode (Default)
Simply run the script without arguments to launch the graphical interface:Console Mode
For command-line usage (useful on servers or for automation), use the--consola flag:
Troubleshooting
Python not found
Python not found
Error:
python: command not found or python3: command not foundSolution: Install Python from python.org. On Windows, make sure to check “Add Python to PATH” during installation.Tkinter not available
Tkinter not available
Error:
ModuleNotFoundError: No module named 'tkinter'Solution: Tkinter should be included with Python, but some Linux distributions package it separately:Ubuntu/Debian
Fedora
Arch Linux
GUI doesn't launch on Linux
GUI doesn't launch on Linux
Error: GUI window doesn’t appear or crashesSolution: If you’re on a headless server or don’t have X11, use console mode:
Encoding errors
Encoding errors
Error:
UnicodeEncodeError or garbled charactersSolution: The compiler automatically configures UTF-8 encoding, but if issues persist, set your terminal encoding:Windows (PowerShell)
Linux/macOS
Verify Installation
To confirm everything works, create a test file:Run in console mode
Optional: EMU8086 Setup
To actually run the generated x86 assembly code, you’ll need the EMU8086 emulator:Download EMU8086
Download EMU8086 from emu8086.com (Windows only)
Export Assembly
In the compiler GUI, click the Export ASM button after compilation to save the
.asm fileEMU8086 is optional - the compiler includes a built-in interpreter for testing programs without assembly.
Next Steps
Quick Start
Compile your first program
Writing Programs
Learn the language syntax
Using the CLI
Master console mode
Using the GUI
Explore the graphical interface