Overview
The Earley Parser tracks predicted, scanned, and completed grammar states at each input position.
Parses general context-free grammars with a chart of partial parse states.
Compact metadata for implementation and discovery.
The Earley Parser tracks predicted, scanned, and completed grammar states at each input position.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n^2)
Worst
O(n^3)
Space
O(n^2)
Show chart columns filling with dotted grammar states.
Earley Parser operates in O(n^2) time and O(n^2) space within the Chart Parsing family. Often compared with CYK Algorithm and Packrat Parsing.
What each reference supports for this entry.
Original Earley parser paper supporting chart states, prediction, scanning, and completion.
Open sourceParsing reference for Earley Parser's control flow, grammar assumptions, and parser construction tradeoffs.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Earley and CYK parsing both recognize context-free grammars with dynamic programming.