a
    7XhN#                     @   s  d Z ddlmZ G dd deZedddddZd	ZejZeZd
Zddl	T ddl
T ddlT ddlmZmZ ddlT ddlT ddlmZ ddlT ddlmZ ddlmZmZmZ ddlmZ ddlmZmZ de vreZde vreZde vreZeee 7 Zg dZdS )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 :meth:`'+'<ParserElement.__add__>` operators create :class:`And` expressions,
and the strings are auto-converted to :class:`Literal` expressions)::

    from pyparsing import Word, alphas

    # define grammar of a greeting
    greet = Word(alphas) + "," + Word(alphas) + "!"

    hello = "Hello, World!"
    print(hello, "->", greet.parse_string(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 :class:`'+'<And>`,
:class:`'|'<MatchFirst>`, :class:`'^'<Or>` and :class:`'&'<Each>` operators.

The :class:`ParseResults` object returned from
:class:`ParserElement.parse_string` 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.set_results_name`
 - access the parsed data, which is returned as a :class:`ParseResults`
   object
 - find some helpful expression short-cuts like :class:`DelimitedList`
   and :class:`one_of`
 - find more useful common expressions in the :class:`pyparsing_common`
   namespace class
    )
NamedTuplec                   @   sR   e Zd ZU eed< eed< eed< eed< eed< edd Zdd	 Zd
d Z	dS )version_infomajorminormicroreleaselevelserialc                 C   sR   | j  d| j d| j | jd dkr*dnd | jd  | j df| jdk  S )N.r   cr final)r   r   r   r   r   self r   W/var/www/viveiro_mudafortebrasil/venv/lib/python3.9/site-packages/pyparsing/__init__.py__version__j   s    (zversion_info.__version__c                 C   s   t  d| j dt S )N z / )__name__r   __version_time__r   r   r   r   __str__t   s    zversion_info.__str__c              
   C   s4   t  dt| j  dddd t| j| D  dS )Nr	   (z, c                 s   s   | ]}d j | V  qdS )z{}={!r}N)format).0nvr   r   r   	<genexpr>x       z(version_info.__repr__.<locals>.<genexpr>))r   typejoinzip_fieldsr   r   r   r   __repr__w   s    zversion_info.__repr__N)
r   
__module____qualname__int__annotations__strpropertyr   r   r"   r   r   r   r   r   c   s   

	r         r      z13 Oct 2024 09:46 UTCz+Paul McGuire <ptmcg.gm+pyparsing@gmail.com>)*)__diag__
__compat__)_builtin_exprs)unicode_setUnicodeRangeListpyparsing_unicode)pyparsing_test)pyparsing_commonr/   r2   r4   r3   )r   r   
__author__r.   r-   AndZAtLineStartZAtStringStartCaselessKeywordCaselessLiteral
CharsNotIn
CloseMatchCombineZDelimitedListDictEachEmpty
FollowedByForward
GoToColumnGroupZIndentedBlockKeywordLineEnd	LineStartLiteralZLocated
PrecededBy
MatchFirstNoMatchNotAny	OneOrMoreOnlyOnceZOpAssocZOptOptionalOrParseBaseExceptionParseElementEnhanceParseExceptionParseExpressionParseFatalExceptionParseResultsParseSyntaxExceptionParserElementZPositionTokenQuotedStringRecursiveGrammarExceptionRegexSkipTo	StringEndStringStartSuppressTagTokenTokenConverterWhiteWordWordEnd	WordStart
ZeroOrMoreChar	alphanumsalphas
alphas8bitZany_close_tagZany_open_tagZautoname_elementsZc_style_commentcolZcommon_html_entityZcondition_as_parse_actionZcounted_arrayZcpp_style_commentZdbl_quoted_stringZdbl_slash_commentZdelimited_listZdict_ofemptyhexnumsZhtml_commentZ
identcharsZidentbodycharsZinfix_notationZjava_style_commentlineZline_endZ
line_startlinenoZmake_html_tagsZmake_xml_tagsZmatch_only_at_colZmatch_previous_exprZmatch_previous_literalZnested_exprZnull_debug_actionnumsZone_ofZoriginal_text_for
printablespunc8bitr4   r3   r2   Zpython_style_commentZquoted_stringZremove_quotesZreplace_withZreplace_html_entityZrest_of_lineZsgl_quoted_stringsrangeZ
string_endZstring_startZ	token_mapZtrace_parse_actionungroupr0   Zunicode_stringZwith_attributeZ
with_class__versionTime__anyCloseTag
anyOpenTagcStyleCommentcommonHTMLEntityconditionAsParseActioncountedArraycppStyleCommentdblQuotedStringdblSlashCommentdelimitedListdictOfhtmlCommentindentedBlockinfixNotationjavaStyleCommentlineEnd	lineStartlocatedExprmakeHTMLTagsmakeXMLTagsmatchOnlyAtColmatchPreviousExprmatchPreviousLiteral
nestedExprnullDebugActiononeOfopAssocoriginalTextForpythonStyleCommentquotedStringremoveQuotesreplaceHTMLEntityreplaceWith
restOfLinesglQuotedString	stringEndstringStarttokenMaptraceParseActionunicodeStringwithAttribute	withClasscommonunicodetestingN)__doc__typingr   r   __version_info__r   r   rt   r5   util
exceptionsactionscorer-   r.   resultsr/   Zcore_builtin_exprsZhelpersZhelper_builtin_exprsr   r0   r1   r2   r   r3   r   r4   Zcommon_builtin_exprsglobals__all__r   r   r   r   <module>   s6   G


