/usr/lib/python2.6/site-packages/pkg_resources/_vendor
NameSizeModeActions
packaging/-0755rm
pyparsing.py1604250644editdlrm
pyparsing.pyc1692260644editdlrm
six.py300980644editdlrm
six.pyc320080644editdlrm
__init__.py00644editdlrm
__init__.pyc1530644editdlrm
Edit: /usr/lib/python2.6/site-packages/pkg_resources/_vendor/pyparsing.pyc (169226B)
Wcs@s` dZdZdZdZddkZddklZddkZddk Z ddk Z ddk Z ddk Z ddk Z ddkZddkZddkZddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdnghZe iidoZeoFe iZeZeZeZeeeee e!e"e#e$e%e&g Z'nue i(Ze)Z*dpZgZ'ddk+Z+xGdqi,D]9Z-ye'i.e/e+e-Wne0j o qtnXqtWe1dre*dsDZ2dtZ3due4fdvYZ5ei6ei7Z8dwZ9e9dxZ:e8e9Z;edyZ<dzi=d{ei>DZ?de@fd|YZAd eAfd}YZBd"eAfd~YZCd$eCfdYZDd'e@fdYZEde4fdYZFd#e4fdYZGe iHiIeGdZJdZKdZLdZMdZNdZOdZPddZQd%e4fdYZRd-eRfdYZSdeSfdYZTdeSfdYZUdeSfdYZVeVZWeVeR_XdeSfdYZYd eVfdYZZdeYfdYZ[d1eSfdYZ\d(eSfdYZ]d&eSfdYZ^d eSfdYZ_d0eSfdYZ`deSfdYZadeafdYZbdeafdYZcdeafdYZdd+eafdYZed*eafdYZfd3eafdYZgd2eafdYZhd!eRfdYZideifdYZjdeifdYZkdeifdYZld eifdYZmdeRfdYZndenfdYZodenfdYZpd4enfdYZqdenfdYZrde4fdYZsesZtdenfdYZud)enfdYZvdenfdYZwdewfdYZxd.enfdYZyd/eyfdYZzd eyfdYZ{deyfdYZ|d eyfdYZ}d,eyfdYZ~de4fdYZdZdedZedZdZdZdZdZeedZdZedZdZdZeTidEZecidLZedidKZeeiddZefidcZe\e<dddidZe]didZe]didZeeBeBe\e?ddddsBe]de iBZe|ee~deZeVdeudide|ereeBiddZdZdZdZdZdZdZdZdZdZdZdZdZe4e_dzdZe5Ze4e_e4e_e~de~ddZeZe]didZe]didZe]didZe{eWdeiZddeeidZedZedZedZee\e8e;d\ZZe{eWdediddiZeedi,dZdZe]didZe]dZe]diZe]didZe]didZeZe]didZe{ere\e?ddeue\deVdediidZeeueieBddzid<ZedjoeZdZeZd Ze\e8e;d Zeed d eieZe|eeid Zeed d eieZe|eeidZedeBid eeidZeidndS(sw 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 C{", !"}):: from 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 parsed results returned from C{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 s2.0.6s9 Nov 2015 19:03s*Paul McGuire iN(treftAndtCaselessKeywordtCaselessLiteralt CharsNotIntCombinetDicttEachtEmptyt FollowedBytForwardt GoToColumntGrouptKeywordtLineEndt LineStarttLiteralt MatchFirsttNoMatchtNotAnyt OneOrMoretOnlyOncetOptionaltOrtParseBaseExceptiontParseElementEnhancetParseExceptiontParseExpressiontParseFatalExceptiont ParseResultstParseSyntaxExceptiont ParserElementt QuotedStringtRecursiveGrammarExceptiontRegextSkipTot StringEndt StringStarttSuppresstTokentTokenConvertertUpcasetWhitetWordtWordEndt WordStartt ZeroOrMoret alphanumstalphast alphas8bitt anyCloseTagt anyOpenTagt cStyleCommenttcoltcommaSeparatedListtcommonHTMLEntityt countedArraytcppStyleCommenttdblQuotedStringtdblSlashCommentt delimitedListtdictOftdowncaseTokenstemptythexnumst htmlCommenttjavaStyleCommenttkeepOriginalTexttlinetlineEndt lineStarttlinenot makeHTMLTagst makeXMLTagstmatchOnlyAtColtmatchPreviousExprtmatchPreviousLiteralt nestedExprtnullDebugActiontnumstoneOftopAssoctoperatorPrecedencet printablestpunc8bittpythonStyleCommentt quotedStringt removeQuotestreplaceHTMLEntityt replaceWitht restOfLinetsglQuotedStringtsranget stringEndt stringStartttraceParseActiont unicodeStringt upcaseTokenst withAttributet indentedBlocktoriginalTextFortungroupt infixNotationt locatedExprt withClasst3cCsDt|to|Syt|SWntj ot|SXdS(sDrop-in replacement for str(obj) that tries to be Unicode friendly. It first tries str(obj). If that fails with a UnicodeEncodeError, then it tries unicode(obj). It then < returns the unicode object | encodes it with the default encoding | ... >. N(t isinstancetunicodetstrtUnicodeEncodeError(tobj((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt_ustrps s6sum len sorted reversed list tuple set any all min maxccsx|] }|VqWdS(N((t.0ty((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s icCsRd}ddiD}x/t||D]\}}|i||}q,W|S(s/Escape &, <, >, ", ', etc. in a string of data.s&><"'css!x|]}d|dVqWdS(t&t;N((Rpts((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s samp gt lt quot apos(tsplittziptreplace(tdatat from_symbolst to_symbolstfrom_tto_((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt _xml_escapes  t _ConstantscBseZRS((t__name__t __module__(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR~st 0123456789t ABCDEFabcdefi\tccs-x&|]}|tijo |VqqWdS(N(tstringt whitespace(Rptc((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s cBsPeZdZdd d dZdZdZdZddZdZ RS( s7base exception class for all parsing runtime exceptionsicCsK||_|djo||_d|_n||_||_||_dS(NR(tloctNonetmsgtpstrt parserElement(tselfRRRtelem((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__init__s      cCss|djot|i|iS|djot|i|iS|djot|i|iSt|dS(ssupported attributes by name are: - lineno - returns the line number of the exception text - col - returns the column number of the exception text - line - returns the line containing the exception text RGR5tcolumnRDN(scolscolumn(RGRRR5RDtAttributeError(Rtaname((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt __getattr__s   cCs d|i|i|i|ifS(Ns"%s (at char %d), (line:%d, col:%d)(RRRGR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__str__scCs t|S(N(Ro(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__repr__ss>!}} ('-' operator) indicates that parsing is to stop immediately because an unbacktrackable syntax error has been foundcCs/tt|i|i|i|i|idS(N(tsuperRRRRRR(Rtpe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs(RRRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscBs eZdZdZdZRS(sNexception thrown by C{validate()} if the grammar could be improperly recursivecCs ||_dS(N(tparseElementTrace(RtparseElementList((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs d|iS(NsRecursiveGrammarException: %s(R(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs(RRRRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR!s t_ParseResultsWithOffsetcBs,eZdZdZdZdZRS(cCs||f|_dS(N(ttup(Rtp1tp2((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs |i|S(N(R(Rti((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt __getitem__scCs t|iS(N(treprR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR scCs|id|f|_dS(Ni(R(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt setOffset s(RRRRRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs   cBseZdZd,eedZd,eeedZdZedZ dZ dZ dZ dZ e Zd Zd Zd Zd Zd ZeoeZeZeZndZdZdZdZdZd,dZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$ddZ%d Z&d!Z'd"Z(d,e)ded#Z*d$Z+d%Z,dd&d'Z-d(Z.d)Z/d*Z0d+Z1RS(-sStructured parse results, to provide multiple means of access to the parsed data: - as a list (C{len(results)}) - by list index (C{results[0], results[1]}, etc.) - by attribute (C{results.}) cCs1t||o|Sti|}t|_|S(N(Rjtobjectt__new__tTruet_ParseResults__doinit(tclsttoklisttnametasListtmodaltretobj((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs  cCs|iot|_d|_d|_h|_||to||_n0||tot||_n |g|_t |_ n|dj o?|o8|pd|i|s (R(R((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt itervaluesscsfdiDS(Nc3s#x|]}||fVqWdS(N((RpR(R(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s (R(R((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt iteritemsscCst|iS(sReturns all named result keys.(RR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytkeysscCst|iS(s Returns all named result values.(RR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytvaluesscCst|iS(s=Returns all named result keys and values as a list of tuples.(RR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs t|iS(sSince keys() returns an iterator, this method is helpful in bypassing code that looks for the existence of any defined results names.(tboolR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pythaskeysscOs|p dg}nxK|iD]=\}}|djo|d|f}q!td|q!Wt|dtp$t|djp|d|jo |d}||}||=|S|d}|SdS(sRemoves and returns item at specified index (default=last). Supports both list and dict semantics for pop(). If passed no argument or an integer argument, it will use list semantics and pop tokens from the list of parsed tokens. If passed a non-integer argument (most likely a string), it will use dict semantics and pop the corresponding value from any defined results names. A second default return value argument is supported, just as in dict.pop().itdefaultis-pop() got an unexpected keyword argument '%s'iN(RRRjRR(RtargstkwargsRRtindextrett defaultvalue((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytpops       cCs||jo ||S|SdS(sReturns named result matching the given key, or if there is no such name, then returns the given C{defaultValue} or C{None} if no C{defaultValue} is specified.N((Rtkeyt defaultValue((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs  cCsw|ii||x]|iiD]L\}}x=t|D]/\}\}}t||||j||sii( RRRRRRjRRRRtupdate( RRt addoffsett otheritemsRRtvlistRtotherdictitems((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__iadd__s J  cCs,t|to|djo |iSdS(Ni(RjRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__radd__scCs dt|it|ifS(Ns(%s, %s)(RRR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs"ddid|iDdS(Nt[s, css<x5|].}t|to t|n t|VqWdS(N(RjRRoR(RpR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s t](RR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRsRcCstg}xg|iD]\}|o|o|i|nt|to||i7}q|it|qW|S(N(RRRjRt _asStringListRo(RtseptoutR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s cCs?g}|iD]*}|t|to |in|q~S(sXReturns the parse results as a nested list of matching tokens, all converted to strings.(RRjRR(RRtres((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs,tot|iSt|iSdS(s.Returns the named parse results as dictionary.N(tPY_3RRR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytasDictscCsPt|i}|ii|_|i|_|ii|i|i|_|S(s/Returns a new copy of a C{ParseResults} object.(RRRRRRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s   c Csd}g}td|iiD}|d}|pd}d}d}nd } |d j o |} n|io |i} n| p|odSd} n|||d| dg7}xt|iD]\} } t| toq| |jo4|| i || |o |d j||g7}q|| i d |o |d j||g7}qd } | |jo|| } n| p|oqqd} nt t | } |||d| d| d| dg 7}qW|||d| dg7}di |S( shReturns the parse results as XML. Tags are created for tokens and lists that have defined results names.s css:x3|],\}}x|D]}|d|fVqWqWdS(iN((RpRRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys -s s RtITEMtss s %s%s[%d]: %s%s%sR( RRoRRtsortedRRjRtdumptanyRR( RRtdepthRtNLRRRRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR|s.  ! C=cOsti|i||dS(sPretty-printer for parsed results as a list, using the C{pprint} module. Accepts additional positional or keyword args as defined for the C{pprint.pprint} method. (U{http://docs.python.org/3/library/pprint.html#pprint.pprint})N(tpprintR(RRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR"scCsE|i|ii|idj o |ipd|i|iffS(N(RRRRRRR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt __getstate__s   cCso|d|_|d\|_}}|_h|_|ii||dj ot||_n d|_dS(Nii(RRRRRRRR(RtstateRt inAccumNames((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt __setstate__s   cCs#ttt|t|iS(N(tdirRRRR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRsN(2RRRRRRRjRRRRRRRt __nonzero__RRRRRRRRRRRRRRRRRRRRRRRRR RRR RRRR"R#R&R(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs^ #                           ;     cCsF|}|t|jo||djodS||idd|S(sReturns current column within a string, counting newlines as line separators. The first column is number 1. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See L{I{ParserElement.parseString}} for more information on parsing strings containing C{}s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. s ii(Rtrfind(RtstrgRt((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR5s cCs|idd|dS(sReturns current line number within a string, counting newlines as line separators. The first line is number 1. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See L{I{ParserElement.parseString}} for more information on parsing strings containing C{}s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. s ii(tcount(RR*((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRGs cCsT|idd|}|id|}|djo||d|!S||dSdS(sfReturns the line of text containing loc within a string, counting newlines as line separators. s iiN(R)tfind(RR*tlastCRtnextCR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRDs  cCsAdt|dt|dt||t||fGHdS(NsMatch s at loc s(%d,%d)(RoRGR5(tinstringRtexpr((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt_defaultStartDebugActionscCs'dt|dt|iGHdS(NsMatched s -> (RoRlR(R/tstartloctendlocR0ttoks((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt_defaultSuccessDebugActionscCsdt|GHdS(NsException raised:(Ro(R/RR0texc((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt_defaultExceptionDebugActionscGsdS(sG'Do-nothing' debug action, to suppress debugging output during parsing.N((R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRNsicsItjofdSdgtgfd}|S(Ncs |S(((Rttltt(tfunc(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRsics}xvy&|d}td<|SWqtj o>djo#d odcd7((R;R<R=R:sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt _trim_aritys     cBsxeZdZdZeZedZedZedZ dZ dZ edZ e dZd Zd Zd Zd Zd ZdZe dZdZe e dZdZe e dZeZhZedZeZedZedZe edZ!dZ"e dZ#dZ$dZ%dZ&dZ'dZ(dZ)d Z*d!Z+d"Z,d#Z-d$Z.d%Z/d&Z0d;d'Z2d(Z3d)Z4d*Z5d+Z6d,Z7d-Z8e d.Z9d/Z:d0Z;d1Z<d2Z=gd3Z>ed4Z?d5Z@d6ZAd7ZBd8ZCd9ZDed:ZERS(<s)Abstract base level parser element class.s cCs |t_dS(s/Overrides the default whitespace chars N(RtDEFAULT_WHITE_CHARS(tchars((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytsetDefaultWhitespaceCharsscCs |t_dS(sV Set class to be used for inclusion of string literals into a parser. N(RtliteralStringClass(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytinlineLiteralsUsingscCst|_d|_d|_d|_||_t|_t i |_ t|_ t |_t |_t|_t |_t |_t|_d|_t|_d|_d|_t|_t |_dS(NR(NNN(Rt parseActionRt failActiontstrReprt resultsNamet saveAsListRtskipWhitespaceRRAt whiteCharstcopyDefaultWhiteCharsRtmayReturnEmptytkeepTabst ignoreExprstdebugt streamlinedt mayIndexErrorterrmsgt modalResultst debugActionstret callPreparset callDuringTry(Rtsavelist((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR%s(                   cCsGti|}|i|_|i|_|ioti|_n|S(sMake a copy of this C{ParserElement}. Useful for defining different parse actions for the same parsing pattern, using copies of the original parse element.(RRFRPRMRRARL(Rtcpy((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR<s    cCs@||_d|i|_t|do|i|i_n|S(s6Define name for this expression, for use in debugging.s Expected t exception(RRTRR\R(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytsetNameFs  cCsG|i}|ido|d }t}n||_| |_|S(s%Define name for referencing matching tokens as a nested attribute of the returned parse results. NOTE: this returns a *copy* of the original C{ParserElement} object; this is so that the client can define a basic element, such as an integer, and reference it in multiple places with different names. You can also set results names using the abbreviated syntax, C{expr("name")} in place of C{expr.setResultsName("name")} - see L{I{__call__}<__call__>}. t*i(RtendswithRRIRU(RRtlistAllMatchestnewself((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytsetResultsNameNs     cse|o4|ittfd}|_||_n't|ido|ii|_n|S(sMethod to invoke the Python pdb debugger when this element is about to be parsed. Set C{breakFlag} to True to enable, False to disable. cs)ddk}|i||||S(Ni(tpdbt set_trace(R/Rt doActionst callPreParseRc(t _parseMethod(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytbreakerhs  t_originalParseMethod(t_parseRRiR(Rt breakFlagRh((RgsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytsetBreakas   cOs7tttt||_|idt|_|S(s_Define action to perform when successfully matching parse element definition. Parse action fn is a callable method with 0-3 arguments, called as C{fn(s,loc,toks)}, C{fn(loc,toks)}, C{fn(toks)}, or just C{fn()}, where: - s = the original string being parsed (see note below) - loc = the location of the matching substring - toks = a list of the matched tokens, packaged as a C{L{ParseResults}} object If the functions in fns modify the tokens, they can return them as the return value from fn, and the modified list of tokens will replace the original. Otherwise, fn does not need to return any value. Note: the default parsing behavior is to expand tabs in the input string before starting the parsing process. See L{I{parseString}} for more information on parsing strings containing C{}s, and suggested methods to maintain a consistent view of the parsed string, the parse location, and line and column positions within the parsed string. RY(RtmapR@RFRRRY(RtfnsR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytsetParseActionsscOsG|itttt|7_|ip|idt|_|S(saAdd parse action to expression's list of parse actions. See L{I{setParseAction}}.RY(RFRRmR@RYRR(RRnR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytaddParseActions$csl|idpdx0|D](fd}|ii|qW|ip|idt|_|S(sAdd a boolean predicate function to expression's list of parse actions. See L{I{setParseAction}}. Optional keyword argument C{message} can be used to define a custom message to be used in the raised exception.tmessagesfailed user-defined conditioncs9tt|||pt||n|S(N(RR@R(RtR8R9(Rtfn(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytpasRY(RRFRRYR(RRnRRs((RRrsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt addConditionscCs ||_|S(s Define action to perform if parsing fails at this expression. Fail acton fn is a callable function that takes the arguments C{fn(s,loc,expr,err)} where: - s = string being parsed - loc = location where expression match was attempted and failed - expr = the parse expression that failed - err = the exception thrown The function returns no value. It may throw C{L{ParseFatalException}} if it is desired to stop parsing immediately.(RG(RRr((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt setFailActions cCsqt}xd|o\t}xO|iD]D}y(x!|i||\}}t}q,Wq tj oq Xq Wq W|S(N(RRRPRjR(RR/Rt exprsFoundtetdummy((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt_skipIgnorabless  cCsw|io|i||}n|ioI|i}t|}x1||jo|||jo|d7}qBWn|S(Ni(RPRyRKRLR(RR/Rtwttinstrlen((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytpreParses    cCs |gfS(N((RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt parseImplscCs|S(N((RR/Rt tokenlist((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt postParsesc Cs|i}|p |io"|ido|id|||n|o |io|i||}n|}|}yWy|i|||\}}Wn1tj o%t|t||i |nXWqt j o\} |ido|id|||| n|io|i|||| nqXn|o |io|i||}n|}|}|i p|t|joWy|i|||\}}Wqtj o%t|t||i |qXn|i|||\}}|i |||}t ||id|id|i} |ioM|p |io<|oyuxn|iD]c} | ||| }|dj o>t ||id|iot|t tfd|i} qfqfWWqt j o8} |ido|id|||| nqXqxr|iD]c} | ||| }|dj o>t ||id|iot|t tfd|i} q#q#Wn|o3|ido!|id||||| qn|| fS(NiiRRi(RQRGRVRXR|R}RRRRTRRSRRRIRJRURFRYRRjR( RR/RReRft debuggingtpreloct tokensStartttokensterrt retTokensRr((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt _parseNoCachest '  '$       %cCsPy|i||dtdSWn+tj ot|||i|nXdS(NRei(RjRRRRT(RR/R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyttryParsescCs|||||f}|tijo@ti|}t|to |n|d|difSyA|i||||}|d|difti|<|SWn.tj o"}d|_|ti|<nXdS(Nii( Rt _exprArgCacheRjt ExceptionRRRRt __traceback__(RR/RReRftlookupRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt _parseCaches  !  cCstiidS(N(RRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt resetCache.scCs'tiptt_tit_ndS(sEnables "packrat" parsing, which adds memoizing to the parsing logic. Repeated parse attempts at the same string location (which happens often in many complex grammars) can immediately return a cached value, instead of re-executing parsing/validating code. Memoizing is done of both valid results and parsing exceptions. This speedup may break existing programs that use parse actions that have side-effects. For this reason, packrat parsing is disabled when you first import pyparsing. To activate the packrat feature, your program must call the class method C{ParserElement.enablePackrat()}. If your program uses C{psyco} to "compile as you go", you must call C{enablePackrat} before calling C{psyco.full()}. If you do not do this, Python will crash. For best results, call C{enablePackrat()} immediately after importing pyparsing. N(Rt_packratEnabledRRRj(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt enablePackrat3s  cCsti|ip|inx|iD]}|iq,W|ip|i}nyY|i|d\}}|o6|i||}t t }|i||nWn,t j o }ti oq|nX|SdS(sExecute the parse expression with the given string. This is the main interface to the client code, once the complete expression has been built. If you want the grammar to require that the entire input string be successfully parsed, then set C{parseAll} to True (equivalent to ending the grammar with C{L{StringEnd()}}). Note: C{parseString} implicitly calls C{expandtabs()} on the input string, in order to report proper column numbers in parse actions. If the input string contains tabs and the grammar uses parse actions that use the C{loc} argument to index into the string being parsed, you can ensure you have a consistent view of the input string by: - calling C{parseWithTabs} on your grammar before calling C{parseString} (see L{I{parseWithTabs}}) - define your parse action using the full C{(s,loc,toks)} signature, and reference the input string using the parse action's C{s} argument - explictly expand the tabs in your input string before calling C{parseString} iN( RRRRt streamlineRPROt expandtabsRjR|RR$Rtverbose_stacktrace(RR/tparseAllRwRRtseR6((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt parseStringHs&      c cs|ip|inx|iD]}|iq"W|ipt|i}nt|}d}|i}|i}t i d} yx||jo| |joy.|||} ||| dt \} } Wnt j o| d}qX| |jo]| d7} | | | fV|o4|||} | |jo | }q^|d7}ql| }q| d}qWWn,t j o }t ioq|nXdS(s"Scan the input string for expression matches. Each match will return the matching tokens, start location, and end location. May be called with optional C{maxMatches} argument, to clip scanning after 'n' matches are found. If C{overlap} is specified, then overlapping matches will be reported. Note that the start and end locations are reported relative to the string being parsed. See L{I{parseString}} for more information on parsing strings with embedded tabs.iRfiN(RRRRPRORoRRR|RjRRRRRR(RR/t maxMatchestoverlapRwR{Rt preparseFntparseFntmatchesRtnextLocRtnextlocR6((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt scanStringusF             c Cs<g}d}t|_yx|i|D]\}}}|i|||!|oSt|to||i7}qt|to||7}q|i|n|}q(W|i||g}|D]}|o ||qq~}dit t t |SWn,t j o } t ioq8| nXdS(sExtension to C{L{scanString}}, to modify matching text with modified tokens that may be returned from a parse action. To use C{transformString}, define a grammar and attach a parse action to it that modifies the returned token list. Invoking C{transformString()} on a target string will then scan for matches, and replace the matched text patterns according to the logic in the parse action. C{transformString()} returns the resulting transformed string.iRN(RRORRRjRRRRRmRot_flattenRRR( RR/RtlastER9RtRwRtoR6((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyttransformStrings*  ,  c Csqy>tg}|i||D]\}}}||q~SWn,tj o }tioqm|nXdS(sAnother extension to C{L{scanString}}, simplifying the access to the tokens found to match the given parse expression. May be called with optional C{maxMatches} argument, to clip searching after 'n' matches are found. N(RRRRR(RR/RRR9RtRwR6((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt searchStrings > cCsht|toti|}nt|tp%tidt|tdddSt ||gS(s0Implementation of + operator - returns C{L{And}}s4Cannot combine element of type %s with ParserElementt stackleveliN( RjRRRDtwarningstwarnRt SyntaxWarningRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs cCs`t|toti|}nt|tp%tidt|tdddS||S(sKImplementation of + operator when left operand is not a C{L{ParserElement}}s4Cannot combine element of type %s with ParserElementRiN( RjRRRDRRRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs cCsqt|toti|}nt|tp%tidt|tdddSt |t i |gS(s?Implementation of - operator, returns C{L{And}} with error stops4Cannot combine element of type %s with ParserElementRiN( RjRRRDRRRRRRt _ErrorStop(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__sub__s cCs`t|toti|}nt|tp%tidt|tdddS||S(sKImplementation of - operator when left operand is not a C{L{ParserElement}}s4Cannot combine element of type %s with ParserElementRiN( RjRRRDRRRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__rsub__s csdt|to|d}}n<t|to|d d }|dd jod|df}nt|dtoc|dd joR|ddjo tS|ddjo tS|dtSq\t|dto.t|dto|\}}||8}q\tdt|dt|dntdt||djotdn|djotdn||jo djnotdn|okfd |oB|djo|}q2t g||}q`|}n+|djo }nt g|}|S( sImplementation of * operator, allows use of C{expr * 3} in place of C{expr + expr + expr}. Expressions may also me multiplied by a 2-integer tuple, similar to C{{min,max}} multipliers in regular expressions. Tuples may also include C{None} as in: - C{expr*(n,None)} or C{expr*(n,)} is equivalent to C{expr*n + L{ZeroOrMore}(expr)} (read as "at least n instances of C{expr}") - C{expr*(None,n)} is equivalent to C{expr*(0,n)} (read as "0 to n instances of C{expr}") - C{expr*(None,None)} is equivalent to C{L{ZeroOrMore}(expr)} - C{expr*(1,None)} is equivalent to C{L{OneOrMore}(expr)} Note that C{expr*(None,n)} does not raise an exception if more than n exprs exist in the input stream; that is, C{expr*(None,n)} does not enforce a maximum number of expr occurrences. If this behavior is desired, then write C{expr*(None,n) + ~expr} iiis7cannot multiply 'ParserElement' and ('%s','%s') objectss0cannot multiply 'ParserElement' and '%s' objectss/cannot multiply ParserElement by negative values@second tuple value must be greater or equal to first tuple values+cannot multiply ParserElement by 0 or (0,0)cs4|djot|dStSdS(Ni(R(tn(RtmakeOptionalList(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR/s N(NN( RjRttupleRR.RRRt ValueErrorR(RRt minElementst optElementsR((RRsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__mul__sD%  ( *   !  cCs |i|S(N(R(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__rmul__BscCsht|toti|}nt|tp%tidt|tdddSt ||gS(s7Implementation of | operator - returns C{L{MatchFirst}}s4Cannot combine element of type %s with ParserElementRiN( RjRRRDRRRRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__or__Es cCs`t|toti|}nt|tp%tidt|tdddS||BS(sKImplementation of | operator when left operand is not a C{L{ParserElement}}s4Cannot combine element of type %s with ParserElementRiN( RjRRRDRRRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__ror__Os cCsht|toti|}nt|tp%tidt|tdddSt ||gS(s/Implementation of ^ operator - returns C{L{Or}}s4Cannot combine element of type %s with ParserElementRiN( RjRRRDRRRRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__xor__Ys cCs`t|toti|}nt|tp%tidt|tdddS||AS(sKImplementation of ^ operator when left operand is not a C{L{ParserElement}}s4Cannot combine element of type %s with ParserElementRiN( RjRRRDRRRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__rxor__cs cCsht|toti|}nt|tp%tidt|tdddSt ||gS(s1Implementation of & operator - returns C{L{Each}}s4Cannot combine element of type %s with ParserElementRiN( RjRRRDRRRRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__and__ms cCs`t|toti|}nt|tp%tidt|tdddS||@S(sKImplementation of & operator when left operand is not a C{L{ParserElement}}s4Cannot combine element of type %s with ParserElementRiN( RjRRRDRRRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__rand__ws cCs t|S(s3Implementation of ~ operator - returns C{L{NotAny}}(R(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt __invert__scCs)|dj o|i|S|iSdS(sShortcut for C{L{setResultsName}}, with C{listAllMatches=default}:: userdata = Word(alphas).setResultsName("name") + Word(nums+"-").setResultsName("socsecno") could be written as:: userdata = Word(alphas)("name") + Word(nums+"-")("socsecno") If C{name} is given with a trailing C{'*'} character, then C{listAllMatches} will be passed as C{True}. If C{name} is omitted, same as calling C{L{copy}}. N(RRbR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__call__s cCs t|S(sSuppresses the output of this C{ParserElement}; useful to keep punctuation from cluttering up returned output. (R&(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytsuppressscCs t|_|S(sDisables the skipping of whitespace before matching the characters in the C{ParserElement}'s defined pattern. This is normally only used internally by the pyparsing module, but may be needed in some whitespace-sensitive grammars. (RRK(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytleaveWhitespaces cCst|_||_t|_|S(s/Overrides the default whitespace chars (RRKRLRRM(RRB((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytsetWhitespaceCharss   cCs t|_|S(sOverrides default behavior to expand C{}s to spaces before parsing the input string. Must be called before C{parseString} when the input grammar contains elements that match C{} characters.(RRO(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt parseWithTabss cCs^t|to.||ijo|ii|iqZn|iit|i|S(sDefine expression to be ignored (e.g., comments) while doing pattern matching; may be called repeatedly, to define multiple comment or other ignorable patterns. (RjR&RPRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytignores cCs4|pt|pt|ptf|_t|_|S(sBEnable display of debugging messages while doing pattern matching.(R1R5R7RVRRQ(Rt startActiont successActiontexceptionAction((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytsetDebugActionss    cCs+|o|itttn t|_|S(s~Enable display of debugging messages while doing pattern matching. Set C{flag} to True to enable, False to disable.(RR1R5R7RRQ(Rtflag((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytsetDebugs cCs|iS(N(R(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs t|S(N(Ro(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCst|_d|_|S(N(RRRRRH(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs  cCsdS(N((RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytcheckRecursionscCs|igdS(sXCheck defined expressions for valid structure, check for infinite recursive definitions.N(R(Rt validateTrace((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytvalidatesc Csy|i}Wn8tj o,t|d}|i}|inXy|i||SWn,tj o }tioq|nXdS(sExecute the parse expression on the given file or filename. If a filename is specified (instead of a file object), the entire file is opened, read, and closed before parsing. trN(treadRtopentcloseRRRR(Rtfile_or_filenameRt file_contentstfR6((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt parseFiles  cCst|to||jp|i|ijSt|to<y!|it|dttSWqtj otSXnt t||jSdS(NR( RjRt__dict__RRRoRRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__eq__s cCs ||j S(N((RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__ne__scCstt|S(N(thashtid(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__hash__scCs ||jS(N((RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__req__scCs ||j S(N((RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__rne__ sc Cst|totti|i}nx|D]}|g}y&|i|i|d|iWnt j o}d|joB|it |i ||idt |i |ddn|id|i d|it|nX|iddi |GHq3WdS(sExecute the parse expression on a series of test strings, showing each test, the parsed results or where the parse failed. Quick and easy way to run a parse expression against a list of sample strings. Parameters: - tests - a list of separate test strings, or a multiline string of test strings - parseAll - (default=False) - flag to pass to C{L{parseString}} when running tests Rs t it^RN(RjRRmRlRt splitlinesRRRRRDRR5R(RttestsRR9RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytrunTests s  & ) N(FRRRRARRt staticmethodRCRERRR]RbRRlRoRpRtRuRyR|R}RRRRRjRRRRRt_MAX_INTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs~         H  -2 !  D                  cBseZdZdZRS(sJAbstract C{ParserElement} subclass, for defining atomic matching patterns.cCstt|idtdS(NRZ(RR'RR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR)s(RRRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR''scBseZdZdZRS(s"An empty token, will always match.cCs2tt|id|_t|_t|_dS(NR(RRRRRRNRRS(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR/s  (RRRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR-scBs#eZdZdZedZRS(sA token that will never match.cCs;tt|id|_t|_t|_d|_dS(NRsUnmatchable token( RRRRRRNRRSRT(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR8s    cCst|||i|dS(N(RRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}?s(RRRRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR6s cBs#eZdZdZedZRS(s*Token to exactly match a specified string.cCstt|i||_t||_y|d|_Wn2tj o&ti dt ddt |_ nXdt |i|_d|i|_t|_t|_dS(Nis2null string passed to Literal; use Empty() insteadRis"%s"s Expected (RRRtmatchRtmatchLentfirstMatchCharRRRRRt __class__RoRRTRRNRS(Rt matchString((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyREs    cCsk|||ijo;|idjp|i|i|o||i|ifSt|||i|dS(Ni(RRt startswithRRRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}Xs&(RRRRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRCs cBsKeZdZedZeedZedZdZ e dZ RS(sToken to exactly match a specified string as a keyword, that is, it must be immediately followed by a non-keyword character. Compare with C{L{Literal}}:: Literal("if") will match the leading C{'if'} in C{'ifAndOnlyIf'}. Keyword("if") will not; it will only match the leading C{'if'} in C{'if x=1'}, or C{'if(y==2)'} Accepts two optional constructor arguments in addition to the keyword string: C{identChars} is a string of characters that would be valid identifier characters, defaulting to all alphanumerics + "_" and "$"; C{caseless} allows case-insensitive matching, default is C{False}. s_$cCstt|i||_t||_y|d|_Wn)tj oti dt ddnXd|i|_ d|i |_ t |_t |_||_|o|i|_|i}nt||_dS(Nis2null string passed to Keyword; use Empty() insteadRis"%s"s Expected (RR RRRRRRRRRRRTRRNRStcaselesstuppert caselessmatchtsett identChars(RRRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRls"     cCsr|io||||i!i|ijo{|t||ijp!|||ii|ijo@|djp||di|ijo||i|ifSn|||ijo|idjp|i|i|oo|t||ijp|||i|ijo:|djp||d|ijo||i|ifSt |||i |dS(Nii( RRRRRRRRRRRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s $;+&5%cCs%tt|i}ti|_|S(N(RR RtDEFAULT_KEYWORD_CHARSR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs cCs |t_dS(s,Overrides the default Keyword chars N(R R(RB((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytsetDefaultKeywordCharss( RRRR/RRRRR}RRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR `s     cBs#eZdZdZedZRS(sToken to match a specified string, ignoring case of letters. Note: the matched results will always be in the case of the given match string, NOT the case of the input text. cCsItt|i|i||_d|i|_d|i|_dS(Ns'%s's Expected (RRRRt returnStringRRT(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs cCsU||||i!i|ijo||i|ifSt|||i|dS(N(RRRRRRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s$(RRRRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs cBs#eZeidZedZRS(cCs#tt|i||dtdS(NR(RRRR(RRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs||||i!i|ijoP|t||ijp!|||ii|ijo||i|ifSt|||i|dS(N(RRRRRRRRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s$;(RRR RRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscBs>eZdZddddeddZedZdZRS(sToken for matching words composed of allowed character sets. Defined with string containing all allowed initial characters, an optional string containing allowed body characters (if omitted, defaults to the initial character set), and an optional minimum, maximum, and/or exact length. The default value for C{min} is 1 (a minimum value < 1 is not valid); the default values for C{max} and C{exact} are 0, meaning no maximum or exact length restriction. An optional C{exclude} parameter can list characters that might be found in the input C{bodyChars} string; useful to define a word of all printables except for one or two characters, for instance. iicstt|ioMdifd|D}|o#difd|D}qgn||_t||_|o||_t||_n||_t||_|dj|_ |djot dn||_ |djo ||_ n t |_ |djo||_ ||_ nt||_d|i|_t|_||_d|i|ijo |djo|djo|djo|i|ijod t|i|_nht|idjo,d ti|it|if|_n&d t|it|if|_|iod |id |_nyti|i|_Wqd|_qXndS( NRc3s*x#|]}|jo |VqqWdS(N((RpR(t excludeChars(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s c3s*x#|]}|jo |VqqWdS(N((RpR(R(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s iisZcannot specify a minimum length < 1; use Optional(Word()) if zero-length word is permitteds Expected Rs[%s]+s%s[%s]*s [%s][%s]*s\b(RR+RRt initCharsOrigRt initCharst bodyCharsOrigt bodyCharst maxSpecifiedRtminLentmaxLenRRoRRTRRSt asKeywordt_escapeRegexRangeCharstreStringRRWtescapetcompileR(RRRtmintmaxtexactRR((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRsT'             >  c Cs|ioU|ii||}|pt|||i|n|i}||ifS|||ijot|||i|n|}|d7}t|}|i}||i }t ||}x-||jo|||jo|d7}qWt } |||i jo t } n|io(||jo|||jo t } n|ioN|djo||d|jp||jo|||jo t } qn| ot|||i|n||||!fS(Nii(RWRRRTtendtgroupRRRRRRRRRR( RR/RRetresulttstartR{t bodycharstmaxloctthrowException((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s8       (  @cCsytt|iSWnnX|idjo_d}|i|ijo)d||i||if|_qd||i|_n|iS(NcSs(t|djo |d dS|SdS(Nis...(R(Rt((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt charsAsStr!s s W:(%s,%s)sW:(%s)(RR+RRHRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs )N( RRRRRRRR}R(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR+s 6 #cBsDeZdZeeidZddZedZ dZ RS(sToken for matching strings that match a given regular expression. Defined with string specifying the regular expression in a form recognized by the inbuilt Python re module. s[A-Z]icCsGtt|it|tot|djotidtddn||_ ||_ y+t i |i |i |_ |i |_ Wqtij o$tid|tddqXnLt|tio,||_ t||_ |_ ||_ n tdt||_d|i|_t|_t|_dS( sThe parameters C{pattern} and C{flags} are passed to the C{re.compile()} function as-is. See the Python C{re} module for an explanation of the acceptable patterns and flags.is0null string passed to Regex; use Empty() insteadRis$invalid pattern (%s) passed to RegexsCRegex may only be constructed with a string or a compiled RE objects Expected N(RR"RRjRRRRRtpatterntflagsRWRRt sre_constantsterrortcompiledREtypeRlRRoRRTRRSRRN(RRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR4s.          cCs|ii||}|pt|||i|n|i}|i}t|i}|o#x |D]}|||| same as quoteChar) is$quoteChar cannot be the empty stringRis'endQuoteChar cannot be the empty strings %s(?:[^%s%s]Rs%s(?:[^%s\n\r%s]is|(?:s)|(?:c3s@x9|]2}dtii| ti|fVqWdS(s%s[^%s]N(RWRt endQuoteCharR(RpR(R(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s it)s|(?:%s)s|(?:%s.)s(.)s)*%ss$invalid pattern (%s) passed to Regexs Expected N('RR RRRRRRt SyntaxErrorRt quoteChart quoteCharLentfirstQuoteCharR tendQuoteCharLentescChartescQuotetunquoteResultsRWt MULTILINEtDOTALLRRRRRRtescCharReplacePatternRRRRRoRRTRRSRRN(RRRRt multilineRR ((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRrsd             + 'F   cCs|||ijo|ii||pd}|pt|||i|n|i}|i}|iox||i |i !}t |t oP|i oti|id|}n|io|i|i|i}qqn||fS(Ns\g<1>(RRWRRRRTRRRRRRjRRRRRRwR (RR/RReRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s0     $cCsUytt|iSWnnX|idjod|i|if|_n|iS(Ns.quoted string, starting with %s ending with %s(RR RRHRRR (R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRsN( RRRRRRRR}R(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR osI cBs5eZdZddddZedZdZRS(sToken for matching words composed of characters *not* in a given set. Defined with string containing all disallowed characters, and an optional minimum, maximum, and/or exact length. The default value for C{min} is 1 (a minimum value < 1 is not valid); the default values for C{max} and C{exact} are 0, meaning no maximum or exact length restriction. iicCstt|it|_||_|djotdn||_|djo ||_n t |_|djo||_||_nt ||_ d|i |_ |idj|_ t|_dS(Nisfcannot specify a minimum length < 1; use Optional(CharsNotIn()) if zero-length char group is permittedis Expected (RRRRRKtnotCharsRRRRRoRRTRNRS(RRRRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs           cCs|||ijot|||i|n|}|d7}|i}t||it|}x-||jo|||jo|d7}qhW|||ijot|||i|n||||!fS(Ni(RRRTRRRR(RR/RReRtnotcharstmaxlen((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s   cCszytt|iSWnnX|idjoBt|idjod|id |_qsd|i|_n|iS(Nis !W:(%s...)s!W:(%s)(RRRRHRRR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs(RRRRRR}R(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs cBsXeZdZhdd6dd6dd6dd6d d 6Zd d d d dZedZRS(sSpecial matching class for matching whitespace. Normally, whitespace is ignored by pyparsing grammars. This class is included when some whitespace structures are significant. Define with a string containing the whitespace characters to be matched; default is C{" \t\r\n"}. Also takes optional C{min}, C{max}, and C{exact} arguments, as defined for the C{L{Word}} class.sRss ss ss ss s iicstti|_idifdiDdidiD_t_ di_ |_ |djo |_ n t _ |djo|_ |_ ndS(NRc3s-x&|]}|ijo |VqqWdS(N(t matchWhite(RpR(R(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys -s css x|]}ti|VqWdS(N(R*t whiteStrs(RpR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys /s s Expected i(RR*RRRRRLRRRNRTRRR(RtwsRRR((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR*s )       cCs|||ijot|||i|n|}|d7}||i}t|t|}x0||jo"|||ijo|d7}qeW|||ijot|||i|n||||!fS(Ni(RRRTRRRR(RR/RReRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}>s  !(RRRRRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR*s t_PositionTokencBseZdZRS(cCs8tt|i|ii|_t|_t|_ dS(N( RR RRRRRRNRRS(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyROs (RRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR NscBs,eZdZdZdZedZRS(sXToken to advance to a specific column of input text; useful for tabular report scraping.cCs tt|i||_dS(N(RR RR5(Rtcolno((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRWscCst|||ijoyt|}|io|i||}nxJ||jo8||io't|||ijo|d7}qHWn|S(Ni(R5RRPRytisspace(RR/RR{((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR|[s  7cCs`t||}||ijot||d|n||i|}|||!}||fS(NsText not in expected column(R5R(RR/RRetthiscoltnewlocR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}ds  (RRRRR|RR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR Us  cBs,eZdZdZdZedZRS(sQMatches if current position is at the beginning of a line within the parse stringcCs<tt|i|itiiddd|_dS(Ns RsExpected start of line(RRRRRRARwRT(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRnscCs>tt|i||}||djo|d7}n|S(Ns i(RRR|(RR/RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR|sscCsa|djp+||i|djp||ddjpt|||i|n|gfS(Niis (R|RRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}ys  (RRRRR|RR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRls  cBs#eZdZdZedZRS(sKMatches if current position is at the end of a line within the parse stringcCs<tt|i|itiiddd|_dS(Ns RsExpected end of line(RRRRRRARwRT(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs|t|jo<||djo|ddfSt|||i|n;|t|jo|dgfSt|||i|dS(Ns i(RRRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s(RRRRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs cBs#eZdZdZedZRS(sCMatches if current position is at the beginning of the parse stringcCs tt|id|_dS(NsExpected start of text(RR%RRT(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCsP|djo9||i|djot|||i|qFn|gfS(Ni(R|RRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s  (RRRRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR%s cBs#eZdZdZedZRS(s=Matches if current position is at the end of the parse stringcCs tt|id|_dS(NsExpected end of text(RR$RRT(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs|t|jot|||i|nY|t|jo|dgfS|t|jo |gfSt|||i|dS(Ni(RRRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s (RRRRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR$s cBs&eZdZedZedZRS(swMatches if the current position is at the beginning of a Word, and is not preceded by any character in a given set of C{wordChars} (default=C{printables}). To emulate the C{} behavior of regular expressions, use C{WordStart(alphanums)}. C{WordStart} will also match at the beginning of the string being parsed, or at the beginning of a line. cCs/tt|it||_d|_dS(NsNot at the start of a word(RR-RRt wordCharsRT(RR%((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCsc|djoL||d|ijp|||ijot|||i|qYn|gfS(Nii(R%RRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s   (RRRRSRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR-s cBs&eZdZedZedZRS(saMatches if the current position is at the end of a Word, and is not followed by any character in a given set of C{wordChars} (default=C{printables}). To emulate the C{} behavior of regular expressions, use C{WordEnd(alphanums)}. C{WordEnd} will also match at the end of the string being parsed, or at the end of a line. cCs8tt|it||_t|_d|_dS(NsNot at the end of a word(RR,RRR%RRKRT(RR%((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs cCs|t|}|djoY||joL|||ijp||d|ijot|||i|qrn|gfS(Nii(RR%RRT(RR/RReR{((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}s   (RRRRSRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR,s cBsqeZdZedZdZdZdZdZdZ dZ edZ gd Z d Z RS( sTAbstract subclass of ParserElement, for combining and post-processing parsed tokens.cCstt|i|t|tot|}nt|tot|g|_nt|t i o=t d|Dot t|}nt||_n6yt||_Wnt j o|g|_nXt|_dS(Ncss"x|]}t|tVqWdS(N(RjR(RpR0((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s (RRRRjRRRRtexprst collectionstSequencetallRmRRRX(RR&RZ((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs |i|S(N(R&(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRscCs|ii|d|_|S(N(R&RRRH(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs cCsXt|_g}|iD]}||iq~|_x|iD]}|iq@W|S(s~Extends C{leaveWhitespace} defined in base class, and also invokes C{leaveWhitespace} on all contained expressions.(RRKR&RR(RRRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs  - cCst|toV||ijoBtt|i|x)|iD]}|i|idq@Wqn?tt|i|x%|iD]}|i|idqW|S(Ni(RjR&RPRRRR&(RRRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs   cCs^ytt|iSWnnX|idjo&d|iit|if|_n|iS(Ns%s:(%s)( RRRRHRRRRoR&(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s&cCstt|ix|iD]}|iqWt|idjo%|id}t||ior|i og|idjoW|i oL|i|idg|_d|_ |i |i O_ |i |i O_ n|id}t||ioo|i od|idjoT|i oI|id |i|_d|_ |i |i O_ |i |i O_ qlndt||_|S(Niiiis Expected (RRRR&RRjRRFRIRRQRHRNRSRlRT(RRwR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s2         cCstt|i||}|S(N(RRRb(RRR`R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRb6 scCs@||g}x|iD]}|i|qW|igdS(N(R&RR(RRttmpRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR: s  cCsFtt|i}g}|iD]}||iq#~|_|S(N(RRRR&(RRRRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR@ s-(RRRRRRRRRRRRbRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs    "  cBsWeZdZdefdYZedZedZdZdZ dZ RS(sRequires all given C{ParseExpression}s to be found in the given order. Expressions may be separated by whitespace. May be constructed using the C{'+'} operator. RcBseZdZRS(cOs3tti|i||d|_|idS(Nt-(RRRRRR(RRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRL s (RRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRK scCsltt|i||td|iD|_|i|idi|idi|_t |_ dS(Ncssx|]}|iVqWdS(N(RN(RpRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys S s i( RRRR)R&RNRRLRKRRX(RR&RZ((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRQ s c CsO|idi|||dt\}}t}x|idD]}t|tio t}q<n|oy|i|||\}}Wqtj o qtj o}d|_ t|qt j o+tt |t ||i|qXn|i|||\}}|p |io||7}q<q<W||fS(NiRfi(R&RjRRjRRRRRRRRRRRTR( RR/RRet resultlistt errorStopRwt exprtokensR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}X s*( -cCs-t|tot|}n|i|S(N(RjRRR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRq scCsB||g}x-|iD]"}|i||ipPqqWdS(N(R&RRN(RRtsubRecCheckListRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRv s    cCsZt|do|iS|idjo+ddid|iDd|_n|iS(NRt{Rcssx|]}t|VqWdS(N(Ro(RpRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s t}(RRRHRRR&(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR} s +( RRRRRRRR}RRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRE s    cBsAeZdZedZedZdZdZdZ RS(sRequires that at least one C{ParseExpression} is found. If two expressions match, the expression that matches the longest string will be used. May be constructed using the C{'^'} operator. cCsPtt|i|||io td|iD|_n t|_dS(Ncssx|]}|iVqWdS(N(RN(RpRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s (RRRR&RRNR(RR&RZ((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s  c Csd}d}g}x|iD]}y|i||}Wntj o5} d| _| i|jo| }| i}qqtj oHt||jo.t|t||i|}t|}qqX|i ||fqW|o|i ddxs|D]g\} }y|i |||SWqtj o5} d| _| i|jo| }| i}qnqXqWn|dj o|i|_ |nt||d|dS(NiRcSs |d S(i((tx((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR ss no defined alternatives to match( RR&RRRRRRRTRtsortRjR( RR/RRet maxExcLoct maxExceptionRRwtloc2Rt_((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR} s@       cCs0t|toti|}n|i|S(N(RjRRRDR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__ixor__ scCsZt|do|iS|idjo+ddid|iDd|_n|iS(NRR0s ^ cssx|]}t|VqWdS(N(Ro(RpRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s R1(RRRHRRR&(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s +cCs3||g}x|iD]}|i|qWdS(N(R&R(RRR/Rw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s ( RRRRRRR}R8RR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s   &  cBsAeZdZedZedZdZdZdZ RS(sRequires that at least one C{ParseExpression} is found. If two expressions match, the first one listed is the one that will match. May be constructed using the C{'|'} operator. cCsPtt|i|||io td|iD|_n t|_dS(Ncssx|]}|iVqWdS(N(RN(RpRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s (RRRR&RRNR(RR&RZ((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s  c Csd}d}x|iD]}y|i|||}|SWqtj o,}|i|jo|}|i}qqtj oHt||jo.t|t||i|}t|}qqXqW|dj o|i|_|nt||d|dS(Nis no defined alternatives to match( RR&RjRRRRRTR( RR/RReR4R5RwRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR} s&    cCs0t|toti|}n|i|S(N(RjRRRDR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt__ior__ scCsZt|do|iS|idjo+ddid|iDd|_n|iS(NRR0s | cssx|]}t|VqWdS(N(Ro(RpRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s R1(RRRHRRR&(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s +cCs3||g}x|iD]}|i|qWdS(N(R&R(RRR/Rw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s ( RRRRRRR}R9RR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s     cBs8eZdZedZedZdZdZRS(sRequires all given C{ParseExpression}s to be found, but in any order. Expressions may be separated by whitespace. May be constructed using the C{'&'} operator. cCsKtt|i||td|iD|_t|_t|_dS(Ncssx|]}|iVqWdS(N(RN(RpRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s ( RRRR)R&RNRRKtinitExprGroups(RR&RZ((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s cCs-|iotd|iD|_g}|iD]$}t|to||iq4q4~}g}|iD],}|iot|t o ||qoqo~}|||_g} |iD]$}t|t o| |iqq~ |_ g} |iD]$}t|t o| |iqq~ |_ g} |iD]*}t|tt t fp | |q;q;~ |_ |i |i 7_ t|_n|} |i } |i}g}t}x|o| ||i |i }g}x|D]}y|i|| } Wn tj o|i|qX|i|iit|||| jo| i|q||jo|i|qqWt|t|jo t}qqW| o3did| D}t||d|n|g}|iD]1}t|to|i|jo ||qq~7}g}x6|D].}|i|||\}}|i|qAWtg}x|D]}h}xS|iD]E}||jo2t||}|t||7}||| s s, cssx|]}t|VqWdS(N(Ro(RpRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys 3 s s*Missing one or more required elements (%s)(R:RR&topt1mapRjRR0RNt optionalsR.tmultioptionalsRt multirequiredtrequiredRRRRRRRtremoveRRRjRRR(RR/RReRRwtopt1t_[2]topt2t_[3]t_[4]t_[5]ttmpLocttmpReqdttmpOptt matchOrdert keepMatchingttmpExprstfailedtmissingt_[6]R,tresultst finalResultsRtdupsRR*R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR} sp ;C >>D   "  L    cCsZt|do|iS|idjo+ddid|iDd|_n|iS(NRR0s & cssx|]}t|VqWdS(N(Ro(RpRw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys P s R1(RRRHRRR&(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRK s +cCs3||g}x|iD]}|i|qWdS(N(R&R(RRR/Rw((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRT s (RRRRRR}RR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s   ; cBs_eZdZedZedZdZdZdZ dZ gdZ dZ RS( sWAbstract subclass of C{ParserElement}, for combining and post-processing parsed tokens.cCstt|i|t|tot|}n||_d|_|dj oc|i |_ |i |_ |i |i |i |_ |i|_|i|_|ii|indS(N(RRRRjRRR0RRHRSRNRRLRKRJRXRPR(RR0RZ((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR\ s        cCsI|idj o|ii|||dtStd||i|dS(NRfR(R0RRjRRRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR}k scCs@t|_|ii|_|idj o|iin|S(N(RRKR0RRR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRq s  cCst|toY||ijoEtt|i||idj o|ii|idqeqnBtt|i||idj o|ii|idn|S(Ni(RjR&RPRRRR0R(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRx s#cCs8tt|i|idj o|iin|S(N(RRRR0R(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR scCsZ||jot||gn||g}|idj o|ii|ndS(N(R!R0RR(RRR/((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s  cCsC||g}|idj o|ii|n|igdS(N(R0RRR(RRR*((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR scCsnytt|iSWnnX|idjo6|idj o&d|iit|if|_n|iS(Ns%s:(%s)( RRRRHRR0RRRo(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s &( RRRRRRR}RRRRRR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRZ s      cBs#eZdZdZedZRS(sLookahead matching of the given parse expression. C{FollowedBy} does *not* advance the parsing position within the input string, it only verifies that the specified parse expression matches at the current position. C{FollowedBy} always returns a null token list.cCs#tt|i|t|_dS(N(RR RRRN(RR0((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR scCs|ii|||gfS(N(R0R(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR} s(RRRRRR}(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s cBs,eZdZdZedZdZRS(sLookahead to disallow matching with the given parse expression. C{NotAny} does *not* advance the parsing position within the input string, it only verifies that the specified parse expression does *not* match at the current position. Also, C{NotAny} does *not* skip over leading whitespace. C{NotAny} always returns a null token list. May be constructed using the '~' operator.cCsBtt|i|t|_t|_dt|i|_ dS(NsFound unwanted token, ( RRRRRKRRNRoR0RT(RR0((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s  cCsUy|ii||Wnttfj onXt|||i||gfS(N(R0RRRRT(RR/RRe((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR} s cCsMt|do|iS|idjodt|id|_n|iS(NRs~{R1(RRRHRRoR0(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s (RRRRRR}R(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s  cBs8eZdZdZedZdZedZRS(s<Optional repetition of zero or more of the given expression.cCs#tt|i|t|_dS(N(RR.RRRN(RR0((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR sc Csg}y|ii|||dt\}}t|idj}xf|o|i||}n|}|ii|||\}}|p |io||7}qEqEWnttfj onX||fS(NRfi( R0RjRRRPRyRRR(RR/RReRthasIgnoreExprsRt tmptokens((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR} s$cCsMt|do|iS|idjodt|id|_n|iS(NRRs]...(RRRHRRoR0(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s cCs(tt|i||}t|_|S(N(RR.RbRRJ(RRR`R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRb s ( RRRRRR}RRRb(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR. s    cBs/eZdZedZdZedZRS(s2Repetition of one or more of the given expression.cCs|ii|||dt\}}yt|idj}xf|o|i||}n|}|ii|||\}}|p |io||7}q?q?Wnttfj onX||fS(NRfi( R0RjRRRPRyRRR(RR/RReRRSRRT((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR} s$cCsMt|do|iS|idjodt|id|_n|iS(NRR0s}...(RRRHRRoR0(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s cCs(tt|i||}t|_|S(N(RRRbRRJ(RRR`R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRb s (RRRRR}RRRb(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s  t _NullTokencBs eZdZeZdZRS(cCstS(N(R(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR scCsdS(NR((R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s(RRRR(R(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRU s cBs/eZdZedZedZdZRS(sOptional matching of the given expression. A default return string can also be specified, if the optional expression is not found. cCs2tt|i|dt||_t|_dS(NRZ(RRRRRRRN(RR0R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR& s c Csy(|ii|||dt\}}Wnuttfj oc|itj oF|iio)t|ig}|i||ii>entering %s(line: '%s', %d, %s) s<gS(Ni(R RR?(RtR8R9R(R0t arrayExpr(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytcountFieldParseActions s /cSst|dS(i(R(R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRx starrayLenRYN( R RR+RORoRR]RpR(R0tintExprR}((R0R|sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR8k s    cCsOg}xB|D]:}t|to|it|q |i|q W|S(N(RjRRRR(tLRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR scs/tfd}|i|dtS(s?Helper 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 = matchPreviousLiteral(first) matchExpr = first + ":" + second will match C{"1:1"}, but not C{"1:2"}. Because this matches a previous literal, will also match the leading C{"1:1"} in C{"1:10"}. If this is not desired, use C{matchPreviousExpr}. Do *not* use with packrat parsing enabled. cs~|oht|djo|d>qzt|i}tg}|D]}|t|qM~>n t>dS(Nii(RRRRRR(RtR8R9ttflatRttt(trep(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytcopyTokenToRepeater s 3RY(R RpR(R0R((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRL s  csEt|i}|Kfd}|i|dtS(sjHelper 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 = matchPreviousExpr(first) matchExpr = first + ":" + second will match C{"1:1"}, but not C{"1:2"}. Because this matches by expressions, will *not* match the leading C{"1:1"} in C{"1:10"}; the expressions are evaluated first, and then compared, so C{"1"} is compared with C{"10"}. Do *not* use with packrat parsing enabled. cs8t|ifd}i|dtdS(Ncs9t|i}|jotdddndS(NRi(RRR(RtR8R9t theseTokens(t matchTokens(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytmustMatchTheseTokens s RY(RRRoR(RtR8R9R(R(RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR sRY(R RRpR(R0te2R((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRK s   cCsUx$dD]}|i|t|}qW|idd}|idd}t|S(Ns\^-]s s\ns s\t(Rwt_bslashRo(RtR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s c CsI|od}d}t}nd}d}t}g}t|to|i}n[t|tiot|}n7t|tot|}nt i dt dd|pt Sd}x|t |d jo||}xt||d D]j\} } || |o||| d =Pq ||| o*||| d =|i|| | }Pq q W|d 7}qW| o|oyet |t d i|jo"td d id |DStd id|DSWqt i dt ddqXntg} |D]} | || q,~ S(srHelper to quickly define a set of alternative Literals, and makes sure to do longest-first testing when there is a conflict, regardless of the input order, but returns a C{L{MatchFirst}} for best performance. Parameters: - strs - a string of space-delimited literals, or a list of string literals - caseless - (default=False) - treat all literals as caseless - useRegex - (default=True) - as an optimization, will generate a Regex object; otherwise, will generate a C{MatchFirst} object (if C{caseless=True}, or if creating a C{Regex} raises an exception) cSs|i|ijS((R(Rtb((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR scSs|ii|iS((RR(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR scSs ||jS(((RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR scSs |i|S((R(RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR ss2Invalid argument to oneOf, expected string or listRiiiRs[%s]cssx|]}t|VqWdS(N(R(Rptsym((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s t|css"x|]}ti|VqWdS(N(RWR(RpR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s s7Exception creating Regex for oneOf, building MatchFirst(RRRjRRuR'R(RRRRRRRRRRR"R( tstrsRtuseRegextisequaltmaskstparseElementClasstsymbolsRtcurRRRR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRP sT           ""! cCsttt||S(sHelper to easily and clearly define a dictionary by specifying the respective patterns for the key and value. Takes care of defining the C{L{Dict}}, C{L{ZeroOrMore}}, and C{L{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 C{Dict} results can include named token fields. (RR.R (RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR= scCsrtid}|i}t|_|d||d}|o d}n d}|i||S(sHelper 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. Simpler to use than the parse action C{L{keepOriginalText}}, and does not require the inspect module to chase up the call stack. By default, returns a string containing the original parsed text. If the optional C{asString} argument is passed as C{False}, then the return value is a C{L{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 C{L{originalTextFor}} contains expressions with defined results names, you must set C{asString} to C{False} if you want to preserve those results name values.cSs|S(((RtRR9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR st_original_startt _original_endcSs||i|i!S((RR(RtR8R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR! scSs3|2|id||i|i!|d=|d=dS(NiRR(RRR(RtR8R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt extractText# s(RRoRRRX(R0tasStringt locMarkert endlocMarkert matchExprR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRd s     cCst|idS(siHelper to undo pyparsing's default grouping of And expressions, even if all but one are non-empty.cSs|dS(i((R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR. s(R(Ro(R0((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRe+ scCsEtid}t|d|d|iidS(sHelper 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 C{} characters, you may want to call C{L{ParserElement.parseWithTabs}} cSs|S(((RtR8R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR: st locn_startRtlocn_end(RRoR RR(R0tlocator((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRg0 s s\[]-*.$+^?()~ RcCs |ddS(ii((RtR8R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRE ss\\0?[xX][0-9a-fA-F]+cCs tt|diddS(is\0xi(tunichrRtlstrip(RtR8R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRF ss \\0[0-7]+cCstt|dddS(iii(RR(RtR8R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRG sRs\]s\wR+RRtnegatetbodyRcsEdy-difdti|iDSWndSXdS(sHelper to easily define string ranges for use in Word construction. Borrows syntax from regexp '[]' string range definitions:: srange("[0-9]") -> "0123456789" srange("[a-z]") -> "abcdefghijklmnopqrstuvwxyz" srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_" The input string must be enclosed in []'s, and the returned string is the expanded character set joined into a single string. The values enclosed in the []'s may be:: a single character an escaped character with a leading backslash (such as \- or \]) an escaped hex character with a leading '\x' (\x21, which is a '!' character) (\0x## is also supported for backwards compatibility) an escaped octal character with a leading '\0' (\041, which is a '!' character) a range of any of the above, separated by a dash ('a-z', etc.) any combination of the above ('aeiouy', 'a-zA-Z0-9_$', etc.) cSsMt|tp|Sdidtt|dt|ddDS(Rcssx|]}t|VqWdS(N(R(RpR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys ] s ii(RjRRRtord(tp((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR] sRc3sx|]}|VqWdS(N((Rptpart(t _expanded(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys _ s N(Rt_reBracketExprRR(Rt((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR\L s  -csfd}|S(srHelper method for defining parse actions that require matching at a specific column in the input text. cs4t||jot||dndS(Nsmatched token not at column %d(R5R(R*tlocnR4(R(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt verifyColg s((RR((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRJc scCstitti|gS(sHelper method for common parse actions that simply return a literal value. Especially useful when used with C{L{transformString}()}. (t functoolstpartialtnextt itertoolstrepeat(treplStr((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRYl scCs|ddd!S(sHelper parse action for removing quotation marks from parsed quoted strings. To use, add this parse action to quoted string using:: quotedString.setParseAction( removeQuotes ) iii((RtR8R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRWu scCs.g}tt|D]}||iq~S(s4Helper parse action to convert tokens to upper case.(RmRoR(RtR8R9RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRa| scCs.g}tt|D]}||iq~S(s4Helper parse action to convert tokens to lower case.(RmRotlower(RtR8R9RR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR> scCsNy t}Wntj otdnX|2|t|||!7}|S(sDEPRECATED - use new helper method C{L{originalTextFor}}. Helper parse action to preserve original parsed text, overriding any nested parse actions.sJincorrect usage of keepOriginalText - may only be called as a parse action(tgetTokensEndLocRRR(RtR[R9R3((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRC s c Csoddk}|i}zLxE|dD]-}|ddjo|did}|Sq&WtdWd~XdS( siMethod to be called from within a parse action to determine the end location of the parsed tokens.iNiiRiRsRincorrect usage of getTokensEndLoc - may only be called from within a parse action(tinspecttstacktf_localsR(RtfstackRR3((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR s    cCs@t|to|}t|d| }n |i}tttd}|otii t }t d|dt t t|t d|tddtgidi d t d }nd id tD}tii t t|B}t d|dt t t|i ttt d|tddtgidi d t d }ttd|d }|idd i|iddiiid|}|idd i|iddiiid|}||_||_||fS(sRInternal helper to construct opening and closing tag expressions, given a tag nameRs_-:R ttagt=t/RR?cSs|ddjS(iR((RtR8R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR sR Rcss*x#|]}|djo |VqqWdS(R N((RpR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pys s cSs|ddjS(iR((RtR8R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR ssRs(RjRR RR+R0R/R:RRoRWR&RR.R RRRbRRSRVR>Rt_LRwttitleRuR]R(ttagStrtxmltresnamet tagAttrNamet tagAttrValuetopenTagtprintablesLessRAbracktcloseTag((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt _makeTags s" p{AA  cCs t|tS(sRHelper to construct opening and closing tag expressions for HTML, given a tag name(RR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRH scCs t|tS(sQHelper to construct opening and closing tag expressions for XML, given a tag name(RR(R((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRI scs^|o |n |ig}D]\}}|||fq)~fd}|S(srHelper to create a validating parse action to be used with start tags created with C{L{makeXMLTags}} or C{L{makeHTMLTags}}. Use C{withAttribute} to qualify a starting tag with a required attribute value, to avoid false matches on common tags such as C{} or C{
}. Call C{withAttribute} with a series of attribute names and values. Specify the list of filter attributes names and values as: - keyword arguments, as in C{(align="right")}, or - as an explicit dict with C{**} operator, when an attribute name is also a Python reserved word, as in C{**{"class":"Customer", "align":"right"}} - a list of name-value tuples, as in ( ("ns1:class", "Customer"), ("ns2:align","right") ) For attribute names with a namespace prefix, you must use the second form. Attribute names are matched insensitive to upper/lower case. If just testing for C{class} (with or without a namespace), use C{L{withClass}}. To verify that the attribute exists, but without specifying a value, pass C{withAttribute.ANY_VALUE} as the value. csxD]{\}}||jot||d|n|tijo8|||jo't||d||||fqqWdS(Nsno matching attribute s+attribute '%s' has value '%s', must be '%s'(RRbt ANY_VALUE(RtR8RtattrNamet attrValue(tattrs(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRs s  ! (R(RtattrDictRRRRs((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRb s   -cCs)|o d|nd}th||6S(sSimplified version of C{L{withAttribute}} when matching on a div class - made difficult because C{class} is a reserved word in Python. s%s:classtclass(Rb(t classnamet namespacet classattr((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRh st(R cCs't}||||B}xt|D]\}}|d d \}} } } | djo@|djpt|djotdn|\} } nt}| tijo| djo(t||t|t |}q| djoe|dj o0t|||t|t ||}qt||t|t |}q| djo:t|| || |t|| || |}qtdn8| ti jo| djoEt |t pt |}nt|i |t||}q| djoe|dj o0t|||t|t ||}qt||t|t |}q| djo:t|| || |t|| || |}qtdn td| o|i| n|||BK}|}q(W||K}|S( sHelper 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. Parameters: - baseExpr - expression representing the most basic element for the nested - opList - list of tuples, one for each operator precedence level in the expression grammar; each tuple is of the form (opExpr, numTerms, rightLeftAssoc, parseAction), where: - opExpr is the pyparsing expression for the operator; may also be a string, which will be converted to a Literal; if numTerms is 3, opExpr is a tuple of two expressions, for the two operators separating the 3 terms - numTerms is the number of terms for this operator (must be 1, 2, or 3) - rightLeftAssoc is the indicator whether the operator is right or left associative, using the pyparsing-defined constants C{opAssoc.RIGHT} and C{opAssoc.LEFT}. - parseAction is the parse action to be associated with expressions matching this operator expression (the parse action tuple member may be omitted) - lpar - expression for matching left-parentheses (default=Suppress('(')) - rpar - expression for matching right-parentheses (default=Suppress(')')) iiis@if numterms=3, opExpr must be a tuple or list of two expressionsis6operator must be unary (1), binary (2), or ternary (3)s2operator must indicate right or left associativityN(N(R RRRRRQtLEFTR R RtRIGHTRjRR0Ro(tbaseExprtopListtlpartrparRtlastExprRtoperDeftopExprtaritytrightLeftAssocRstopExpr1topExpr2tthisExprR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRf sR      (  0( ! %  0( !   s4"(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]+)|(?:\\.))*"s string enclosed in double quotess4'(?:[^'\n\r\\]|(?:'')|(?:\\x[0-9a-fA-F]+)|(?:\\.))*'s string enclosed in single quotessq(?:"(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]+)|(?:\\.))*")|(?:'(?:[^'\n\r\\]|(?:'')|(?:\\x[0-9a-fA-F]+)|(?:\\.))*')s*quotedString using single or double quotestucCs||jotdn|d jort|toRt|toBt|djot|djo||d j o>tt|t||ti ddi d}qt i t||ti i d}q|d j oLtt|t |t |tti ddi d}qttt |t |tti ddi d}qtdnt}|d j o6|tt|t||B|Bt|K}n/|tt|t||Bt|K}|S( sHelper 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) - ignoreExpr - expression for ignoring opening and closing delimiters (default=quotedString) 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 C{ignoreExpr} 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 quotedString or a comment expression. Specify multiple expressions using an C{L{Or}} or C{L{MatchFirst}}. The default is L{quotedString}, but if no expressions are to be ignored, then pass C{None} for this argument. s.opening and closing strings cannot be the sameiRcSs|diS(i(R(R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyR_scSs|diS(i(R(R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRbscSs|diS(i(R(R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRhscSs|diS(i(R(R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRlssOopening and closing arguments must be strings if no content expression is givenN(RRRjRRRRRRRARoR?RRR R R&R.(topenertclosertcontentRWR((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRMBs2   &  $    6.c sfd}fd}fd}ttidi}tti|}ti|}ti|} |o<tt||t|t|t|| } n1tt|t|t|t|} |it t| S(sHelper 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 the current level; set to False for block of left-most statements (default=True) A valid block must contain at least one C{blockStatement}. csy|t|jodSt||}|djo=|djot||dnt||dndS(Nisillegal nestingsnot a peer entry(RR5RR(RtR8R9tcurCol(t indentStack(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytcheckPeerIndentscsGt||}|djoi|nt||ddS(Nisnot a subentry(R5RR(RtR8R9R(R(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pytcheckSubIndentscst|t|jodSt||}o|djo|djpt||dnidS(Niisnot an unindent(RR5RR(RtR8R9R(R(sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt checkUnindents )s ( RRRRRRoR RRR( tblockStatementExprRRRRRR!tINDENTtPEERtUNDENTtsmExpr((RsC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRcvs9 $s#[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]s[\0xa1-\0xbf\0xd7\0xf7]s_:Rrsgt lt amp nbsp quottentityRss><& "cCs"|itjot|ipdS(N(Rt_htmlEntityMapR(R9((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyRss/\*(?:[^*]*\*+)+?/sC style commentss.*s \/\/(\\\n|.)*s // comments:/(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?RCRRRHRIRbRRhRQRRRfRRR:R[RVR`RMRcR1RTR3R2RR7RRvRRXR4RARRZR;R9RBRUt _commasepitemR6Rt selectTokent fromTokentidentt columnNametcolumnNameListt tableNamet tableNameListt simpleSQLR(((sC/tmp/pip-build-iUCeBS/setuptools/pkg_resources/_vendor/pyparsing.pyt:s           +         0          8 |@p>1 mBF8UH '" ">L   "      @   !4@         !     H4 4  /  8+