XylotrechusZ
�
�Re�+ � �� � d Z dZdZdZddlZddlmZ ddlZddl Z ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlmZ ddlmZ ddlZdd lmZ dd
lmZ ddlmZ n# e$ r ddlmZ Y nw xY w dd
lmZ n# e$ r dd
lmZ Y nw xY w ddlm Z ddlm!Z!m"Z" n# e$ r ddl
m Z ddl
m!Z!m"Z" Y nw xY w ddl
m#Z$ n # e$ r ddl%m#Z$ n
# e$ r dZ$Y nw xY wY nw xY w ddlm&Z& n# e$ r G d� d� � Z&Y nw xY w e&� � Z'de'_ de'_( e&� � Z)de)_ de)_* de)_+ de)_, de)_- de)_. d� e/e)� � D � � e)_0 d� Z1e1e)_2 g d�Z3 e4e j5 � � dd� Z6e6d dk Z7e7re j8 Z9e:Z;e<Z=e:Z>e:Z?e@eAeBeCeDe4eEeFeGeHeIgZJnTe jK Z9eLZMd� Z?g ZJddlNZNd�O � � D ]-ZP eJ�Q eReNeP� � � � �## eS$ r Y �*w xY w eTd� eMd� � D � � � � ZUd � ZVejW ejX z ZYd!ZZeZd"z Z[eYeZz Z\ e<d#� � Z]d$�^ d%� ej_ D � � � � Z`�dd&�Za G d'� d(eb� � Zc G d)� d*ec� � Zd G d+� d,ec� � Ze G d-� d.ee� � Zf G d/� d0eb� � Zg G d1� d2eh� � Zi G d3� d4eh� � Zj e!jk ej� � d5� Zld6� Zmd7� Znd8� Zod9� Zpd:� Zqd;� Zr �dd=�Zs G d>� d?eh� � Zt G d@� dAet� � Zu G dB� dCet� � Zv G dD� dEev� � Zw G dF� dGev� � Zx G dH� dIev� � Zy G dJ� dKey� � ZzeyZ{eyet_| G dL� dMev� � Z} G dN� dOey� � Z~ G dP� dQe}� � Z G dR� dSev� � Z� G dT� dUev� � Z� G dV� dWe�� � Z� G dX� dYe�� � Z� G dZ� d[ev� � Z� G d\� d]ev� � Z� G d^� d_ev� � Z� G d`� daev� � Z� G db� dcev� � Z� G dd� dee�� � Z� G df� dge�� � Z� G dh� die�� � Z� G dj� dke�� � Z� G dl� dme�� � Z� G dn� doe�� � Z� G dp� dqe�� � Z� G dr� dset� � Z� G dt� due�� � Z� G dv� dwe�� � Z� G dx� dye�� � Z� G dz� d{e�� � Z� G d|� d}et� � Z� G d~� de�� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�eh� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�e�� � Z� G d�� d�eh� � Z�d�� Z��dd��Z��dd��Z�d�� Z�d�� Z�d�� Z�d�� Z��dd��Z�d�� Z��dd��Z�d�� Z�d�� Z� ew� � �� d�� � Z� e�� � �� d�� � Z� e�� � �� d�� � Z� e�� � �� d�� � Z� e�� � �� d�� � Z� e�e]d�d<��� � �� d�� � � Z� e�d�� � �� d�� � � Z� e�d�� � �� d�� � � Z�e�e�z e�z e�d�d��� � z Z� e�e� e�d�� � z e�z � � Z� eyd�� � e�d�� � �� d�� � z e� e�e�e�z � � � � �� d�� � z d�z Z�d�� Z�d�� Z�d�� Z�d�� Z�d Z� e�dÄ � � Z� e�dĄ � � Z� e�dŦ � e�dƦ � fdDŽZ�dȄ Z�dɄ Z�dʄ Z� eh� � e�_� �d d˄Z� e&� � Z� eh� � e�_� eh� � e�_� e�d̦ � e�dͦ � fd΄Z�e�Z� e� e�dϦ � d�z � � �� dѦ � Z� e� e�dҦ � d�z � � �� dԦ � Z� e� e�dϦ � d�z e�dҦ � d�z z � � �� dզ � Z� e� e{d֦ � eԠ � � z � � �� dצ � Z�d�d�deԠ � � fdZddلZ� e�dڦ � Z� e�dۦ � Z� e� e�eYe\d�z � � �� dݦ � � � \ Z�Z� e� e�dޠO � � dߦ � � � Z� e�d�d�^ eޠ� � � � � z d�z � � �� d� � Z�d� Z� e� e�d� � d�z � � �� d� � Z� e�d� � �� d� � Z� e�d� � �� � � �� d� � Z� e�d� � �� d� � Z� e� e�d� � d�z e�z � � �� d� � Z� e�Z� e�d� � �� d� � Z� e� e� e�e`d��� � e� e�d� � eyd�� � z e�� � z � � z � � � � �� � � �� d� � Z� e� e�eԠ � � e�z d$�� � � � �� d�� � Z� G d�� d�� � Z� G d�� d�eh� � Z� G d�� d�eh� � Z� G d�� d�e� � Z�e�j� j� j� e�j� j� j� z e�j� j� j� z e�j� _� e7�r e�e�d�e�j� � � e�e�d�e�j� � � e�e�d e�j� � � e�e�de�j� � � e�e�de�j� � � e�e�de�j� � � e�e�j� �de�j� j� � � e�e�j� �de�j� j� � � e�e�j� �de�j� j� � � e�e�de�j� � � e�e�de�j� � � e�e�d e�j� � � G �d
� �d� � Z��e �dk �r� e~�d
� � �Z e~�d� � �Z e�eYe\�dz � � �Z e��e�dd��� � �� eŦ � �Z e� e��e� � � � �� �d� � �Z�d�ez �Z e��e�dd��� � �� eŦ � �Z e� e��e� � � � �� �d� � �Z �e�d� � �e�d� � z �ez �e�d� � z �Z �e ��
�d� � e�j ��
�d� � e�j ��
�d� � e�j
��
�d� � dd�l�Ze�j �� eĐe�j � � � � e�j ��
�d� � dS dS (! a�
pyparsing module - Classes and methods to define and execute parsing grammars
=============================================================================
The pyparsing module is an alternative approach to creating and
executing simple grammars, vs. the traditional lex/yacc approach, or the
use of regular expressions. With pyparsing, you don't need to learn
a new syntax for defining grammars or matching expressions - the parsing
module provides a library of classes that you use to construct the
grammar directly in Python.
Here is a program to parse "Hello, World!" (or any greeting of the form
``"<salutation>, <addressee>!"``), built up using :class:`Word`,
:class:`Literal`, and :class:`And` elements
(the :class:`'+'<ParserElement.__add__>` operators create :class:`And` expressions,
and the strings are auto-converted to :class:`Literal` expressions)::
from pip._vendor.pyparsing import Word, alphas
# define grammar of a greeting
greet = Word(alphas) + "," + Word(alphas) + "!"
hello = "Hello, World!"
print (hello, "->", greet.parseString(hello))
The program outputs the following::
Hello, World! -> ['Hello', ',', 'World', '!']
The Python representation of the grammar is quite readable, owing to the
self-explanatory class names, and the use of '+', '|' and '^' operators.
The :class:`ParseResults` object returned from
:class:`ParserElement.parseString` can be
accessed as a nested list, a dictionary, or an object with named
attributes.
The pyparsing module handles some of the problems that are typically
vexing when writing text parsers:
- extra or missing whitespace (the above program will also handle
"Hello,World!", "Hello , World !", etc.)
- quoted strings
- embedded comments
Getting Started -
-----------------
Visit the classes :class:`ParserElement` and :class:`ParseResults` to
see the base classes that most other pyparsing
classes inherit from. Use the docstrings for examples of how to:
- construct literal match expressions from :class:`Literal` and
:class:`CaselessLiteral` classes
- construct character word-group expressions using the :class:`Word`
class
- see how to create repetitive expressions using :class:`ZeroOrMore`
and :class:`OneOrMore` classes
- use :class:`'+'<And>`, :class:`'|'<MatchFirst>`, :class:`'^'<Or>`,
and :class:`'&'<Each>` operators to combine simple expressions into
more complex ones
- associate names with your parsed results using
:class:`ParserElement.setResultsName`
- access the parsed data, which is returned as a :class:`ParseResults`
object
- find some helpful expression short-cuts like :class:`delimitedList`
and :class:`oneOf`
- find more useful common expressions in the :class:`pyparsing_common`
namespace class
z2.4.7z30 Mar 2020 00:43 UTCz*Paul McGuire <[email protected]>� N)�ref)�datetime)�
itemgetter)�wraps)�contextmanager)�filterfalse)�ifilterfalse)�RLock)�Iterable)�MutableMapping�Mapping)�OrderedDict)�SimpleNamespacec � � e Zd ZdS )r N)�__name__�
__module__�__qualname__� � ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/pyparsing.pyr r � s � � � � � � � r r aA
A cross-version compatibility configuration for pyparsing features that will be
released in a future version. By setting values in this configuration to True,
those features can be enabled in prior versions for compatibility development
and testing.
- collect_all_And_tokens - flag to enable fix for Issue #63 that fixes erroneous grouping
of results names when an And expression is nested within an Or or MatchFirst; set to
True to enable bugfix released in pyparsing 2.3.0, or False to preserve
pre-2.3.0 handling of named results
Ta�
Diagnostic configuration (all default to False)
- warn_multiple_tokens_in_named_alternation - flag to enable warnings when a results
name is defined on a MatchFirst or Or expression with one or more And subexpressions
(only warns if __compat__.collect_all_And_tokens is False)
- warn_ungrouped_named_tokens_in_collection - flag to enable warnings when a results
name is defined on a containing expression with ungrouped subexpressions that also
have results names
- warn_name_set_on_empty_Forward - flag to enable warnings whan a Forward is defined
with a results name, but has no contents defined
- warn_on_multiple_string_args_to_oneof - flag to enable warnings whan oneOf is
incorrectly called with multiple str arguments
- enable_debug_on_named_expressions - flag to auto-enable debug on all subsequent
calls to ParserElement.setName()
Fc �f � g | ].}|� d � � s|� d� � �,|��/S )�enable_�warn_��
startswith)�.0�nms r �
<listcomp>r � s>