Home | Trees | Indices | Help |
|
---|
|
object --+ | Production
A context-free grammar production. Each production expands a single
Nonterminal
(the left-hand side) to a sequence of terminals and
Nonterminals
(the right-hand side). terminals can be any immutable hashable object that
is not a Nonterminal
. Typically, terminals are strings
representing word types, such as "dog"
or
"under"
.
Abstractly, a Grammar production indicates that the right-hand side is a possible instantiation of the left-hand side. Grammar productions are context-free, in the sense that this instantiation should not depend on the context of the left-hand side or of the right-hand side.
|
|||
|
|||
Nonterminal |
|
||
sequence of (Nonterminal and (terminal))
|
|
||
string
|
|
||
string
|
|
||
boolean
|
|
||
|
|||
|
|||
int
|
|
||
Inherited from |
|
|||
Nonterminal |
_lhs The left-hand side of the production. |
||
tuple of (Nonterminal and (terminal))
|
_rhs The right-hand side of the production. |
|
|||
|
Construct a new
|
|
|
str(x)
|
repr(x)
|
|
hash(x)
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Wed May 16 22:47:26 2007 | http://epydoc.sourceforge.net |