|
|
Repeat(matcher,
start=0,
stop=None,
limit=None,
algorithm=DEPTH_FIRST,
separator=None,
add_=False,
reduce=None)
This is called by the [] operator. |
source code
|
|
|
|
Apply(matcher,
function,
raw=False,
args=False)
Apply an arbitrary function to the results of the matcher
(>, >=). |
source code
|
|
|
|
args(function)
A decorator that has the same effect as ApplyArgs for functions/methods. |
source code
|
|
|
|
KApply(matcher,
function,
raw=False)
Apply an arbitrary function to named arguments (**). |
source code
|
|
|
|
AnyBut(exclude=None)
Match any character except those specified (or, if a matcher is used as
the exclude, if the matcher fails). |
source code
|
|
|
|
Optional(matcher)
Match zero or one instances of a matcher ([0:1]). |
source code
|
|
|
|
Star(matcher)
Match zero or more instances of a matcher ([0:]) |
source code
|
|
|
|
ZeroOrMore(matcher)
Match zero or more instances of a matcher ([0:]) |
source code
|
|
|
|
Plus(matcher)
Match one or more instances of a matcher ([1:]) |
source code
|
|
|
|
OneOrMore(matcher)
Match one or more instances of a matcher ([1:]) |
source code
|
|
|
|
Map(matcher,
function)
Apply an arbitrary function to each of the tokens in the result of the
matcher (>>). |
source code
|
|
|
|
add(_stream,
matcher)
The transformation used in Add - we carefully use "+" in as generic
a manner as possible. |
source code
|
|
|
|
Add(matcher)
Join tokens in the result using the "+" operator (+). |
source code
|
|
|
|
Join(*matchers)
Combine many matchers together with Add(And(...)). |
source code
|
|
|
|
|
|
|
Substitute(matcher,
value)
Replace each return value with that given. |
source code
|
|
|
|
|
|
|
Identity(matcher)
Functions identically to the matcher given as an argument. |
source code
|
|
|
|
Newline()
Match newline (Unix) or carriage return newline (Windows) |
source code
|
|
|
|
Space(space=' \t')
Match a single space (by default space or tab). |
source code
|
|
|
|
Whitespace(space=whitespace)
Match a single space (by default from string.whitespace,
which includes newlines). |
source code
|
|
|
|
|
|
|
Letter()
Match any ASCII letter (A-Z, a-z). |
source code
|
|
|
|
Upper()
Match any ASCII uppercase letter (A-Z). |
source code
|
|
|
|
Lower()
Match any ASCII lowercase letter (A-Z). |
source code
|
|
|
|
Printable()
Match any printable character (string.printable). |
source code
|
|
|
|
Punctuation()
Match any punctuation character (string.punctuation). |
source code
|
|
|
|
UnsignedInteger()
Match a simple sequence of digits. |
source code
|
|
|
|
SignedInteger()
Match a sequence of digits with an optional initial sign. |
source code
|
|
|
|
Integer()
The default integer is a signed one. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Real(decimal='.',
exponent='eE')
The default float is signed with exponents. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Float(decimal='.',
exponent='eE')
The default float matcher accepts signed values with optional exponents. |
source code
|
|
|
|
Word(chars=NfaRegexp('[^%s]' % whitespace),
body=None)
Match a sequence of non-space characters, joining them together. |
source code
|
|
|
|
|
|
|
Literals(*matchers)
A series of literals, joined with Or. |
source code
|
|
|
|
String(quote='"',
escape='\\')
Match a string with quotes that can be escaped. |
source code
|
|
|
|
SingleLineString(quote='"',
escape='\\',
exclude='\n')
Like String, but will not match across multiple lines. |
source code
|
|
|
|
SkipString(quote='"',
escape='\\',
ignore='\n')
Like String, matching across multiple lines, but will silently
drop newlines. |
source code
|
|
|
|
SkipTo(matcher,
include=True)
Consume everything up to (and including, if include is True, as it is by
default) the matcher. |
source code
|
|