K i3 UddlZddlZddlZddlZddlZddlmZddlddl m Z m Z m Z m Z mZ dddddedej ed ej ed efd Zded efd Zded efd Z deddddeej*eefdededededed efdZdeded efdZ dfdddededed efdZded efdZded efd ZeZd!d"defed#d$eeefd%eeefd&ej ed'ej ed(ej ed ef d)Z e!d*e!d+fd,Z"d-eeefd e#eeffd.Z$d-eeefd e#eeffd/Z%ee&d0<ee&d1<e$e'e(e)d2zjUd3\Z+Z,ejZj\j_Dcic]\}}|jad4|c}}Z1d5jed6d7Z3e4d8jUd9Z5d:Z6Gd;de=e<d?eeefd@eeefd e>f dAZ?dgfdBZ@e4dCjUdDZA e4dEjUdFZB e4dGjjUdHZDe4dIjUdJZE e4dKjUdLZF eFZG e4dMjUdNZH eIjDcgc]}eK|es |c}ZLe=ee&dO< dgddPdeeefdQeeefdRedSej e:dTej e:dUed efdVZMe8ZNe+ZOe,ZPe5ZQeAZReBZSeDZTeEZUeFZVeGZWeHZXedWeYZZedXeYZMedYeZ[edZeZ\ed[eZ]ed\eZ^ed]eZ_ed^eZ`ed_e Zaed`e$Zbedae%Zcedbe6Zdedce?Zeycc}}wcc}w)hN)__diag__)*)_bslash_flatten_escape_regex_range_charsmake_compressed_rereplaced_by_pep8)intExprexprint_exprr returnc|xs|}tfd}| ttjd}n|j }|j d|j |d|zj ddS)a$Helper to define a counted list of expressions. This helper defines a pattern of the form:: integer expr expr expr... where the leading integer tells how many expr expressions follow. The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed. If ``int_expr`` is specified, it should be a pyparsing expression that produces an integer value. Examples: .. doctest:: >>> counted_array(Word(alphas)).parse_string('2 ab cd ef') ParseResults(['ab', 'cd'], {}) - In this parser, the leading integer value is given in binary, '10' indicating that 2 values are in the array: .. doctest:: >>> binary_constant = Word('01').set_parse_action(lambda t: int(t[0], 2)) >>> counted_array(Word(alphas), int_expr=binary_constant ... ).parse_string('10 ab cd ef') ParseResults(['ab', 'cd'], {}) - If other fields must be parsed after the count but before the list items, give the fields results names and they will be preserved in the returned ParseResults: .. doctest:: >>> ppc = pyparsing.common >>> count_with_metadata = ppc.integer + Word(alphas)("type") >>> typed_array = counted_array(Word(alphanums), ... int_expr=count_with_metadata)("items") >>> result = typed_array.parse_string("3 bool True True False") >>> print(result.dump()) ['True', 'True', 'False'] - items: ['True', 'True', 'False'] - type: 'bool' cB|d}|r|zn tz|dd=yNr)Empty)sltn array_exprr s W/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pyparsing/helpers.pycount_field_parse_actionz/counted_array..count_field_parse_actionMs' aDQqEG3 aDct|dSr)intrs rzcounted_array..UsAaD rarrayLenT)call_during_tryz(len) z...)ForwardWordnumsset_parse_actioncopyset_nameadd_parse_action)r r r rrs` @r counted_arrayr(sh!GJt*--.AB,,. Z  5tL j * *VD6+= >>rctfd}|j|djdt|zS)aIHelper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example:: .. testcode:: first = Word(nums) second = match_previous_literal(first) match_expr = first + ":" + second will match ``"1:1"``, but not ``"1:2"``. Because this matches a previous literal, will also match the leading ``"1:1"`` in ``"1:10"``. If this is not desired, use :class:`match_previous_expr`. Do *not* use with packrat parsing enabled. c|stzyt|dk(r |dzyt|j}t d|Dzy)Nrrc32K|]}t|ywN)Literal).0tts r zImatch_previous_literal..copy_token_to_repeater..{s/272;/)rlenras_listAnd)rrrtflatreps rcopy_token_to_repeaterz6match_previous_literal..copy_token_to_repeaterpsP 57N  q6Q; 1Q4K % s////rT callDuringTry(prev) )r!r'r&str)r r7r6s @rmatch_previous_literalr<]sA" )C 0 0ELLSY&' Jrct|j}|zfd}|j|djdt |zS)afHelper to define an expression that is indirectly defined from the tokens matched in a previous expression, that is, it looks for a 'repeat' of a previous expression. For example: .. testcode:: first = Word(nums) second = match_previous_expr(first) match_expr = first + ":" + second will match ``"1:1"``, but not ``"1:2"``. Because this matches by expressions, will *not* match the leading ``"1:1"`` in ``"1:10"``; the expressions are evaluated first, and then compared, so ``"1"`` is compared with ``"10"``. Do *not* use with packrat parsing enabled. cjt|jfd}j|dy)Ncht|j}|k7rt||dd|y)Nz Expected z, found)rr3ParseException)rrr theseTokens matchTokenss rmust_match_these_tokenszTmatch_previous_expr..copy_token_to_repeater..must_match_these_tokenssA"199;/Kk)$qIk]'+G*rTr8)rr3r$)rrrrCrBr6s @rr7z3match_previous_expr..copy_token_to_repeaters.qyy{+   4DIrTr8r:)r!r%r'r&r;)r e2r7r6s @rmatch_previous_exprrEsV" )C BBJC J 0ELLSY&' JrFT)useRegex asKeywordstrscaseless use_regex as_keywordrFrGc|xs|}|xr|}t|tr'tjrtj dd|rd}d}nt j}d}t|tr+tjt|}|j}n't|tr t|}n td|s tSd} | t!|d z kr|| } t#|| d zd D]W\} } || | r || | zd z=nEt!| t!| kDs2|| | s<|| | zd z=|j%| | n| d z } | t!|d z kr|r|rt&j(nd} t+d |Drd d j-d|Dd}ndj-d|D}|rd|d}t/|| }|j1dj-d|D|r3|Dcic]}|j3|c}|j5fd|Sdx}}||ft8|| ft:| |ft<| | ft>i||ftAfd|Dj1dj-|Scc}w#t&j6$rtj ddYwxYw)a Helper to quickly define a set of alternative :class:`Literal` s, and makes sure to do longest-first testing when there is a conflict, regardless of the input order, but returns a :class:`MatchFirst` for best performance. :param strs: a string of space-delimited literals, or a collection of string literals :param caseless: treat all literals as caseless :param use_regex: bool - as an optimization, will generate a :class:`Regex` object; otherwise, will generate a :class:`MatchFirst` object (if ``caseless=True`` or ``as_keyword=True``, or if creating a :class:`Regex` raises an exception) :param as_keyword: bool - enforce :class:`Keyword`-style matching on the generated expressions Parameters ``asKeyword`` and ``useRegex`` are retained for pre-PEP8 compatibility, but will be removed in a future release. Example: .. testcode:: comp_oper = one_of("< = > <= >= !=") var = Word(alphas) number = Word(nums) term = var | number comparison_expr = term + comp_oper + term print(comparison_expr.search_string("B = 12 AA=23 B<=AA AA>12")) prints: .. testoutput:: [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']] zwarn_on_multiple_string_args_to_oneof: More than one string argument passed to one_of, pass choices as a list or space-delimited string) stacklevelcD|j|jk(Sr,)upperabs rrzone_of..s QWWY 6rc\|jj|jSr,)rP startswithrQs rrzone_of..sQWWY11!'')<rc$|j|Sr,)rUrQs rrzone_of..sQ\\!_rz7Invalid argument to one_of, expected string or iterablerrNc38K|]}t|dk(yw)rN)r2r.syms rr0zone_of..s4S3s8q=4s[c32K|]}t|ywr,)rrXs rr0zone_of.. s"Uc#. sB3 #Bs!z\b(?:z)\b)flagsz | c32K|]}t|ywr,)repr)r.rs rr0zone_of..s#=DG#=r1c0|djSrlower)rrr symbol_maps rrzone_of..sZ! 5Mrz8Exception creating Regex for one_of, building MatchFirstTc3.K|] }|ywr,)r.rYparse_element_classs rr0zone_of..+sB3)#.Bs)! isinstancestr_typer%warn_on_multiple_string_args_to_oneofwarningswarnoperatoreqtypingcastr;splitIterablelist TypeErrorNoMatchr2 enumerateinsertr` IGNORECASEalljoinRegexr&rgr'errorCaselessKeywordCaselessLiteralKeywordr- MatchFirst)rHrIrJrKrFrGis_equalmaskssymbolsicurjotherre_flagspattretrYCASELESSKEYWORDrkrhs @@rone_ofrsX'ZI%IH 8X&  : :  ;  6<;;,$!{{3%**, D( #t*QRR y A c'lQ aj!'!a%'"23 HAus#AEAI&5zCH$sE):AEAI&q%(  FA c'lQ )1 q 4G44277"UW"UUVVWXxxB'BBvS)H-C LL#=W#== >;BB3ciik3.B $$%MNJHw 7_ w; w 7{#W    B'B B K K 7 'C xx  MMJWX   s%B J! J"J!J!!*K KkeyvaluecBttt||zS)aHelper to easily and clearly define a dictionary by specifying the respective patterns for the key and value. Takes care of defining the :class:`Dict`, :class:`ZeroOrMore`, and :class:`Group` tokens in the proper order. The key pattern can include delimiting markers or punctuation, as long as they are suppressed, thereby leaving the significant key text. The value pattern can include named results, so that the :class:`Dict` results can include named token fields. Example: .. doctest:: >>> text = "shape: SQUARE posn: upper left color: light blue texture: burlap" >>> data_word = Word(alphas) >>> label = data_word + FollowedBy(':') >>> attr_expr = ( ... label ... + Suppress(':') ... + OneOrMore(data_word, stop_on=label) ... .set_parse_action(' '.join)) >>> print(attr_expr[1, ...].parse_string(text).dump()) ['shape', 'SQUARE', 'posn', 'upper left', 'color', 'light blue', 'texture', 'burlap'] >>> attr_label = label >>> attr_value = Suppress(':') + OneOrMore(data_word, stop_on=label ... ).set_parse_action(' '.join) # similar to Dict, but simpler call format >>> result = dict_of(attr_label, attr_value).parse_string(text) >>> print(result.dump()) [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] - color: 'light blue' - posn: 'upper left' - shape: 'SQUARE' - texture: 'burlap' [0]: ['shape', 'SQUARE'] [1]: ['posn', 'upper left'] [2]: ['color', 'light blue'] [3]: ['texture', 'burlap'] >>> print(result['shape']) SQUARE >>> print(result.shape) # object attribute access works too SQUARE >>> print(result.as_dict()) {'shape': 'SQUARE', 'posn': 'upper left', 'color': 'light blue', 'texture': 'burlap'} )Dict OneOrMoreGroup)rrs rdict_ofr0sl  %e ,- ..r)asString as_stringrc0|xr|}tjd}|j}d|_|d|z|dz}|rd}nd}|j||j|_|j t j|S)a)Helper to return the original, untokenized text for a given expression. Useful to restore the parsed fields of an HTML start tag into the raw tag text itself, or to revert separate tokens with intervening whitespace back to the original matching input text. By default, returns a string containing the original parsed text. If the optional ``as_string`` argument is passed as ``False``, then the return value is a :class:`ParseResults` containing any results names that were originally matched, and a single token containing the original matched text from the input string. So if the expression passed to :class:`original_text_for` contains expressions with defined results names, you must set ``as_string`` to ``False`` if you want to preserve those results name values. The ``asString`` pre-PEP8 argument is retained for compatibility, but will be removed in a future release. Example: .. testcode:: src = "this is test bold text normal text " for tag in ("b", "i"): opener, closer = make_html_tags(tag) patt = original_text_for(opener + ... + closer) print(patt.search_string(src)[0]) prints: .. testoutput:: [' bold text '] ['text'] c|Sr,rj)rlocrs rrz#original_text_for..s3rF_original_start _original_endc4||j|jSr,)rrrrrs rrz#original_text_for..sa(9(9AOO&LrcR||jd|jdg|ddy)Nrrpoprs r extractTextz&original_text_for..extractTexts(aee-.1GHIAaDr)rr$r% callPreparse ignoreExprssuppress_warning Diagnostics)warn_ungrouped_named_tokens_in_collection)r rr locMarker endlocMarker matchExprrs roriginal_text_forrisL%IH(()>?I>>#L %L+,t3l?6SSIL  J{+ ,,I {TTU rc8t|jdS)zkHelper to undo pyparsing's default grouping of And expressions, even if all but one are non-empty. c |dSrrjrs rrzungroup..s 1Q4r)TokenConverterr')r s rungrouprs $  0 0 @@rctjd}t|d|dz|jj dzS)a< .. deprecated:: 3.0.0 Use the :class:`Located` class instead. Helper to decorate a returned token with its starting and ending locations in the input string. This helper adds the following results names: - ``locn_start`` - location where matched expression begins - ``locn_end`` - location where matched expression ends - ``value`` - the actual parsed results Be careful if the input text contains ```` characters, you may want to call :meth:`ParserElement.parse_with_tabs` Example: .. testcode:: wd = Word(alphas) res = locatedExpr(wd).search_string("ljsdf123lksdjjf123lkkjj1222") for match in res: print(match) prints: .. testoutput:: [[0, 'ljsdf', 5]] [[8, 'lksdjjf', 15]] [[18, 'lkkjj', 23]] c|Sr,rj)ssllr/s rrzlocatedExpr..s"r locn_startrlocn_end)rr$rr%leaveWhitespace)r locators r locatedExprrsWDg&&'<=G   w-  *',,. ( ( *: 6 7 r()) ignoreExpropenerclosercontent ignore_exprrc ||k7r |tur|n|}|tur t}||k(r td|t|tret|trTt j t|}t j t|}t|dk(r|t|dk(rn|8tt|t||ztjzdz}nttt||ztjzz}n|Ltt|t|zt|zttjdz}nSttt|t|zttjdz}n tdtjr|j!dt#}|6|t%t'|t)||z|zzt'|zz}n2|t%t'|t)||zzt'|zz}|j+d||dd|_|S) a Helper method for defining nested lists enclosed in opening and closing delimiters (``"("`` and ``")"`` are the default). :param opener: str - opening character for a nested list (default= ``"("``); can also be a pyparsing expression :param closer: str - closing character for a nested list (default= ``")"``); can also be a pyparsing expression :param content: expression for items within the nested lists :param ignore_expr: expression for ignoring opening and closing delimiters (default = :class:`quoted_string`) Parameter ``ignoreExpr`` is retained for compatibility but will be removed in a future release. If an expression is not provided for the content argument, the nested expression will capture all whitespace-delimited content between delimiters as a list of separate values. Use the ``ignore_expr`` argument to define expressions that may contain opening or closing characters that should not be treated as opening or closing characters for nesting, such as quoted_string or a comment expression. Specify multiple expressions using an :class:`Or` or :class:`MatchFirst`. The default is :class:`quoted_string`, but if no expressions are to be ignored, then pass ``None`` for this argument. Example: .. testcode:: data_type = one_of("void int short long char float double") decl_data_type = Combine(data_type + Opt(Word('*'))) ident = Word(alphas+'_', alphanums+'_') number = pyparsing_common.number arg = Group(decl_data_type + ident) LPAR, RPAR = map(Suppress, "()") code_body = nested_expr('{', '}', ignore_expr=(quoted_string | c_style_comment)) c_function = (decl_data_type("type") + ident("name") + LPAR + Opt(DelimitedList(arg), [])("args") + RPAR + code_body("body")) c_function.ignore(c_style_comment) source_code = ''' int is_odd(int x) { return (x%2); } int dec_to_hex(char hchar) { if (hchar >= '0' && hchar <= '9') { return (ord(hchar)-ord('0')); } else { return (10+ord(hchar)-ord('A')); } } ''' for func in c_function.search_string(source_code): print(f"{func.name} ({func.type}) args: {func.args}") prints: .. testoutput:: is_odd (int) args: [['int', 'x']] dec_to_hex (int) args: [['char', 'hchar']] z.opening and closing strings cannot be the sameNr)exactzOopening and closing arguments must be strings if no content expression is givencF|djtjSr)strip ParserElementDEFAULT_WHITE_CHARSrs rrznested_expr..as!A$**]%F%FGrznested z expression)_NO_IGNORE_EXPR_GIVEN quoted_string ValueErrorrlrmrsrtr;r2Combiner CharsNotInrrrr-r$r!rSuppress ZeroOrMorer&errmsg)rrrrrrs r nested_exprrsb`[ $.2G$G[Z **"_  IJJ fh 'Jvx,H[[f-F[[f-F6{aCK1$4)%!'K( &-2S2S S&'G&$"VOm.O.OOG)%!'K&v./&v./))J)JRSTUG&!$V_,&v./()J)JRSTUGa   , ,  $ $G  )C  V z*s*:W*DE EQWHX X   hv&C'M)BBXfEUUVVLL76(6(+67CJ Jr<>c t|tr|t|| }n |jt t t dz}|rtjjt}||dzttt|tdz|zztddgdjd z|z}nt jjtt t"d z}||dzttt|jd ttd|zzztddgdjd z|z}t%t'd|zd zd}|j)dd |j+fd|ddj-j/ddj1j3zj)dd }|_|_t7||_||fS)zVInternal helper to construct opening and closing tag expressions, given a tag name)rIz_-:tag=/F)defaultemptyc|ddk(SNrrrjrs rrz_makeTags..! rr) exclude_charsc(|djSrrfrs rrz_makeTags..sqtzz|rc|ddk(Srrjrs rrz_makeTags..rrz.sF!-- bgggooc37==?EEGH H!&&( rendr[rr)rlrmrnamer"alphas alphanumsdbl_quoted_stringr%r$ remove_quotesrrrrOptr printablesrr-r&r'r~rrrurSkipTotag_body) tagStrxml suppress_LT suppress_GT tagAttrName tagAttrValueopenTagcloseTagrs @r _makeTagsrss9&(#c'2++vy501K (--/@@O Um :eK(3-$?,$NOPQ R(c#w'0AA+     %))+<<]Kd cO   Um #445KLhsml:;< (c#w'0AA+    wt}v-3eDH q ^$    S1779??ABBhG9A GKHLhj)G H rtag_strct|dS)alHelper to construct opening and closing tag expressions for HTML, given a tag name. Matches tags in either upper or lower case, attributes with namespaces and with quoted or unquoted values. Example: .. testcode:: text = 'More info at the pyparsing wiki page' # make_html_tags returns pyparsing expressions for the opening and # closing tags as a 2-tuple a, a_end = make_html_tags("A") link_expr = a + SkipTo(a_end)("link_text") + a_end for link in link_expr.search_string(text): # attributes in the tag (like "href" shown here) are # also accessible as named results print(link.link_text, '->', link.href) prints: .. testoutput:: pyparsing -> https://github.com/pyparsing/pyparsing/wiki Frrs rmake_html_tagsrs8 We $$rct|dS)zHelper to construct opening and closing tag expressions for XML, given a tag name. Matches tags only in the given upper/lower case. Example: similar to :class:`make_html_tags` Trrs r make_xml_tagsrs Wd ##r any_open_tag any_close_tagz_:zany tag;z-nbsp lt gt amp quot apos cent pound euro copyrr^c6dtdttdS)Nz &(?Pr^z);)_most_common_entitiesr _htmlEntityMaprjrrrrsl013En3U2VVX Yrzcommon HTML entityc@tj|jS)zRHelper parser action to replace common HTML entities with their special characters)rgetentityrs rreplace_html_entityr s   ahh ''rceZdZdZdZdZy)OpAssoczvEnumeration of operator associativity - used in constructing InfixNotationOperatorSpec for :class:`infix_notation`rrMN)__name__ __module__ __qualname____doc__LEFTRIGHTrjrrrrsT D Err base_exprop_listlparrparcGddt}d|_t}|j|jdt |t r t|}t |t r t|}||z|zjd|jd}t |trt |ts|t|z}n||z}|D]}|dzdd\} } } } t | trtj| } tjt| } | d k(r._FBcB|jj|||gfSr,)r try_parse)selfinstringr doActionss r parseImplz%infix_notation.._FB.parseImples II  # .7NrNT)rrrr!rjrr_FBrds rr#z FollowedBy> _expressionnested_r,NrMz@if numterms=3, opExpr must be a tuple or list of two expressionsz operationsrz6operator must be unary (1), binary (2), or ternary (3)z2operator must indicate right or left associativity)r.)rM.F) FollowedByrr!r&rrlr;rrrmr_literalStringClassrsrttuplerwr2rrrrr4rr show_in_diagramr$setName)rrrrr#rrlastExproperDefopExprarityrightLeftAssocpaopExpr1opExpr2 term_namethisExprmatch_lookaheadrs rinfix_notationr8s|j !CL )CLLINN#;/0$~$~#:$..8H /TUK tX &:dH+Eu[11{*L-4w->,C)~r fh '"66v>F]F3 A:fudm4F q8H V & GW")G9K8I!(+.IEQUV VUV V ',, !> >QR R"))"4"4Y"?;;w1b' W\\ )z"%h&7"8!(VF^";< !%&)(V*;h*F&GO %h&82CV1L&L MI&)(X*=&>O %hv&6 7I!"%w&1G;hF#"( 2W O %h&1A&A BI!"%w&1G;hF#"(W"4x"?'"IH"TU +0'$i/ "udm,* **B/**2.i(*33I>>YL\HC Jrc | jddfd fd}fd}fd}ttjdj }t t j |zjd}t j |jd} t j |jd } |r?tt||zt| t|zt|zz| z} nDtt|t| t|zt|zzt| z} | jfd | j fd |jttz| jd S) av .. deprecated:: 3.0.0 Use the :class:`IndentedBlock` class instead. Helper method for defining space-delimited indentation blocks, such as those used to define block statements in Python source code. :param blockStatementExpr: expression defining syntax of statement that is repeated within the indented block :param indentStack: list created by caller to manage indentation stack (multiple ``statementWithIndentedBlock`` expressions within a single grammar should share a common ``indentStack``) :param indent: boolean indicating whether block must be indented beyond the current level; set to ``False`` for block of left-most statements A valid block must contain at least one ``blockStatement``. (Note that indentedBlock uses internal parse actions which make it incompatible with packrat parsing.) Example: .. testcode:: data = ''' def A(z): A1 B = 100 G = A2 A2 A3 B def BB(a,b,c): BB1 def BBA(): bba1 bba2 bba3 C D def spam(x,y): def eggs(z): pass ''' indentStack = [1] stmt = Forward() identifier = Word(alphas, alphanums) funcDecl = ("def" + identifier + Group("(" + Opt(delimitedList(identifier)) + ")") + ":") func_body = indentedBlock(stmt, indentStack) funcDef = Group(funcDecl + func_body) rvalue = Forward() funcCall = Group(identifier + "(" + Opt(delimitedList(rvalue)) + ")") rvalue << (funcCall | identifier | Word(nums)) assignment = Group(identifier + "=" + rvalue) stmt << (funcDef | assignment | identifier) module_body = stmt[1, ...] parseTree = module_body.parseString(data) parseTree.pprint() prints: .. testoutput:: [['def', 'A', ['(', 'z', ')'], ':', [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]], 'B', ['def', 'BB', ['(', 'a', 'b', 'c', ')'], ':', [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]], 'C', 'D', ['def', 'spam', ['(', 'x', 'y', ')'], ':', [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]] NcdddyNrj) backup_stacks indentStacksr reset_stackz"indentedBlock..reset_stack/s&r* Arc|t|k\ryt||}|dk7r"|dkDr t||dt||dy)Nr<zillegal nestingznot a peer entry)r2colr@rrrcurColr>s rcheckPeerIndentz&indentedBlock..checkPeerIndent2sY A; Q [_ $ B'$Q+<== A'9: : %rcjt||}|dkDrj|yt||d)Nr<znot a subentry)rAappendr@rBs rcheckSubIndentz%indentedBlock..checkSubIndent;s8Q KO #   v & A'78 8rc|t|k\ryt||}r|vs t||d|dkrjyy)Nznot an unindentr<)r2rAr@rrBs r checkUnindentz$indentedBlock..checkUnindentBsQ A; Q+ 5 A'89 9 KO # OO  $rz INDENTr[UNINDENTc6rjdxrdSdSr;r)r=srrzindentedBlock.._s- !!"%.$TrcSr,rj)rRrScdr?s rrzindentedBlock..as kmrzindented block)rFrLineEndset_whitespace_charssuppressrr$r&rrr'set_fail_actionignorer) blockStatementExprr>indentr=rDrGrINLrJPEERUNDENTsmExprr?s ` ` @r indentedBlockr[s~tQ(+;9 7911%8AAC DBg00@@ J J8 TF 7 # #O 4 = =b AD W % %m 4 = =j IF  G u%7883r7BC D   Gu%7883r7BC D&k   I ;<g 12 ??+ ,,rz/\*(?:[^*]|\*(?!/))*\*\/zC style commentzz HTML commentz.*z rest of linez//(?:\\\n|[^\n])*z // commentz2(?:/\*(?:[^*]|\*(?!/))*\*\/)|(?://(?:\\\n|[^\n])*)zC++ style commentz#.*zPython style comment_builtin_exprsallow_trailing_delimdelimcombineminmaxr^c$t||||||S)zT .. deprecated:: 3.1.0 Use the :class:`DelimitedList` class instead. r]) DelimitedList)r r_r`rarbr^s rdelimited_listres  eWc3=Q r delimitedListre countedArraymatchPreviousLiteralmatchPreviousExproneOfdictOforiginalTextFor nestedExpr makeHTMLTags makeXMLTagsreplaceHTMLEntity infixNotationr,)FTFr"),FNN)f html.entitieshtmlrqr`sysrsr[rcoreutilrrrr r rOptionalr(r<rEUnionrvr;boolrrrrrrryrrrrr*rr__annotations__r"rrr&rrentitieshtml5itemsrstriprrrrcommon_html_entityr EnumrInfixNotationOperatorArgTyper ParseActionInfixNotationOperatorSpecrwr!r8r[c_style_comment html_commentleave_whitespace rest_of_linedbl_slash_commentcpp_style_commentjava_style_commentpython_style_commentvarsvaluesrlr\reopAssoc anyOpenTag anyCloseTagcommonHTMLEntity cStyleComment htmlComment restOfLinedblSlashCommentcppStyleCommentjavaStyleCommentpythonStyleCommentrdrfrgrhrirjrkrlrmrnrorprq)kvs00rrs 04D?/3 D? D?oom,D?__] + D?  D?N""="J#m# #P E E $c) *EEE E  EEEP6/6/}6/6/t,06EI6 6$(6>B66rA-AMA'm' 'X ),(+.22G X 2G X #}$ %X #}$ %X__] +X/ X  . XXv(0}(3-8v% 3 % &% =- '(%>$ 3 % &$ =- '($,T!"++I6 m04}}/B/B/H/H/JKtq!!((3-"KGOOY (   ( d %3eM3$67}c?Q9RRSS " $  $ &  $    $'/sm&.sm JJ + ,J ]" #J ]" # J  JZ;?bP-j34==>OP#'(11.A &U|,,.77G ./88F19 ( P&$V}--.DE0 v}}' *Q ">A']#(+ $ $ "' ]" # m# $      (    %   ##%) -@ !"2MB > '(>@VW$%8:MN&) (G ,"#46GH lK 8 ? }m< $%8:MN .A gLD 'sO;P"P