Trees | Indices | Help |
---|
|
object --+ | CFNameGen
|
|||
|
__init__(self,
nameGrammar) Create a namegen object. |
||
|
checkTypes(self,
nameGrammar) Check given grammar object for correct datatypes. |
||
|
checkUndefinedNonTerminals(self,
nameGrammar) Check given grammar for undefined non-terminals. |
||
|
checkUnproductiveNonTerminals(self,
nameGrammar) Check grammar for possibly unproductive non-terminals. |
||
|
checkUnusedNonTerminals(self,
nameGrammar) Check grammar for non-terminals that can never be reached. |
||
| verifyGrammar(self) | ||
| getName(self) | ||
Inherited from |
|
|||
|
stringUndefinedNonTerminal = 'Undefined non-terminal "%(undefinedNonTerminal)s" i...
|
||
|
reNonTerminal = <_sre.SRE_Pattern object at 0xa6dc90>
|
|
|||
Inherited from |
|
Create a namegen object. We take a grammar dict, as before the Great Refactoring.
|
Check given grammar object for correct datatypes. This function is only really necessary while the grammar's still being specified in here. It will likely disappear when we parse the grammar from a data file. |
Check given grammar for undefined non-terminals. An undefined non-terminal is a non-terminal symbol used in a symbol definition that has no definition of its own and cannot therefore be expanded. Undefined non-terminals can lead to ugly error messages instead of beautifully generated names. |
Check grammar for possibly unproductive non-terminals. An unproductive non-terminal is a non-terminal symbol that cannot be converted to a terminal symbol in the given grammar. A good example of this is a non-terminal symbol that includes itself in its definition. This function is currently very basic and should be extended (rewritten?) to allow warnings for _possible_ unproductive non-terminals and errors for _definite_ unproductive non-terminals. Volunteers? XXX: INCOMPLETE |
Check grammar for non-terminals that can never be reached. While unused non-terminals are irrelevant in the generation of sentences, their presence usually implies an error in the grammar. XXX: INCOMPLETE |
|
|
|
stringUndefinedNonTerminalNone
|
reNonTerminalNone
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0alpha3 on Wed Aug 8 12:24:34 2007 | http://epydoc.sourceforge.net |