Class ContextFreeGrammar
Implements Context Free Grammar - a list of context free production Rules. It supports the tentative addition and substraction of rules, as well as the possibility to accept/reject these changes.
Note: The terminals corresponding to parts of speech (e.g. D -> 'the', A -> 'big') appear in a separate vocabulary.json file See CFGExample.txt for an example. Many other example grammar appear also in the unit test project.
Inherited Members
Namespace: EarleyParser
Assembly: EarleyParser.dll
Syntax
public class ContextFreeGrammar : Grammar
Constructors
| Edit this page View SourceContextFreeGrammar(IEnumerable<Rule>)
Declaration
public ContextFreeGrammar(IEnumerable<Rule> rules)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<Rule> | rules |