A concise implementation of the Earley parsing algorithm in Python, capable of parsing any context-free grammar (CFG), including ambiguous and left-recursive grammars.
- Parses any CFG using the Earley algorithm
- Handles ambiguous and left-recursive grammars
- Outputs a detailed parsing chart with edge histories
- Includes example grammars and test sentences
Install requirements with:
pip install tabulate
Run the parser with:
python earley-parser.py
This project is licensed under the MIT License. See the LICENSE file for details.