| Home | Trees | Index | Help |
|---|
| Package ZestyParser :: Module Tokens :: Class Token |
|
AbstractToken --+
|
Token
| Method Summary | |
|---|---|
| |
__call__(self,
parser,
origCursor)
| |
__str__(self)
| |
| Inherited from AbstractToken | |
Allows you to construct TokenSequences with the + operator. | |
Allows you to construct CompositeTokens with the | operator. | |
| |
Convenience overloading for setting the callback of a token whose initializer you
do not call directly, such as the result of combining tokens with + or |. | |
Overloading for setting the failMessage of a token. | |
Method called by subclasses' __call__ methods to add
uniform support for the callback and as parameters. | |
| Instance Variable Summary | |
|---|---|
| int | group: If defined, __call__ returns that group of the regular
expression match instead of the whole match object. |
| Inherited from AbstractToken | |
as: An optional callable which, if not None, will be called in the same
manner as a callback (after any callback and before returning to the
parser instance), but will be passed only one argument: the data matched
(or returned by the callback, if any). | |
callback: An optional callable which, if not None, will be called whenever an
instance matches successfully. | |
desc: The generic "description" variable which stores the
"essence" of any given instance. | |
| Class Variable Summary | |
|---|---|
| Inherited from AbstractToken | |
NoneType |
failMessage = None |
| Method Details |
|---|
__init__(self,
regex,
callback=None,
as=None,
name=None,
group=None)
|
| Instance Variable Details |
|---|
groupIf defined,__call__ returns that group of the regular
expression match instead of the whole match object.
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Thu Jan 11 23:26:09 2007 | http://epydoc.sf.net |