Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
parsimonious.expressions.Expression Class Reference
Inheritance diagram for parsimonious.expressions.Expression:
Inheritance graph
[legend]
Collaboration diagram for parsimonious.expressions.Expression:
Collaboration graph
[legend]

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)
 

Detailed Description

A thing that can be matched against a piece of text

Constructor & Destructor Documentation

◆ __init__()

parsimonious.expressions.Expression.__init__ (   self,
  name = '' 
)

Member Function Documentation

◆ _as_rhs()

parsimonious.expressions.Expression._as_rhs (   self)
protected

◆ _unicode_members()

parsimonious.expressions.Expression._unicode_members (   self)
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.

◆ as_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.

◆ match()

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

◆ match_core()

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.

◆ parse()

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.

The documentation for this class was generated from the following file: