@hackage / context-free-grammar

Basic algorithms on context-free grammars

Latest0.1.1

About

Metadata

  • Last updated , by nedervold
  • License BSD-3-Clause
  • Maintained by: Eric Nedervold<nedervoldsoftware@gmail.com>

  • Lottery factor: 0

Links

Installation

Tested Compilers

  1. 9.0.1
  2. 8.10.4
  3. 8.8.4
  4. 8.6.5
  5. 8.4.4
  6. 8.2.2
  7. 8.0.2
  8. 7.10.3

Readme

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.