| Home | Trees | Indices | Help |
|---|
|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
self + other - Join strings, merge lists. Combine adjacent matchers in sequence, merging the result with "+" (so strings are joined, lists merged).
|
other + self - Join strings, merge lists. Combine adjacent matchers in sequence, merging the result with "+" (so strings are joined, lists merged).
|
self & other - Append results. Combine adjacent matchers in sequence. This is equivalent to And().
|
other & self - Append results. Combine adjacent matchers in sequence. This is equivalent to And().
|
self / other - Append results, with optional separating space. Combine adjacent matchers in sequence, with an optional space between them. The space is included in the results.
|
other / self - Append results, with optional separating space. Combine adjacent matchers in sequence, with an optional space between them. The space is included in the results.
|
self // other - Append results, with required separating space. Combine adjacent matchers in sequence, with a space between them. The space is included in the results.
|
other // self - Append results, with required separating space. Combine adjacent matchers in sequence, with a space between them. The space is included in the results.
|
self | other - Try alternative matchers. This introduces backtracking. Matches are tried from left to right and successful results returned (one on each "recall"). This is equivalent to Or().
|
other | self - Try alternative matchers. This introduces backtracking. Matches are tried from left to right and successful results returned (one on each "recall"). This is equivalent to Or().
|
self % other - Take first match (committed choice). Matches are tried from left to right and the first successful result is returned. This is equivalent to First().
|
other % self - Take first match (committed choice). Matches are tried from left to right and the first successful result is returned. This is equivalent to First().
|
~self - Discard the result. This generates a matcher that behaves as the original, but returns an empty list. This is equivalent to Drop(). Note that Lookahead() overrides this method to have different semantics (negative lookahead). |
self[start:stop:algorithm, separator, ...] - Repetition and lists. This is a complex statement that modifies the current matcher so that it matches several times. A separator may be specified (eg for comma-separated lists) and the results may be combined with "+" (so repeated matching of characters would give a word).
ExamplesAny()[0:3,...] will match 3 or less characters, joining them together so that the result is a single string. Word()[:,','] will match a comma-separated list of words. value[:] or value[0:] or value[0::'d'] is a "greedy" match that, if value does not backtrack, is equivalent to the "*" in a regular expression. value[::'n'] is the "non-greedy" equivalent (preferring as short a match as possible) and value[::'g'] is greedy even when value does provide alternative matches on backtracking. |
self > function - Process or label the results. Create a named pair or apply a function to the results. This is equivalent to Apply().
|
self >= function - Process or label the results. Apply a function to the results. This is equivalent to Apply(raw=True).
|
self >> function - Process or label the results (map). Create a named pair or apply a function to each result in turn. This is equivalent to Map(). It is similar to self >= function, except that the function is applied to each result in turn.
|
self ** function - Process the results (**kargs). Apply a function to keyword arguments This is equivalent to KApply().
|
self ^ message Raise a SytaxError.
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sat Jun 9 21:50:55 2012 | http://epydoc.sourceforge.net |