| Home | Trees | Index | Help |
|---|
| Module yeanpypa :: Class CallbackParser |
|
Rule --+
|
CallbackParser
| Method Summary | |
|---|---|
Initialize the object with a callback. | |
Return a human-readable description of the rule. | |
Match this rule against the input. | |
| Inherited from Rule | |
Define an operator to concat two rules. | |
Define an operator to concat two rules via OR. | |
Call the action attached to this rule. | |
Tell this rule to not produce any token output. | |
Helper function encapsulating the hide()-functionality. | |
Set the action to execute on a rule match. | |
| Class Variable Summary | |
|---|---|
| Inherited from Rule | |
NoneType |
action = None |
bool |
hide_token = False
|
| Method Details |
|---|
__init__(self,
callback)
Initialize the object with a callback. The callback takes a single
character as parameter and returns True if it should match and False
otherwise:
|
__str__(self)
Return a human-readable description of the rule.
|
match(self, input_reader)Match this rule against the input. The rule calls the callback to determine whether the next character should match or not and returns the character if so.
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Sat Feb 10 16:11:43 2007 | http://epydoc.sf.net |