Prerequisites
The Expresiones compiler requires Python 3.6+ and ANTLR4 to be installed on your system.Install ANTLR4
Download and install ANTLR4 from the official website:Add ANTLR to your CLASSPATH:
Add these lines to your
.bashrc or .zshrc to make the changes permanent.Install Python Dependencies
Install the ANTLR4 Python runtime:The compiler also uses tkinter for file selection dialogs. On most systems, tkinter comes pre-installed with Python. If you need to install it:
Generate Parser and Lexer
Navigate to your source directory and generate the parser files from the grammar:This will generate the following files:
ExpresionesLexer.pyExpresionesParser.pyExpresionesVisitor.pyExpresiones.tokens
Project Structure
Your workspace should have the following structure:Troubleshooting
Common Issues
ANTLR4 not found- Verify CLASSPATH is set correctly
- Check that the ANTLR jar file exists at the specified path
- Ensure you’re using ANTLR4 (not ANTLR3)
- Check that the grammar file has no syntax errors
- Install the python3-tk package for your distribution
- On macOS, you may need to reinstall Python from python.org