context-free-grammar

Basic algorithms on context-free grammars http://github.com/nedervold/context-free-grammar

Latest on Hackage:0.1.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed and maintained by Eric Nedervold<nedervoldsoftware@gmail.com>

Basic algorithms on context-free grammars:

  • augmenting a grammar

  • calculating nullability

  • calculating reachability

  • calculating productivity

  • calculating first sets

  • calculating follow sets

  • calculating predict sets

You may define your context-free grammar textually using parse or with the quasiquoter bnf (both in Data.Cfg.Bnf), or you may use any data structure you like after making it an instance of Cfg (found in Data.Cfg.Cfg).

Testing is very thin in this version; basically just sanity-checking.

Changes

0.1.0 (2015-04-02):
- Restructured API so default is to keep partial analysis results;
old way was too error-prone.
0.0.1 (2015-03-14):
- Initial version.
comments powered byDisqus