/opt/alt/python27/lib/python2.7/site-packages
NameSizeModeActions
alembic/-0755rm
alembic-0.8.3-py2.7.egg-info/-0755rm
argparse-1.2.1-py2.7.egg-info/-0755rm
babel/-0755rm
Babel-1.3-py2.7.egg-info/-0755rm
beaker/-0755rm
Beaker-1.5.4-py2.7.egg-info/-0755rm
chardet/-0755rm
chardet-2.3.0-py2.7.egg-info/-0755rm
contextlib2-0.5.4-py2.7.egg-info/-0755rm
dateutil/-0755rm
docopt-0.6.2-py2.7.egg-info/-0755rm
jinja2/-0755rm
Jinja2-2.7.2-py2.7.egg-info/-0755rm
lvestats/-0755rm
mako/-0755rm
Mako-0.7.3-py2.7.egg-info/-0755rm
nose/-0755rm
nose-1.3.4-py2.7.egg-info/-0755rm
paste/-0755rm
Paste-1.7.5.1-py2.7.egg-info/-0755rm
pip/-0755rm
pip-20.2.4.dist-info/-0755rm
pkg_resources/-0755rm
python_dateutil-1.4.1-py2.7.egg-info/-0755rm
python_editor-0.4-py2.7.egg-info/-0755rm
pytz/-0755rm
raven/-0755rm
raven-6.3.0-py2.7.egg-info/-0755rm
requests/-0755rm
requests-2.10.0-py2.7.egg-info/-0755rm
schema-0.3.1-py2.7.egg-info/-0755rm
setuptools/-0755rm
setuptools-36.3.0.post20231113.dist-info/-0755rm
svgwrite/-0755rm
svgwrite-1.1.5-py2.7.egg-info/-0755rm
tempita/-0755rm
Tempita-0.5.1-py2.7.egg-info/-0755rm
urllib3/-0755rm
urllib3-1.15.1-py2.7.egg-info/-0755rm
argparse.py877910644editdlrm
argparse.pyc686760644editdlrm
argparse.pyo685060644editdlrm
contextlib2.py148280644editdlrm
contextlib2.pyc160090644editdlrm
contextlib2.pyo160090644editdlrm
docopt.py199460644editdlrm
docopt.pyc246660644editdlrm
docopt.pyo250330644editdlrm
easy_install.py1260644editdlrm
easy_install.pyc3280644editdlrm
easy_install.pyo3280644editdlrm
editor.py25500755editdlrm
editor.pyc36850644editdlrm
editor.pyo36850644editdlrm
lprettytable.py238490644editdlrm
lprettytable.pyc196970644editdlrm
lprettytable.pyo197970644editdlrm
Paste-1.7.5.1-py2.7-nspkg.pth3040644editdlrm
pyparsing-1.5.6-py2.7.egg-info6700644editdlrm
pyparsing.py1554290644editdlrm
pyparsing.pyc1551950644editdlrm
pyparsing.pyo1551950644editdlrm
PySocks-1.5.7-py2.7.egg-info3220644editdlrm
pytz-2012d-py2.7.egg-info233090644editdlrm
schema.py62060644editdlrm
schema.pyc85320644editdlrm
schema.pyo86080644editdlrm
six-1.9.0-py2.7.egg-info14190644editdlrm
six.py296640644editdlrm
six.pyc307220644editdlrm
six.pyo307220644editdlrm
socks.py299520644editdlrm
socks.pyc256880644editdlrm
socks.pyo256880644editdlrm
sockshandler.py29130644editdlrm
sockshandler.pyc47370644editdlrm
sockshandler.pyo47370644editdlrm
typing-3.5.3.0-py2.7.egg-info14840644editdlrm
typing.py648950644editdlrm
typing.pyc790680644editdlrm
typing.pyo784070644editdlrm
Edit: /opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyo (155195B)
Ucl@s dZdZdZdZddkZddklZddkZddk Z ddk Z ddk Z ddk Z ddd 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`dadbdcdddedfdgdhdidjdkgeZ e idldmjZeo/e iZeZeZeZeieiZnBe iZeZdnZeieiZdoZeieiZgZ ddk!Z!xGdpi"D]9Z#ye i$e%e!e#Wne&j o qNnXqNWdqZ'dre(fdsYZ)ei*Z+e+dtZ,ee+Z-eduZ.dvi/gZ0ei1D]!Z2e2ei3jo e0e2nq[0Z4de5fdwYZ6d e6fdxYZ7d"e6fdyYZ8d$e8fdzYZ9d'e5fd{YZ:d|e(fd}YZ;d#e(fd~YZ<dZ=dZ>dZ?dZ@dZAdZBdZCe odmdZDn dmdZDd%e(fdYZEd-eEfdYZFdeFfdYZGdeFfdYZHdeFfdYZIeIZJdeFfdYZKd eIfdYZLdeKfdYZMd1eFfdYZNd(eFfdYZOd&eFfdYZPd eFfdYZQd0eFfdYZRdeFfdYZSdeSfdYZTdeSfdYZUdeSfdYZVd+eSfdYZWd*eSfdYZXd3eSfdYZYd2eSfdYZZd!eEfdYZ[de[fdYZ\de[fdYZ]de[fdYZ^d e[fdYZ_deEfdYZ`de`fdYZade`fdYZbd4e`fdYZcde`fdYZdde(fdYZeeeZfde`fdYZgd)e`fdYZhde`fdYZideifdYZjd.e`fdYZkd/ekfdYZld ekfdYZmdekfdYZnd ekfdYZod,ekfdYZpde(fdYZqdZrdesdZteudZvdZwdZxdZydZzese{dZ|dZ}e{dZ~dZeGidEZeUidMZeVidLZeWideZeXiddZeNe.dddmidZdvi/gZe4D]Z2e2djo ee2nq[ZeOdidZeOdidZeeBeBeNeddBZeneepdeZeIdegdidenedeeBiddZdZdZdZdZdZdZdZdZdZdZdZdZdZe(e_e)Ze(e_e(e_dZeOdidZeOdidZeOdidZemeJdeiZddeueidZe{dZedZedZeeNee-d\ZZemeJde|diddiZeedi"dZdZeOdidZeOdZeOdiZeOdidZeOdidZeZeOdidZdvi/gZe4D]Z2e2djo ee2nq [ZemedeNeegeNdeIdeViidZetegeieBddvid<Zedjo.dZeLdZeLdZeNee-dZetedde{ieZeneteZetedde{ieZeneteZedeBideeid Zed ed ed ed edededededededndS(su 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 s1.5.6s26 June 2011 10:53s*Paul McGuire iN(treftAndtCaselessKeywordtCaselessLiteralt CharsNotIntCombinetDicttEachtEmptyt FollowedBytForwardt GoToColumntGrouptKeywordtLineEndt LineStarttLiteralt MatchFirsttNoMatchtNotAnyt OneOrMoretOnlyOncetOptionaltOrtParseBaseExceptiontParseElementEnhancetParseExceptiontParseExpressiontParseFatalExceptiont ParseResultstParseSyntaxExceptiont ParserElementt QuotedStringtRecursiveGrammarExceptiontRegextSkipTot StringEndt StringStarttSuppresstTokentTokenConvertertUpcasetWhitetWordtWordEndt WordStartt ZeroOrMoret alphanumstalphast alphas8bitt anyCloseTagt anyOpenTagt cStyleCommenttcoltcommaSeparatedListtcommonHTMLEntityt countedArraytcppStyleCommenttdblQuotedStringtdblSlashCommentt delimitedListtdictOftdowncaseTokenstemptytgetTokensEndLocthexnumst htmlCommenttjavaStyleCommenttkeepOriginalTexttlinetlineEndt lineStarttlinenot makeHTMLTagst makeXMLTagstmatchOnlyAtColtmatchPreviousExprtmatchPreviousLiteralt nestedExprtnullDebugActiontnumstoneOftopAssoctoperatorPrecedencet printablestpunc8bittpythonStyleCommentt quotedStringt removeQuotestreplaceHTMLEntityt replaceWitht restOfLinetsglQuotedStringtsranget stringEndt stringStartttraceParseActiont unicodeStringt upcaseTokenst withAttributet indentedBlocktoriginalTextForiicCs+tg}|D]}||dfq~S(i(tdict(tst_[1]tc((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytlscCsDt|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((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt_ustros s8sum len enumerate sorted reversed list tuple set any allcCskd}g}diD]}|d|dq~}x/t||D]\}}|i||}qEW|S(s/Escape &, <, >, ", ', etc. in a string of data.s&><"'samp gt lt quot apost&t;(tsplittziptreplace(tdatat from_symbolsRhRgt to_symbolstfrom_tto_((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt _xml_escapes / t _ConstantscBseZRS((t__name__t __module__(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR|st ABCDEFabcdefi\tcBsPeZdZdd d dZdZdZdZddZdZ RS( s7base exception class for all parsing runtime exceptionsicCsK||_|djo||_d|_n||_||_||_dS(NR(tloctNonetmsgtpstrt parserElement(tselfRRRtelem((s:/opt/alt/python27/lib/python2.7/site-packages/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 RHR5tcolumnREN(scolscolumn(RHRRR5REtAttributeError(Rtaname((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt __getattr__s   cCs d|i|i|i|ifS(Ns"%s (at char %d), (line:%d, col:%d)(RRRHR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__str__scCs t|S(N(Rp(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__repr__ss>!}) cCs1t||o|Sti|}t|_|S(N(Rktobjectt__new__tTruet_ParseResults__doinit(tclsttoklisttnametasListtmodaltretobj((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs  cCs|io^t|_d|_d|_h|_||to||_n |g|_t|_ n|dj o |o|pd|i|s  cCs||to4|ii|t|g|i|<|d}n]||to||i|<|}n6|ii|tt|dg|i|<|}||tot||_ndS(Ni( RRtgetRRRRtwkrefR(RtkRRktsub((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt __setitem__Gs&  /c Cst|ttfot|i}|i|=t|to2|djo||7}nt||d}ntt|i|}|ix}|i D]d}|i |}xN|D]F}x=t |D]/\}\}} t || | |j||s} for more information on parsing strings containing 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(Rtstrg((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR5ms 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 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((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRHys 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(RRtlastCRtnextCR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyREs  cCsAdt|dt|dt||t||fGHdS(NsMatch s at loc s(%d,%d)(RpRHR5(tinstringRtexpr((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt_defaultStartDebugActionscCs'dt|dt|iGHdS(NsMatched s -> (RpRmR(RtstartloctendlocRttoks((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt_defaultSuccessDebugActionscCsdt|GHdS(NsException raised:(Rp(RRRtexc((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt_defaultExceptionDebugActionscGsdS(sG'Do-nothing' debug action, to suppress debugging output during parsing.N((targs((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyROscs"dgfd}|S(NicsaxZy|dSWqtj o2djodcd7d5Z?d6Z@d7ZAd8ZBd9ZCRS(:s)Abstract base level parser element class.s cCs |t_dS(s/Overrides the default whitespace chars N(RtDEFAULT_WHITE_CHARS(tchars((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytsetDefaultWhitespaceCharsscCst|_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 saveAsListRtskipWhitespaceRR"t whiteCharstcopyDefaultWhiteCharsRtmayReturnEmptytkeepTabst ignoreExprstdebugt streamlinedt mayIndexErrorterrmsgt modalResultst debugActionstret callPreparset callDuringTry(Rtsavelist((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs(                   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.(RR%R/R,RR"R+(Rtcpy((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs    cCs@||_d|i|_t|do|i|i_n|S(s6Define name for this expression, for use in debugging.s Expected t exception(RR3thasattrR;R(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytsetNames  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(RtendswithRR(R4(RRtlistAllMatchestnewself((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytsetResultsNames     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(RRt doActionst callPreParseRC(t _parseMethod(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytbreakers  t_originalParseMethod(t_parseRRIR<(Rt breakFlagRH((RGs:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytsetBreaks   cOs<tttt||_d|jo|d|_|S(sVDefine 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 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 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. R8(RtmapR!R%R8(Rtfnstkwargs((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytsetParseActionscOsL|itttt|7_|ipd|jo|d|_|S(saAdd parse action to expression's list of parse actions. See L{I{setParseAction}}.R8(R%RRMR!R8(RRNRO((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytaddParseAction's$$cCs ||_|S(sDefine 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{ParseFatalException} if it is desired to stop parsing immediately.(R&(Rtfn((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt setFailAction-s cCsqt}xd|o\t}xO|iD]D}y(x!|i||\}}t}q,Wq tj oq Xq Wq W|S(N(RRR/RJR(RRRt exprsFoundtetdummy((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt_skipIgnorables:s  cCsw|io|i||}n|ioI|i}t|}x1||jo|||jo|d7}qBWn|S(Ni(R/RWR*R+R(RRRtwttinstrlen((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytpreParseGs    cCs |gfS(N((RRRRE((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt parseImplSscCs|S(N((RRRt tokenlist((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt postParseVsc Cs|i}|p |ioW|ido|id|||n|o |io|i||}n|}|}yWy|i|||\}}Wn1tj o%t|t||i |nXWq3t j od} |ido.t i d} |id|||| n|io;| djot i d} n|i|||| nq3Xn|o |io|i||}n|}|}|ip|t|joWy|i|||\}}Wq3tj o%t|t||i |q3Xn|i|||\}}|i|||}t||id|id|i} |io[|p |ioJ|oyuxn|iD]c} | ||| }|dj o>t||id|iot|ttfd|i} qqWWqt j oF|ido.t i d} |id|||| nqXqxr|iD]c} | ||| }|dj o>t||id|iot|ttfd|i} qfqfWn|o3|ido!|id||||| q n|| fS(NiiiRR(R0R&R5R7RZR[RRRR3RRtsystexc_infoR2R]RR(R)R4R%R8RkR( RRRRERFt debuggingtpreloct tokensStartttokensterrt retTokensRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt _parseNoCacheZs~ '   '$       %cCsPy|i||dtdSWn+tj ot|||i|nXdS(NREi(RJRRRR3(RRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyttryParsescCs|||||f}|tijo@ti|}t|to |n|d|difSyA|i||||}|d|difti|<|SWn3tj o'tid}|ti|<nXdS(Nii( Rt _exprArgCacheRkt ExceptionRRfRR^R_(RRRRERFtlookupRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt _parseCaches  ! cCstiidS(N(RRhtclear(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt resetCachescCs'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_packratEnabledRRkRJ(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt enablePackrats  cCsti|ip|inx|iD]}|iq,W|ip|i}nyY|i|d\}}|o6|i||}t t }|i||nWn:t j o.ti oqt id}|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{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} iiN(RRmR1t streamlineR/R.t expandtabsRJRZRR$Rtverbose_stacktraceR^R_(RRtparseAllRURRctseR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt parseStrings(      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 ioqtid}|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(R1RpR/R.RpRqRRZRJRRmRRRRrR^R_(RRt maxMatchestoverlapRURYRt preparseFntparseFntmatchesRatnextLocRctnextlocR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt scanString sH             c CsJg}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 ioqFtid} | nXdS(sExtension to C{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.iRiN(RR.R}RRkRRRRRMRpt_flattenRRRrR^R_( RRRtlastEttRgRURhtoR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyttransformString?s,  ,  c Csy>tg}|i||D]\}}}||q~SWn:tj o.tioq{tid}|nXdS(sAnother extension to C{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. iN(RR}RRRrR^R_(RRRvRhRRgRUR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt searchStringas> cCset|tot|}nt|tp%tidt|tdddSt ||gS(s*Implementation of + operator - returns Ands4Cannot combine element of type %s with ParserElementt stackleveliN( RkRRRtwarningstwarnttypet SyntaxWarningRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRps cCs]t|tot|}nt|tp%tidt|tdddS||S(sHImplementation of + operator when left operand is not a C{ParserElement}s4Cannot combine element of type %s with ParserElementRiN( RkRRRRRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRzs cCsnt|tot|}nt|tp%tidt|tdddSt |t i |gS(s<Implementation of - operator, returns C{And} with error stops4Cannot combine element of type %s with ParserElementRiN( RkRRRRRRRRRt _ErrorStop(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__sub__s cCs]t|tot|}nt|tp%tidt|tdddS||S(sHImplementation of - operator when left operand is not a C{ParserElement}s4Cannot combine element of type %s with ParserElementRiN( RkRRRRRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/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 + 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{ZeroOrMore(expr)} - C{expr*(1,None)} is equivalent to C{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(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs N(NN( RkRttupleRR.RRRt ValueErrorR(RRt minElementst optElementsR((RRs:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__mul__sD%  ( *   !  cCs |i|S(N(R(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__rmul__scCset|tot|}nt|tp%tidt|tdddSt ||gS(s4Implementation of | operator - returns C{MatchFirst}s4Cannot combine element of type %s with ParserElementRiN( RkRRRRRRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__or__s cCs]t|tot|}nt|tp%tidt|tdddS||BS(sHImplementation of | operator when left operand is not a C{ParserElement}s4Cannot combine element of type %s with ParserElementRiN( RkRRRRRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__ror__s cCset|tot|}nt|tp%tidt|tdddSt ||gS(s,Implementation of ^ operator - returns C{Or}s4Cannot combine element of type %s with ParserElementRiN( RkRRRRRRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__xor__s cCs]t|tot|}nt|tp%tidt|tdddS||AS(sHImplementation of ^ operator when left operand is not a C{ParserElement}s4Cannot combine element of type %s with ParserElementRiN( RkRRRRRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__rxor__s cCset|tot|}nt|tp%tidt|tdddSt ||gS(s.Implementation of & operator - returns C{Each}s4Cannot combine element of type %s with ParserElementRiN( RkRRRRRRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__and__s cCs]t|tot|}nt|tp%tidt|tdddS||@S(sHImplementation of & operator when left operand is not a C{ParserElement}s4Cannot combine element of type %s with ParserElementRiN( RkRRRRRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__rand__s cCs t|S(s0Implementation of ~ operator - returns C{NotAny}(R(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt __invert__scCs |i|S(sShortcut for C{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}. (RB(RR((s:/opt/alt/python27/lib/python2.7/site-packages/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((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytsuppress*scCs 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((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytleaveWhitespace0s cCst|_||_t|_|S(s/Overrides the default whitespace chars (RR*R+RR,(RR#((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytsetWhitespaceChars8s   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((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt parseWithTabs@s 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. (RkR&R/RR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytignoreGs cCs4|pt|pt|ptf|_t|_|S(sBEnable display of debugging messages while doing pattern matching.(RRRR5RR0(Rt startActiont successActiontexceptionAction((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytsetDebugActionsSs    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.(RRRRRR0(Rtflag((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytsetDebug[s cCs|iS(N(R(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRdscCs t|S(N(Rp(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRgscCst|_d|_|S(N(RR1RR'(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRpjs  cCsdS(N((RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytcheckRecursionoscCs|igdS(sXCheck defined expressions for valid structure, check for infinite recursive definitions.N(R(Rt validateTrace((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytvalidatersc Csy|i}Wn8tj o,t|d}|i}|inXy|i||SWn)tj otid}|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. trbiN(treadRtopentcloseRuRR^R_(Rtfile_or_filenameRst file_contentstfR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt parseFilevs cCstdd|i|S(NRi(RR3(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt getExceptionscCs9|djo|i|_}|Std|dS(Nt myExceptionsno such attribute (RRR(RRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs cCst|to||jp|i|ijSt|to<y!|it|dttSWqtj otSXnt t||jSdS(NRs( RkRt__dict__RRuRpRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__eq__s cCs ||j S(N((RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__ne__scCstt|S(N(thashtid(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__hash__scCs ||jS(N((RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__req__scCs ||j S(N((RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__rne__s(DR}R~RR"RRrR$t staticmethodRRR=RBRRLRPRQRSRWRZR[R]RfRgRkRJRhRmRnRoRut_MAX_INTR}RRRRRRRRRRRRRRRRRRRRRRRRRRpRRRRRRRRRR(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs          M      .3 "  D                  cBs eZdZdZdZRS(sJAbstract C{ParserElement} subclass, for defining atomic matching patterns.cCstt|idtdS(NR9(RR'RR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRscCs,tt|i|}d|i|_|S(Ns Expected (RR'R=RR3(RRRg((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR=s(R}R~RRR=(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR's cBseZdZdZRS(s"An empty token, will always match.cCs2tt|id|_t|_t|_dS(NR(RRRRRR-RR2(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs  (R}R~RR(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRscBs#eZdZdZedZRS(sA token that will never match.cCs;tt|id|_t|_t|_d|_dS(NRsUnmatchable token( RRRRRR-RR2R3(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs    cCs%|i}||_||_|dS(N(RRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[s   (R}R~RRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs 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__RpRR3RR-R2(Rt matchString((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs    cCst|||ijo;|idjp|i|i|o||i|ifS|i}||_||_|dS(Ni(RRt startswithRRRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[s&   (R}R~RRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs cBsQeZdZedZeedZedZdZ dZ e e Z 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{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 RRRRRRRRRRR3RR-R2tcaselesstuppert caselessmatchtsett identChars(RRRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs"     cCs{|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|ifS|i }||_ ||_ |dS(Nii( RRRRRRRRRRRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[s $;+&5%   cCs%tt|i}ti|_|S(N(RR RtDEFAULT_KEYWORD_CHARSR(RRi((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s cCs |t_dS(s,Overrides the default Keyword chars N(R R(R#((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytsetDefaultKeywordChars%s( R}R~RR/RRRRR[RRR(((s:/opt/alt/python27/lib/python2.7/site-packages/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 returnStringRR3(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR0s cCs^||||i!i|ijo||i|ifS|i}||_||_|dS(N(RRRRRRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[7s $   (R}R~RRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR+s cBs#eZeidZedZRS(cCs#tt|i||dtdS(NR(RRRR(RRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRAscCs||||i!i|ijoP|t||ijp!|||ii|ijo||i|ifS|i}||_||_|dS(N( RRRRRRRRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[Ds$;   (R}R~R RRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR@scBs>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. iic Cstt|i|odig}|D]} | |jo || q+q+~}|o?dig} |D]} | |jo | | qmqm~ }qn||_t||_|o||_t||_n||_t||_|dj|_ |djot dn||_ |djo ||_ n t |_ |djo||_ ||_ nt||_d|i|_t|_||_d|i|ijo |djo|djo|djo|i|ijodt|i|_nht|idjo,dti|it|if|_n&d t|it|if|_|iod |id |_nyti|i|_Wqd|_qXndS( NRiisZcannot specify a minimum length < 1; use Optional(Word()) if zero-length word is permitteds Expected t s[%s]+s%s[%s]*s [%s][%s]*s\b(RR+RRt initCharsOrigRt initCharst bodyCharsOrigt bodyCharst maxSpecifiedRtminLentmaxLenRRpRR3RR2t asKeywordt_escapeRegexRangeCharstreStringRR6tescapetcompileR( RRRtmintmaxtexactRt excludeCharsRhRit_[2]((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRZsT;C             >  c Cs|io^|ii||}|p%|i}||_||_|n|i}||ifS|||ijo%|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| o%|i}||_||_|n||||!fS(Nii(R6RRRRtendtgroupRRRRRRRRRR( RRRREtresultRtstartRYt bodycharstmaxloctthrowException((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[sJ               (  @    cCsytt|iSWnnX|idjo_d}|i|ijo)d||i||if|_qd||i|_n|iS(NcSs(t|djo |d dS|SdS(Nis...(R(Rg((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt charsAsStrs s W:(%s,%s)sW:(%s)(RR+RR'RRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs )N( R}R~RRRRRR[R(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR+Ns 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"RRkRRRRRtpatterntflagsR6RRt sre_constantsterrortcompiledREtypeRmRRpRR3RR2RR-(RRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs.          c Cs|ii||}|p%|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)|(?:is%s[^%s]t)s|(?:%s)s|(?:%s.)t^s\^t-s\-s([%s])s)*%ss$invalid pattern (%s) passed to Regexs Expected N()RR RRRRRRt SyntaxErrorRt quoteChart quoteCharLentfirstQuoteChart endQuoteChartendQuoteCharLentescChartescQuotetunquoteResultsR6t MULTILINEtDOTALLRRRRRRRRutescCharReplacePatternRRRRRpRR3RR2RR-( RRRRt multilineRRRhRtcharset((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRsf             + 'x ?!  cCs|||ijo|ii||pd}|p%|i}||_||_|n|i}|i}|i ox||i |i !}t |t oP|ioti|id|}n|io|i|i|i}qqn||fS(Ns\g<1>(RR6RRRRRRRRRRRkRRRRRRuR(RRRRERRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[ds 0         $cCsUytt|iSWnnX|idjod|i|if|_n|iS(Ns.quoted string, starting with %s ending with %s(RR RR'RRR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRsN( R}R~RRRRRR[R(((s:/opt/alt/python27/lib/python2.7/site-packages/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|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 (RRRRR*tnotCharsRRRRRpRR3R-R2(RRRRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs           cCs|||ijo%|i}||_||_|n|}|d7}|i}t||it|}x-||jo|||jo|d7}qqW|||ijo%|i}||_||_|n||||!fS(Ni(RRRRRRRR(RRRRERRtnotcharstmaxlen((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[s&           cCszytt|iSWnnX|idjoBt|idjod|id |_qsd|i|_n|iS(Nis !W:(%s...)s!W:(%s)(RRRR'RRR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs(R}R~RRRR[R(((s:/opt/alt/python27/lib/python2.7/site-packages/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{Word} class.sRss ss ss ss s iicCstt|i||_|idig}|iD]!}||ijo ||q6q6~dig}|iD]}|ti|qx~|_t |_ d|i|_ ||_ |djo ||_ n t|_ |djo||_ ||_ ndS(NRs Expected i(RR*Rt matchWhiteRRR+t whiteStrsRRR-R3RRR(RtwsRRRRhRiR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs H7       cCs|||ijo%|i}||_||_|n|}|d7}||i}t|t|}x0||jo"|||ijo|d7}qnW|||ijo%|i}||_||_|n||||!fS(Ni(RRRRRRRR(RRRRERRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[s$      !    (R}R~RRRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR*s t_PositionTokencBseZdZRS(cCs8tt|i|ii|_t|_t|_ dS(N( RRRRR}RRR-RR2(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s (R}R~R(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR scBs,eZdZdZdZedZRS(sXToken to advance to a specific column of input text; useful for tabular report scraping.cCs tt|i||_dS(N(RR RR5(Rtcolno((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRscCst|||ijoyt|}|io|i||}nxJ||jo8||io't|||ijo|d7}qHWn|S(Ni(R5RR/RWtisspace(RRRRY((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRZs  7cCs`t||}||ijot||d|n||i|}|||!}||fS(NsText not in expected column(R5R(RRRREtthiscoltnewlocR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[ s  (R}R~RRRZRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s  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(RRRRRR"RuR3(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR*scCs>tt|i||}||djo|d7}n|S(Ns i(RRRZ(RRRRa((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRZ/scCsj|djp+||i|djp||ddjp%|i}||_||_|n|gfS(Niis (RZRRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[5s     (R}R~RRRZRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR(s  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(RRRRRR"RuR3(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRBscCs|t|joE||djo|ddfS|i}||_||_|nD|t|jo|dgfS|i}||_||_|dS(Ns i(RRRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[Gs       (R}R~RRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR@s cBs#eZdZdZedZRS(sCMatches if current position is at the beginning of the parse stringcCs tt|id|_dS(NsExpected start of text(RR%RR3(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[scCsY|djoB||i|djo%|i}||_||_|qOn|gfS(Ni(RZRRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[_s    (R}R~RRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR%Ys cBs#eZdZdZedZRS(s=Matches if current position is at the end of the parse stringcCs tt|id|_dS(NsExpected end of text(RR$RR3(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRlscCs|t|jo%|i}||_||_|nb|t|jo|dgfS|t|jo |gfS|i}||_||_|dS(Ni(RRRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[ps        (R}R~RRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR$js 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 wordCharsR3(RR ((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRscCsl|djoU||d|ijp|||ijo%|i}||_||_|qbn|gfS(Nii(R RRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[s    (R}R~RRTRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/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 RR*R3(RR ((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs cCst|}|djob||joU|||ijp||d|ijo%|i}||_||_|q{n|gfS(Nii(RR RRR(RRRRERYR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[s    (R}R~RRTRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/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|to ||_n\t|tot|g|_n6yt||_Wntj o|g|_nXt |_ dS(N( RRRRkRtexprsRRRRR7(RR R9((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs cCs |i|S(N(R (RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRscCs|ii|d|_|S(N(R RRR'(RR((s:/opt/alt/python27/lib/python2.7/site-packages/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.(RR*R RR(RRhRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs  - cCst|toV||ijoBtt|i|x)|iD]}|i|idq@Wqn?tt|i|x%|iD]}|i|idqW|S(Ni(RkR&R/RRRR (RRRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs   cCs^ytt|iSWnnX|idjo&d|iit|if|_n|iS(Ns%s:(%s)( RRRR'RRR}RpR (R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRs&cCsptt|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_ qln|S(Niiii(RRRpR RRkRR%R(RR0R'R-R2(RRUR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRps0         cCstt|i||}|S(N(RRRB(RRR@R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRB scCs@||g}x|iD]}|i|qW|igdS(N(R RR(RRttmpRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s  cCsFtt|i}g}|iD]}||iq#~|_|S(N(RRRR (RRRhRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s-(R}R~RRRRRRRRRpRBRR(((s:/opt/alt/python27/lib/python2.7/site-packages/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(cOs'tt|i|||idS(N(RRRR(RRRO((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s(R}R~R(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR scCstt|i||t|_x)|iD]}|ipt|_Pq,q,W|i|di|di |_ t|_ dS(Ni( RRRRR-R RRR+R*R7(RR R9RU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR! s     c CsT|idi|||dt\}}t}x|idD] }t|tio t}q<n|oy|i|||\}}Wq$tj o q$tj o#t i d}t|q$t j o+tt |t ||i|q$Xn|i|||\}}|p |io||7}q<q<W||fS(NiRFi(R RJRRkRRRRRR^R_RRRR3R( RRRREt resultlistt errorStopRUt exprtokensR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[, s*(-cCs-t|tot|}n|i|S(N(RkRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRE scCsB||g}x-|iD]"}|i||ipPqqWdS(N(R RR-(RRtsubRecCheckListRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRJ s    cCsqt|do|iS|idjoBddig}|iD]}|t|q?~d|_n|iS(NRt{Rt}(R<RR'RRR Rp(RRhRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRQ s B( R}R~RRRRRR[RRR(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR 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. cCsRtt|i||t|_x)|iD]}|iot|_Pq,q,WdS(N(RRRRR-R R(RR R9RU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR` s    c CsEd}d}d}x|iD]}y|i||}Wntj o:tid} | i|jo| }| i}qqtj oHt||jo.t|t||i |}t|}qqX||jo|}|} qqW|djo0|dj o |q2t||d|n| i |||S(Niiis no defined alternatives to match( RR RgRR^R_RRRR3RJ( RRRREt maxExcLoct maxMatchLoct maxExceptionRUtloc2Rdt maxMatchExp((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[h s0     cCs-t|tot|}n|i|S(N(RkRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__ixor__ scCsqt|do|iS|idjoBddig}|iD]}|t|q?~d|_n|iS(NRRs ^ R(R<RR'RRR Rp(RRhRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s BcCs3||g}x|iD]}|i|qWdS(N(R R(RRRRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s ( R}R~RRRRR[RRR(((s:/opt/alt/python27/lib/python2.7/site-packages/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. cCsftt|i|||o9t|_x6|iD]}|iot|_Pq3q3Wn t|_dS(N(RRRRR-R R(RR R9RU((s:/opt/alt/python27/lib/python2.7/site-packages/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 |nt||d|dS(Nis no defined alternatives to match(RR RJRRRRR3( RRRRERRRURRd((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[ s$   cCs-t|tot|}n|i|S(N(RkRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt__ior__ scCsqt|do|iS|idjoBddig}|iD]}|t|q?~d|_n|iS(NRRs | R(R<RR'RRR Rp(RRhRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s BcCs3||g}x|iD]}|i|qWdS(N(R R(RRRRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s ( R}R~RRRRR[RRR(((s:/opt/alt/python27/lib/python2.7/site-packages/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. cCsdtt|i||t|_x)|iD]}|ipt|_Pq,q,Wt|_t|_dS(N( RRRRR-R RR*tinitExprGroups(RR R9RU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s      cCs|iofg}|iD]$}t|to||iqq~}g}|iD](}|io||jo ||qSqS~}|||_g} |iD]$}t|to| |iqq~ |_g} |iD]$}t|t o| |iqq~ |_ g} |iD]*}t|ttt fp | |qq~ |_ |i |i 7_ t |_n|} |i } |i}g}t }x|o| ||i|i }g}x|D]}y|i|| } Wn tj o|i|qX|i||| jo| i|q||jo|i|qqWt|t|jo t }qqW| oJdig}| D]}|t|q~}t||d|n|g}|iD]1}t|to|i|jo ||qq~7}g}x6|D].}|i|||\}}|i|q#Wtg}x|D]}h}xY|iD]K}||ijo2t||}|t||7}|||>D      0L   cCsqt|do|iS|idjoBddig}|iD]}|t|q?~d|_n|iS(NRRs & R(R<RR'RRR Rp(RRhRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s BcCs3||g}x|iD]}|i|qWdS(N(R R(RRRRU((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR& s (R}R~RRRR[RR(((s:/opt/alt/python27/lib/python2.7/site-packages/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(RRRRkRRRRR'R2R-RR+R*R)R7R/textend(RRR9((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR. s        cCsI|idj o|ii|||dtStd||i|dS(NRFR(RRRJRRR3(RRRRE((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[= scCs@t|_|ii|_|idj o|iin|S(N(RR*RRRR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRC s  cCst|toY||ijoEtt|i||idj o|ii|idqeqnBtt|i||idj o|ii|idn|S(Ni(RkR&R/RRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRJ s#cCs8tt|i|idj o|iin|S(N(RRRpRR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRpV scCsZ||jot||gn||g}|idj o|ii|ndS(N(R!RRR(RRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR\ s  cCsC||g}|idj o|ii|n|igdS(N(RRRR(RRR ((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRc scCsnytt|iSWnnX|idjo6|idj o&d|iit|if|_n|iS(Ns%s:(%s)( RRRR'RRRR}Rp(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRi s &( R}R~RRRRR[RRRpRRR(((s:/opt/alt/python27/lib/python2.7/site-packages/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|i|t|_dS(N(RR RRR-(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRy scCs|ii|||gfS(N(RRg(RRRRE((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[} s(R}R~RRRR[(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR t 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, ( RRRRR*RR-RpRR3(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s  cCs^y|ii||Wnttfj on#X|i}||_||_||gfS(N(RRgRRRRR(RRRRER((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[ s   cCsMt|do|iS|idjodt|id|_n|iS(NRs~{R(R<RR'RRpR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s (R}R~RRRR[R(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s  cBs8eZdZdZedZdZedZRS(s<Optional repetition of zero or more of the given expression.cCs#tt|i|t|_dS(N(RR.RRR-(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR sc Csg}y|ii|||dt\}}t|idj}xf|o|i||}n|}|ii|||\}}|p |io||7}qEqEWnttfj onX||fS(NRFi( RRJRRR/RWRRR(RRRRERcthasIgnoreExprsRat tmptokens((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[ s$cCsMt|do|iS|idjodt|id|_n|iS(NRRs]...(R<RR'RRpR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s cCs(tt|i||}t|_|S(N(RR.RBRR)(RRR@R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRB s ( R}R~RRRR[RRRB(((s:/opt/alt/python27/lib/python2.7/site-packages/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( RRJRRR/RWRRR(RRRRERcR3RaR4((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR[ s$cCsMt|do|iS|idjodt|id|_n|iS(NRRs}...(R<RR'RRpR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s cCs(tt|i||}t|_|S(N(RRRBRR)(RRR@R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRB s (R}R~RRR[RRRB(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s  t _NullTokencBs eZdZeZdZRS(cCstS(N(R(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR scCsdS(NR((R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s(R}R~RR R(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR5 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(NR9(RRRRRRR-(RR tdefault((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s c Csy(|ii|||dt\}}Wnuttfj oc|itj oF|iio)t|ig}|i||ii|SdS(N(RRRR R(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s  N( R}R~RRRRARRpRRR(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR Z s       RCcBseZdZRS(cCsdS(Ns...((R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s(R}R~R(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRC scBseZdZedZRS(sGAbstract subclass of C{ParseExpression}, for converting parsed results.cCs#tt|i|t|_dS(N(RR(RRR)(RRR9((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s(R}R~RRR(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR( scBs eZdZdZdZRS(s,Converter to upper case all matching tokens.cGs0tt|i|tidtdddS(NsAUpcase class is deprecated, use upcaseTokens parse action insteadRi(RR)RRRtDeprecationWarning(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s cCsttti|S(N(RRMtstringR(RRRR\((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR] s(R}R~RRR](((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR) s cBs/eZdZdedZdZdZRS(sConverter to concatenate all matching tokens to a single string. By default, the matching patterns must also be contiguous in the input string; this can be disabled by specifying C{'adjacent=False'} in the constructor. RcCsStt|i||o|in||_t|_||_t|_dS(N( RRRRtadjacentRR*t joinStringR7(RRRHRG((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s   cCs8|ioti||ntt|i||S(N(RGRRRR(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s cCst|i}|2|tdi|i|igd|i7}|io!t|idjo|gS|SdS(NRRi( RRRRRHR4R(RR(RRRR\tretToks((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR] s  1#(R}R~RRRRR](((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s cBs eZdZdZdZRS(s}Converter to return the matched tokens as a list - useful for returning tokens of C{ZeroOrMore} and C{OneOrMore} expressions.cCs#tt|i|t|_dS(N(RR RRR)(RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR scCs|gS(N((RRRR\((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR] s(R}R~RRR](((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s cBs eZdZdZdZRS(sConverter to return a repetitive expression as a list, but also as a dictionary. Each element can also be referenced using the first token in the expression as its key. Useful for tabular report scraping when the first column can be used as a item key. cCs#tt|i|t|_dS(N(RRRRR)(RR ((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR scCscxFt|D]8\}}t|djoq n|d}t|tot|di}nt|djotd|||>entering %s(line: '%s', %d, %s) is<gS(Ni(R RR?(RgRPRR(Rt arrayExpr(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytcountFieldParseActionI s /cSst|dS(i(R(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRjN starrayLenR8N( R RR+RPRPRR=RQR(RtintExprR^((RR]s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR8A s    cCsOg}xB|D]:}t|to|it|q |i|q W|S(N(RkRR2R~R(tLRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR~U 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(RR~RRRR(RgRPRttflatRhttt(trep(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytcopyTokenToRepeaterk s 3R8(R RQR(RRe((Rds:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRM^ s  csCt|i}|>fd}|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(R~RR(RgRPRt theseTokens(t matchTokens(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytmustMatchTheseTokens s R8(R~RRPR(RgRPRRh(Rd(Rgs:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRe sR8(R RRQR(Rte2Re((Rds:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRLx s  cCsUx$dD]}|i|t|}qW|idd}|idd}t|S(Ns\^-]s s\ns s\t(Rut_bslashRp(RgRi((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR s c CsH|od}d}t}nd}d}t}t|ttfot|}n7t|to|i}ntidt ddd}x|t |d jo||}xt ||d D]j\} } || |o||| d =Pq||| o*||| d =|i || | }PqqW|d 7}qW| o|oyt |t d i |jo9td d i g} |D]} | t| q~ Std i g} |D]} | ti| q~ SWqtid t ddqXntg}|D]} ||| q+~S(soHelper 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{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((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj scSs|ii|iS((RR(RRk((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj scSs ||jS(((RRk((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj scSs |i|S((R(RRk((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj ss2Invalid argument to oneOf, expected string or listRiiiRs[%s]t|s7Exception creating Regex for oneOf, building MatchFirst(RRRkRRRRsRRRRRRRR"RR6RR(tstrsRtuseRegextisequaltmaskstparseElementClasstsymbolsRtcurRRRhtsymRR!((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRQ sJ           "9; 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{Dict}, C{ZeroOrMore}, and C{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((s:/opt/alt/python27/lib/python2.7/site-packages/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{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(((RgRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj st_original_startt _original_endcSs||i|i!S((RuRv(RgRPR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj scSs3|2|id||i|i!|d=|d=dS(NiRuRv(RRuRv(RgRPR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt extractText s(RRPRRR7(RtasStringt locMarkert endlocMarkert matchExprRw((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRe s     cCst|idS(siHelper to undo pyparsing's default grouping of And expressions, even if all but one are non-empty.cSs|dS(i((R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj s(R(RP(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytungroup ss\[]-*.$+^?()~ RcCs |ddS(ii((RgRPR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj ss\]s\\0?[xX][0-9a-fA-F]+cCstt|dddS(iii(tunichrR(RgRPR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj ss \\0[0-7]+cCstt|dddS(iii(R}R(RgRPR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj siRRRtnegatetbodyRcCsft|toRdig}tt|dt|ddD]}|t|qB~p|S(Rii(RkRRRtordR}(tpRhRi((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj sc CsMy>dig}ti|iD]}|t|q ~SWndSXdS(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.) RN(Rt_reBracketExprRuRt _expanded(RgRhtpart((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR] 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(RtlocnR(R(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt verifyCol, s((RR((Rs:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRK( scsfd}|S(sHelper method for common parse actions that simply return a literal value. Especially useful when used with C{transformString()}. csgS(N((R(treplStr(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt _replFunc5 s((RR((Rs:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRZ1 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((RgRPR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRX9 scCs.g}tt|D]}||iq~S(s4Helper parse action to convert tokens to upper case.(RMRpR(RgRPRRhRc((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRb@ scCs.g}tt|D]}||iq~S(s4Helper parse action to convert tokens to lower case.(RMRptlower(RgRPRRhRc((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR>D scCsNy t}Wntj otdnX|2|t|||!7}|S(sDEPRECATED - use new helper method C{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(R@RRR(RgR<RR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRDH 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.iNiiRfiRsRincorrect usage of getTokensEndLoc - may only be called from within a parse action(tinspecttstacktf_localsR(RtfstackRR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyR@T s    c Csbt|to|}t|d| }n |i}tttd}|otii t }t d|dt t t|t d|tddtgidi d t d }nd ig}tD]}|d jo ||qq~}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_-:Rttagt=t/R6R?cSs|ddjS(iR((RgRPR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRjq sRRcSs|ddjS(iR((RgRPR((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRjx ssRs(RkRR RR+R0R/R:RRPRXR&RR.R RRRBRRTRWR>Rt_LRuttitleRsR=R( ttagStrtxmltresnamet tagAttrNamet tagAttrValuetopenTagRhRitprintablesLessRAbracktcloseTag((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt _makeTagsd s" p;{AA  cCs t|tS(sRHelper to construct opening and closing tag expressions for HTML, given a tag name(RR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRI scCs t|tS(sQHelper to construct opening and closing tag expressions for XML, given a tag name(RR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRJ scs^|o |n |ig}D]\}}|||fq)~fd}|S(s Helper to create a validating parse action to be used with start tags created with C{makeXMLTags} or C{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. 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'(RRct ANY_VALUE(RgRPRctattrNamet attrValue(tattrs(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytpa s  ! (R(RtattrDictRhRRR((Rs:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRc s   -cCs/t}|td|tdB}xt|D]\}}|d d \}}}} |djo@|d jpt|djotdn|\} } nt} |tijo|djo(t||t |t |} q|djoe|d j o0t|||t |t ||} qt||t |t |} q|djo:t|| || |t || || |} qtdn8|ti jo|djoEt |t pt |}nt|i| t || } q|djoe|d j o0t||| t |t || } qt|| t |t | } q|djo:t|| | | | t || | | | } qtdn td | o| i| n| | |B>| }q4W||>|S( s#Helper method for constructing grammars of expressions made up of operators working in a precedence hierarchy. Operators may be unary or binary, left- or right-associative. Parse actions can also be attached to operator expressions. 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 opAssoc.RIGHT and opAssoc.LEFT. - parseAction is the parse action to be associated with expressions matching this operator expression (the parse action tuple member may be omitted) t(Riiis@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 R&RRRRRRtLEFTR R RtRIGHTRkRRRP(tbaseExprtopListRtlastExprRtoperDeftopExprtaritytrightLeftAssocRtopExpr1topExpr2tthisExprR{((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRS 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 quotestuRRcCs||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 o4|tt|t||B|Bt|>n-|tt|t||Bt|>|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(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRjscSs|diS(i(R(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRjscSs|diS(i(R(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj scSs|diS(i(R(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRj$ssOopening and closing arguments must be strings if no content expression is givenN(RRRkRRRRRRR"RPR?RRR R R&R.(topenertclosertcontentR8R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRN s2   &  $    4,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(RgRPRtcurCol(t indentStack(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytcheckPeerIndent>scsGt||}|djoi|nt||ddS(Nisnot a subentry(R5RR(RgRPRR(R(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pytcheckSubIndentFscst|t|jodSt||}o|djo|djpt||dnidS(Niisnot an unindent(RR5RR(RgRPRR(R(s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt checkUnindentMs )s ( RRRRRRPR RRRj( tblockStatementExprRRRRRtNLtINDENTtPEERtUNDENTtsmExpr((Rs:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRd.s9 $s#[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]s[\0xa1-\0xbf\0xd7\0xf7]s_:Rqsgt lt amp nbsp quottentityRrs><& "cCs"|itjot|ipdS(N(Rt_htmlEntityMapR(R((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyRjhss/\*(?:[^*]*\*+)+?/sC style commentss.*s \/\/(\\\n|.)*s // comments:/(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?s tokens = stokens.columns = stokens.tables = tSQLiRR(( t simpleSQLRuRRmtcolumnsttablesRRRR^R_RER(t teststringRcR\Rd((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyttest}s   tselecttfroms_$RRR[R>RRsSELECT * from XYZZY, ABCsselect * from SYS.XYZZYsSelect A from Sys.dualsSelect AA,BB,CC from Sys.dualsSelect A, B, C from Sys.dualsXelect A, B, C from Sys.dualsSelect A, B, C frox Sys.dualtSelectsSelect ^^^ frox Sys.duals'Select A, B, C from Sys.dual, Table2 (Rt __version__t__versionTime__t __author__RFtweakrefRRRR^RR6Rt__all__t version_infot_PY3KtmaxsizeRRmRtchrR}Rptascii_lowercasetascii_uppercaseR0tmaxinttxrangeRRt lowercaset uppercasetsingleArgBuiltinst __builtin__RstfnameRtgetattrRR{RR|tdigitsRPRAR/RjRRht printableRit whitespaceRTRiRRRRR!RRR5RHRERRRROR!RR'RRRRR RRR+R"R RR*RR RRR%R$R-R,RRRRRRR RR.RR5R7RR#R RCR(R)RR RR&RR`RR<RR8R~RMRLRRRQR=ReR|R=R?RGRFR_R^RPt _escapedPuncRt_printables_less_backslasht_escapedHexChart_escapedOctChart _singleChart _charRangeRBRRR]RKRZRXRbR>RDR@RRIRJRcRRRRRRSR:R\RWRaRNRdR1RUR3R2RpR7RfRtRRYR4RBRR[R;R9RCRVR!t _noncommat _commasepitemR6R}Rt selectTokent fromTokentidentt columnNametcolumnNameListt tableNamet tableNameListR(((s:/opt/alt/python27/lib/python2.7/site-packages/pyparsing.pyt;s                   A0  a       <CtF9eE>;XH$'" "AH   "      ;  !;@                G4 4  /  ;8+