context-free-grammar-0.1.1: Basic algorithms on context-free grammars
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Cfg.FreeCfg

Description

The free Cfg

Synopsis

Documentation

data FreeCfg t nt Source #

Represents a context-free grammar with its nonterminal and terminal types. The canonical instance of Cfg: a record that collects up implementations of each class method.

Constructors

FreeCfg 

Fields

Instances

Instances details
Cfg FreeCfg t nt Source # 
Instance details

Defined in Data.Cfg.FreeCfg

Methods

nonterminals :: FreeCfg t nt -> Set nt Source #

terminals :: FreeCfg t nt -> Set t Source #

productionRules :: FreeCfg t nt -> nt -> Set (Vs t nt) Source #

startSymbol :: FreeCfg t nt -> nt Source #

toFreeCfg :: Cfg cfg t nt => cfg t nt -> FreeCfg t nt Source #

Converts any Cfg into a FreeCfg.