A lambda calculus expression parser.
Methods
|
|
__init__
feed
isVariable
next
process
token
|
|
__init__
|
__init__ ( self, data=None )
|
|
feed
|
feed ( self, data )
Feed another batch of data to the parser.
|
|
isVariable
|
isVariable ( self, token )
Is this token a variable (that is, not one of the other types)?
|
|
next
|
next ( self )
Parse the next complete expression from the stream and return it.
Exceptions
|
|
Error, "parse error, unexpected token: %s" % tok
|
|
|
process
|
process ( self )
Process the waiting stream to make it trivial to parse.
|
|
token
|
token ( self, destructive=1 )
Get the next waiting token. The destructive flag indicates
whether the token will be removed from the buffer; setting it to
0 gives lookahead capability.
|
|