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

Public Member Functions

 __init__ (self, typing.Optional[Union[ParserElement, str]] other=None)
 
"Forward" __lshift__ (self, other)
 
"Forward" __ilshift__ (self, other)
 
"ParserElement" __or__ (self, other)
 
 __del__ (self)
 
 parseImpl (self, instring, loc, doActions=True)
 
ParserElement leave_whitespace (self, bool recursive=True)
 
ParserElement ignore_whitespace (self, bool recursive=True)
 
ParserElement streamline (self)
 
None validate (self, validateTrace=None)
 
ParserElement copy (self)
 
 leaveWhitespace (self)
 
 ignoreWhitespace (self)
 
- Public Member Functions inherited from pip._vendor.pyparsing.core.ParseElementEnhance
List[ParserElementrecurse (self)
 
ParserElement ignore (self, other)
 
- Public Member Functions inherited from pip._vendor.pyparsing.core.ParserElement
 using_each (cls, seq, **class_kwargs)
 
"ParserElement" suppress_warning (self, Diagnostics warning_type)
 
 visit_all (self)
 
"ParserElement" set_results_name (self, str name, bool list_all_matches=False, *bool listAllMatches=False)
 
"ParserElement" set_break (self, bool break_flag=True)
 
"ParserElement" set_parse_action (self, *ParseAction fns, **kwargs)
 
"ParserElement" add_parse_action (self, *ParseAction fns, **kwargs)
 
"ParserElement" add_condition (self, *ParseCondition fns, **kwargs)
 
"ParserElement" set_fail_action (self, ParseFailAction fn)
 
int preParse (self, str instring, int loc)
 
 postParse (self, instring, loc, tokenlist)
 
int try_parse (self, str instring, int loc, *bool raise_fatal=False, bool do_actions=False)
 
bool can_parse_next (self, str instring, int loc, bool do_actions=False)
 
ParseResults parse_string (self, str instring, bool parse_all=False, *bool parseAll=False)
 
Generator[Tuple[ParseResults, int, int], None, None] scan_string (self, str instring, int max_matches=_MAX_INT, bool overlap=False, *bool debug=False, int maxMatches=_MAX_INT)
 
str transform_string (self, str instring, *bool debug=False)
 
ParseResults search_string (self, str instring, int max_matches=_MAX_INT, *bool debug=False, int maxMatches=_MAX_INT)
 
Generator[str, None, None] split (self, str instring, int maxsplit=_MAX_INT, bool include_separators=False, *includeSeparators=False)
 
"ParserElement" __add__ (self, other)
 
"ParserElement" __radd__ (self, other)
 
"ParserElement" __sub__ (self, other)
 
"ParserElement" __rsub__ (self, other)
 
"ParserElement" __mul__ (self, other)
 
"ParserElement" __rmul__ (self, other)
 
"ParserElement" __ror__ (self, other)
 
"ParserElement" __xor__ (self, other)
 
"ParserElement" __rxor__ (self, other)
 
"ParserElement" __and__ (self, other)
 
"ParserElement" __rand__ (self, other)
 
"ParserElement" __invert__ (self)
 
 __getitem__ (self, key)
 
"ParserElement" __call__ (self, typing.Optional[str] name=None)
 
"ParserElement" suppress (self)
 
"ParserElement" set_whitespace_chars (self, Union[Set[str], str] chars, bool copy_defaults=False)
 
"ParserElement" parse_with_tabs (self)
 
"ParserElement" set_debug_actions (self, DebugStartAction start_action, DebugSuccessAction success_action, DebugExceptionAction exception_action)
 
"ParserElement" set_debug (self, bool flag=True, bool recurse=False)
 
str default_name (self)
 
"ParserElement" set_name (self, str name)
 
str name (self)
 
str __str__ (self)
 
str __repr__ (self)
 
ParseResults parse_file (self, Union[str, Path, TextIO] file_or_filename, str encoding="utf-8", bool parse_all=False, *bool parseAll=False)
 
 __eq__ (self, other)
 
 __hash__ (self)
 
bool matches (self, str test_string, bool parse_all=True, *bool parseAll=True)
 
Tuple[bool, List[Tuple[str, Union[ParseResults, Exception]]]] run_tests (self, Union[str, List[str]] tests, bool parse_all=True, typing.Optional[Union["ParserElement", str]] comment="#", bool full_dump=True, bool print_results=True, bool failure_tests=False, typing.Optional[Callable[[str, ParseResults], str]] post_parse=None, typing.Optional[TextIO] file=None, bool with_line_numbers=False, *bool parseAll=True, bool fullDump=True, bool printResults=True, bool failureTests=False, typing.Optional[Callable[[str, ParseResults], str]] postParse=None)
 
None create_diagram (self, Union[TextIO, Path, str] output_html, int vertical=3, bool show_results_names=False, bool show_groups=False, bool embed=False, **kwargs)
 
 setResultsName (self)
 
 setBreak (self)
 
 setParseAction (self)
 
 addParseAction (self)
 
 addCondition (self)
 
 setFailAction (self)
 
 tryParse (self)
 
 parseString (self)
 
 scanString (self)
 
 transformString (self)
 
 searchString (self)
 
 setWhitespaceChars (self)
 
 parseWithTabs (self)
 
 setDebugActions (self)
 
 setDebug (self)
 
 setName (self)
 
 parseFile (self)
 
 runTests (self)
 

Public Attributes

 caller_frame
 
 lshift_line
 
 expr
 
 streamlined
 
 mayIndexError
 
 mayReturnEmpty
 
 skipWhitespace
 
 saveAsList
 
- Public Attributes inherited from pip._vendor.pyparsing.core.ParseElementEnhance
 expr
 
 mayIndexError
 
 mayReturnEmpty
 
 skipWhitespace
 
 saveAsList
 
 callPreparse
 
- Public Attributes inherited from pip._vendor.pyparsing.core.ParserElement
 saveAsList
 
 skipWhitespace
 
 whiteChars
 
 copyDefaultWhiteChars
 
 mayReturnEmpty
 
 keepTabs
 
 debug
 
 streamlined
 
 mayIndexError
 
 errmsg
 
 modalResults
 
 debugActions
 
 callPreparse
 
 callDuringTry
 
 parseAction
 
 failAction
 
 resultsName
 
 customName
 

Protected Member Functions

str _generateDefaultName (self)
 
 _setResultsName (self, name, list_all_matches=False)
 
- Protected Member Functions inherited from pip._vendor.pyparsing.core.ParseElementEnhance
 _checkRecursion (self, parseElementList)
 
- Protected Member Functions inherited from pip._vendor.pyparsing.core.ParserElement
int _skipIgnorables (self, str instring, int loc)
 
Tuple[int, ParseResults_parseNoCache (self, instring, loc, doActions=True, callPreParse=True)
 
Tuple[int, ParseResults_parseCache (self, instring, loc, doActions=True, callPreParse=True)
 

Protected Attributes

 _defaultName
 
- Protected Attributes inherited from pip._vendor.pyparsing.core.ParseElementEnhance
 _literalStringClass
 
- Protected Attributes inherited from pip._vendor.pyparsing.core.ParserElement
 _parse
 
 _defaultName
 

Additional Inherited Members

- Static Public Member Functions inherited from pip._vendor.pyparsing.core.ParserElement
None set_default_whitespace_chars (str chars)
 
None inline_literals_using (type cls)
 
None reset_cache ()
 
None disable_memoization ()
 
None enable_left_recursion (typing.Optional[int] cache_size_limit=None, *force=False)
 
None enable_packrat (int cache_size_limit=128, *bool force=False)
 
 inlineLiteralsUsing ()
 
 setDefaultWhitespaceChars ()
 
 enableLeftRecursion ()
 
 enablePackrat ()
 
- Static Public Attributes inherited from pip._vendor.pyparsing.core.ParserElement
str DEFAULT_WHITE_CHARS = " \n\t\r"
 
bool verbose_stacktrace = False
 
 recursion_lock = RLock()
 
dict recursion_memos = {}
 
tuple packrat_cache
 
 packrat_cache_lock = RLock()
 
list packrat_cache_stats = [0, 0]
 
bool canParseNext = can_parse_next
 
None resetCache = reset_cache
 
str defaultName = default_name
 
- Static Protected Attributes inherited from pip._vendor.pyparsing.core.ParserElement
type _literalStringClass = None
 
Tuple[int, ParseResults_parse = _parseNoCache
 
bool _packratEnabled = False
 
bool _left_recursion_enabled = False
 

Detailed Description

Forward declaration of an expression to be defined later -
used for recursive grammars, such as algebraic infix notation.
When the expression is known, it is assigned to the ``Forward``
variable using the ``'<<'`` operator.

Note: take care when assigning to ``Forward`` not to overlook
precedence of operators.

Specifically, ``'|'`` has a lower precedence than ``'<<'``, so that::

    fwd_expr << a | b | c

will actually be evaluated as::

    (fwd_expr << a) | b | c

thereby leaving b and c out as parseable alternatives.  It is recommended that you
explicitly group the values inserted into the ``Forward``::

    fwd_expr << (a | b | c)

Converting to use the ``'<<='`` operator instead will avoid this problem.

See :class:`ParseResults.pprint` for an example of a recursive
parser created using ``Forward``.

Constructor & Destructor Documentation

◆ __init__()

pip._vendor.pyparsing.core.Forward.__init__ (   self,
typing.Optional[Union[ParserElement, str]]   other = None 
)

Member Function Documentation

◆ __or__()

"ParserElement" pip._vendor.pyparsing.core.Forward.__or__ (   self,
  other 
)
Implementation of ``|`` operator - returns :class:`MatchFirst`

Reimplemented from pip._vendor.pyparsing.core.ParserElement.

◆ _generateDefaultName()

str pip._vendor.pyparsing.core.Forward._generateDefaultName (   self)
protected
Child classes must define this method, which defines how the ``default_name`` is set.

Reimplemented from pip._vendor.pyparsing.core.ParseElementEnhance.

◆ _setResultsName()

pip._vendor.pyparsing.core.Forward._setResultsName (   self,
  name,
  list_all_matches = False 
)
protected

◆ copy()

ParserElement pip._vendor.pyparsing.core.Forward.copy (   self)
Make a copy of this :class:`ParserElement`.  Useful for defining
different parse actions for the same parsing pattern, using copies of
the original parse element.

Example::

    integer = Word(nums).set_parse_action(lambda toks: int(toks[0]))
    integerK = integer.copy().add_parse_action(lambda toks: toks[0] * 1024) + Suppress("K")
    integerM = integer.copy().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M")

    print((integerK | integerM | integer)[1, ...].parse_string("5K 100 640K 256M"))

prints::

    [5120, 100, 655360, 268435456]

Equivalent form of ``expr.copy()`` is just ``expr()``::

    integerM = integer().add_parse_action(lambda toks: toks[0] * 1024 * 1024) + Suppress("M")

Reimplemented from pip._vendor.pyparsing.core.ParserElement.

◆ ignore_whitespace()

ParserElement pip._vendor.pyparsing.core.Forward.ignore_whitespace (   self,
bool   recursive = True 
)
Enables the skipping of whitespace before matching the characters in the
:class:`ParserElement`'s defined pattern.

:param recursive: If ``True`` (the default), also enable whitespace skipping in child elements (if any)

Reimplemented from pip._vendor.pyparsing.core.ParseElementEnhance.

◆ ignoreWhitespace()

pip._vendor.pyparsing.core.Forward.ignoreWhitespace (   self)

◆ leave_whitespace()

ParserElement pip._vendor.pyparsing.core.Forward.leave_whitespace (   self,
bool   recursive = True 
)
Disables the skipping of whitespace before matching the characters in the
:class:`ParserElement`'s defined pattern.  This is normally only used internally by
the pyparsing module, but may be needed in some whitespace-sensitive grammars.

:param recursive: If true (the default), also disable whitespace skipping in child elements (if any)

Reimplemented from pip._vendor.pyparsing.core.ParseElementEnhance.

◆ leaveWhitespace()

pip._vendor.pyparsing.core.Forward.leaveWhitespace (   self)

◆ parseImpl()

pip._vendor.pyparsing.core.Forward.parseImpl (   self,
  instring,
  loc,
  doActions = True 
)

◆ streamline()

ParserElement pip._vendor.pyparsing.core.Forward.streamline (   self)

◆ validate()

None pip._vendor.pyparsing.core.Forward.validate (   self,
  validateTrace = None 
)
Check defined expressions for valid structure, check for infinite recursive definitions.

Reimplemented from pip._vendor.pyparsing.core.ParseElementEnhance.


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