C# Class CFGLib.Grammar

Represents a concrete (probabilistic) context free grammar
Inheritance: BaseGrammar
Afficher le fichier Open project: ellisonch/CFGLib Class Usage Examples

Méthodes publiques

Méthode Description
AddProduction ( Production production ) : void
Grammar ( IEnumerable productions, Nonterminal start ) : System
ShallowClone ( ) : BaseGrammar
ToCNF ( ) : CNFGrammar

Returns a new grammar that is the CNF equivalent of this grammar. WARNING: currently this does not always preserve probabilities!

Méthodes protégées

Méthode Description
RemoveProductionWithoutSimplifying ( Production production ) : void

Private Methods

Méthode Description
ProductionsFrom ( Nonterminal lhs ) : IEnumerable

Method Details

AddProduction() public méthode

public AddProduction ( Production production ) : void
production Production
Résultat void

Grammar() public méthode

public Grammar ( IEnumerable productions, Nonterminal start ) : System
productions IEnumerable
start Nonterminal
Résultat System

RemoveProductionWithoutSimplifying() protected méthode

protected RemoveProductionWithoutSimplifying ( Production production ) : void
production Production
Résultat void

ShallowClone() public méthode

public ShallowClone ( ) : BaseGrammar
Résultat BaseGrammar

ToCNF() public méthode

Returns a new grammar that is the CNF equivalent of this grammar. WARNING: currently this does not always preserve probabilities!
public ToCNF ( ) : CNFGrammar
Résultat CNFGrammar