o 7]h@s ddlZddlZddlmZddlTddlmZmZm Z     dgddd e e e fd e e e fd e d eed eede de fddZ dhddd e dee dee de fddZd e de fddZd e de fddZ   didddde ee e fde de d e d!e d"e de fd#d$Zd%e d&e de fd'd(Z djdd)d e d*e d+e de fd,d-Zd e de fd.d/Zd e de fd0d1Zd2d3defed4d5e e e fd6e e e fd7ee d8e d9e de f d:d;Zed<ed=fd>d?Zd@e e e fdee e ffdAdBZd@e e e fdee e ffdCdDZ ee!e"e#dE$dF\Z%Z&dGdHej'j()DZ*e+dIdJ,e*dK$dLZ-dMdNZ.GdOdPdPe/Z0e e e ee e e fe e e fffZ1e ee1ee0ee2fee1ee0ffZ3ed2ed3fdQe dRe4e3dSe e e fdTe e e fde f dUdVZ5dgfdWdXZ6e7e+dYdZ$d[Z8 e+d\$d]Z9 e+d^:$d_Z;e+d`$daZ< e7e+dYdZe e+dc$ddZ? dedfe@ADZBeZCeZDeZEeZFeZGeZHeZIeZJeZKe ZLe%e&ZMZNe-ZOe.ZPe0ZQe5ZRe8ZSe9ZTe;ZUeZXe?ZYdS)kN)__diag__)*)_bslash_flatten_escape_regex_range_chars,F)allow_trailing_delimexprdelimcombineminmaxr returncCst|tr t|}djt|t||rdt|ndd}|s)t|}|dur9|dkr5t d|d8}|durM|durI||krIt d|d8}|||||f}|r_|t |7}|rht | |S| |S) a/Helper to define a delimited list of expressions - the delimiter defaults to ','. By default, the list elements and delimiters can have intervening whitespace, and comments, but this can be overridden by passing ``combine=True`` in the constructor. If ``combine`` is set to ``True``, the matching tokens are returned as a single token string, with the delimiters included; otherwise, the matching tokens are returned as a list of tokens, with the delimiters suppressed. If ``allow_trailing_delim`` is set to True, then the list may end with a delimiter. Example:: delimited_list(Word(alphas)).parse_string("aa,bb,cc") # -> ['aa', 'bb', 'cc'] delimited_list(Word(hexnums), delim=':', combine=True).parse_string("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE'] z{expr} [{delim} {expr}]...{end}z [{}])r r endNrzmin must be greater than 0z)max must be greater than, or equal to min) isinstancestr_type ParserElement_literalStringClassformatstrcopy streamlineSuppress ValueErrorOptCombineset_name)r r r r rr dlNamedelimited_list_exprr!?/usr/lib/python3/dist-packages/pip/_vendor/pyparsing/helpers.pydelimited_list s.    r#)intExprint_exprr$csr|p|}tfdd}|durttdd}n|}|d|j|dd|d td S) 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. Example:: counted_array(Word(alphas)).parse_string('2 ab cd ef') # -> ['ab', 'cd'] # in this parser, the leading integer value is given in binary, # '10' indicating that 2 values are in the array 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') # -> ['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: count_with_metadata = 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()) # prints # ['True', 'True', 'False'] # - items: ['True', 'True', 'False'] # - type: 'bool' cs,|d}|r |ntK|dd=dSNr)Empty)sltn array_exprr r!r"count_field_parse_actionrsz/counted_array..count_field_parse_actionNcSs t|dSr&)intr*r!r!r"z zcounted_array..arrayLenT)call_during_tryz(len) z...)ForwardWordnumsset_parse_actionrradd_parse_actionr)r r%r$r.r!r,r" counted_arrayFs) r:cs6tfdd}|j|dddt|S)a9Helper 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:: 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. csT|r#t|dkr|d>dSt|}tdd|D>dSt>dS)Nrrcs|]}t|VqdSN)Literal).0ttr!r!r" zImatch_previous_literal..copy_token_to_repeater..)lenras_listAndr')r(r)r*tflatrepr!r"copy_token_to_repeaters   z6match_previous_literal..copy_token_to_repeaterT callDuringTry(prev) )r5r9rr)r rHr!rFr"match_previous_literals   rLcsFt|}|Kfdd}|j|dddt|S)aWHelper 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:: 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. cs*t|fdd}j|dddS)Ncs,t|}|krt||d|dS)NzExpected {}, found{})rrCParseExceptionr)r(r)r* theseTokens matchTokensr!r"must_match_these_tokenss zTmatch_previous_expr..copy_token_to_repeater..must_match_these_tokensTrI)rrCr8)r(r)r*rQrFrOr"rHs  z3match_previous_expr..copy_token_to_repeaterTrIrK)r5rr9rr)r e2rHr!rFr"match_previous_exprs  rST)useRegex asKeywordstrscaseless use_regex as_keywordrTrUcs@|p|}|o|}t|trtjrtjddd|r(dd}dd}|r%tntndd}dd}|r4tnt g}t|trB| }nt|t rLt |}nt d |sUtStd d |Drd } | t|d kr|| } t|| d dD]&\} } || | r|| | d =n|| | r|| | d =|| | nqv| d 7} | t|d ksh|r|rtjnd } zItdd |Drdddd |D}n ddd |D}|rd|}t|| dd|}|rdd|D|fdd|WStjytjdddYnwtfdd |Dd|S)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. Parameters: - ``strs`` - a string of space-delimited literals, or a collection of string literals - ``caseless`` - treat all literals as caseless - (default= ``False``) - ``use_regex`` - as an optimization, will generate a :class:`Regex` object; otherwise, will generate a :class:`MatchFirst` object (if ``caseless=True`` or ``asKeyword=True``, or if creating a :class:`Regex` raises an exception) - (default= ``True``) - ``as_keyword`` - enforce :class:`Keyword`-style matching on the generated expressions - (default= ``False``) - ``asKeyword`` and ``useRegex`` are retained for pre-PEP8 compatibility, but will be removed in a future release Example:: 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:: [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']] z`More than one string argument passed to one_of, pass choices as a list or space-delimited string) stacklevelcSs||kSr<)upperabr!r!r"r1zone_of..cSs||Sr<)r\ startswithr]r!r!r"r1scSs||kSr<r!r]r!r!r"r1cSs ||Sr<)rar]r!r!r"r1s z7Invalid argument to one_of, expected string or iterablecss|] }t|dkVqdSrNrBr>symr!r!r"r@zone_of..rrNcss|] }t|dkVqdSrcrdrer!r!r"r@#rgz[{}]rcsr;r<)rrer!r!r"r@&rA|css|]}t|VqdSr<)reescaperer!r!r"r@)sz \b(?:{})\b)flagsz | cSsi|]}||qSr!lowerrer!r!r" 4zone_of..cs|dSr&rlr(r)r*) symbol_mapr!r"r15r`z8Exception creating Regex for one_of, building MatchFirstc3s|]}|VqdSr<r!re)parseElementClassr!r"r@?rA)rrr%warn_on_multiple_string_args_to_oneofwarningswarnCaselessKeywordCaselessLiteralKeywordr=splitIterablelist TypeErrorNoMatchanyrB enumerateinsertri IGNORECASEallrjoinRegexrr9 sre_constantserror MatchFirst)rVrWrXrYrTrUisequalmaskssymbolsicurjotherre_flagspattretr!)rrrqr"one_ofs~)           rkeyvaluecCsttt||S)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:: text = "shape: SQUARE posn: upper left color: light blue texture: burlap" attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)) print(OneOrMore(attr_expr).parse_string(text).dump()) 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()) print(result['shape']) print(result.shape) # object attribute access works too print(result.as_dict()) prints:: [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']] - color: light blue - posn: upper left - shape: SQUARE - texture: burlap SQUARE SQUARE {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'} )Dict OneOrMoreGroup)rrr!r!r"dict_ofDs%r)asString as_stringrcCsr|o|}tdd}|}d|_|d||d}|r$dd}ndd}|||j|_|tj|S) aHelper 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 astring 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:: src = "this is test bold text normal text " for tag in ("b", "i"): opener, closer = make_html_tags(tag) patt = original_text_for(opener + SkipTo(closer) + closer) print(patt.search_string(src)[0]) prints:: [' bold text '] ['text'] cS|Sr<r!)r(locr*r!r!r"r1z#original_text_for..F_original_start _original_endcSs||j|jSr<)rrrpr!r!r"r1r`cSs&||d|dg|dd<dS)Nrrpoprpr!r!r" extractTexts&z&original_text_for..extractText)r'r8r callPreparse ignoreExprssuppress_warning Diagnostics)warn_ungrouped_named_tokens_in_collection)r rr locMarker endlocMarker matchExprrr!r!r"original_text_forls"   rcCst|ddS)zkHelper to undo pyparsing's default grouping of And expressions, even if all but one are non-empty. cSs|dSr&r!r0r!r!r"r1rbzungroup..)TokenConverterr9)r r!r!r"ungroupsrcCs4tdd}t|d|d|dS)a (DEPRECATED - future code should use the Located class) 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 :class:`ParserElement.parseWithTabs` Example:: wd = Word(alphas) for match in locatedExpr(wd).searchString("ljsdf123lksdjjf123lkkjj1222"): print(match) prints:: [[0, 'ljsdf', 5]] [[8, 'lksdjjf', 15]] [[18, 'lkkjj', 23]] cSrr<r!)ssllr?r!r!r"r1rzlocatedExpr.. locn_startrlocn_end)r'r8rrleaveWhitespace)r locatorr!r!r" locatedExprsr()) ignoreExpropenerclosercontent ignore_exprrcCs||kr |tkr |n|}||krtd|durt|trt|trt|dkr^t|dkr^|durKtt|t||tj dd dd}nTt t||tj  dd}nA|durtt|t |t |ttj dd dd}nttt |t |ttj dd d d}ntd t}|dur|tt|t||B|Bt|K}n|tt|t||Bt|K}|d ||f|S) a& Helper method for defining nested lists enclosed in opening and closing delimiters (``"("`` and ``")"`` are the default). Parameters: - ``opener`` - opening character for a nested list (default= ``"("``); can also be a pyparsing expression - ``closer`` - closing character for a nested list (default= ``")"``); can also be a pyparsing expression - ``content`` - expression for items within the nested lists (default= ``None``) - ``ignore_expr`` - expression for ignoring opening and closing delimiters (default= :class:`quoted_string`) - ``ignoreExpr`` - this pre-PEP8 argument 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:: 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(delimited_list(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("%(name)s (%(type)s) args: %(args)s" % func) prints:: is_odd (int) args: [['int', 'x']] dec_to_hex (int) args: [['char', 'hchar']] z.opening and closing strings cannot be the sameNr)exactcS |dSr&stripr0r!r!r"r1%r2znested_expr..cSrr&rr0r!r!r"r1)r2cSrr&rr0r!r!r"r13r2cSrr&rr0r!r!r"r1;r2zOopening and closing arguments must be strings if no content expression is givenznested %s%s expression) quoted_stringrrrrBrr CharsNotInrDEFAULT_WHITE_CHARSr8emptyrr=r5rr ZeroOrMorer)rrrrrrr!r!r" nested_exprszJ         $r<>cst|tr|t|| d}n|jtttd}|rGt t }||dt t t |td|tddgdd d d |}n8t t ttd d B}||dt t t | d d ttd|tddgdd dd |}ttd|d dd}|d|fdd |ddddd}|_|_t||_||fS)zRInternal helper to construct opening and closing tag expressions, given a tag name)rWz_-:tag=/F)defaultrcS |ddkSNrrr!rpr!r!r"r1[r2z_makeTags..r) exclude_charscSrr&rlr0r!r!r"r1ir2cSrrr!rpr!r!r"r1or2zc s*|dddd|S)Nstartr: ) __setitem__rreplacetitleryrr0resnamer!r"r1xs"rrrrz)rrrxnamer6alphas alphanumsdbl_quoted_stringrr8 remove_quotesrrrrrr printablesrr=rr9rrrryrSkipTotag_body)tagStrxml suppress_LT suppress_GT tagAttrName tagAttrValueopenTagcloseTagr!rr" _makeTagsKsp        rtag_strcC t|dS)aPHelper 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:: 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:: pyparsing -> https://github.com/pyparsing/pyparsing/wiki Frrr!r!r"make_html_tagss rcCr)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` Trrr!r!r" make_xml_tagss rz_:zany tagcCsi|] \}}|d|qS);)rstrip)r>kvr!r!r"rnsrnz &(?Prhz);zcommon HTML entitycCs t|jS)zRHelper parser action to replace common HTML entities with their special characters)_htmlEntityMapgetentityr0r!r!r"replace_html_entitys rc@seZdZdZdZdS)OpAssocrrZN)__name__ __module__ __qualname__LEFTRIGHTr!r!r!r"rsr base_exprop_listlparrparcCsGdddt}d|_t}t|}t|}||||B}t|D]N\}}|ddd\} } } } t| tr=t| } | dkr]t| t t frNt | dkrRt d | \} }d | |}nd | }d | krodkstt d t d | tjtjfvrt dt|}| tjur| d kr||| t|| d}n| dkr| dur||| |t|| |d}n|||t|d}n| dkr||| |||t|t| |||}nk| tjurP| d krt| tst| } || j|t| |}nI| dkr3| dur$||| |t|| |d}n,|||t||d}n| dkrP||| |||t|| |||}| rft| t t fra|j| n|| |||B|K}|}q"||K}|S)a Helper method for constructing grammars of expressions made up of operators working in a precedence hierarchy. Operators may be unary or binary, left- or right-associative. Parse actions can also be attached to operator expressions. The generated parser will also recognize the use of parentheses to override operator precedences (see example below). Note: if you define a deep operator list, you may see performance issues when using infix_notation. See :class:`ParserElement.enable_packrat` for a mechanism to potentially improve your parser performance. Parameters: - ``base_expr`` - expression representing the most basic operand to be used in the expression - ``op_list`` - list of tuples, one for each operator precedence level in the expression grammar; each tuple is of the form ``(op_expr, num_operands, right_left_assoc, (optional)parse_action)``, where: - ``op_expr`` is the pyparsing expression for the operator; may also be a string, which will be converted to a Literal; if ``num_operands`` is 3, ``op_expr`` is a tuple of two expressions, for the two operators separating the 3 terms - ``num_operands`` is the number of terms for this operator (must be 1, 2, or 3) - ``right_left_assoc`` is the indicator whether the operator is right or left associative, using the pyparsing-defined constants ``OpAssoc.RIGHT`` and ``OpAssoc.LEFT``. - ``parse_action`` is the parse action to be associated with expressions matching this operator expression (the parse action tuple member may be omitted); if the parse action is passed a tuple or list of functions, this is equivalent to calling ``set_parse_action(*fn)`` (:class:`ParserElement.set_parse_action`) - ``lpar`` - expression for matching left-parentheses (default= ``Suppress('(')``) - ``rpar`` - expression for matching right-parentheses (default= ``Suppress(')')``) Example:: # simple example of four-function arithmetic with ints and # variable names integer = pyparsing_common.signed_integer varname = pyparsing_common.identifier arith_expr = infix_notation(integer | varname, [ ('-', 1, OpAssoc.RIGHT), (one_of('* /'), 2, OpAssoc.LEFT), (one_of('+ -'), 2, OpAssoc.LEFT), ]) arith_expr.run_tests(''' 5+3*6 (5+3)*6 -2--11 ''', full_dump=False) prints:: 5+3*6 [[5, '+', [3, '*', 6]]] (5+3)*6 [[[5, '+', 3], '*', 6]] -2--11 [[['-', 2], '-', ['-', 11]]] c@seZdZdddZdS)zinfix_notation.._FBTcSs|j|||gfSr<)r try_parse)selfinstringr doActionsr!r!r" parseImplsz%infix_notation.._FB.parseImplNT)rrrrr!r!r!r"_FBsrz FollowedBy>r<NrZz@if numterms=3, opExpr must be a tuple or list of two expressionsz {}{} termz{} termrz6operator must be unary (1), binary (2), or ternary (3)z2operator must indicate right or left associativity)r.)rZ.) FollowedByrr5rrrrrrtupler{rBrrrrrrrrrr r8setName)rrrrrrlastExprroperDefopExprarityrightLeftAssocpaopExpr1opExpr2 term_namethisExprrr!r!r"infix_notationsM               rc s0ddfddfdd}fdd}fdd }ttd }tt|d }t|d } t|d } |rctt ||t| t|t || } ntt |t| t|t |t | } | fdd| fdd| t t| dS)a (DEPRECATED - use IndentedBlock class instead) Helper method for defining space-delimited indentation blocks, such as those used to define block statements in Python source code. Parameters: - ``blockStatementExpr`` - expression defining syntax of statement that is repeated within the indented block - ``indentStack`` - list created by caller to manage indentation stack (multiple ``statementWithIndentedBlock`` expressions within a single grammar should share a common ``indentStack``) - ``indent`` - boolean indicating whether block must be indented beyond the current level; set to ``False`` for block of left-most statements (default= ``True``) A valid block must contain at least one ``blockStatement``. (Note that indentedBlock uses internal parse actions which make it incompatible with packrat parsing.) Example:: 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 = OneOrMore(stmt) parseTree = module_body.parseString(data) parseTree.pprint() prints:: [['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']]]]]]] Ncsddd<dSNr!r!) backup_stacks indentStackr!r" reset_stacksz"indentedBlock..reset_stackcsN|t|krdSt||}|dkr%|dkrt||dt||ddS)Nrzillegal nestingznot a peer entry)rBcolrMr(r)r*curColrr!r"checkPeerIndents      z&indentedBlock..checkPeerIndentcs0t||}|dkr|dSt||d)Nrznot a subentry)rappendrMrr r!r"checkSubIndents   z%indentedBlock..checkSubIndentcsN|t|krdSt||}r|vst||d|dkr%dSdS)Nznot an unindentr)rBrrMrrr r!r" checkUnindents      z$indentedBlock..checkUnindentz INDENTrUNINDENTcsr dodSdSrrr!)rr!r"r1rozindentedBlock..csSr<r!)r^r_cd)rr!r"r1szindented block)r"rLineEndset_whitespace_charssuppressr'r8rrrr9set_fail_actionignorer) blockStatementExprrindentrr!r#r$NLr%PEERUNDENTsmExprr!)rrrr" indentedBlockjs@V     r4z/\*(?:[^*]|\*(?!/))*z*/zC style commentzz HTML commentz.*z rest of linez//(?:\\\n|[^\n])*z // commentzC++ style commentz#.*zPython style commentcCsg|] }t|tr|qSr!)rr)r>rr!r!r" sr5)rFNNr<)FTFr)Z html.entitieshtmlrirrcoreutilrrrUnionrrbool OptionalTyper/r#r:rLrS IterableTyperrrrrrrrrTuplerrr6rrr any_open_tag any_close_tagentitieshtml5itemsrrrcommon_html_entityrEnumrInfixNotationOperatorArgType ParseActionInfixNotationOperatorSpecListrr4rc_style_comment html_commentleave_whitespace rest_of_linedbl_slash_commentcpp_style_commentjava_style_commentpython_style_commentvarsvalues_builtin_exprs delimitedList countedArraymatchPreviousLiteralmatchPreviousExproneOfdictOforiginalTextFor nestedExpr makeHTMLTags makeXMLTags anyOpenTag anyCloseTagcommonHTMLEntityreplaceHTMLEntityopAssoc infixNotation cStyleComment htmlComment restOfLinedblSlashCommentcppStyleCommentjavaStyleCommentpythonStyleCommentr!r!r!r"s    ; <!$ ) 5$   :