Method | __init__ |
No summary |
Method | __or__ |
Allow new parsers to be constructed by combining parser objects with the "|" operator. |
Method | __repr__ |
Undocumented |
Instance Variable | decent |
optional function (or object) to recursively parse the text matched by this rule. Called in the same way as process. |
Instance Variable | descent |
Undocumented |
Instance Variable | pattern |
the regular expression for this parser as string |
Instance Variable | process |
function (or object) to process matched text, or None The function should take a Builder object as first argument, followed by one or more parameters for matched groups in the regular expression. If the regex pattern has no capturing groups this function is called with the whole match. The default function will use the tag and descent attributes |
Instance Variable | tag |
Builder tag for result of this rule. Used by the default process method. |
Method | _process |
Undocumented |
Instance Variable | _re |
Undocumented |
Parameters | |
tag | Builder tag for result of this rule. Used by the default process method. |
pattern | regex pattern as string |
process | optional function to process matched text |
descent | optional function to recursively parse matched text |
Builder
object as first argument, followed by one or more parameters for matched groups in the regular expression. If the regex pattern has no capturing groups this function is called with the whole match. The default function will use the tag and descent attributes