| Home | Trees | Index | Help |
|---|
| Package ZestyParser :: Module Parser |
|
Version: 0.7.0
Author: Adam Atlas
Contact: adam@atlas.st
Copyright: Copyright 2006-2007 Adam Atlas. Released under the terms of the GNU General Public License.
| Classes | |
|---|---|
ZestyParser |
Parses one stream of data, by means of tokens. |
| Exceptions | |
|---|---|
NotMatched |
Raised by a token if it has failed to match at the parser's current cursor. |
ParseError |
Raised by a token to indicate that a parse error has occurred. |
| Function Summary | |
|---|---|
Function decorator indicating that the function should be set as the callback of the given token; returns the token instead of the function. | |
Factory which creates a logging function usable as a token callback. | |
| Function Details |
|---|
CallbackFor(token)Function decorator indicating that the function should be set as the callback of the given token; returns the token instead of the function. Example:
@CallbackFor(Token('([0-9]+)'))
def T_INT(r):
print r
This is equivalent to:
def T_INT(r):
print r
T_INT = Token('([0-9]+)', callback=T_INT)
|
DebugNote(note)Factory which creates a logging function usable as a token callback.
The logging function prints
T_FOO = TokenSeries(RawToken('foo')) >> DebugNote('foo_series')
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Thu Mar 22 02:13:39 2007 | http://epydoc.sf.net |