PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  r2Wcf@sY dZdZdZdZddlZddlmZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddd 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`dadbdcdddedfdgdhdidjdkdlgfZe jjdmZerAe jZeZeZeZeeee e!e"e#e$e%e&e'g Z(nre j)Ze*Z+dnZgZ(ddl,Z,xEdoj-D]7Z.ye(j/e0e,e.Wne1k rqxnXqxWe2dpe+dqDZ3drZ4dse5fdtYZ6ej7ej8Z9duZ:e:dvZ;e9e:Z<edwZ=dxj>dyej?DZ@deAfdzYZBd eBfd{YZCd"eBfd|YZDd$eDfd}YZEd'eAfd~YZFde5fdYZGd#e5fdYZHe jIjJeHdZKdZLdZMdZNdZOdZPdZQddZRd%e5fdYZSd-eSfdYZTdeTfdYZUdeTfdYZVdeTfdYZWeWZXeWeS_YdeTfdYZZd eWfdYZ[deZfdYZ\d0eTfdYZ]d(eTfdYZ^d&eTfdYZ_d eTfdYZ`d/eTfdYZadeTfdYZbdebfdYZcdebfdYZddebfdYZed+ebfdYZfd*ebfdYZgd2ebfdYZhd1ebfdYZid!eSfdYZjdejfdYZkdejfdYZldejfdYZmd ejfdYZndeSfdYZodeofdYZpdeofdYZqdeofdYZrd3erfdYZsde5fdYZtetZudeofdYZvd)eofdYZwdeofdYZxdexfdYZyd.eofdYZzd ezfdYZ{dezfdYZ|d ezfdYZ}d,ezfdYZ~de5fdYZdZdedZedZdZdZdZdZeedZdZedZdZdZeUjdDZedjdJZeejdIZefjdbZegjdaZe]e=dddjdZe^djdZe^djdZeeBeBe]e@ddddqBe^de jBZe|ee~deZeWdevdjde|ereeBjddZdZdZdZdZdZdZdZdZdZdZe5e_dxdZe6Ze5e_e5e_e~de~ddZeZe^djdZe^djdZe^djdZe{eXdejjdZddeejdZedZedZedZee]e9e<djd\ZZeedj-dZe^ddj>ejdjdZdZe^djdZe^djdZe^djjdZe^djdZe^djdZeZe^djdZe{ere]e@ddeve]deWdeejjdZeevejeBddxjd;ZedkrU e[dZe[d Ze]e9e<d Zeed d ejeZe|eejd Zeed d ejeZe|eejdZedeBjd eejdZejdndS(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.1.1s21 Mar 2016 05:04 UTCs*Paul McGuire iN(treftAndtCaselessKeywordtCaselessLiteralt CharsNotIntCombinetDicttEachtEmptyt FollowedBytForwardt GoToColumntGrouptKeywordtLineEndt LineStarttLiteralt MatchFirsttNoMatchtNotAnyt OneOrMoretOnlyOncetOptionaltOrtParseBaseExceptiontParseElementEnhancetParseExceptiontParseExpressiontParseFatalExceptiont ParseResultstParseSyntaxExceptiont ParserElementt QuotedStringtRecursiveGrammarExceptiontRegextSkipTot StringEndt StringStarttSuppresstTokentTokenConvertertWhitetWordtWordEndt WordStartt ZeroOrMoret alphanumstalphast alphas8bitt anyCloseTagt anyOpenTagt cStyleCommenttcoltcommaSeparatedListtcommonHTMLEntityt countedArraytcppStyleCommenttdblQuotedStringtdblSlashCommentt delimitedListtdictOftdowncaseTokenstemptythexnumst htmlCommenttjavaStyleCommenttlinetlineEndt lineStarttlinenot makeHTMLTagst makeXMLTagstmatchOnlyAtColtmatchPreviousExprtmatchPreviousLiteralt nestedExprtnullDebugActiontnumstoneOftopAssoctoperatorPrecedencet printablestpunc8bittpythonStyleCommentt quotedStringt removeQuotestreplaceHTMLEntityt replaceWitht restOfLinetsglQuotedStringtsranget stringEndt stringStartttraceParseActiont unicodeStringt upcaseTokenst withAttributet indentedBlocktoriginalTextFortungroupt infixNotationt locatedExprt withClasst3cCs}t|tr|Syt|SWnUtk rxt|jtjd}td}|jd|j |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 | ... >. txmlcharrefreplaces&#\d+;cSs#dtt|ddd!dS(Ns\uiii(thextint(tt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytsN( t isinstancetunicodetstrtUnicodeEncodeErrortencodetsystgetdefaultencodingR"tsetParseActionttransformString(tobjtrett xmlcharref((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt_ustrqs  s6sum len sorted reversed list tuple set any all min maxccs|] }|VqdS(N((t.0ty((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys sicCsRd}ddjD}x/t||D]\}}|j||}q,W|S(s/Escape &, <, >, ", ', etc. in a string of data.s&><"'css|]}d|dVqdS(t&t;N((Rzts((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys ssamp gt lt quot apos(tsplittziptreplace(tdatat from_symbolst to_symbolstfrom_tto_((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt _xml_escapes t _ConstantscBseZRS((t__name__t __module__(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRst 0123456789t ABCDEFabcdefi\tccs$|]}|tjkr|VqdS(N(tstringt whitespace(Rztc((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys scBsPeZdZdd d dZdZdZdZddZdZ RS( s7base exception class for all parsing runtime exceptionsicCsI||_|dkr*||_d|_n||_||_||_dS(NR(tloctNonetmsgtpstrt parserElement(tselfRRRtelem((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__init__s      cCsm|dkrt|j|jS|dkr>t|j|jS|dkr]t|j|jSt|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 RER4tcolumnRBN(scolscolumn(RERRR4RBtAttributeError(Rtaname((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt __getattr__s   cCs d|j|j|j|jfS(Ns"%s (at char %d), (line:%d, col:%d)(RRRER(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__str__scCs t|S(N(Ry(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__repr__ss>!}} ('-' operator) indicates that parsing is to stop immediately because an unbacktrackable syntax error has been foundcCs/tt|j|j|j|j|jdS(N(tsuperRRRRRR(Rtpe((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs(RRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscBs eZdZdZdZRS(sNexception thrown by C{validate()} if the grammar could be improperly recursivecCs ||_dS(N(tparseElementTrace(RtparseElementList((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCs d|jS(NsRecursiveGrammarException: %s(R(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs(RRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR!s t_ParseResultsWithOffsetcBs,eZdZdZdZdZRS(cCs||f|_dS(N(ttup(Rtp1tp2((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCs |j|S(N(R(Rti((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt __getitem__scCs t|jS(N(treprR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCs|jd|f|_dS(Ni(R(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt setOffsets(RRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs   cBseZdZd-d-eedZd-d-eeedZdZedZ dZ dZ dZ dZ e Zd Zd Zd Zd Zd ZereZeZeZndZdZdZdZdZd-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+Z1d,Z2RS(.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.}) cCs/t||r|Stj|}t|_|S(N(Rmtobjectt__new__tTruet_ParseResults__doinit(tclsttoklisttnametasListtmodaltretobj((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs  c Cs|jrt|_d|_d|_i|_||_||_|dkrTg}n||trp||_ n-||t rt||_ n |g|_ t |_ n|dk r|r|sd|j|s  cCs||trB|jj|t|g|j|<|d}n`||ttfrm||j|<|}n5|jj|tt|dg|j|<|}||trt||_ ndS(Ni( RRtgetRRjRRRtwkrefR(RtkRRmtsub((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt __setitem__Gs&   /c Cst|ttfrt|j}|j|=t|trl|dkrV||7}nt||d}ntt|j|}|jx{|j j D]]\}}xN|D]F}x=t |D]/\}\}} t || | |k||s(R(R((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt itervalues}scsfdjDS(Nc3s|]}||fVqdS(N((RzR(R(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys s(R(R((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt iteritemsscCst|jS(sReturns all named result keys.(RR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytkeysscCst|jS(s Returns all named result values.(RR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytvaluesscCst|jS(s=Returns all named result keys and values as a list of tuples.(RR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCs t|jS(sSince keys() returns an iterator, this method is helpful in bypassing code that looks for the existence of any defined results names.(tboolR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pythaskeysscOs|sdg}nxI|jD];\}}|dkrJ|d|f}qtd|qWt|dtst|dks|d|kr|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(RRRmRjR(RtargstkwargsRRtindexRwt defaultvalue((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytpops      cCs||kr||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((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs cCsw|jj||x]|jjD]L\}}x=t|D]/\}\}}t||||k|| st](RR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRsRcCsog}xb|jD]W}|r2|r2|j|nt|trT||j7}q|jt|qW|S(N(RRRmRt _asStringListRy(RtseptoutR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR  s cCs5g|jD]'}t|tr+|jn|^q S(sXReturns the parse results as a nested list of matching tokens, all converted to strings.(RRmRR(Rtres((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscsGtr|j}n |j}fdtfd|DS(s7Returns the named parse results as a nested dictionary.csMt|trE|jr%|jSg|D]}|^q,Sn|SdS(N(RmRRtasDict(RvR(ttoItem(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR!s    c3s'|]\}}||fVqdS(N((RzRR(R(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys *s(tPY_3RRR(Rtitem_fn((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs    cCsPt|j}|jj|_|j|_|jj|j|j|_|S(s/Returns a new copy of a C{ParseResults} object.(RRRRRRRR(RRw((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR,s   c Csd}g}td|jjD}|d}|sPd}d}d}nd } |d k rk|} n|jr|j} n| s|rdSd} n|||d| dg7}x t|jD]\} } t| trI| |kr|| j || |o|d k||g7}q|| j d |o6|d k||g7}qd } | |krh|| } n| s|rzqqd} nt t | } |||d| d| d| dg 7}qW|||d| dg7}dj |S( shReturns the parse results as XML. Tags are created for tokens and lists that have defined results names.s css2|](\}}|D]}|d|fVqqdS(iN((RzRRR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys 9s s RtITEMtsss %s%s[%d]: %s%s%sR( RRyRRtsortedRRmRtdumptanyRR( RRtdepthRtNLRRRRR'((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR)s*  B<cOstj|j||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((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR-scCsC|j|jj|jdk r-|jp0d|j|jffS(N(RRRRRRR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt __getstate__s  cCsm|d|_|d\|_}}|_i|_|jj||dk r`t||_n d|_dS(Nii(RRRRRRRR(RtstateR%t inAccumNames((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt __setstate__s   cCs|j|j|j|jfS(N(RRRR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__getnewargs__scCs tt|t|jS(N(RRRR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRsN(3RRRRRRRmRRRRRRRt __nonzero__RRRRRRRRRRRRRRRRRRR R RRR RRRRRR$R&R)R-R.R1R2R(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs` '                           ;     cCsC|}|t|kr,||dkr,dS||jdd|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(RtstrgR~((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR4s cCs|jdd|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(RR5((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyREs cCsR|jdd|}|jd|}|dkrB||d|!S||dSdS(sfReturns the line of text containing loc within a string, counting newlines as line separators. s iiN(R4tfind(RR5tlastCRtnextCR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRBs  cCsAdt|dt|dt||t||fGHdS(NsMatch s at loc s(%d,%d)(RyRER4(tinstringRtexpr((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt_defaultStartDebugActionscCs'dt|dt|jGHdS(NsMatched s -> (RyRoR(R:tstartloctendlocR;ttoks((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt_defaultSuccessDebugActionscCsdt|GHdS(NsException raised:(Ry(R:RR;texc((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt_defaultExceptionDebugActionscGsdS(sG'Do-nothing' debug action, to suppress debugging output during parsing.N((R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRLsicsGtkrfdSdgtgfd}|S(Ncs |S(N((R~tlRk(tfunc(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRlsicsxy&|d}td<|SWqtk rdrInGz@tjd}tj|dd}|jdsnWd~Xdkrdcd7gd4Z?ed5Z@d6ZAd7ZBd8ZCd9ZDd:ZEed;ZFRS(=s)Abstract base level parser element class.s cCs |t_dS(s/Overrides the default whitespace chars N(RtDEFAULT_WHITE_CHARS(tchars((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytsetDefaultWhitespaceChars3scCs |t_dS(sV Set class to be used for inclusion of string literals into a parser. N(RtliteralStringClass(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytinlineLiteralsUsing9scCst|_d|_d|_d|_||_t|_t j |_ t|_ t |_t |_t|_t |_t |_t|_d|_t|_d|_d|_t|_t |_dS(NR(NNN(Rt parseActionRt failActiontstrReprt resultsNamet saveAsListRtskipWhitespaceRRQt whiteCharstcopyDefaultWhiteCharsRtmayReturnEmptytkeepTabst ignoreExprstdebugt streamlinedt mayIndexErrorterrmsgt modalResultst debugActionstret callPreparset callDuringTry(Rtsavelist((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR@s(                   cCsEtj|}|j|_|j|_|jrAtj|_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.(RRVR`R]RRQR\(Rtcpy((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRWs    cCs>||_d|j|_t|dr:|j|j_n|S(s6Define name for this expression, for use in debugging.s Expected t exception(RRdRRlR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytsetNameas  cCsE|j}|jdr.|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(RRHRRYRe(RRtlistAllMatchestnewself((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytsetResultsNameis     csa|r9|jttfd}|_||_n$t|jdr]|jj|_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)ddl}|j||||S(Ni(tpdbt set_trace(R:Rt doActionst callPreParseRr(t _parseMethod(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytbreakers  t_originalParseMethod(t_parseRRxR(Rt breakFlagRw((Rvs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytsetBreak|s   cOs7tttt||_|jdt|_|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. Ri(RtmapRPRVRRRi(RtfnsR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRtscOsF|jtttt|7_|jp<|jdt|_|S(saAdd parse action to expression's list of parse actions. See L{I{setParseAction}}.Ri(RVRR|RPRiRR(RR}R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytaddParseActions$csj|jdpdx0|D](fd}|jj|qW|jp`|jdt|_|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 conditioncs7tt|||s3t||n|S(N(RRPR(R~RCRk(tfnR(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytpasRi(RRVRRiR(RR}RR((RRs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt addConditions  cCs ||_|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.(RW(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt setFailActions cCsmt}x`|rht}xM|jD]B}y(x!|j||\}}t}q+Wqtk r`qXqWq W|S(N(RRR`RyR(RR:Rt exprsFoundtetdummy((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt_skipIgnorabless    cCsp|jr|j||}n|jrl|j}t|}x-||krh|||krh|d7}q?Wn|S(Ni(R`RR[R\R(RR:Rtwttinstrlen((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytpreParses    cCs |gfS(N((RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt parseImplscCs|S(N((RR:Rt tokenlist((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt postParsesc Cs|j}|s|jr,|jdr?|jd|||n|rc|jrc|j||}n|}|}yUy|j|||\}}Wn/tk rt|t||j |nXWqt k r(} |jdr|jd|||| n|jr"|j|||| nqXn|rP|jrP|j||}n|}|}|j sw|t|kry|j|||\}}Wqtk rt|t||j |qXn|j|||\}}|j |||}t ||jd|jd|j} |jrf|s7|jrf|ryrxk|jD]`} | ||| }|dk rJt ||jd|jot|t tfd|j} qJqJWWqct k r} |jdr|jd|||| nqcXqfxn|jD]`} | ||| }|dk rt ||jd|joMt|t tfd|j} qqWn|r|jdr|jd||||| qn|| fS(NiiRRi(RaRWRfRhRRRRRRdRRcRRRYRZReRVRiRRmR( RR:RRtRut debuggingtpreloct tokensStartttokensterrt retTokensR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt _parseNoCachesp   &    %$       #cCsNy|j||dtdSWn)tk rIt|||j|nXdS(NRti(RyRRRRd(RR:R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyttryParse,s cCs7y|j||Wnttfk r.tSXtSdS(N(RRRRR(RR:R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt canParseNext2s cCs|||||f}|tjkratj|}t|trI|n|d|djfSyA|j||||}|d|djftj|<|SWn,tk r}d|_|tj|<nXdS(Nii( Rt _exprArgCacheRmt ExceptionRRRRt __traceback__(RR:RRtRutlookupRR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt _parseCache<s  !  cCstjjdS(N(RRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt resetCacheQscCs%tjs!tt_tjt_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_packratEnabledRRRy(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt enablePackratVs  cCstj|js |jnx|jD]}|jq*W|jsV|j}nyW|j|d\}}|r|j||}t t }|j||nWn(t k r}tj rq|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( RRRbt streamlineR`R_t expandtabsRyRRR$Rtverbose_stacktrace(RR:tparseAllRRRtseRA((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt parseStringks$      ccs|js|jnx|jD]}|jq W|jsRt|j}nt|}d}|j}|j}t j d} yx||kra| |kray.|||} ||| dt \} } Wnt k r| d}qX| |krT| d7} | | | fV|rK|||} | |kr>| }qQ|d7}q^| }q| d}qWWn(t k r}t jrq|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.iRuiN(RbRR`R_RyRRRRyRRRRRR(RR:t maxMatchestoverlapRRRt preparseFntparseFntmatchesRtnextLocRtnextlocRA((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt scanStringsB               c Cs%g}d}t|_yx|j|D]}\}}}|j|||!|rt|trs||j7}qt|tr||7}q|j|n|}q(W|j||g|D]}|r|^q}djt t t |SWn(t k r }t jrq!|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(RR_RRRmRRRRR|Ryt_flattenRRR( RR:RtlastERkR~RtoRA((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRus(     cCsey6tg|j||D]\}}}|^qSWn(tk r`}tjrWqa|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:RRkR~RRA((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt searchStrings 6 cCsdt|tr!tj|}nt|tsTtjdt|tdddSt ||gS(s0Implementation of + operator - returns C{L{And}}s4Cannot combine element of type %s with ParserElementt stackleveliN( RmRRRTtwarningstwarnRt SyntaxWarningRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs cCs\t|tr!tj|}nt|tsTtjdt|tdddS||S(sKImplementation of + operator when left operand is not a C{L{ParserElement}}s4Cannot combine element of type %s with ParserElementRiN( RmRRRTRRRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s cCsmt|tr!tj|}nt|tsTtjdt|tdddSt |t j |gS(s?Implementation of - operator, returns C{L{And}} with error stops4Cannot combine element of type %s with ParserElementRiN( RmRRRTRRRRRRt _ErrorStop(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__sub__ s cCs\t|tr!tj|}nt|tsTtjdt|tdddS||S(sKImplementation of - operator when left operand is not a C{L{ParserElement}}s4Cannot combine element of type %s with ParserElementRiN( RmRRRTRRRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__rsub__s csEt|tr|d}}n-t|tr7|d d }|dd kr_d|df}nt|dtr|dd kr|ddkrtS|ddkrtS|dtSqLt|dtrt|dtr|\}}||8}qLtdt|dt|dntdt||dkrgtdn|dkrtdn||kodknrtdn|rfd |r |dkr|}qt g||}qA|}n(|dkr.}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)cs2|dkr$t|dStSdS(Ni(R(tn(tmakeOptionalListR(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRRs N(NN( RmRjttupleRR-RRRt ValueErrorR(RRt minElementst optElementsRw((RRs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__mul__!sD#  &  )      cCs |j|S(N(R(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__rmul__escCsdt|tr!tj|}nt|tsTtjdt|tdddSt ||gS(s7Implementation of | operator - returns C{L{MatchFirst}}s4Cannot combine element of type %s with ParserElementRiN( RmRRRTRRRRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__or__hs cCs\t|tr!tj|}nt|tsTtjdt|tdddS||BS(sKImplementation of | operator when left operand is not a C{L{ParserElement}}s4Cannot combine element of type %s with ParserElementRiN( RmRRRTRRRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__ror__rs cCsdt|tr!tj|}nt|tsTtjdt|tdddSt ||gS(s/Implementation of ^ operator - returns C{L{Or}}s4Cannot combine element of type %s with ParserElementRiN( RmRRRTRRRRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__xor__|s cCs\t|tr!tj|}nt|tsTtjdt|tdddS||AS(sKImplementation of ^ operator when left operand is not a C{L{ParserElement}}s4Cannot combine element of type %s with ParserElementRiN( RmRRRTRRRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__rxor__s cCsdt|tr!tj|}nt|tsTtjdt|tdddSt ||gS(s1Implementation of & operator - returns C{L{Each}}s4Cannot combine element of type %s with ParserElementRiN( RmRRRTRRRRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__and__s cCs\t|tr!tj|}nt|tsTtjdt|tdddS||@S(sKImplementation of & operator when left operand is not a C{L{ParserElement}}s4Cannot combine element of type %s with ParserElementRiN( RmRRRTRRRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__rand__s cCs t|S(s3Implementation of ~ operator - returns C{L{NotAny}}(R(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt __invert__scCs'|dk r|j|S|jSdS(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(RRqR(RR((s9/usr/lib/python2.7/site-packages/pip/_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((s9/usr/lib/python2.7/site-packages/pip/_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. (RR[(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytleaveWhitespaces cCst|_||_t|_|S(s/Overrides the default whitespace chars (RR[R\RR](RRR((s9/usr/lib/python2.7/site-packages/pip/_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.(RR_(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt parseWithTabss cCsrt|trt|}nt|trR||jkrn|jj|qnn|jjt|j|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. (RmRR&R`RR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytignorescCs1|p t|pt|ptf|_t|_|S(sBEnable display of debugging messages while doing pattern matching.(R<R@RBRfRRa(Rt startActiont successActiontexceptionAction((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytsetDebugActionss    cCs)|r|jtttn t|_|S(s~Enable display of debugging messages while doing pattern matching. Set C{flag} to True to enable, False to disable.(RR<R@RBRRa(Rtflag((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytsetDebugs cCs|jS(N(R(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCs t|S(N(Ry(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCst|_d|_|S(N(RRbRRX(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs  cCsdS(N((RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytcheckRecursionscCs|jgdS(sXCheck defined expressions for valid structure, check for infinite recursive definitions.N(R(Rt validateTrace((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytvalidatescCsy|j}Wn6tk rHt|d}|j}|jnXy|j||SWn(tk r}tjr~q|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_contentstfRA((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt parseFiles   cCst|tr1||kp0t|t|kSt|tryy!|jt|dttSWqtk rutSXnt t||kSdS(NR( RmRtvarsRRRyRRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__eq__s" cCs ||k S(N((RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__ne__'scCstt|S(N(thashtid(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__hash__*scCs ||kS(N((RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__req__-scCs ||k S(N((RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__rne__0scCst|tr*ttj|j}nx|D]}|g}y&|j|j|d|jWnt k r}d|kr|jt |j ||jdt |j |ddn|jd|j d|jt|nX|jddj |GHq1WdS(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(RmRR|RoRt splitlinesRRR)RRBRR4R(RttestsRRkRR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytrunTests3s   & ( N(GRRRRQRRt staticmethodRSRURRRmRqRR{RtR~RRRRRRRRRRRyRRRRRt_MAX_INTRRuRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR.s         H   -2 !  D                   cBseZdZdZRS(sJAbstract C{ParserElement} subclass, for defining atomic matching patterns.cCstt|jdtdS(NRj(RR'RR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyROs(RRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR'MscBseZdZdZRS(s"An empty token, will always match.cCs2tt|jd|_t|_t|_dS(NR(RRRRRR^RRc(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRUs  (RRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRSscBs#eZdZdZedZRS(sA token that will never match.cCs;tt|jd|_t|_t|_d|_dS(NRsUnmatchable token( RRRRRR^RRcRd(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR^s    cCst|||j|dS(N(RRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRes(RRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR\s cBs#eZdZdZedZRS(s*Token to exactly match a specified string.cCstt|j||_t||_y|d|_Wn0tk rntj dt ddt |_ nXdt |j|_d|j|_t|_t|_dS(Nis2null string passed to Literal; use Empty() insteadRis"%s"s Expected (RRRtmatchRtmatchLentfirstMatchCharRRRRRt __class__RyRRdRR^Rc(Rt matchString((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRks      cCsg|||jkrK|jdks7|j|j|rK||j|jfSt|||j|dS(Ni(RRt startswithRRRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR~s$(RRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRis 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|j||_t||_y|d|_Wn'tk retj dt ddnXd|j|_ d|j |_ t |_t |_||_|r|j|_|j}nt||_dS(Nis2null string passed to Keyword; use Empty() insteadRis"%s"s Expected (RR RRRRRRRRRRRdRR^Rctcaselesstuppert caselessmatchtsett identChars(RRRR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs"      c Csb|jr||||j!j|jkrF|t||jkse|||jj|jkrF|dks||dj|jkrF||j|jfSn|||jkrF|jdks|j|j|rF|t||jks|||j|jkrF|dks2||d|jkrF||j|jfSt |||j |dS(Nii( RRRRRRRRRRRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs #9)$3#cCs%tt|j}tj|_|S(N(RR RtDEFAULT_KEYWORD_CHARSR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs cCs |t_dS(s,Overrides the default Keyword chars N(R R(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytsetDefaultKeywordCharss( RRRR.RRRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_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|j|j||_d|j|_d|j|_dS(Ns'%s's Expected (RRRRt returnStringRRd(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs cCsS||||j!j|jkr7||j|jfSt|||j|dS(N(RRRRRRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs#(RRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs cBs#eZejdZedZRS(cCs#tt|j||dtdS(NR(RRRR(RRR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCs||||j!j|jkrp|t||jks\|||jj|jkrp||j|jfSt|||j|dS(N(RRRRRRRRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs#9(RRR RRRR(((s9/usr/lib/python2.7/site-packages/pip/_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{excludeChars} 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. iicswtt|jrcdjfd|D}|rcdjfd|D}qcn||_t||_|r||_t||_n||_t||_|dk|_ |dkrt dn||_ |dkr||_ n t |_ |dkr)||_ ||_ nt||_d|j|_t|_||_d|j|jkrs|dkrs|dkrs|dkrs|j|jkrd t|j|_net|jdkrd tj|jt|jf|_n%d t|jt|jf|_|jrDd |jd |_nytj|j|_Wqsd|_qsXndS( NRc3s!|]}|kr|VqdS(N((RzR(t excludeChars(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys sc3s!|]}|kr|VqdS(N((RzR(R(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys siisZcannot 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 maxSpecifiedRtminLentmaxLenRRyRRdRRct asKeywordt_escapeRegexRangeCharstreStringRRgtescapetcompileR(RRRtmintmaxtexactRR((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRsT%             :  c Cs|jr[|jj||}|s?t|||j|n|j}||jfS|||jkrt|||j|n|}|d7}t|}|j}||j }t ||}x*||kr|||kr|d7}qWt } |||j krt } n|jrG||krG|||krGt } n|jr|dkrp||d|ks||kr|||krt } qn| rt|||j|n||||!fS(Nii(RgRRRdtendtgroupRRRRRRRRRR( RR:RRttresulttstartRt bodycharstmaxloctthrowException((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs6       %  < cCsytt|jSWnnX|jdkrd}|j|jkrsd||j||jf|_qd||j|_n|jS(NcSs&t|dkr|d dS|SdS(Nis...(R(R~((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt charsAsStrGs s W:(%s,%s)sW:(%s)(RR*RRXRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR>s (N( RRRRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR*s 6 #cBsDeZdZeejdZddZedZ 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]icCs3tt|jt|tr|sAtjdtddn||_||_ y+t j |j|j |_ |j|_ Wqt jk rtjd|tddqXnIt|tjr||_ t||_|_ ||_ n tdt||_d|j|_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.s0null 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"RRmRRRRtpatterntflagsRgRRt sre_constantsterrortcompiledREtypeRoRRyRRdRRcRR^(RRR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRZs.          cCs|jj||}|s6t|||j|n|j}|j}t|j}|rx|D]}||||eZdZddeededZedZdZRS(sIToken for matching strings that are delimited by quoting characters. c sttj|j}|sGtjdtddtn|dkr\|}n4|j}|stjdtddtn|_ t |_ |d_ |_ t |_|_|_|_|_|rTtjtjB_dtjj tj d|dk rDt|pGdf_nPd_dtjj tj d|dk rt|pdf_t j d krjd d jfd tt j d dd Dd7_n|r*jdtj|7_n|rhjdtj|7_tjjd_njdtjj 7_y+tjjj_j_Wn4tj k rtjdjtddnXt!_"dj"_#t$_%t&_'dS(sbDefined with the following parameters: - quoteChar - string of one or more characters defining the quote delimiting string - escChar - character to escape quotes, typically backslash (default=None) - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=None) - multiline - boolean indicating whether quotes can span multiple lines (default=C{False}) - unquoteResults - boolean indicating whether the matched text should be unquoted (default=C{True}) - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=C{None} => same as quoteChar) - convertWhitespaceEscapes - convert escaped whitespace (C{'\t'}, C{'\n'}, etc.) to actual whitespace (default=C{True}) s$quoteChar cannot be the empty stringRis'endQuoteChar cannot be the empty stringis %s(?:[^%s%s]Rs%s(?:[^%s\n\r%s]is|(?:s)|(?:c3s<|]2}dtjj| tj|fVqdS(s%s[^%s]N(RgRt endQuoteCharR(RzR(R(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys sit)s|(?:%s)s|(?:%s.)s(.)s)*%ss$invalid pattern (%s) passed to Regexs Expected N((RR RRRRRt SyntaxErrorRt quoteCharRt quoteCharLentfirstQuoteCharRtendQuoteCharLentescChartescQuotetunquoteResultstconvertWhitespaceEscapesRgt MULTILINEtDOTALLRRRRRRtescCharReplacePatternRRRRRyRRdRRcRR^(RRR!R"t multilineR#RR$((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRsf              ( %E  c CsT|||jkr(|jj||p+d}|sOt|||j|n|j}|j}|jrJ||j |j !}t |t rJd|kr|j ridd6dd6dd6dd 6}x/|jD]\}}|j||}qWn|jr tj|jd |}n|jrG|j|j|j}qGqJn||fS( Ns\s s\ts s\ns s\fs s\rs\g<1>(RRgRRRRdR R R#RR RmRR$RRR!RR'R"R( RR:RRtR Rwtws_maptwslittwschar((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs*.      !cCsSytt|jSWnnX|jdkrLd|j|jf|_n|jS(Ns.quoted string, starting with %s ending with %s(RR RRXRRR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRsN( RRRRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR sJ #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|jt|_||_|dkr@tdn||_|dkra||_n t |_|dkr||_||_nt ||_ d|j |_ |jdk|_ t|_dS(Nisfcannot specify a minimum length < 1; use Optional(CharsNotIn()) if zero-length char group is permittedis Expected (RRRRR[tnotCharsRRRRRyRRdR^Rc(RR,RR R ((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs           cCs|||jkr.t|||j|n|}|d7}|j}t||jt|}x*||kr|||kr|d7}qfW|||jkrt|||j|n||||!fS(Ni(R,RRdRRRR(RR:RRtRtnotcharstmaxlen((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR0s  cCsvytt|jSWnnX|jdkrot|jdkr\d|jd |_qod|j|_n|jS(Nis !W:(%s...)s!W:(%s)(RRRRXRRR,(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRAs(RRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs cBsXeZdZidd6dd6dd6dd6d 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 iicsttj|_jdjfdjDdjdjD_t_ dj_ |_ |dkr|_ n t _ |dkr|_ |_ ndS(NRc3s$|]}|jkr|VqdS(N(t matchWhite(RzR(R(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys _scss|]}tj|VqdS(N(R)t whiteStrs(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys ass Expected i(RR)RR/RRR\RRR^RdRRR(RtwsRR R ((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR\s )       cCs|||jkr.t|||j|n|}|d7}||j}t|t|}x-||kr|||jkr|d7}qcW|||jkrt|||j|n||||!fS(Ni(R/RRdRRRR(RR:RRtRR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRps  "(RRRR0RRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR)Os t_PositionTokencBseZdZRS(cCs8tt|j|jj|_t|_t|_ dS(N( RR2RRRRRR^RRc(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs (RRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR2scBs,eZdZdZdZedZRS(sXToken to advance to a specific column of input text; useful for tabular report scraping.cCs tt|j||_dS(N(RR RR4(Rtcolno((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCst|||jkrt|}|jrB|j||}nxE||kr||jrt|||jkr|d7}qEWn|S(Ni(R4RR`Rtisspace(RR:RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs  7cCs^t||}||jkr6t||d|n||j|}|||!}||fS(NsText not in expected column(R4R(RR:RRttthiscoltnewlocRw((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs  (RRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s  cBs,eZdZdZdZedZRS(sQMatches if current position is at the beginning of a line within the parse stringcCs<tt|j|jtjjddd|_dS(Ns RsExpected start of line(RRRRRRQRRd(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCs<tt|j||}||dkr8|d7}n|S(Ns i(RRR(RR:RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs cCs]|dkp5||j|dkp5||ddksSt|||j|n|gfS(Niis (RRRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs  (RRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs  cBs#eZdZdZedZRS(sKMatches if current position is at the end of a line within the parse stringcCs<tt|j|jtjjddd|_dS(Ns RsExpected end of line(RRRRRRQRRd(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCs|t|krK||dkr0|ddfSt|||j|n8|t|krk|dgfSt|||j|dS(Ns i(RRRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs(RRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs cBs#eZdZdZedZRS(sCMatches if current position is at the beginning of the parse stringcCs tt|jd|_dS(NsExpected start of text(RR%RRd(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCsL|dkrB||j|dkrBt|||j|qBn|gfS(Ni(RRRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs (RRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR%s cBs#eZdZdZedZRS(s=Matches if current position is at the end of the parse stringcCs tt|jd|_dS(NsExpected end of text(RR$RRd(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCs|t|kr-t|||j|nT|t|krM|dgfS|t|kri|gfSt|||j|dS(Ni(RRRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs (RRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_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|jt||_d|_dS(NsNot at the start of a word(RR,RRt wordCharsRd(RR7((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRscCs^|dkrT||d|jks6|||jkrTt|||j|qTn|gfS(Nii(R7RRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs  (RRRRQRRR(((s9/usr/lib/python2.7/site-packages/pip/_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|jt||_t|_d|_dS(NsNot at the end of a word(RR+RRR7RR[Rd(RR7((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRs cCsvt|}|dkrl||krl|||jksN||d|jkrlt|||j|qln|gfS(Nii(RR7RRd(RR:RRtR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s  (RRRRQRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR+s cBsqeZdZedZdZdZdZdZdZ dZ edZ gd Z d Z RS( sTAbstract subclass of ParserElement, for combining and post-processing parsed tokens.cCstt|j|t|tr4t|}nt|trXt|g|_nt|t j rt d|Drt t|}nt||_n3yt||_Wnt k r|g|_nXt|_dS(Ncss|]}t|tVqdS(N(RmR(RzR;((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys  s(RRRRmRRRRtexprst collectionstSequencetallR|RRRh(RR8Rj((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s cCs |j|S(N(R8(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR scCs|jj|d|_|S(N(R8RRRX(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR" s cCsPt|_g|jD]}|j^q|_x|jD]}|jq8W|S(s~Extends C{leaveWhitespace} defined in base class, and also invokes C{leaveWhitespace} on all contained expressions.(RR[R8RR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR' s  %cCst|trb||jkrtt|j|x(|jD]}|j|jdq>Wqn>tt|j|x%|jD]}|j|jdqW|S(Ni(RmR&R`RRRR8(RRR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR0 scCs\ytt|jSWnnX|jdkrUd|jjt|jf|_n|jS(Ns%s:(%s)( RRRRXRRRRyR8(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR< s%c Cswtt|jx|jD]}|jqWt|jdkr`|jd}t||jr|j r|jdkr|j r|j|jdg|_d|_ |j |j O_ |j |j O_ n|jd}t||jr`|j r`|jdkr`|j r`|jd |j|_d|_ |j |j O_ |j |j O_ q`ndt||_|S(Niiiis Expected (RRRR8RRmRRVRYRRaRXR^RcRyRd(RRR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRF s0        cCstt|j||}|S(N(RRRq(RRRoRw((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRqh scCs@||g}x|jD]}|j|qW|jgdS(N(R8RR(RRttmpR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl scCs>tt|j}g|jD]}|j^q|_|S(N(RRRR8(RRwR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRr s%(RRRRRRRRRRRRqRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s    "  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(cOs3ttj|j||d|_|jdS(Nt-(RRRRRR(RRR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR~ s (RRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR} scCsltt|j||td|jD|_|j|jdj|jdj|_t |_ dS(Ncss|]}|jVqdS(N(R^(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys si( RRRR;R8R^RR\R[RRh(RR8Rj((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s c CsB|jdj|||dt\}}t}x|jdD]}t|tjr`t}q<n|ry|j|||\}}Wqtk rqtk r}d|_ t|qt k rtt |t ||j|qXn|j|||\}}|s'|jr<||7}q<q<W||fS(NiRui(R8RyRRmRRRRRRRRRRRdR( RR:RRtt resultlistt errorStopRt exprtokensR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s((   +cCs+t|trt|}n|j|S(N(RmRRR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR  scCs@||g}x+|jD] }|j||jsPqqWdS(N(R8RR^(RRtsubRecCheckListR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s   cCsVt|dr|jS|jdkrOddjd|jDd|_n|jS(NRt{Rcss|]}t|VqdS(N(Ry(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys st}(RRRXRRR8(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s *( RRRRRRRRR RR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRw 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. cCsNtt|j|||jrAtd|jD|_n t|_dS(Ncss|]}|jVqdS(N(R^(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys s(RRRR8R*R^R(RR8Rj((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s c Csd}d}g}x|jD]}y|j||}Wntk rw} d| _| j|kr| }| j}qqtk rt||krt|t||j|}t|}qqX|j ||fqW|rh|j ddxn|D]c\} }y|j |||SWqtk r`} d| _| j|kra| }| j}qaqXqWn|dk r|j|_ |nt||d|dS(NiRcSs |d S(Ni((tx((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl ss no defined alternatives to match( RR8RRRRRRRdRtsortRyR( RR:RRtt maxExcLoct maxExceptionRRtloc2Rt_((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s<      cCs.t|tr!tj|}n|j|S(N(RmRRRTR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__ixor__ scCsVt|dr|jS|jdkrOddjd|jDd|_n|jS(NRRBs ^ css|]}t|VqdS(N(Ry(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys sRC(RRRXRRR8(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s *cCs3||g}x|jD]}|j|qWdS(N(R8R(RRRAR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s( RRRRRRRRJRR(((s9/usr/lib/python2.7/site-packages/pip/_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. cCsNtt|j|||jrAtd|jD|_n t|_dS(Ncss|]}|jVqdS(N(R^(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys  s(RRRR8R*R^R(RR8Rj((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s c Csd}d}x|jD]}y|j|||}|SWqtk ro}|j|kr|}|j}qqtk rt||krt|t||j|}t|}qqXqW|dk r|j|_|nt||d|dS(Nis no defined alternatives to match( RR8RyRRRRRdR( RR:RRtRFRGRRwR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s$    cCs.t|tr!tj|}n|j|S(N(RmRRRTR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt__ior__# scCsVt|dr|jS|jdkrOddjd|jDd|_n|jS(NRRBs | css|]}t|VqdS(N(Ry(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys - sRC(RRRXRRR8(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR( s *cCs3||g}x|jD]}|j|qWdS(N(R8R(RRRAR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR1 s( RRRRRRRRKRR(((s9/usr/lib/python2.7/site-packages/pip/_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|j||td|jD|_t|_t|_dS(Ncss|]}|jVqdS(N(R^(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys > s( RRRR;R8R^RR[tinitExprGroups(RR8Rj((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR< s cCs|jrLtd|jD|_g|jD]}t|tr/|j^q/}g|jD]%}|jr]t|t r]|^q]}|||_g|jD]}t|t r|j^q|_ g|jD]}t|t r|j^q|_ g|jD]$}t|tt t fs|^q|_ |j |j 7_ t|_n|}|j }|j} g} t} x| r_|| |j |j } g} x| D]}y|j||}Wntk r| j|qX| j|jjt||||kr|j|q|| kr| j|qqWt| t| krut} ququW|rdjd|D}t||d|n| g|jD]*}t|tr|j| kr|^q7} g}x6| D].}|j|||\}}|j|qWt}x|D]}i}xQ|jD]C}||kr>t||}|t||7}|||q>W|t|7}x$|jD]\}}|||D ss, css|]}t|VqdS(N(Ry(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys e ss*Missing one or more required elements (%s)(RLRR8topt1mapRmRR;R^t optionalsR-tmultioptionalsRt multirequiredtrequiredRRRRRRRtremoveRRRyRRR(RR:RRtRtopt1topt2ttmpLocttmpReqdttmpOptt matchOrdert keepMatchingttmpExprstfailedtmissingR>tresultst finalResultsRtdupsRR<R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRB sd .5 117      "   >    cCsVt|dr|jS|jdkrOddjd|jDd|_n|jS(NRRBs & css|]}t|VqdS(N(Ry(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys sRC(RRRXRRR8(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR} s *cCs3||g}x|jD]}|j|qWdS(N(R8R(RRRAR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s(RRRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR7 s   ; cBs_eZdZedZedZdZdZdZ dZ gdZ dZ RS( sWAbstract subclass of C{ParserElement}, for combining and post-processing parsed tokens.cCstt|j|t|tr4t|}n||_d|_|dk r|j |_ |j |_ |j |j |j |_ |j|_|j|_|jj|jndS(N(RRRRmRRR;RRXRcR^RR\R[RZRhR`R(RR;Rj((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s        cCsG|jdk r+|jj|||dtStd||j|dS(NRuR(R;RRyRRRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR scCs>t|_|jj|_|jdk r:|jjn|S(N(RR[R;RRR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s  cCst|trc||jkrtt|j||jdk r`|jj|jdq`qn?tt|j||jdk r|jj|jdn|S(Ni(RmR&R`RRRR;R(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s cCs6tt|j|jdk r2|jjn|S(N(RRRR;R(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR scCsV||kr"t||gn||g}|jdk rR|jj|ndS(N(R!R;RR(RRRA((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s  cCsA||g}|jdk r0|jj|n|jgdS(N(R;RRR(RRR<((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR scCskytt|jSWnnX|jdkrd|jdk rdd|jjt|jf|_n|jS(Ns%s:(%s)( RRRRXRR;RRRy(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s%( RRRRRRRRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR 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|j|t|_dS(N(RR RRR^(RR;((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR scCs|jj|||gfS(N(R;R(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s(RRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_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|j|t|_t|_dt|j|_ dS(NsFound unwanted token, ( RRRRR[RR^RyR;Rd(RR;((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s  cCs:|jj||r0t|||j|n|gfS(N(R;RRRd(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR scCsIt|dr|jS|jdkrBdt|jd|_n|jS(NRs~{RC(RRRXRRyR;(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s (RRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s  cBs;eZdZddZedZdZedZ RS(sGRepetition of one or more of the given expression. Parameters: - expr - expression that must match one or more times - stopOn - (default=None) - expression for a terminating sentinel (only required if the sentinel would ordinarily match the repetition expression) cCsZtt|j||}t|tr:t|}n|dk rM|nd|_dS(N(RRRRmRRRt not_ender(RR;tstopOntender((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s c Cs|jj}|j}|jdk }|r9|jj}n|rO|||n||||dt\}}y|j } xn|r|||n| r|||} n|} ||| |\}} | s| jr~|| 7}q~q~Wnt t fk rnX||fS(NRu( R;RyRR`RRRR`RRR( RR:RRttself_expr_parsetself_skip_ignorablest check_endert try_not_enderRthasIgnoreExprsRt tmptokens((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s,   cCsIt|dr|jS|jdkrBdt|jd|_n|jS(NRRBs}...(RRRXRRyR;(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR+ s cCs(tt|j||}t|_|S(N(RRRqRRZ(RRRoRw((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRq4 s N( RRRRRRRRRRq(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s    cBs/eZdZddZedZdZRS(sROptional repetition of zero or more of the given expression. Parameters: - expr - expression that must match zero or more times - stopOn - (default=None) - expression for a terminating sentinel (only required if the sentinel would ordinarily match the repetition expression) cCs)tt|j|d|t|_dS(NRa(RR-RRR^(RR;Ra((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRB scCsEy tt|j|||SWnttfk r@|gfSXdS(N(RR-RRR(RR:RRt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRF s cCsIt|dr|jS|jdkrBdt|jd|_n|jS(NRR s]...(RRRXRRyR;(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRL s N(RRRRRRRR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR-9 s  t _NullTokencBs eZdZeZdZRS(cCstS(N(R(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRV scCsdS(NR((R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRY s(RRRR3R(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRiU s cBs/eZdZedZedZdZRS(sOptional matching of the given expression. Parameters: - expr - expression that must match zero or more times - default (optional) - value to be returned if the optional expression is not found. cCs2tt|j|dt||_t|_dS(NRj(RRRRRRR^(RR;R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRe s cCsy(|jj|||dt\}}Wnottfk r|jtk r|jjrt|jg}|j||jjnX|S(s&Decorator for debugging parse actions.csj}|d\}}}t|dkrI|djjd|}ntjjd|t||||fy|}Wn0tk r}tjjd||fnXtjjd||f|S(Niiit.s">>entering %s(line: '%s', %d, %s) s<gS(Ni(R RR>(R~RCRkR(t arrayExprR;(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytcountFieldParseAction s -cSst|dS(Ni(Rj(Rk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl starrayLenRis(len) s...N( R RR*RMRtRRmR~RRy(R;tintExprR((RR;s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR7 s    cCsMg}x@|D]8}t|tr8|jt|q |j|q W|S(N(RmRRRR(tLRwR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s  csFtfd}|j|dtjdt|S(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. csc|rTt|dkr'|d>q_t|j}td|D>n t>dS(Niicss|]}t|VqdS(N(R(Rzttt((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys s(RRRRR(R~RCRkttflat(trep(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytcopyTokenToRepeater s Ris(prev) (R R~RRmRy(R;R((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRJ s  cs\t|j}|Kfd}|j|dtjdt|S(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|jfd}j|dtdS(Ncs7t|j}|kr3tdddndS(NRi(RRR(R~RCRkt theseTokens(t matchTokens(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytmustMatchTheseTokens s Ri(RRRtR(R~RCRkR(R(Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR sRis(prev) (R RR~RRmRy(R;te2R((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRI s   cCsUx$dD]}|j|t|}qW|jdd}|jdd}t|S(Ns\^-]s s\ns s\t(Rt_bslashRy(R~R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s  c sY|r!d}d}tnd}d}tg}t|tr]|j}nVt|tjrt|}n4t|trt|}nt j dt dd|st Sd}x|t |d kru||}xt||d D]f\}} || |r,|||d =Pq||| r|||d =|j|| | }PqqW|d 7}qW| r-|r-yt |t d j|krtd d jd |Djd j|Stdjd|Djd j|SWq-t j dt ddq-Xntfd|Djd j|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|j|jkS(N(R(Rtb((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl scSs|jj|jS(N(RR(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl scSs ||kS(N((RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl scSs |j|S(N(R(RR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl ss2Invalid argument to oneOf, expected string or listRiiiRs[%s]css|]}t|VqdS(N(R(Rztsym((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys : ss | t|css|]}tj|VqdS(N(RgR(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys < ss7Exception creating Regex for oneOf, building MatchFirstc3s|]}|VqdS(N((RzR(tparseElementClass(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys C s(RRRmRRR9R:RRRRRRRRRRR"RmR( tstrsRtuseRegextisequaltmaskstsymbolsRtcurRR((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRN sP         ! !33 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((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR<E scCsptjd}|j}t|_|d||d}|rVd}n d}|j||S(sBHelper 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 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(N((R~RRk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl[ st_original_startt _original_endcSs||j|j!S(N(RR(R~RCRk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl` scSs'||jd|jd!g|(dS(NRR(R(R~RCRk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt extractTextb s(RRtRRRh(R;tasStringt locMarkert endlocMarkert matchExprR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRbO s      cCst|jdS(siHelper to undo pyparsing's default grouping of And expressions, even if all but one are non-empty.cSs|dS(Ni((Rk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRlj s(R(Rt(R;((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRcg scCsEtjd}t|d|d|jjdS(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(N((R~RCRk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRlv st locn_startRtlocn_end(RRtR RR(R;tlocator((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRel s s\[]-*.$+^?()~ R cCs |ddS(Nii((R~RCRk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl ss\\0?[xX][0-9a-fA-F]+cCs tt|djddS(Nis\0xi(tunichrRjtlstrip(R~RCRk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl ss \\0[0-7]+cCstt|dddS(Niii(RRj(R~RCRk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl sRs\]s\wR=R RtnegatetbodyR csEdy-djfdtj|jDSWndSXdS(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.) cSsKt|ts|Sdjdtt|dt|ddDS(NRcss|]}t|VqdS(N(R(RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys sii(RmRRRtord(tp((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl sRc3s|]}|VqdS(N((Rztpart(t _expanded(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys sN(Rt_reBracketExprRR(R~((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRZ s  -csfd}|S(srHelper method for defining parse actions that require matching at a specific column in the input text. cs2t||kr.t||dndS(Nsmatched token not at column %d(R4R(R5tlocnR?(R(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt verifyCol s((RR((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRH scs fdS(sHelper method for common parse actions that simply return a literal value. Especially useful when used with C{L{transformString}()}. csgS(N((R~RCRk(treplStr(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl s((R((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRW 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((R~RCRk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRU scCs&gtt|D]}|j^qS(s4Helper parse action to convert tokens to upper case.(R|RyR(R~RCRkR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR_ scCs&gtt|D]}|j^qS(s4Helper parse action to convert tokens to lower case.(R|Rytlower(R~RCRkR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR= scCs<t|tr+|}t|d| }n |j}tttd}|rtjj t }t d|dt t t|t d|tddtgjdj d t d }nd jd tD}tjj t t|B}t d|dt t t|j ttt d|tddtgjdj d t d }ttd|d }|jdd j|jddjjjd|}|jdd j|jddjjjd|}||_||_||fS(sRInternal helper to construct opening and closing tag expressions, given a tag nameRs_-:Rttagt=t/RR>cSs|ddkS(NiR((R~RCRk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl sRRcss!|]}|dkr|VqdS(RN((RzR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pys scSs|ddkS(NiR((R~RCRk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl ssR s(RmRR RR*R/R.R9RRtRUR&RR-R RRRqRRQRTR=Rt_LRttitleRRmR(ttagStrtxmltresnamet tagAttrNamet tagAttrValuetopenTagtprintablesLessRAbracktcloseTag((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt _makeTags s" o{AA  cCs t|tS(sRHelper to construct opening and closing tag expressions for HTML, given a tag name(RR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRF scCs t|tS(sQHelper to construct opening and closing tag expressions for XML, given a tag name(RR(R((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRG scsT|r|n |jgD]\}}||f^q#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. c sx~D]v\}}||kr8t||d|n|tjkr|||krt||d||||fqqWdS(Nsno matching attribute s+attribute '%s' has value '%s', must be '%s'(RR`t ANY_VALUE(R~RCRtattrNamet attrValue(tattrs(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR s   (R(RtattrDictRRR((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyR` s   %cCs'|rd|nd}ti||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(R`(t classnamet namespacet classattr((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRfst(RcCs<t}||||B}xt|D]\}}|d d \}} } } | dkrdd|nd|} | dkr|d kst|dkrtdn|\} }ntj| }| tjkr| dkr t||t |t |}q| dkrx|d k rQt|||t |t ||}qt||t |t |}q| dkrt|| |||t || |||}qtdn+| tj kr| dkr)t |t st |}nt|j|t ||}q| dkr|d k rpt|||t |t ||}qt||t |t |}q| dkrt|| |||t || |||}qtdn td | r |j| n||j| |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(')')) iis%s terms %s%s termis@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 RRRRRmROtLEFTR R RtRIGHTRmRR;Rt(tbaseExprtopListtlpartrparRwtlastExprRtoperDeftopExprtaritytrightLeftAssocRttermNametopExpr1topExpr2tthisExprR((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRdsR    '  /'   $  /'     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 quotestusunicode string literalc Cs!||krtdn|d krt|trt|trt|dkrt|dkr|d k rtt|t||tj ddj d}q|t j t||tj j d}q|d k r9tt|t |t |ttj ddj d}qttt |t |ttj ddj d}qtdnt}|d k r|tt|t||B|Bt|K}n.|tt|t||Bt|K}|jd ||f|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 sameiR cSs|djS(Ni(R(Rk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRl}scSs|djS(Ni(R(Rk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRlscSs|djS(Ni(R(Rk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRlscSs|djS(Ni(R(Rk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRlssOopening and closing arguments must be strings if no content expression is givensnested %s%s expressionN(RRRmRRRRRRRQRtR>RRR R R&R-Rm(topenertclosertcontentRkRw((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRK`s4  $  $    5.c s5fd}fd}fd}ttjdj}ttj|jd}tj|jd}tj|jd} |rtt||t|t|t|| } n0tt|t|t|t|} |j t t| jdS( 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}. css|t|krdSt||}|dkro|dkrZt||dnt||dndS(Nisillegal nestingsnot a peer entry(RR4RR(R~RCRktcurCol(t indentStack(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytcheckPeerIndentscsEt||}|dkr/j|nt||ddS(Nisnot a subentry(R4RR(R~RCRkR(R(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pytcheckSubIndentscsn|t|krdSt||}oH|dkoH|dks`t||dnjdS(Niisnot an unindent(RR4RR(R~RCRkR(R(s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt checkUnindents &s tINDENTRtUNINDENTsindented block( RRRRRRtRmR RRR( tblockStatementExprRRRRRR,RtPEERtUNDENTtsmExpr((Rs9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRas"8 $s#[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]s[\0xa1-\0xbf\0xd7\0xf7]s_:sany tagsgt lt amp nbsp quot aposs><& "'s &(?PRs);scommon HTML entitycCstj|jS(sRHelper parser action to replace common HTML entities with their special characters(t_htmlEntityMapRtentity(Rk((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyRVss/\*(?:[^*]*\*+)+?/sC style commentss HTML comments.*s rest of lines \/\/(\\\n|.)*s // comments:/(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?RDRCR\R[Rtt _escapedPunct_escapedHexChart_escapedOctChartUNICODEt _singleChart _charRangeRqRRZRHRWRUR_R=RRFRGR`RRfRORRRdRPR9RYRTR^RKRaR0RRR2R1RRRRR6RVR3R@RRXR:R8RARSRt _commasepitemR5Rt selectTokent fromTokentidentt columnNametcolumnNameListt tableNamet tableNameListt simpleSQLR(((s9/usr/lib/python2.7/site-packages/pip/_vendor/pyparsing.pyt:s            *         /       "   8 |@|>1 mBF8UH; $IM  "      @   !4@         !     I%5 4  (, 8+