Earley parsing algorithm implementation in Haskell including a CFG definition API
Haskell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Text
.gitignore
Example.hs
LICENSE
README.markdown
Setup.hs
haskell-earley.cabal

README.markdown

hasekll-earley

The code implements Earley parsing algorithm in Haskell 1. Context-free grammars and processing rules are specified directly in Haskell, without templates or other forms of pre-processing, using the monadic syntax with the DoRec extension. Programming in this style feels like using parser combinators but does not prevent global grammar analysis.

Warning: This code is alpha quality, as I have not yet convinced myself that the implementation is correct, especially with handling epsilon rules. Nor did I do any complexity analysis yet, so it may be performing worse advertised (Earley is supposed to be cubic).