![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| __init__ (self, name='') | |
| __hash__ (self) | |
| __eq__ (self, other) | |
| __ne__ (self, other) | |
| resolve_refs (self, rule_map) | |
| parse (self, text, pos=0) | |
| match (self, text, pos=0) | |
| match_core (self, text, pos, cache, error) | |
| __str__ (self) | |
| as_rule (self) | |
Public Member Functions inherited from parsimonious.utils.StrAndRepr | |
| __repr__ (self) | |
Public Attributes | |
| name | |
| identity_tuple | |
Protected Member Functions | |
| _eq_check_cycles (self, other, checked) | |
| _unicode_members (self) | |
| _as_rhs (self) | |
A thing that can be matched against a piece of text
| parsimonious.expressions.Expression.__init__ | ( | self, | |
name = '' |
|||
| ) |
Reimplemented in parsimonious.expressions.Compound, parsimonious.expressions.Quantifier, and parsimonious.expressions.Lookahead.
|
protected |
Return the right-hand side of a rule that represents me. Implemented by subclasses.
Reimplemented in parsimonious.expressions.Literal, parsimonious.expressions.Regex, parsimonious.expressions.Sequence, parsimonious.expressions.OneOf, parsimonious.expressions.Lookahead, and parsimonious.expressions.Quantifier.
|
protected |
Return an iterable of my unicode-represented children, stopping descent when we hit a named node so the returned value resembles the input rule.
| parsimonious.expressions.Expression.as_rule | ( | self | ) |
Return the left- and right-hand sides of a rule that represents me. Return unicode. If I have no ``name``, omit the left-hand side.
| parsimonious.expressions.Expression.match | ( | self, | |
| text, | |||
pos = 0 |
|||
| ) |
Return the parse tree matching this expression at the given position, not necessarily extending all the way to the end of ``text``. Raise ``ParseError`` if there is no match there. :arg pos: The index at which to start matching
| parsimonious.expressions.Expression.match_core | ( | self, | |
| text, | |||
| pos, | |||
| cache, | |||
| error | |||
| ) |
Internal guts of ``match()``
This is appropriate to call only from custom rules or Expression
subclasses.
:arg cache: The packrat cache::
{(oid, pos): Node tree matched by object `oid` at index `pos` ...}
:arg error: A ParseError instance with ``text`` already filled in but
otherwise blank. We update the error reporting info on this object
as we go. (Sticking references on an existing instance is faster
than allocating a new one for each expression that fails.) We
return None rather than raising and catching ParseErrors because
catching is slow.
| parsimonious.expressions.Expression.parse | ( | self, | |
| text, | |||
pos = 0 |
|||
| ) |
Return a parse tree of ``text``. Raise ``ParseError`` if the expression wasn't satisfied. Raise ``IncompleteParseError`` if the expression was satisfied but didn't consume the full string.