Home | Trees | Index | Help |
---|
Package ZestyParser :: Module Parser :: Class ZestyParser |
|
tokens
.
Method Summary | |
---|---|
Initializes the parser, optionally calling useData | |
tuple |
Returns row/column coordinates for a given point in the input stream, or cursor by default. |
iterator |
Returns an iterator which scans for tokens every time it is invoked. |
object |
Scan for one token. |
bool |
Skip one token. |
Begin parsing a stream of data |
Instance Variable Summary | |
---|---|
dict | context : A dictionary which can be used for storing any necessary state
information. |
int | cursor : The current position of the parser in data . |
sequence | data : The sequence being parsed (probably a string). |
token |
last : The last matched token. |
Class Variable Summary | |
---|---|
int |
len = 0 |
Method Details |
---|
__init__(self,
data=None)
Initializes the parser, optionally calling |
coord(self, loc=None)Returns row/column coordinates for a given point in the input stream, orcursor by default. Counting starts at
(1, 1) .
|
iter(self, tokens, skip=None, until=None)Returns an iterator which scans fortokens every time it is invoked.
|
scan(self, tokens)Scan for one token.
|
skip(self, token)Skip one token. This is a convenience method that may be slightly faster thanscan when appropriate.
|
useData(self, data)Begin parsing a stream of data
|
Instance Variable Details |
---|
contextA dictionary which can be used for storing any necessary state information.
|
cursorThe current position of the parser indata .
|
dataThe sequence being parsed (probably a string).
|
lastThe last matched token.
|
Class Variable Details |
---|
len
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Jan 11 23:26:09 2007 | http://epydoc.sf.net |