A context-free grammar. A Grammar consists of a start state and a set
of productions. The set of terminals and nonterminals is implicitly
specified by the productions.
If you need efficient key-based access to productions, you can use a
subclass to implement it.
Method Summary |
|
__init__ (self,
start,
productions)
Create a new context-free grammar, from the given start state and set
of Production s. |
|
__repr__(self)
|
|
__str__(self)
|
|
productions(self,
lhs,
rhs)
|
|
start(self)
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__
|