Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
ó 2–Sce@s” dZdZdZdZddlZddlmZddlZddl Z ddl Z ddl Z ddl 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 jdldmkZerìe jZeZeZeZejejZnAe jZeZdn„ZejejZdo„ZejejZgZ ddl!Z!xEdpj"ƒD]7Z#ye j$e%e!e#ƒƒWne&k r‚qLnXqLWdq„Z'dre(fds„ƒYZ)ej*Z+e+dtZ,ee+Z-eduƒZ.dvj/gej0D]Z1e1ej2krúe1^q߃Z3de4fdw„ƒYZ5d e5fdx„ƒYZ6d"e5fdy„ƒYZ7d$e7fdz„ƒYZ8d'e4fd{„ƒYZ9d|e(fd}„ƒYZ:d#e(fd~„ƒYZ;d„Z<d€„Z=d�„Z>d‚„Z?dƒ„Z@d„„ZAd…„ZBe ròdmd†„ZCn dmd‡„ZCd%e(fdˆ„ƒYZDd-eDfd‰„ƒYZEdeEfdŠ„ƒYZFdeEfd‹„ƒYZGdeEfdŒ„ƒYZHeHZIdeEfd�„ƒYZJd eHfdŽ„ƒYZKdeJfd�„ƒYZLd1eEfd�„ƒYZMd(eEfd‘„ƒYZNd&eEfd’„ƒYZOd eEfd“„ƒYZPd0eEfd”„ƒYZQd•eEfd–„ƒYZRdeRfd—„ƒYZSdeRfd˜„ƒYZTdeRfd™„ƒYZUd+eRfdš„ƒYZVd*eRfd›„ƒYZWd3eRfdœ„ƒYZXd2eRfd�„ƒYZYd!eDfdž„ƒYZZdeZfdŸ„ƒYZ[deZfd „ƒYZ\deZfd¡„ƒYZ]d eZfd¢„ƒYZ^deDfd£„ƒYZ_de_fd¤„ƒYZ`de_fd¥„ƒYZad4e_fd¦„ƒYZbde_fd§„ƒYZcd¨e(fd©„ƒYZdedƒZede_fdª„ƒYZfd)e_fd«„ƒYZgde_fd¬„ƒYZhd­ehfd®„ƒYZid.e_fd¯„ƒYZjd/ejfd°„ƒYZkd ejfd±„ƒYZldejfd²„ƒYZmd ejfd³„ƒYZnd,ejfd´„ƒYZode(fdµ„ƒYZpd¶„Zqd·erd¸„Zsetd¹„Zudº„Zvd»„Zwd¼„Zxd½„Zyerezd¾„Z{d¿„Z|ezdÀ„Z}dÁ„Z~eFƒjdEƒZ€eTƒjdMƒZ�eUƒjdLƒZ‚eVƒjdeƒZƒeWƒjddƒZ„eMe.dÂdÃdmƒj…dÄ„ƒZ†dvj/ge3D]Z1e1dÅkrÔe1^q¼ƒZ‡eNdƃj…dÇ„ƒZˆeNdȃj…dÉ„ƒZ‰e†eˆBe‰BeMe‡dÃdʃBZŠemeŠeod˃eŠƒZ‹eHd̃efd̓jŒd΃emece‹eŠBƒƒjŒdσdÐZ�dÑ„ZŽdÒ„Z�dÓ„Z�dÔ„Z‘dÕ„Z’dÖ„Z“dׄZ”dØ„Z•dÙ„Z–dÚ„Z—dÛ„Z˜dÜ„Z™dÝ„Zše(ƒeš_›e)ƒZœe(ƒeœ_�e(ƒeœ_ždÞ„ZŸeNd߃jdàƒZ eNdáƒjdâƒZ¡eNdãƒjdäƒZ¢eleIdåƒe¢jƒƒZ£dædçete¢jƒdè„Z¤ezdé„Z¥e�dêƒZ¦e�dëƒZ§e˜eMee-d샃\Z¨Z©eleIdíƒe{dîƒjŒdïƒdðƒjªƒZ«e¬e­dîj"ƒdñƒƒZ®dò„Z¯eNdóƒjdôƒZ°eNdõƒZ±eNdöƒj²ƒZ³eNd÷ƒjdøƒZ´eNdùƒjdúƒZµeµZ¶eNdûƒjdüƒZ·dvj/ge3D]Z1e1d·krÙ e1^qÁ ƒZ¸eleceMe¸ƒefeMdýƒeHd·ƒeUƒƒƒƒjªƒjdþƒZ¹esefe¢jƒe¹Bdÿdvƒƒjd<ƒZºe»dkr� d„Z¼eKdƒZ½eKdƒZ¾eMee-dƒZ¿ese¿ddezƒj…e“ƒZÀemeseÀƒƒZÁese¿ddezƒj…e“ƒZÂemeseƒƒZÃe½deÁBjŒdƒe¾eÃjŒd ƒZÄe¼d ƒe¼d ƒe¼d ƒe¼d ƒe¼dƒe¼dƒe¼dƒe¼dƒe¼dƒe¼dƒe¼dƒndS(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 iÿÿÿÿN(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]}|df^q ƒS(Ni(tdict(tstc((s-/usr/lib/python2.7/site-packages/pyparsing.pytlscCs@t|tƒr|Syt|ƒSWntk r;t|ƒ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-/usr/lib/python2.7/site-packages/pyparsing.pyt_ustros  s8sum len enumerate sorted reversed list tuple set any allcCscd}gdjƒD]}d|d^q}x/t||ƒD]\}}|j||ƒ}q=W|S(s/Escape &, <, >, ", ', etc. in a string of data.s&><"'samp gt lt quot apost&t;(tsplittziptreplace(tdatat from_symbolsRgt to_symbolstfrom_tto_((s-/usr/lib/python2.7/site-packages/pyparsing.pyt _xml_escape•s 't _ConstantscBseZRS((t__name__t __module__(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR{Ÿst ABCDEFabcdefi\tcBsPeZdZdd d d„Zd„Zd„Zd„Zdd„Zd„Z RS( s7base exception class for all parsing runtime exceptionsicCsI||_|dkr*||_d|_n||_||_||_dS(NR(tloctNonetmsgtpstrt parserElement(tselfRƒR€R‚telem((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__init__¬s      cCsm|dkrt|j|jƒS|dkr>t|j|jƒS|dkr]t|j|jƒSt|ƒ‚dS(s÷supported 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(RHR€RƒR5REtAttributeError(R…taname((s-/usr/lib/python2.7/site-packages/pyparsing.pyt __getattr__¶s   cCs d|j|j|j|jfS(Ns"%s (at char %d), (line:%d, col:%d)(R‚R€RHRˆ(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__str__ÅscCs t|ƒS(N(Ro(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__repr__Èss>!}) cCs/t||ƒr|Stj|ƒ}t|_|S(N(Rjtobjectt__new__tTruet_ParseResults__doinit(tclsttoklisttnametasListtmodaltretobj((s-/usr/lib/python2.7/site-packages/pyparsing.pyR£s  cCs„|jrdt|_d|_d|_i|_||tƒrI||_n |g|_tƒ|_ n|dk r€|r€|sŒd|j|s  cCsÁ||tƒrB|jj|tƒƒ|g|j|<|d}nZ||tƒrg||j|<|}n5|jj|tƒƒt|dƒg|j|<|}||tƒr½t|ƒ|_ndS(Ni( RšR²tgetR°R³R±RtwkrefR®(R…tkRºRjtsub((s-/usr/lib/python2.7/site-packages/pyparsing.pyt __setitem__Gs&   /c Cst|ttfƒrt|jƒ}|j|=t|tƒrl|dkrV||7}nt||dƒ}ntt|j|ƒŒƒ}|jƒx||j D]d}|j |}xN|D]F}x=t |ƒD]/\}\}} t || | |kƒ||s||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 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(RÀtrfind(R€tstrg((s-/usr/lib/python2.7/site-packages/pyparsing.pyR5ms 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 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(R€R ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRHys cCsR|jdd|ƒ}|jd|ƒ}|dkrB||d|!S||dSdS(sfReturns the line of text containing loc within a string, counting newlines as line separators. s iiN(R tfind(R€R tlastCRtnextCR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRE…s  cCsAdt|ƒdt|ƒdt||ƒt||ƒfGHdS(NsMatch s at loc s(%d,%d)(RoRHR5(tinstringR€texpr((s-/usr/lib/python2.7/site-packages/pyparsing.pyt_defaultStartDebugAction�scCs'dt|ƒdt|jƒƒGHdS(NsMatched s -> (RoRlR©(RtstartloctendlocRttoks((s-/usr/lib/python2.7/site-packages/pyparsing.pyt_defaultSuccessDebugAction’scCsdt|ƒGHdS(NsException raised:(Ro(RR€Rtexc((s-/usr/lib/python2.7/site-packages/pyparsing.pyt_defaultExceptionDebugAction•scGsdS(sG'Do-nothing' debug action, to suppress debugging output during parsing.N((targs((s-/usr/lib/python2.7/site-packages/pyparsing.pyRO˜scs"dg‰‡‡‡fd†}|S(Nics]xVyˆ|ˆdŒSWqtk rUˆdˆkrOˆdcd7d5„Z?d6„Z@d7„ZAd8„ZBd9„ZCRS(:s)Abstract base level parser element class.s cCs |t_dS(s/Overrides the default whitespace chars N(RtDEFAULT_WHITE_CHARS(tchars((s-/usr/lib/python2.7/site-packages/pyparsing.pytsetDefaultWhitespaceChars¾scCsÁtƒ|_d|_d|_d|_||_t|_t j |_ t|_ t |_t |_tƒ|_t |_t |_t|_d|_t|_d|_d|_t|_t |_dS(NR(NNN(R°t parseActionR�t failActiontstrReprt resultsNamet saveAsListR¤tskipWhitespaceRR!t whiteCharstcopyDefaultWhiteCharsR¬tmayReturnEmptytkeepTabst ignoreExprstdebugt streamlinedt mayIndexErrorterrmsgt modalResultst debugActionstret callPreparset callDuringTry(R…tsavelist((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡Äs(                   cCsEtj|ƒ}|j|_|j|_|jrAtj|_n|S(s§Make a copy of this C{ParserElement}. Useful for defining different parse actions for the same parsing pattern, using copies of the original parse element.(RµR$R.R+RR!R*(R…tcpy((s-/usr/lib/python2.7/site-packages/pyparsing.pyRµÛs    cCs>||_d|j|_t|dƒr:|j|j_n|S(s6Define name for this expression, for use in debugging.s Expected t exception(R¨R2thasattrR:R‚(R…R¨((s-/usr/lib/python2.7/site-packages/pyparsing.pytsetNameås  cCsE|jƒ}|jdƒr.|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ÿÿÿÿ(RµtendswithR¤R'R3(R…R¨tlistAllMatchestnewself((s-/usr/lib/python2.7/site-packages/pyparsing.pytsetResultsNameís     csa|r9|j‰tt‡fd†}ˆ|_||_n$t|jdƒr]|jj|_n|S(s¦Method 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(RR€t doActionst callPreParseRB(t _parseMethod(s-/usr/lib/python2.7/site-packages/pyparsing.pytbreakers  t_originalParseMethod(t_parseR¤RHR;(R…t breakFlagRG((RFs-/usr/lib/python2.7/site-packages/pyparsing.pytsetBreaks   cOs;tttt|ƒƒƒ|_d|ko1|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. R7(R°tmapR R$R7(R…tfnstkwargs((s-/usr/lib/python2.7/site-packages/pyparsing.pytsetParseActionscOsJ|jtttt|ƒƒƒ7_|jp@d|ko@|d|_|S(saAdd parse action to expression's list of parse actions. See L{I{setParseAction}}.R7(R$R°RLR R7(R…RMRN((s-/usr/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%(R…tfn((s-/usr/lib/python2.7/site-packages/pyparsing.pyt setFailAction-s cCsmt}x`|rht}xM|jD]B}y(x!|j||ƒ\}}t}q+Wqtk r`qXqWq W|S(N(R¤R¬R.RIR(R…RR€t exprsFoundtetdummy((s-/usr/lib/python2.7/site-packages/pyparsing.pyt_skipIgnorables:s    cCsp|jr|j||ƒ}n|jrl|j}t|ƒ}x-||krh|||krh|d7}q?Wn|S(Ni(R.RVR)R*RÀ(R…RR€twttinstrlen((s-/usr/lib/python2.7/site-packages/pyparsing.pytpreParseGs    cCs |gfS(N((R…RR€RD((s-/usr/lib/python2.7/site-packages/pyparsing.pyt parseImplSscCs|S(N((R…RR€t tokenlist((s-/usr/lib/python2.7/site-packages/pyparsing.pyt postParseVsc Csç|j}|s|jr_|jdr?|jd|||ƒn|rc|jrc|j||ƒ}n|}|}yUy|j|||ƒ\}}Wn/tk rÂt|t|ƒ|j |ƒ‚nXWqt k r[d} |jdrt j ƒd} |jd|||| ƒn|jrU| dkr<t j ƒd} n|j|||| ƒn‚qXnº|rƒ|jrƒ|j||ƒ}n|}|}|jsª|t|ƒkrþy|j|||ƒ\}}Wqtk rút|t|ƒ|j |ƒ‚qXn|j|||ƒ\}}|j|||ƒ}t||jd|jd|jƒ} |jr§|sj|jr§|r6yrxk|jD]`} | ||| ƒ}|dk r}t||jd|joËt|ttfƒd|jƒ} q}q}WWq¤t k r2|jdr,t j ƒd} |jd|||| ƒn‚q¤Xq§xn|jD]`} | ||| ƒ}|dk r@t||jd|joŽt|ttfƒd|jƒ} q@q@Wn|rÝ|jdrÝ|jd||||| ƒqÝn|| fS(NiiiR©Rª(R/R%R4R6RYRZR¸RRÀR2RR�tsystexc_infoR1R\RR'R(R3R$R7RjR°( R…RR€RDREt debuggingtpreloct tokensStartttokensterrt retTokensRQ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt _parseNoCacheZsz   &      %$        #cCsNy|j||dtƒdSWn)tk rIt|||j|ƒ‚nXdS(NRDi(RIR¬RRR2(R…RR€((s-/usr/lib/python2.7/site-packages/pyparsing.pyttryParse§s cCsÚ|||||f}|tjkratj|}t|tƒrI|‚n|d|djƒfSyA|j||||ƒ}|d|djƒftj|<|SWn1tk rÕtjƒd}|tj|<‚nXdS(Nii( Rt _exprArgCacheRjt ExceptionRµReRR]R^(R…RR€RDREtlookupRÉR—((s-/usr/lib/python2.7/site-packages/pyparsing.pyt _parseCache¯s  !  cCstjjƒdS(N(RRgtclear(((s-/usr/lib/python2.7/site-packages/pyparsing.pyt resetCacheÄscCs%tjs!tt_tjt_ndS(sÕEnables "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_packratEnabledR¤RjRI(((s-/usr/lib/python2.7/site-packages/pyparsing.pyt enablePackratÉs  cCsîtjƒ|js |jƒnx|jD]}|jƒq*W|jsV|jƒ}nyW|j|dƒ\}}|r¬|j||ƒ}t ƒt ƒ}|j||ƒnWn6t k råtj rÌ‚qêt jƒd}|‚nX|SdS(s«Execute 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(RRlR0t streamlineR.R-t expandtabsRIRYRR$Rtverbose_stacktraceR]R^(R…RtparseAllRTR€RbtseR((s-/usr/lib/python2.7/site-packages/pyparsing.pyt parseStringÞs&       ccs |js|jƒnx|jD]}|jƒq W|jsRt|ƒjƒ}nt|ƒ}d}|j}|j}t j ƒd} yÝxÖ||kra| |kray.|||ƒ} ||| dt ƒ\} } Wnt k rï| d}qŒX| |krT| d7} | | | fV|rK|||ƒ} | |kr>| }qQ|d7}q^| }qŒ| d}qŒWWn6t k r›t jr‚‚qœtjƒd}|‚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.iREiN(R0RoR.R-RoRpRÀRYRIRRlR¬RRRqR]R^(R…Rt maxMatchestoverlapRTRXR€t preparseFntparseFntmatchesR`tnextLocRbtnextlocR((s-/usr/lib/python2.7/site-packages/pyparsing.pyt scanString sD                c Cs3g}d}t|_yáxŽ|j|ƒD]}\}}}|j|||!ƒ|rŸt|tƒrs||jƒ7}qŸt|tƒr�||7}qŸ|j|ƒn|}q(W|j||ƒg|D]}|rÁ|^qÁ}djt t t |ƒƒƒSWn6t k r.t jr‚q/tjƒd}|‚nXdS(süExtension 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(R¤R-R|RëRjRR©R°RŽRLRot_flattenRRRqR]R^( R…RRétlastEttRgRTtoR((s-/usr/lib/python2.7/site-packages/pyparsing.pyttransformString?s*      cCssy6tg|j||ƒD]\}}}|^qƒSWn6tk rntjrU‚qotjƒd}|‚nXdS(söAnother 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|RRRqR]R^(R…RRuRRgRTR((s-/usr/lib/python2.7/site-packages/pyparsing.pyt searchStringas6  cCsat|tƒrt|ƒ}nt|tƒsQtjdt|ƒtddƒdSt ||gƒS(s*Implementation of + operator - returns Ands4Cannot combine element of type %s with ParserElementt stackleveliN( RjR´RRtwarningstwarnttypet SyntaxWarningR�R(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRÝps cCsYt|tƒrt|ƒ}nt|tƒsQtjdt|ƒtddƒdS||S(sHImplementation of + operator when left operand is not a C{ParserElement}s4Cannot combine element of type %s with ParserElementRƒiN( RjR´RRR„R…R†R‡R�(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRæzs cCsjt|tƒrt|ƒ}nt|tƒsQtjdt|ƒtddƒdSt |t j ƒ|gƒS(s<Implementation of - operator, returns C{And} with error stops4Cannot combine element of type %s with ParserElementRƒiN( RjR´RRR„R…R†R‡R�Rt _ErrorStop(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__sub__„s cCsYt|tƒrt|ƒ}nt|tƒsQtjdt|ƒtddƒdS||S(sHImplementation of - operator when left operand is not a C{ParserElement}s4Cannot combine element of type %s with ParserElementRƒiN( RjR´RRR„R…R†R‡R�(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__rsub__Žs csEt|tƒr|d}}n-t|tƒr7|d d }|dd kr_d|df}nt|dtƒrÏ|dd krÏ|ddkrœtˆƒS|ddkr¶tˆƒSˆ|dtˆƒSqLt|dtƒrt|dtƒr|\}}||8}qLtdt|dƒt|dƒƒ‚ntdt|ƒƒ‚|dkrgtdƒ‚n|dkr‚tdƒ‚n||ko™dknr­tdƒ‚n|r‡‡fd †‰|r |dkrꈈ|ƒ}qt ˆg|ƒˆ|ƒ}qAˆ|ƒ}n(|dkr.ˆ}nt ˆg|ƒ}|S( søImplementation 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)cs2|dkr$tˆˆ|dƒƒStˆƒSdS(Ni(R(tn(tmakeOptionalListR…(s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒÉs N(NN( RjR³ttupleR�R.RR·R†t ValueErrorR(R…RÜt minElementst optElementsRÔ((RŒR…s-/usr/lib/python2.7/site-packages/pyparsing.pyt__mul__˜sD#  &  )      cCs |j|ƒS(N(R‘(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__rmul__ÜscCsat|tƒrt|ƒ}nt|tƒsQtjdt|ƒtddƒdSt ||gƒS(s4Implementation of | operator - returns C{MatchFirst}s4Cannot combine element of type %s with ParserElementRƒiN( RjR´RRR„R…R†R‡R�R(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__or__ßs cCsYt|tƒrt|ƒ}nt|tƒsQtjdt|ƒtddƒdS||BS(sHImplementation of | operator when left operand is not a C{ParserElement}s4Cannot combine element of type %s with ParserElementRƒiN( RjR´RRR„R…R†R‡R�(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__ror__és cCsat|tƒrt|ƒ}nt|tƒsQtjdt|ƒtddƒdSt ||gƒS(s,Implementation of ^ operator - returns C{Or}s4Cannot combine element of type %s with ParserElementRƒiN( RjR´RRR„R…R†R‡R�R(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__xor__ós cCsYt|tƒrt|ƒ}nt|tƒsQtjdt|ƒtddƒdS||AS(sHImplementation of ^ operator when left operand is not a C{ParserElement}s4Cannot combine element of type %s with ParserElementRƒiN( RjR´RRR„R…R†R‡R�(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__rxor__ýs cCsat|tƒrt|ƒ}nt|tƒsQtjdt|ƒtddƒdSt ||gƒS(s.Implementation of & operator - returns C{Each}s4Cannot combine element of type %s with ParserElementRƒiN( RjR´RRR„R…R†R‡R�R(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__and__s cCsYt|tƒrt|ƒ}nt|tƒsQtjdt|ƒtddƒdS||@S(sHImplementation of & operator when left operand is not a C{ParserElement}s4Cannot combine element of type %s with ParserElementRƒiN( RjR´RRR„R…R†R‡R�(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__rand__s cCs t|ƒS(s0Implementation of ~ operator - returns C{NotAny}(R(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyt __invert__scCs |j|ƒS(s«Shortcut 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}. (RA(R…R¨((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__call__s cCs t|ƒS(s‚Suppresses the output of this C{ParserElement}; useful to keep punctuation from cluttering up returned output. (R&(R…((s-/usr/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. (R¬R)(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pytleaveWhitespace0s cCst|_||_t|_|S(s/Overrides the default whitespace chars (R¤R)R*R¬R+(R…R"((s-/usr/lib/python2.7/site-packages/pyparsing.pytsetWhitespaceChars8s   cCs t|_|S(sÝOverrides 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.(R¤R-(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyt parseWithTabs@s cCsZt|tƒr:||jkrV|jj|jƒƒqVn|jjt|jƒƒƒ|S(s¿Define expression to be ignored (e.g., comments) while doing pattern matching; may be called repeatedly, to define multiple comment or other ignorable patterns. (RjR&R.RëRµ(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pytignoreGs cCs1|p t|pt|ptf|_t|_|S(sBEnable display of debugging messages while doing pattern matching.(RRRR4R¤R/(R…t startActiont successActiontexceptionAction((s-/usr/lib/python2.7/site-packages/pyparsing.pytsetDebugActionsSs    cCs)|r|jtttƒn t|_|S(s~Enable display of debugging messages while doing pattern matching. Set C{flag} to True to enable, False to disable.(R£RRRR¬R/(R…tflag((s-/usr/lib/python2.7/site-packages/pyparsing.pytsetDebug[s cCs|jS(N(R¨(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒdscCs t|ƒS(N(Ro(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyR�gscCst|_d|_|S(N(R¤R0R�R&(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRojs  cCsdS(N((R…R™((s-/usr/lib/python2.7/site-packages/pyparsing.pytcheckRecursionoscCs|jgƒdS(sXCheck defined expressions for valid structure, check for infinite recursive definitions.N(R¦(R…t validateTrace((s-/usr/lib/python2.7/site-packages/pyparsing.pytvalidaterscCs‹y|jƒ}Wn6tk rHt|dƒ}|jƒ}|jƒnXy|j||ƒSWn'tk r†tjƒd}|‚nXdS(sÍExecute 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(treadR‰topentcloseRtRR]R^(R…tfile_or_filenameRrt file_contentstfR((s-/usr/lib/python2.7/site-packages/pyparsing.pyt parseFilevs   cCstdd|j|ƒS(NRi(RR2(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyt getExceptionˆscCs7|dkr#|jƒ|_}|Std|ƒ‚dS(Nt myExceptionsno such attribute (R±R²R‰(R…RŠRÔ((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‹‹s cCsŠt|tƒr+||kp*|j|jkSt|tƒrsy!|jt|ƒdtƒtSWq†tk rotSXnt t|ƒ|kSdS(NRr( RjRt__dict__R´RtRoR¤RR¬R–(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__eq__’s cCs ||k S(N((R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__ne__žscCstt|ƒƒS(N(thashtid(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__hash__¡scCs ||kS(N((R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__req__¤scCs ||k S(N((R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__rne__§s(DR|R}R•R!R¬RqR#t staticmethodR‡RµR<RAR¤RKRORPRRRVRYRZR\ReRfRjRIRgRlRmRnRtt_MAX_INTR|R�R‚RÝRæR‰RŠR‘R’R“R”R•R–R—R˜R™RšR›RœR�RžRŸR£R¥RŒR�RoR¦R¨R°R±R‹R´RµR¸R¹Rº(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR¹s‚          M      .3 "  D                  cBs eZdZd„Zd„ZRS(sJAbstract C{ParserElement} subclass, for defining atomic matching patterns.cCstt|ƒjdtƒdS(NR8(R–R'R‡R¬(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡­scCs,tt|ƒj|ƒ}d|j|_|S(Ns Expected (R–R'R<R¨R2(R…R¨Rg((s-/usr/lib/python2.7/site-packages/pyparsing.pyR<°s(R|R}R•R‡R<(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR'«s cBseZdZd„ZRS(s"An empty token, will always match.cCs2tt|ƒjƒd|_t|_t|_dS(NR(R–RR‡R¨R¤R,R¬R1(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡¸s  (R|R}R•R‡(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR¶scBs#eZdZd„Zed„ZRS(sA token that will never match.cCs;tt|ƒjƒd|_t|_t|_d|_dS(NRsUnmatchable token( R–RR‡R¨R¤R,R¬R1R2(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡Ás    cCs%|j}||_||_|‚dS(N(R²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZÈs   (R|R}R•R‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR¿s cBs#eZdZd„Zed„ZRS(s*Token to exactly match a specified string.cCs«tt|ƒjƒ||_t|ƒ|_y|d|_Wn0tk rntj dt ddƒt |_ nXdt |jƒ|_d|j|_t|_t|_dS(Nis2null string passed to Literal; use Empty() insteadRƒis"%s"s Expected (R–RR‡tmatchRÀtmatchLentfirstMatchCharR¸R„R…R‡Rt __class__RoR¨R2R¬R,R1(R…t matchString((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡Ñs      cCsp|||jkrK|jdks7|j|j|ƒrK||j|jfS|j}||_||_|‚dS(Ni(R¿R¾t startswithR½R²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZäs$   (R|R}R•R‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyRÏs cBsQeZdZedZeed„Zed„Zd„Z d„Z e e ƒZ RS(s†Token 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_$cCsØtt|ƒjƒ||_t|ƒ|_y|d|_Wn'tk retj dt ddƒnXd|j|_ d|j |_ t |_t |_||_|rÅ|jƒ|_|jƒ}nt|ƒ|_dS(Nis2null string passed to Keyword; use Empty() insteadRƒis"%s"s Expected (R–R R‡R½RÀR¾R¿R¸R„R…R‡R¨R2R¬R,R1tcaselesstuppert caselessmatchtsett identChars(R…RÁRÇRÃ((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡ûs"      c Csk|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|jfS|j }||_ ||_ |‚dS(Nii( RÃR¾RÄRÅRÀRÇR½R¿RÂR²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZs #9)$3#   cCs%tt|ƒjƒ}tj|_|S(N(R–R RµtDEFAULT_KEYWORD_CHARSRÇ(R…Rh((s-/usr/lib/python2.7/site-packages/pyparsing.pyRµ s cCs |t_dS(s,Overrides the default Keyword chars N(R RÈ(R"((s-/usr/lib/python2.7/site-packages/pyparsing.pytsetDefaultKeywordChars%s( R|R}R•R/RÈR¬R‡R¤RZRµRÉR»(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR ïs     cBs#eZdZd„Zed„ZRS(s¿Token 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 (R–RR‡RÄt returnStringR¨R2(R…RÁ((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡0s cCs\||||j!jƒ|jkr7||j|jfS|j}||_||_|‚dS(N(R¾RÄR½RÊR²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ7s #   (R|R}R•R‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR+s cBs#eZejd„Zed„ZRS(cCs#tt|ƒj||dtƒdS(NRÃ(R–RR‡R¤(R…RÁRÇ((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡AscCs•||||j!jƒ|jkrp|t|ƒ|jks\|||jjƒ|jkrp||j|jfS|j}||_||_|‚dS(N( R¾RÄRÅRÀRÇR½R²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZDs#9   (R|R}R RÈR‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR@scBs>eZdZddddedd„Zed„Zd„ZRS(sÐToken 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 Cs•tt|ƒjƒ|r�djg|D]}||kr&|^q&ƒ}|r�djg|D]}||krZ|^qZƒ}q�n||_t|ƒ|_|rº||_t|ƒ|_n||_t|ƒ|_|dk|_ |dkrüt dƒ‚n||_ |dkr||_ n t |_ |dkrG||_ ||_ nt|ƒ|_d|j|_t|_||_d|j|jkr‘|dkr‘|dkr‘|dkr‘|j|jkrÝdt|jƒ|_net|jƒdkrdtj|jƒt|jƒf|_n%d t|jƒt|jƒf|_|jrbd |jd |_nytj|jƒ|_Wq‘d|_q‘XndS( 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(R–R+R‡RŽt initCharsOrigRÆt initCharst bodyCharsOrigt bodyCharst maxSpecifiedRŽtminLentmaxLenR¼RoR¨R2R¬R1t asKeywordt_escapeRegexRangeCharstreStringRÀR5tescapetcompileR�( R…RÍRÏtmintmaxtexactRÓt excludeCharsRh((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡ZsT.4             :  c Cså|jrd|jj||ƒ}|sH|j}||_||_|‚n|jƒ}||jƒfS|||jkr›|j}||_||_|‚n|}|d7}t|ƒ}|j }||j } t | |ƒ} x*|| kr|||kr|d7}qßWt } |||j kr+t} n|jrY||krY|||krYt} n|jrª|dkr‚||d|ksž||krª|||krªt} qªn| rÔ|j}||_||_|‚n||||!fS(Nii(R5R½R²R€RƒtendtgroupRÍRÀRÏRÒRØR¬RÑR¤RÐRÓ( R…RR€RDtresultRtstartRXt bodycharstmaxloctthrowException((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ�sH               %  <     cCs“ytt|ƒjƒSWnnX|jdkrŒd„}|j|jkrsd||jƒ||jƒf|_qŒd||jƒ|_n|jS(NcSs&t|ƒdkr|d dS|SdS(Nis...(RÀ(Rg((s-/usr/lib/python2.7/site-packages/pyparsing.pyt charsAsStrÆs s W:(%s,%s)sW:(%s)(R–R+RŒR&R�RÌRÎ(R…Rã((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒ½s (N( R|R}R•R�R¬R‡R¤RZRŒ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR+Ns 6 -cBsDeZdZeejdƒƒZdd„Zed„Z d„Z RS(s¹Token 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]icCs?tt|ƒjƒt|tƒrÁt|ƒdkrMtjdtddƒn||_ ||_ y+t j |j |j ƒ|_ |j |_ Wq tjk r½tjd|tddƒ‚q XnIt|tjƒrþ||_ t|ƒ|_ |_ ||_ n tdƒ‚t|ƒ|_d|j|_t|_t|_dS( s­The 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() insteadRƒis$invalid pattern (%s) passed to RegexsCRegex may only be constructed with a string or a compiled RE objects Expected N(R–R"R‡RjR´RÀR„R…R‡tpatterntflagsR5R×RÕt sre_constantsterrortcompiledREtypeRlRŽRoR¨R2R¬R1R¤R,(R…RäRå((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡Ùs.          c Cs›|jj||ƒ}|s?|j}||_||_|‚n|jƒ}|jƒ}t|jƒƒ}|r‘x|D]}|||||jd d jgtt|j ƒd dd ƒD]3}d tj|j | ƒt|j |ƒf^qøƒd7_n|rc|jdtj|ƒ7_n|rä|jdtj|ƒ7_djt|j d|j dƒƒjddƒjddƒ}tj|jƒd||_n|jdtj|j ƒ7_y+tj|j|jƒ|_|j|_Wn4t j!k rdtjd|jtddƒ‚nXt"|ƒ|_#d|j#|_$t%|_&t'|_(dS(sá Defined 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=False) - unquoteResults - boolean indicating whether the matched text should be unquoted (default=True) - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=None => same as quoteChar) is$quoteChar cannot be the empty stringRƒis'endQuoteChar cannot be the empty strings %s(?:[^%s%s]Rs%s(?:[^%s\n\r%s]is|(?:s)|(?:iÿÿÿÿs%s[^%s]t)s|(?:%s)s|(?:%s.)t^s\^t-s\-s([%s])s)*%ss$invalid pattern (%s) passed to Regexs Expected N()R–R R‡R�RÀR„R…R‡t SyntaxErrorR�t quoteChart quoteCharLentfirstQuoteChart endQuoteChartendQuoteCharLentescChartescQuotetunquoteResultsR5t MULTILINEtDOTALLRåRÖRÔRäRŽRÁRÆRttescCharReplacePatternR×RÕRæRçRoR¨R2R¬R1R¤R,( R…RïRôRõt multilineRöRòRžtcharset((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡sf             ( %o?   cCsô|||jkr(|jj||ƒp+d}|sX|j}||_||_|‚n|jƒ}|jƒ}|j rê||j |j !}t |t ƒrê|jrÀtj|jd|ƒ}n|jrç|j|j|jƒ}qçqên||fS(Ns\g<1>(RñR5R½R�R²R€RƒRÜRÝRöRðRóRjR´RôR¾RùRõRtRò(R…RR€RDRÞRRÔ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZds .         !cCsSytt|ƒjƒSWnnX|jdkrLd|j|jf|_n|jS(Ns.quoted string, starting with %s ending with %s(R–R RŒR&R�RïRò(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒsN( R|R}R•R�R¬R¤R‡RZRŒ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR sJ cBs5eZdZdddd„Zed„Zd„ZRS(s€Token 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. iicCsÉtt|ƒjƒt|_||_|dkr@tdƒ‚n||_|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 (R–RR‡R¬R)tnotCharsRŽRÑRÒR¼RoR¨R2R,R1(R…RüRØRÙRÚ((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡’s           cCsá|||jkr7|j}||_||_|‚n|}|d7}|j}t||jt|ƒƒ}x*||kr˜|||kr˜|d7}qoW|||jkrÐ|j}||_||_|‚n||||!fS(Ni(RüR²R€RƒRØRÒRÀRÑ(R…RR€RDRRßtnotcharstmaxlen((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZªs$          cCsvytt|ƒjƒSWnnX|jdkrot|jƒdkr\d|jd |_qod|j|_n|jS(Nis !W:(%s...)s!W:(%s)(R–RRŒR&R�RÀRü(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒÃs(R|R}R•R‡R¤RZRŒ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‹s cBsXeZdZidd6dd6dd6dd6d d 6Zd d d d d„Zed„ZRS(sŽSpecial 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.sRËss ss ss ss s iicCsîtt|ƒjƒ||_|jdjg|jD]}||jkr2|^q2ƒƒdjg|jD]}tj|^qgƒ|_t |_ d|j|_ ||_ |dkrÀ||_ n t|_ |dkrê||_ ||_ ndS(NRs Expected i(R–R*R‡t matchWhiteR�RŽR*t whiteStrsR¨R¤R,R2RÑRÒR¼(R…twsRØRÙRÚRh((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡Þs ;/       cCsá|||jkr7|j}||_||_|‚n|}|d7}||j}t|t|ƒƒ}x-||kr˜|||jkr˜|d7}qlW|||jkrÐ|j}||_||_|‚n||||!fS(Ni(RÿR²R€RƒRÒRØRÀRÑ(R…RR€RDRRßRá((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZòs"      "    (R|R}R•RR‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR*Ñs t_PositionTokencBseZd„ZRS(cCs8tt|ƒjƒ|jj|_t|_t|_ dS(N( R–RR‡RÀR|R¨R¤R,R¬R1(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡ s (R|R}R‡(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR scBs,eZdZd„Zd„Zed„ZRS(sXToken to advance to a specific column of input text; useful for tabular report scraping.cCs tt|ƒjƒ||_dS(N(R–R R‡R5(R…tcolno((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡scCsŽt||ƒ|jkrŠt|ƒ}|jrB|j||ƒ}nxE||kr†||jƒr†t||ƒ|jkr†|d7}qEWn|S(Ni(R5RÀR.RVtisspace(R…RR€RX((s-/usr/lib/python2.7/site-packages/pyparsing.pyRYs  7cCs^t||ƒ}||jkr6t||d|ƒ‚n||j|}|||!}||fS(NsText not in expected column(R5R(R…RR€RDtthiscoltnewlocRÔ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ s  (R|R}R•R‡RYR¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR s  cBs,eZdZd„Zd„Zed„ZRS(sQMatches if current position is at the beginning of a line within the parse stringcCs<tt|ƒjƒ|jtjjddƒƒd|_dS(Ns RsExpected start of line(R–RR‡R�RR!RtR2(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡*scCs<tt|ƒj||ƒ}||dkr8|d7}n|S(Ns i(R–RRY(R…RR€R`((s-/usr/lib/python2.7/site-packages/pyparsing.pyRY/s cCsf|dkp5||j|dƒkp5||ddks\|j}||_||_|‚n|gfS(Niis (RYR²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ5s     (R|R}R•R‡RYR¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR(s  cBs#eZdZd„Zed„ZRS(sKMatches if current position is at the end of a line within the parse stringcCs<tt|ƒjƒ|jtjjddƒƒd|_dS(Ns RsExpected end of line(R–RR‡R�RR!RtR2(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡BscCs™|t|ƒkrT||dkr0|ddfS|j}||_||_|‚nA|t|ƒkrt|dgfS|j}||_||_|‚dS(Ns i(RÀR²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZGs       (R|R}R•R‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR@s cBs#eZdZd„Zed„ZRS(sCMatches if current position is at the beginning of the parse stringcCs tt|ƒjƒd|_dS(NsExpected start of text(R–R%R‡R2(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡[scCsU|dkrK||j|dƒkrK|j}||_||_|‚qKn|gfS(Ni(RYR²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ_s     (R|R}R•R‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR%Ys cBs#eZdZd„Zed„ZRS(s=Matches if current position is at the end of the parse stringcCs tt|ƒjƒd|_dS(NsExpected end of text(R–R$R‡R2(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡lscCs—|t|ƒkr6|j}||_||_|‚n]|t|ƒkrV|dgfS|t|ƒkrr|gfS|j}||_||_|‚dS(Ni(RÀR²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZps        (R|R}R•R‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR$js cBs&eZdZed„Zed„ZRS(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|ƒjƒt|ƒ|_d|_dS(NsNot at the start of a word(R–R-R‡RÆt wordCharsR2(R…R((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡ˆscCsg|dkr]||d|jks6|||jkr]|j}||_||_|‚q]n|gfS(Nii(RR²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ�s     (R|R}R•RTR‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR-�s cBs&eZdZed„Zed„ZRS(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|ƒjƒt|ƒ|_t|_d|_dS(NsNot at the end of a word(R–R,R‡RÆRR¬R)R2(R…R((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡žs cCst|ƒ}|dkru||kru|||jksN||d|jkru|j}||_||_|‚qun|gfS(Nii(RÀRR²R€Rƒ(R…RR€RDRXR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ¤s     (R|R}R•RTR‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR,—s cBsqeZdZed„Zd„Zd„Zd„Zd„Zd„Z d„Z ed„Z gd „Z d „Z RS( sTAbstract subclass of ParserElement, for combining and post-processing parsed tokens.cCs•tt|ƒj|ƒt|tƒr1||_nWt|tƒrUt|ƒg|_n3yt|ƒ|_Wntk r‡|g|_nXt |_ dS(N( R–RR‡RjR°texprsR´RR·R¬R6(R…RR8((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡³s  cCs |j|S(N(R(R…Rž((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŸÀscCs|jj|ƒd|_|S(N(RRëR�R&(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRëÃs cCsPt|_g|jD]}|jƒ^q|_x|jD]}|jƒq8W|S(s~Extends C{leaveWhitespace} defined in base class, and also invokes C{leaveWhitespace} on all contained expressions.(R¬R)RRµRœ(R…RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyRœÈs  %cCs¤t|tƒrb||jkr tt|ƒj|ƒx(|jD]}|j|jdƒq>Wq n>tt|ƒj|ƒx%|jD]}|j|jdƒq‚W|S(Niÿÿÿÿ(RjR&R.R–RRŸR(R…RÜRT((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŸÑscCs\ytt|ƒjƒSWnnX|jdkrUd|jjt|jƒf|_n|jS(Ns%s:(%s)( R–RRŒR&R�RÀR|RoR(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒÝs%c Csdtt|ƒjƒx|jD]}|jƒqWt|jƒdkr`|jd}t||jƒrÓ|j rÓ|jdkrÓ|j rÓ|j|jdg|_d|_ |j |j O_ |j |j O_ n|jd}t||jƒr`|j r`|jdkr`|j r`|jd |j|_d|_ |j |j O_ |j |j O_ q`n|S(Niiiiÿÿÿÿ(R–RRoRRÀRjRÀR$R'R�R/R&R,R1(R…RTRÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRoçs.        cCstt|ƒj||ƒ}|S(N(R–RRA(R…R¨R?RÔ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRA scCs@||g}x|jD]}|j|ƒqW|jgƒdS(N(RR¨R¦(R…R§ttmpRT((s-/usr/lib/python2.7/site-packages/pyparsing.pyR¨ scCs>tt|ƒjƒ}g|jD]}|jƒ^q|_|S(N(R–RRµR(R…RÔRT((s-/usr/lib/python2.7/site-packages/pyparsing.pyRµ s%(R|R}R•R¬R‡RŸRëRœRŸRŒRoRAR¨Rµ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR±s    cBsWeZdZdefd„ƒYZed„Zed„Zd„Zd„Z d„Z RS(s³Requires 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. RˆcBseZd„ZRS(cOs'tt|ƒj||Ž|jƒdS(N(R–RR‡Rœ(R…RRN((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡ s(R|R}R‡(((s-/usr/lib/python2.7/site-packages/pyparsing.pyRˆ scCs}tt|ƒj||ƒt|_x'|jD]}|js,t|_Pq,q,W|j|djƒ|dj |_ t|_ dS(Ni( R–RR‡R¤R,RR¬R�R*R)R6(R…RR8RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡! s   c CsG|jdj|||dtƒ\}}t}x |jdD]ý}t|tjƒr`t}q<n|rÿy|j|||ƒ\}}Wqtk r›‚qtk rÇt j ƒd}t|ƒ‚qt k rûtt |t |ƒ|j|ƒƒ‚qXn|j|||ƒ\}}|s,|jƒr<||7}q<q<W||fS(NiREi(RRIR¬RjRRˆR¤RRR]R^R¸RRÀR2RÒ( R…RR€RDt resultlistt errorStopRTt exprtokensR—((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ, s((   +cCs+t|tƒrt|ƒ}n|j|ƒS(N(RjR´RRë(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRåE scCs@||g}x+|jD] }|j|ƒ|jsPqqWdS(N(RR¦R,(R…R™tsubRecCheckListRT((s-/usr/lib/python2.7/site-packages/pyparsing.pyR¦J s   cCset|dƒr|jS|jdkr^ddjg|jD]}t|ƒ^q8ƒd|_n|jS(NR¨t{RËt}(R;R¨R&R�RŽRRo(R…RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒQ s 9( R|R}R•RRˆR¤R‡RZRåR¦RŒ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR s   cBsAeZdZed„Zed„Zd„Zd„Zd„Z RS(sÏRequires that at least one C{ParseExpression} is found. If two expressions match, the expression that matches the longest string will be used. May be constructed using the C{'^'} operator. cCsPtt|ƒj||ƒt|_x'|jD]}|jr,t|_Pq,q,WdS(N(R–RR‡R¬R,RR¤(R…RR8RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡` s    c Cs7d}d}d}xÖ|jD]Ë}y|j||ƒ}Wn‘tk r|tjƒd} | j|krç| }| j}qçqtk rËt|ƒ|krçt|t|ƒ|j |ƒ}t|ƒ}qçqX||kr|}|} qqW|dkr$|dk r |‚q$t||d|ƒ‚n| j |||ƒS(Niÿÿÿÿiis no defined alternatives to match( R�RRfRR]R^R€R¸RÀR2RI( R…RR€RDt maxExcLoct maxMatchLoct maxExceptionRTtloc2Rct maxMatchExp((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZh s.       cCs+t|tƒrt|ƒ}n|j|ƒS(N(RjR´RRë(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__ixor__… scCset|dƒr|jS|jdkr^ddjg|jD]}t|ƒ^q8ƒd|_n|jS(NR¨Rs ^ R(R;R¨R&R�RŽRRo(R…RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒŠ s 9cCs3||g}x|jD]}|j|ƒqWdS(N(RR¦(R…R™R RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyR¦“ s( R|R}R•R¬R‡R¤RZRRŒR¦(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR[ s     cBsAeZdZed„Zed„Zd„Zd„Zd„Z RS(sÃRequires 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. cCsbtt|ƒj||ƒ|rUt|_x3|jD]}|jr2t|_Pq2q2Wn t|_dS(N(R–RR‡R¬R,RR¤(R…RR8RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡ž s    c Csñd}d}xÞ|jD]©}y|j|||ƒ}|SWqtk ro}|j|kr¿|}|j}q¿qtk r¾t|ƒ|kr¿t|t|ƒ|j|ƒ}t|ƒ}q¿qXqW|dk rØ|‚nt||d|ƒ‚dS(Niÿÿÿÿs no defined alternatives to match(R�RRIRR€R¸RÀR2( R…RR€RDRRRTRÔRc((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ© s"   cCs+t|tƒrt|ƒ}n|j|ƒS(N(RjR´RRë(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyt__ior__À scCset|dƒr|jS|jdkr^ddjg|jD]}t|ƒ^q8ƒd|_n|jS(NR¨Rs | R(R;R¨R&R�RŽRRo(R…RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒÅ s 9cCs3||g}x|jD]}|j|ƒqWdS(N(RR¦(R…R™R RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyR¦Î s( R|R}R•R¬R‡R¤RZRRŒR¦(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR™ s    cBs8eZdZed„Zed„Zd„Zd„ZRS(s²Requires 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. cCsbtt|ƒj||ƒt|_x'|jD]}|js,t|_Pq,q,Wt|_t|_dS(N( R–RR‡R¤R,RR¬R)tinitExprGroups(R…RR8RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡Ù s    cCs­|jr,g|jD]}t|tƒr|j^q}g|jD]!}|jrA||krA|^qA}|||_g|jD]}t|tƒr|j^q|_g|jD]}t|t ƒr°|j^q°|_ g|jD]$}t|ttt fƒsá|^qá|_ |j |j 7_ t |_n|}|j }|j} g} t } xÖ| r*|| |j|j } g} xŠ| D]‚}y|j||ƒ}Wntk r¼| j|ƒq€X| j|ƒ||kræ|j|ƒq€|| kr€| j|ƒq€q€Wt| ƒt| ƒkrUt } qUqUW|rrdjg|D]}t|ƒ^q>ƒ}t||d|ƒ‚n| g|jD]*}t|tƒr|j| kr|^q7} g}x6| D].}|j|||ƒ\}}|j|ƒq½Wtgƒ}x¥|D]�}i}xW|jƒD]I}||jƒkrt||ƒ}|t||ƒ7}|||   cCset|dƒr|jS|jdkr^ddjg|jD]}t|ƒ^q8ƒd|_n|jS(NR¨Rs & R(R;R¨R&R�RŽRRo(R…RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒ s 9cCs3||g}x|jD]}|j|ƒqWdS(N(RR¦(R…R™R RT((s-/usr/lib/python2.7/site-packages/pyparsing.pyR¦& s(R|R}R•R¤R‡RZRŒR¦(((s-/usr/lib/python2.7/site-packages/pyparsing.pyRÔ s  : cBs_eZdZed„Zed„Zd„Zd„Zd„Z d„Z gd„Z d„Z RS( sWAbstract subclass of C{ParserElement}, for combining and post-processing parsed tokens.cCs¸tt|ƒj|ƒt|tƒr4t|ƒ}n||_d|_|dk r´|j |_ |j |_ |j |j ƒ|j |_ |j|_|j|_|jj|jƒndS(N(R–RR‡RjR´RRR�R&R1R,R�R*R)R(R6R.textend(R…RR8((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡. s        cCsG|jdk r+|jj|||dtƒStd||j|ƒ‚dS(NRER(RR�RIR¬RR2(R…RR€RD((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ= scCs>t|_|jjƒ|_|jdk r:|jjƒn|S(N(R¬R)RRµR�Rœ(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRœC s  cCs¦t|tƒrc||jkr¢tt|ƒj|ƒ|jdk r`|jj|jdƒq`q¢n?tt|ƒj|ƒ|jdk r¢|jj|jdƒn|S(Niÿÿÿÿ(RjR&R.R–RRŸRR�(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŸJ s cCs6tt|ƒjƒ|jdk r2|jjƒn|S(N(R–RRoRR�(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRoV scCsV||kr"t||gƒ‚n||g}|jdk rR|jj|ƒndS(N(R!RR�R¦(R…R™R ((s-/usr/lib/python2.7/site-packages/pyparsing.pyR¦\ s  cCsA||g}|jdk r0|jj|ƒn|jgƒdS(N(RR�R¨R¦(R…R§R ((s-/usr/lib/python2.7/site-packages/pyparsing.pyR¨c scCskytt|ƒjƒSWnnX|jdkrd|jdk rdd|jjt|jƒf|_n|jS(Ns%s:(%s)( R–RRŒR&R�RRÀR|Ro(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒi s%( R|R}R•R¬R‡R¤RZRœRŸRoR¦R¨RŒ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR, s      cBs#eZdZd„Zed„ZRS(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(R–R R‡R¤R,(R…R((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡y scCs|jj||ƒ|gfS(N(RRf(R…RR€RD((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ} s(R|R}R•R‡R¤RZ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR t s cBs,eZdZd„Zed„Zd„ZRS(sŒLookahead 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, ( R–RR‡R¬R)R¤R,RoRR2(R…R((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡ˆ s  cCs\y|jj||ƒWnttfk r0n"X|j}||_||_|‚|gfS(N(RRfRR¸R²R€Rƒ(R…RR€RDR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ� s   cCsIt|dƒr|jS|jdkrBdt|jƒd|_n|jS(NR¨s~{R(R;R¨R&R�RoR(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒœ s (R|R}R•R‡R¤RZRŒ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‚ s  cBs8eZdZd„Zed„Zd„Zed„ZRS(s<Optional repetition of zero or more of the given expression.cCs#tt|ƒj|ƒt|_dS(N(R–R.R‡R¤R,(R…R((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡¨ scCsËg}y¡|jj|||dtƒ\}}t|jƒdk}xa|r`|j||ƒ}n|}|jj|||ƒ\}}|s–|jƒrE||7}qEqEWnttfk rÀnX||fS(NREi( RRIR¬RÀR.RVRÒRR¸(R…RR€RDRbthasIgnoreExprsR`t tmptokens((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ¬ s$cCsIt|dƒr|jS|jdkrBdt|jƒd|_n|jS(NR¨Rçs]...(R;R¨R&R�RoR(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒ¾ s cCs(tt|ƒj||ƒ}t|_|S(N(R–R.RAR¤R((R…R¨R?RÔ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRAÇ s ( R|R}R•R‡R¤RZRŒR¬RA(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR.¦ s    cBs/eZdZed„Zd„Zed„ZRS(s2Repetition of one or more of the given expression.cCsÅ|jj|||dtƒ\}}y}t|jƒdk}xa|rZ|j||ƒ}n|}|jj|||ƒ\}}|s�|jƒr?||7}q?q?Wnttfk rºnX||fS(NREi( RRIR¬RÀR.RVRÒRR¸(R…RR€RDRbR,R`R-((s-/usr/lib/python2.7/site-packages/pyparsing.pyRZÏ s$cCsIt|dƒr|jS|jdkrBdt|jƒd|_n|jS(NR¨Rs}...(R;R¨R&R�RoR(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒá s cCs(tt|ƒj||ƒ}t|_|S(N(R–RRAR¤R((R…R¨R?RÔ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRAê s (R|R}R•R¤RZRŒR¬RA(((s-/usr/lib/python2.7/site-packages/pyparsing.pyRÍ s  t _NullTokencBs eZd„ZeZd„ZRS(cCstS(N(R¬(R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRÎð scCsdS(NR((R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒó s(R|R}RÎR RŒ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR.ï s cBs/eZdZed„Zed„Zd„ZRS(s•Optional matching of the given expression. A default return string can also be specified, if the optional expression is not found. cCs2tt|ƒj|dtƒ||_t|_dS(NR8(R–RR‡R¬R×R¤R,(R…Rtdefault((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡ü s cCs¤y(|jj|||dtƒ\}}Wnottfk r™|jtk r�|jjr�t|jgƒ}|j||jj|SdS(N(RR�R–R Rµ(R…RÔ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRµš s  N( R|R}R•R�R‡R:RœRoR¨RŒRµ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR Z s       R<cBseZd„ZRS(cCsdS(Ns...((R…((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŒ£ s(R|R}RŒ(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR<¢ scBseZdZed„ZRS(sGAbstract subclass of C{ParseExpression}, for converting parsed results.cCs#tt|ƒj|ƒt|_dS(N(R–R(R‡R¬R((R…RR8((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡¨ s(R|R}R•R¬R‡(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR(¦ scBs eZdZd„Zd„ZRS(s,Converter to upper case all matching tokens.cGs0tt|ƒj|ŒtjdtddƒdS(NsAUpcase class is deprecated, use upcaseTokens parse action insteadRƒi(R–R)R‡R„R…tDeprecationWarning(R…R((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡® s cCstttj|ƒƒS(N(R°RLtstringRÄ(R…RR€R[((s-/usr/lib/python2.7/site-packages/pyparsing.pyR\³ s(R|R}R•R‡R\(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR)¬ s cBs/eZdZded„Zd„Zd„ZRS(síConverter 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. RcCsQtt|ƒj|ƒ|r)|jƒn||_t|_||_t|_dS(N( R–RR‡RœtadjacentR¤R)t joinStringR6(R…RRAR@((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡¼ s    cCs6|jrtj||ƒntt|ƒj|ƒ|S(N(R@RRŸR–R(R…RÜ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRŸÆ s cCsq|jƒ}|2|tdj|j|jƒƒgd|jƒ7}|jrit|jƒƒdkri|gS|SdS(NRRªi( RµRRŽRìRAR3R'RÀRÒ(R…RR€R[tretToks((s-/usr/lib/python2.7/site-packages/pyparsing.pyR\Í s  1!(R|R}R•R¤R‡RŸR\(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR· s cBs eZdZd„Zd„ZRS(s}Converter to return the matched tokens as a list - useful for returning tokens of C{ZeroOrMore} and C{OneOrMore} expressions.cCs#tt|ƒj|ƒt|_dS(N(R–R R‡R¤R((R…R((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡Ù scCs|gS(N((R…RR€R[((s-/usr/lib/python2.7/site-packages/pyparsing.pyR\Ý s(R|R}R•R‡R\(((s-/usr/lib/python2.7/site-packages/pyparsing.pyR × s cBs eZdZd„Zd„ZRS(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|ƒj|ƒt|_dS(N(R–RR‡R¤R((R…R((s-/usr/lib/python2.7/site-packages/pyparsing.pyR‡å scCsTx9t|ƒD]+\}}t|ƒdkr1q n|d}t|tƒrct|dƒjƒ}nt|ƒdkr‹td|ƒ||nX|S(s&Decorator for debugging parse actions.csáˆj}|d\}}}t|ƒdkrI|djjd|}ntjjd|t||ƒ||fƒyˆ|Œ}Wn>tk rÂtj ƒd}tjjd||fƒ‚nXtjjd||fƒ|S( Niýÿÿÿiit.s">>entering %s(line: '%s', %d, %s) is<gS(Ni(R RR?(RgRIRR‹(t arrayExprR(s-/usr/lib/python2.7/site-packages/pyparsing.pytcountFieldParseActionI s -cSst|dƒS(Ni(R³(R((s-/usr/lib/python2.7/site-packages/pyparsing.pyRiN starrayLenR7N( R R�R+RPRORµR<RPR¤(RtintExprRW((RVRs-/usr/lib/python2.7/site-packages/pyparsing.pyR8A s    cCsMg}x@|D]8}t|tƒr8|jt|ƒƒq |j|ƒq W|S(N(RjR°R+R}Rë(tLRÔRž((s-/usr/lib/python2.7/site-packages/pyparsing.pyR}U s  cs/tƒ‰‡fd†}|j|dtƒˆ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. csr|rct|ƒdkr'ˆ|d>qnt|jƒƒ}ˆtg|D]}t|ƒ^qFƒ>n ˆtƒ>dS(Nii(RÀR}R©RRR(RgRIRttflatttt(trep(s-/usr/lib/python2.7/site-packages/pyparsing.pytcopyTokenToRepeaterk s *R7(R RPR¤(RR^((R]s-/usr/lib/python2.7/site-packages/pyparsing.pyRM^ s  csCtƒ‰|jƒ}ˆ|>‡fd†}|j|dtƒˆ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|jƒƒ‰‡fd†}ˆj|dtƒdS(Ncs7t|jƒƒ}|ˆkr3tdddƒ‚ndS(NRi(R}R©R(RgRIRt theseTokens(t matchTokens(s-/usr/lib/python2.7/site-packages/pyparsing.pytmustMatchTheseTokensŠ s R7(R}R©ROR¤(RgRIRRa(R](R`s-/usr/lib/python2.7/site-packages/pyparsing.pyR^ˆ sR7(R RµRPR¤(Rte2R^((R]s-/usr/lib/python2.7/site-packages/pyparsing.pyRLx s  cCsUx$dD]}|j|t|ƒ}qW|jddƒ}|jddƒ}t|ƒS(Ns\^-]s s\ns s\t(Rtt_bslashRo(RgRh((s-/usr/lib/python2.7/site-packages/pyparsing.pyRÔ’ s  c Cs|r!d„}d„}t}nd„}d„}t}t|ttfƒr^t|ƒ}n4t|tƒr||jƒ}ntjdt ddƒd}x­|t |ƒd krG||}x†t ||d ƒD]f\} } || |ƒrþ||| d =PqÐ||| ƒrÐ||| d =|j || ƒ| }PqÐqÐW|d 7}q›W| rü|rüy„t |ƒt d j |ƒƒkr©td d j g|D]} t| ƒ^qŒƒƒStd j g|D]} tj| ƒ^q¹ƒƒSWqütjd t ddƒqüXntg|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|jƒ|jƒkS(N(RÄ(RÞtb((s-/usr/lib/python2.7/site-packages/pyparsing.pyRi§ scSs|jƒj|jƒƒS(N(RÄRÂ(RÞRd((s-/usr/lib/python2.7/site-packages/pyparsing.pyRi¨ scSs ||kS(N((RÞRd((s-/usr/lib/python2.7/site-packages/pyparsing.pyRi« scSs |j|ƒS(N(RÂ(RÞRd((s-/usr/lib/python2.7/site-packages/pyparsing.pyRi¬ ss2Invalid argument to oneOf, expected string or listRƒiiiRs[%s]t|s7Exception creating Regex for oneOf, building MatchFirst(RRRjR°R�R´RrR„R…R‡RÀRÄRØRŽR"RÔR5RÖR( tstrsRÃtuseRegextisequaltmaskstparseElementClasstsymbolsRžtcurRÈRÜtsym((s-/usr/lib/python2.7/site-packages/pyparsing.pyRQš sF         ! !03 cCsttt||ƒƒƒS(sæHelper 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 (RÖRÉ((s-/usr/lib/python2.7/site-packages/pyparsing.pyR=Õ scCsptƒjd„ƒ}|jƒ}t|_|dƒ||dƒ}|rVd„}n d„}|j|ƒ|S(sÑHelper to return the original, untokenized text for a given expression. Useful to restore the parsed fields of an HTML start tag into the raw tag text itself, or to revert separate tokens with intervening whitespace back to the original matching input text. 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(N((RgR€R((s-/usr/lib/python2.7/site-packages/pyparsing.pyRií st_original_startt _original_endcSs||j|j!S(N(RnRo(RgRIR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRiò scSs3|2|jd||j|j!ƒ|d=|d=dS(NiRnRo(RØRnRo(RgRIR((s-/usr/lib/python2.7/site-packages/pyparsing.pyt extractTextô s(RRORµR¬R6(RtasStringt locMarkert endlocMarkert matchExprRp((s-/usr/lib/python2.7/site-packages/pyparsing.pyReß s     cCst|ƒjd„ƒS(siHelper to undo pyparsing's default grouping of And expressions, even if all but one are non-empty.cSs|dS(Ni((R((s-/usr/lib/python2.7/site-packages/pyparsing.pyRiÿ s(R(RO(R((s-/usr/lib/python2.7/site-packages/pyparsing.pytungroupü ss\[]-*.$+^?()~ RÚcCs |ddS(Nii((RgRIR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRi ss\]s\\0?[xX][0-9a-fA-F]+cCstt|dddƒƒS(Niii(tunichrR³(RgRIR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRi ss \\0[0-7]+cCstt|dddƒƒS(Niii(RvR³(RgRIR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRi siRíRçRìtnegatetbodyRècCs\t|tƒrXdjgtt|dƒt|dƒdƒD]}t|ƒ^q=ƒp[|S(NRii(RjRRŽRÁtordRv(tpRh((s-/usr/lib/python2.7/site-packages/pyparsing.pyRi scCsEy6djgtj|ƒjD]}t|ƒ^qƒSWndSXdS(sÛHelper 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(RŽt_reBracketExprRtRxt _expanded(Rgtpart((s-/usr/lib/python2.7/site-packages/pyparsing.pyR] s6cs‡fd†}|S(srHelper method for defining parse actions that require matching at a specific column in the input text. cs2t||ƒˆkr.t||dˆƒ‚ndS(Nsmatched token not at column %d(R5R(R tlocnR(R‹(s-/usr/lib/python2.7/site-packages/pyparsing.pyt verifyCol, s((R‹R((R‹s-/usr/lib/python2.7/site-packages/pyparsing.pyRK( scs‡fd†}|S(sŽHelper method for common parse actions that simply return a literal value. Especially useful when used with C{transformString()}. csˆgS(N((R(treplStr(s-/usr/lib/python2.7/site-packages/pyparsing.pyt _replFunc5 s((R€R�((R€s-/usr/lib/python2.7/site-packages/pyparsing.pyRZ1 scCs|ddd!S(sÄHelper parse action for removing quotation marks from parsed quoted strings. To use, add this parse action to quoted string using:: quotedString.setParseAction( removeQuotes ) iiiÿÿÿÿ((RgRIR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRX9 scCs&gtt|ƒD]}|jƒ^qS(s4Helper parse action to convert tokens to upper case.(RLRoRÄ(RgRIRR\((s-/usr/lib/python2.7/site-packages/pyparsing.pyRb@ scCs&gtt|ƒD]}|jƒ^qS(s4Helper parse action to convert tokens to lower case.(RLRotlower(RgRIRR\((s-/usr/lib/python2.7/site-packages/pyparsing.pyR>D scCsLy tƒ}Wntk r,tdƒ‚nX|2|t|||!ƒ7}|S(sŸDEPRECATED - 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(RgR5RR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRDH s  cCsmddl}|jƒ}zJxC|dD]+}|ddkr&|djd}|Sq&Wtdƒ‚Wd~XdS( siMethod to be called from within a parse action to determine the end location of the parsed tokens.iÿÿÿÿNiiReiR€sRincorrect usage of getTokensEndLoc - may only be called from within a parse action(tinspecttstacktf_localsR(RƒtfstackR¯R((s-/usr/lib/python2.7/site-packages/pyparsing.pyR@T s  c CsQt|tƒr+|}t|d| ƒ}n |j}tttdƒ}|rÑtjƒj t ƒ}t dƒ|dƒt t t|t dƒ|ƒƒƒtddtgƒjdƒj d „ƒt d ƒ}nÈd jgtD]}|d krÞ|^qÞƒ}tjƒj t ƒt|ƒB}t dƒ|dƒt t t|j tƒtt dƒ|ƒƒƒƒtddtgƒjdƒj d „ƒt d ƒ}ttd ƒ|d ƒ}|jdd j|jddƒjƒjƒƒƒjd|ƒ}|jdd j|jddƒjƒjƒƒƒjd|ƒ}||_||_||fS(sRInternal helper to construct opening and closing tag expressions, given a tag nameRÃs_-:Rñttagt=t/R/R?cSs|ddkS(NiR‰((RgRIR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRiq sRòRcSs|ddkS(NiR‰((RgRIR((s-/usr/lib/python2.7/site-packages/pyparsing.pyRix ssRÜs(RjR´R R¨R+R0R/R:RµRORXR&RR.R RR¬RARŽRTRWR>Rt_LRtttitleRrR<R‡( ttagStrtxmltresnamet tagAttrNamet tagAttrValuetopenTagRhtprintablesLessRAbracktcloseTag((s-/usr/lib/python2.7/site-packages/pyparsing.pyt _makeTagsd s" o.{AA  cCs t|tƒS(sRHelper to construct opening and closing tag expressions for HTML, given a tag name(R•R¬(R�((s-/usr/lib/python2.7/site-packages/pyparsing.pyRI� scCs t|tƒS(sQHelper to construct opening and closing tag expressions for XML, given a tag name(R•R¤(R�((s-/usr/lib/python2.7/site-packages/pyparsing.pyRJ… scsT|r|‰n |jƒ‰gˆD]\}}||f^q#‰‡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. c s…x~ˆD]v\}}||kr8t||d|ƒ‚n|tjkr|||krt||d||||fƒ‚qqWdS(Nsno matching attribute s+attribute '%s' has value '%s', must be '%s'(RRct ANY_VALUE(RgRIRbtattrNamet attrValue(tattrs(s-/usr/lib/python2.7/site-packages/pyparsing.pytpa  s   (RÚ(RtattrDictR½RºRš((R™s-/usr/lib/python2.7/site-packages/pyparsing.pyRc‰ s   %cCstƒ}|tdƒ|tdƒB}xÜt|ƒD]Î\}}|d d \}}}} |dkr¢|d ks„t|ƒdkr“tdƒ‚n|\} } ntƒ} |tjkr¯|dkrít||ƒt |t |ƒƒ} qÚ|dkr[|d k r4t|||ƒt |t ||ƒƒ} q¬t||ƒt |t |ƒƒ} qÚ|dkr t|| || |ƒt || || |ƒ} qÚtdƒ‚n+|tj krÎ|dkr t |t ƒsèt |ƒ}nt|j| ƒt || ƒ} qÚ|dkrz|d k rSt||| ƒt |t || ƒƒ} qËt|| ƒt |t | ƒƒ} qÚ|dkr¿t|| | | | ƒt || | | | ƒ} qÚtdƒ‚n td ƒ‚| rð| j| ƒ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(Rëiiis@if numterms=3, opExpr must be a tuple or list of two expressionsis6operator must be unary (1), binary (2), or ternary (3)s2operator must indicate right or left associativityN(N(R R&RÄR�RÀRŽRRtLEFTR R RtRIGHTRjRRRO(tbaseExprtopListRÔtlastExprRžtoperDeftopExprtaritytrightLeftAssocRštopExpr1topExpr2tthisExprRt((s-/usr/lib/python2.7/site-packages/pyparsing.pyRS® sP    '  /'   $  /'     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 quotestuRœRëc Cs||krtdƒ‚n|d krŽt|tƒrt|tƒrt|ƒdkrât|ƒdkrâ|d k r²tt|t||tj ddƒƒƒj d„ƒ}q|t j ƒt||tj ƒj d„ƒ}q‹|d k r9tt|t |ƒt |ƒttj ddƒƒƒj d„ƒ}q‹ttt |ƒt |ƒttj ddƒƒƒj d„ƒ}qŽtdƒ‚ntƒ}|d k rÖ|tt|ƒt||B|Bƒt|ƒƒ>n,|tt|ƒt||Bƒt|ƒƒ>|S( s—Helper method for defining nested lists enclosed in opening and closing delimiters ("(" and ")" are the default). Parameters: - opener - opening character for a nested list (default="("); can also be a pyparsing expression - closer - closing character for a nested list (default=")"); can also be a pyparsing expression - content - expression for items within the nested lists (default=None) - 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|djƒS(Ni(R�(R((s-/usr/lib/python2.7/site-packages/pyparsing.pyRiscSs|djƒS(Ni(R�(R((s-/usr/lib/python2.7/site-packages/pyparsing.pyRiscSs|djƒS(Ni(R�(R((s-/usr/lib/python2.7/site-packages/pyparsing.pyRi scSs|djƒS(Ni(R�(R((s-/usr/lib/python2.7/site-packages/pyparsing.pyRi$ssOopening and closing arguments must be strings if no content expression is givenN(RŽR�RjR´RÀRRRRR!ROR?RµRR R R&R.(topenertclosertcontentR1RÔ((s-/usr/lib/python2.7/site-packages/pyparsing.pyRNú s2  $  $    3,c s‡fd†}‡fd†}‡fd†}ttƒjdƒjƒƒ}tƒtƒj|ƒ}tƒj|ƒ}tƒj|ƒ} |rÉtt|ƒ|t|t|ƒt|ƒƒ| ƒ} n0tt|ƒt|t|ƒt|ƒƒƒ} |jt tƒƒ| S(sìHelper method for defining space-delimited indentation blocks, such as those used to define block statements in Python source code. Parameters: - blockStatementExpr - expression defining syntax of statement that is repeated within the indented block - indentStack - list created by caller to manage indentation stack (multiple statementWithIndentedBlock expressions within a single grammar should share a common indentStack) - indent - boolean indicating whether block must be indented beyond the 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||dƒ‚nt||dƒ‚ndS(Niÿÿÿÿsillegal nestingsnot a peer entry(RÀR5RR(RgRIRtcurCol(t indentStack(s-/usr/lib/python2.7/site-packages/pyparsing.pytcheckPeerIndent>scsEt||ƒ}|ˆdkr/ˆj|ƒnt||dƒ‚dS(Niÿÿÿÿsnot a subentry(R5RëR(RgRIRR­(R®(s-/usr/lib/python2.7/site-packages/pyparsing.pytcheckSubIndentFscsn|t|ƒkrdSt||ƒ}ˆoH|ˆdkoH|ˆdks`t||dƒ‚nˆjƒdS(Niÿÿÿÿiþÿÿÿsnot an unindent(RÀR5RRÕ(RgRIRR­(R®(s-/usr/lib/python2.7/site-packages/pyparsing.pyt checkUnindentMs &s ( RRR�R›RROR RRŸRc( tblockStatementExprR®RöR¯R°R±tNLtINDENTtPEERtUNDENTtsmExpr((R®s-/usr/lib/python2.7/site-packages/pyparsing.pyRd.s8 $s#[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]s[\0xa1-\0xbf\0xd7\0xf7]s_:Rpsgt lt amp nbsp quottentityRqs><& "cCs |jtkrt|jpdS(N(R¸t_htmlEntityMapR�(R((s-/usr/lib/python2.7/site-packages/pyparsing.pyRihss/\*(?:[^*]*\*+)+?/sC style commentss.*s \/\/(\\\n|.)*s // comments:/(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?s tokens = stokens.columns = stokens.tables = tSQLiRËRì(( t simpleSQLRtR©RltcolumnsttablesRóR¤RR]R^RERˆ(t teststringRbR[Rc((s-/usr/lib/python2.7/site-packages/pyparsing.pyttest}s    tselecttfroms_$RKRTR=R¾R¿sSELECT * 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 (ÅR•t __version__t__versionTime__t __author__R?tweakrefRR¼RµR]R„R5Ræt__all__t version_infot_PY3KtmaxsizeR¼RlR´tchrRvRotascii_lowercasetascii_uppercaseR0tmaxinttxrangeRÁRÆt lowercaset uppercasetsingleArgBuiltinst __builtin__RrtfnameRëtgetattrR‰RzR¢R{tdigitsRPRAR/RcRŽt printableRht whitespaceRTRhRRRRR!RšRR5RHRERRRROR RR'RRRR‹R RRR+R"R RR*RR RRR%R$R-R,RRRRRRR RR.RR.R0RR#R R<R(R)RR RR&RR`R¬R<R�R8R}RMRLRÔR¤RQR=ReRuR<R?RGRFR_R^ROt _escapedPunct_printables_less_backslasht_escapedHexChart_escapedOctChart _singleChart _charRangeRAR{R|R]RKRZRXRbR>RDR@R•RIRJRcR–RRR�RžRSR:R\RWRaRNRdR1RUR3R2RoR7RfRsR¹RYR4RBRœR[R;R9RCRVt _noncommat _commasepitemR6R|RÁt selectTokent fromTokentidentt columnNametcolumnNameListt tableNamet tableNameListR½(((s-/usr/lib/python2.7/site-packages/pyparsing.pyt;sœ                   40  ÿa     ÿÿô  <†CtF9eE>;XH$'" "AH   "      ;  !.@                G4 4  /  .8+