module documentation
Undocumented
Function | demo |
Undocumented |
Function | generate |
Generates an iterator of all sentences from a CFG. |
Variable | demo |
Undocumented |
Function | _generate |
Undocumented |
Function | _generate |
Undocumented |
Generates an iterator of all sentences from a CFG.
Parameters | |
grammar | The Grammar used to generate sentences. |
start | The Nonterminal from which to start generate sentences. |
depth | The maximal depth of the generated tree. |
n | The maximum number of sentences to return. |
Returns | |
An iterator of lists of terminal tokens. |