_e[c@sddlZddlZddlZddlZddlZddlZddlZdZdZ e Z dZ dZ dZdZeZdZdZejddkreZneZejZd efd YZd efd YZd efdYZdZdZ e!a"e!a#e!a$dZ%dZ&dZ'dZ(dZ)dfdYZ*dfdYZ+dfdYZ,ej-dZ.defdYZ/defd YZ0d!efd"YZ1d#Z2d$efd%YZ3d&efd'YZ4d(efd)YZ5d*efd+YZ6d,Z7d-Z8d.efd/YZ9d0e6fd1YZ:d2Z;d3Z<d4efd5YZ=de e!e e!e ee e e!e!e!e!d6 Z>dS(7iNs3.10s parser.outtparsetabtLALRii(it PlyLoggercBs8eZdZdZeZdZdZeZRS(cCs ||_dS(N(tf(tselfR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt__init__nscOs|jj||ddS(Ns (Rtwrite(Rtmsgtargstkwargs((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytdebugqscOs |jjd||ddS(Ns WARNING: s (RR(RRRR ((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytwarningvscOs |jjd||ddS(NsERROR: s (RR(RRRR ((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyterrorys(t__name__t __module__RR tinfoR R tcritical(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRms     t NullLoggercBseZdZdZRS(cCs|S(N((Rtname((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt__getattribute__scOs|S(N((RRR ((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt__call__s(R RRR(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs t YaccErrorcBseZRS((R R(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRscCspt|}d|kr't|}nt|tkrJ|t d}ndt|jt||f}|S(Ns s ...s<%s @ 0x%x> (%s)(treprtlent resultlimitttypeR tid(trtrepr_strtresult((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt format_results  "cCs^t|}d|kr't|}nt|dkr=|Sdt|jt|fSdS(Ns is <%s @ 0x%x>(RRRR R(RR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytformat_stack_entrys   sPLY: Don't use global functions errok(), token(), and restart() in p_error(). Instead, invoke the methods on the associated parser instance: def p_error(p): ... # Use parser.errok(), parser.token(), parser.restart() ... parser = yacc.yacc() cCstjttS(N(twarningstwarnt_warnmsgt_errok(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyterroks cCstjttS(N(R R!R"t_restart(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytrestarts cCstjttS(N(R R!R"t_token(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyttokens cCsL|ja|ja|ja||}y bbbWntk rGnX|S(N(R$R#R(R'R&R%t NameError(t errorfuncR(tparserR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytcall_errorfuncs      t YaccSymbolcBseZdZdZRS(cCs|jS(N(R(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt__str__scCs t|S(N(tstr(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt__repr__s(R RR.R0(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR-s tYaccProductioncBsneZd dZdZdZdZdZdZdZ dZ dZ d Z d Z RS( cCs(||_||_d|_d|_dS(N(tslicetstacktNonetlexerR+(RtsR3((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs   cCs\t|tr0g|j|D]}|j^qS|dkrJ|j|jS|j|jSdS(Ni(t isinstanceR2tvalueR3(RtnR6((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt __getitem__s ! cCs||j|_dS(N(R2R8(RR9tv((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt __setitem__scCs$g|j||!D]}|j^qS(N(R2R8(RtitjR6((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt __getslice__scCs t|jS(N(RR2(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt__len__scCst|j|ddS(Ntlinenoi(tgetattrR2(RR9((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRAscCs||j|_dS(N(R2RA(RR9RA((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt set_linenoscCs<t|j|dd}t|j|d|}||fS(NRAit endlineno(RBR2(RR9t startlinetendline((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytlinespanscCst|j|ddS(Ntlexposi(RBR2(RR9((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRH scCs<t|j|dd}t|j|d|}||fS(NRHit endlexpos(RBR2(RR9tstartpostendpos((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytlexspanscCs tdS(N(t SyntaxError(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR sN(R RR4RR:R<R?R@RARCRGRHRLR (((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR1s          tLRParsercBseZdZdZdZdZdZeeeeedZ eeeeedZ eeeeedZ eeeeedZ RS( cCsD|j|_|j|_|j|_||_|jt|_ dS(N( tlr_productionst productionst lr_actiontactiontlr_gototgotoR*tset_defaulted_statestTrueterrorok(Rtlrtabterrorf((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs      cCs t|_dS(N(RVRW(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR$&scCsD|j2|j2t}d|_|jj||jjddS(Ns$endi(t statestacktsymstackR-Rtappend(Rtsym((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR&)s   cCsui|_xe|jjD]T\}}t|j}t|dkr|ddkr|d|j| %sRss %s -> (RttupleRtnumbertfuncR4R{tfiletlinetprecRtusymsR\tlr_itemstlr_nextRyR/( RRRRt precedenceRRRR6((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs$           %cCs|jS(N(R/(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR.=scCsdt|dS(Ns Production(t)(R/(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR0@scCs t|jS(N(RR(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR@CscCsdS(Ni((R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt __nonzero__FscCs |j|S(N(R(Rtindex((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR:IscCs|t|jkrdSt||}yt|j|d|_Wn ttfk rfg|_nXy|j|d|_Wntk rd|_nX|S(Ni( RRR4tLRItemt Prodnamestlr_aftert IndexErrortKeyErrort lr_before(RR9R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytlr_itemMs   cCs |jr||j|_ndS(N(RR{(Rtpdict((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytbind]s (srightiN( R RtreducedR4RR.R0R@RR:RR(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs      tMiniProductioncBs,eZdZdZdZdZRS(cCsC||_||_||_d|_||_||_||_dS(N(RRRR4R{RRR/(RR/RRRRR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRfs      cCs|jS(N(R/(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR.oscCs d|jS(NsMiniProduction(%s)(R/(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR0rscCs |jr||j|_ndS(N(RR{(RR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRvs (R RRR.R0R(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRes  RcBs#eZdZdZdZRS(cCs|j|_t|j|_|j|_||_i|_|jj|dt|j|_t|j|_|j |_ dS(Nt.( RR`RRtlr_indext lookaheadstinsertRRR(RRR9((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs    cCs<|jr+d|jdj|jf}n d|j}|S(Ns%s -> %sRss %s -> (RRRy(RR6((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR.s " cCsdt|dS(NsLRItem(R(R/(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR0s(R RRR.R0(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs cCsIt|d}x2|dkrD|||kr7||S|d8}qWdS(Nii(RR4(tsymbolst terminalsR=((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytrightmost_terminals t GrammarErrorcBseZRS((R R(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRstGrammarcBseZdZdZdZdZddddZddZdZ d Z d Z d Z d Z d ZdZdZddZdZRS(cCsdg|_i|_i|_i|_x|D]}g|j| %ss%s:%d: Duplicate rule %s. sPrevious definition at %s:%d(srighti(RRt_is_identifiertmatcht enumeratetevalRRMRRxRtaddRRRRRRR\RRR(RtprodnametsymsRRRR9R6tctprecnametprodprectmaptmtpnumberRR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytadd_production sp    #       cCsx|s|jdj}n||jkr;td|ntdd|g|jd<|j|jd||_dS(Nisstart symbol %s undefinedisS'(RRRRRR\R(Rtstart((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt set_startascs\fdtjdjdgjD]}|kr@|^q@S(Ncs_|krdSj|x;jj|gD]$}x|jD]}|qCWq3WdS(N(RRRxR(R6RR(tmark_reachable_fromt reachableR(s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRts   i(RRRR(RR6((RRRs7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytfind_unreachableqs c CsYi}x|jD]}t||(R~RRVR\(RtbetaRtxtx_produces_emptyR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt_first s     cCs|jr|jSx!|jD]}|g|j|( RRRRRRRVR~RRRR\R( RRtktdidaddRR=tBtfstthasemptyR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytcompute_followQs<        cCsx |jD]}|}d}g}xtr|t|krFd}nt||}y|j|j|d|_Wn tt fk rg|_nXy|j|d|_ Wntk rd|_ nX||_ |sPn|j ||}|d7}q%W||_ q WdS(Nii(RRVRR4RRRRRRRRR\R(RRtlastlriR=Rtlri((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt build_lritemss.       N(R RRR@R:RR4RRRRRRRRRRRR(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs  $  T   @     # % ;t VersionErrorcBseZRS((R R(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRstLRTablecBs,eZdZdZdZdZRS(cCs(d|_d|_d|_d|_dS(N(R4RQRSROt lr_method(R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs   cBse|ejr|}nd|dUej|}|jekrRedn|j|_ |j |_ g|_ x'|j D]}|j je|q}W|j|_|jS(Ns import %ss&yacc table file version is out of date(R7ttypest ModuleTypeRhtmodulest _tabversiont__tabversion__Rt _lr_actionRQt_lr_gotoRSROt_lr_productionsR\Rt _lr_methodRt _lr_signature(RtmoduleRR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt read_tables       cCsyddl}Wntk r/ddl}nXtjj|sKtnt|d}|j|}|tkrt dn|j||_ |j|}|j||_ |j||_ |j|}g|_ x$|D]}|j jt|qW|j|S(Nitrbs&yacc table file version is out of date(tcPicklet ImportErrortpickletostpathtexiststopentloadRRRRQRSROR\Rtclose(RtfilenameRtin_ft tabversiont signatureRPR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt read_pickles(      cCs%x|jD]}|j|q WdS(N(ROR(RRR((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytbind_callabless(R RRRRR(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs   c Csqi}x|D]}d|||j| gD]*} | ||kr||j| qqWqFW|||krYt||d<||||d<|j} x?| |krUt||d<||||d<|j} qWndS(Nii(R\RRtminRxtMAXINTRw( RRR3RRRRtdtreltytatelement((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRs(      t LALRErrorcBseZRS((R R(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR")stLRGeneratedTablecBseZdddZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdddZddZRS(RcCs|dkrtd|n||_||_|sCt}n||_i|_i|_|j|_i|_ i|_ d|_ d|_ d|_ g|_g|_g|_|jj|jj|jj|jdS(NtSLRRsUnsupported method %si(R$R(R"tgrammarRRtlogRQRSRROt lr_goto_cachet lr0_cidhasht _add_countt sr_conflictt rr_conflictt conflictst sr_conflictst rr_conflictsRRRtlr_parse_table(RR%tmethodR&((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR4s,                   cCs|jd7_|}t}xx|rt}xe|D]]}xT|jD]I}t|dd|jkriqBn|j|j|j|_t}qBWq2WqW|S(Nit lr0_addedi(R)RVR~RRBR\RR1(RtItJRR>R((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt lr0_closureYs   c Cs6|jjt||f}|r(|S|jj|}|sVi}||j|RR ((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytreads_relation s   cCsli}i}i}x|D]}d||| D]6}||kr3g||tliR5RR=((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytcompute_lookback_includesC sX        cs@fd}fd}t|||}|S(Ncsj|S(N(RE(R(R9R=R(s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt scsj|S(N(RG(R(R9R=R(s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRO s(R(RR9tntransR=RRR((R9R=Rs7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytcompute_read_sets scs4fd}fd}t|||}|S(Ncs|S(N((R(treadsets(s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRO scsj|gS(N(Rx(R(tinclsets(s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRO s(R(RRPRRRSRRR((RSRRs7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytcompute_follow_sets sc Csx|jD]\}}x|D]x\}}||jkrKg|j|t _actprintRtnot_usedtnkeysR;R6R9((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyR/ s               #  $                $              Rrc Cst|tjr!tdn|jdd}tjj||d}yVt|d}|j dtjj |t |j |fd}|ri}x|j jD]y\} } xj| jD]\\} } |j| } | sggf} | || \} } | jdrt| t jt j frqn| jd rqn| jdrB| d krB|jjd | nt| t jrf| j j dkst| t j r| jj j dkr| jryN| jjd }|dd kr|jjd| j j| j j| nWqtk rqXqqqW||_dS(Nis+no rules of the form p_rulename are definediis%%s:%d: Rule %r has too many argumentss#%s:%d: Rule %r requires an argumentsA%s:%d: No documentation string specified in function %r (ignored)Rtt_Rs%r not defined as a functionRsRs9%s:%d: Possible grammar rule %r defined without p_ prefix(RRR&R RVRRRR7RRRRR RR RR\RMR/RRR_RRt__func__RsRRRR%(RR%RRRRRRtreqargstparsed_gR5RzR9R;((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRL s\         *$'    N(R RR4RRRRRRRRRRRRRRR(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyRx s             c > Bs |dkre}n| r$d}n| dkrBeej} n|rge|D]} | e|| f^qU}e|}d|krej|dj |d}| j#d||fe(} qKXqNe(} n| j)de*e+}|j,red n|j s| j#dne-|j.}xW|j/D]L\}}}y|j0|||Wqe1k r}| j#d|qXqWxr|j2D]g\}} | \}!}"}#}$y|j3|#|$||!|"Wq e1k rq}| jd|e4}q Xq Wy0|dkr|j5|j6n |j5|Wn,e1k r}| je|e4}nX|red n|j7}%x6|%D].\}&}'| jd|'j8|'j9|&e4}qW|j:}(|(r| j)d| j)d| j)dx1|(D]&}| j#d|| j)d|qoWn|r| j)d| j)d| j)dx3e;|j<D]\})}*| j)d|)|*qWn|j=}+x-|+D]%}'| j#d|'j8|'j9|'j>qWe?|(dkr]| j#dne?|(dkr| j#de?|(ne?|+dkr| j#dne?|+dkr| j#de?|+n|r| j)d| j)d| j)de@|jA},|,jBxJ|,D]B}| j)d |d!jg|jA|D]}-e|-^qHq"W| j)d| j)d"| j)de@|jC}.|.jBxJ|.D]B}/| j)d |/d!jg|jC|/D]}-e|-^qqW| j)dn|rn|jD}0x|0D]}1| j#d#|1qW|jE}2x'|2D]}3| jd$|3e4}qKWn|jF}4x-|4D]%\}}| jd%||e4}qW|red n|r| jGd&|neH||| }|r e?|jI}5|5dkr | j#d'n|5dkr: | j#d(|5ne?|jJ}6|6dkre | j#d)q |6dkr | j#d*|6q n|r |jIs |jJr | j#d| j#d+| j#dx0|jID]%\}7}8}9| j#d,|8|7|9q WeK}:x|jJD]\}7};}<|7eL|;eL|<f|:krB q n| j#d-|7|;| j#d.|<|7| j#d-|7|;| j#d.|<|7|:jM|7eL|;eL|<fq Wg}=xc|jJD]U\}7};}<|<jN r |<|=kr | j#d/|<| j#d/|<|=jO|<q q Wn|rm y|jP|| |Wqm e'k ri }| j#d0||fqm Xn| r y|jQ| |Wq e'k r }| j#d0| |fq Xn|j|je||j }|j!a!|S(1Nit__file__RiRis import %sRrt __package__RR&sUnable to build parsers.There was a problem loading the table file: %rRqsCouldn't open %r. %ss5Created by PLY version %s (http://www.dabeaz.com/ply)s no p_error() function is defineds%ss;%s:%d: Symbol %r used, but not defined as a token or a rulesUnused terminals:sToken %r defined, but not useds %sRs Rule %-5d %ss$%s:%d: Rule %r defined, but not usedisThere is 1 unused tokensThere are %d unused tokenssThere is 1 unused rulesThere are %d unused ruless'Terminals, with rules where they appears %-20s : %sRss*Nonterminals, with rules where they appearsSymbol %r is unreachables)Infinite recursion detected for symbol %rs0Precedence rule %r defined for unknown symbol %rsGenerating %s tabless1 shift/reduce conflicts%d shift/reduce conflictss1 reduce/reduce conflicts%d reduce/reduce conflictss Conflicts:s7shift/reduce conflict for %s in state %d resolved as %ss;reduce/reduce conflict in state %d resolved using rule (%s)srejected rule (%s) in state %dsRule (%s) is never reducedsCouldn't create %r. %s(RR4t tab_moduleRRhRitdirRBtdictRRRR7RRRsRyRR tdirnameRxR/RRR RRRRRRRRNRRpRR RRR RrRRt __version__R~RRRRRRR%RRVRRRRRRRRRRRR`RRRRRRR R#R-R.RRRRR\R{R(>R0R RRuRtcheck_recursiontoptimizet write_tablest debugfileRvtdebuglogterrorlogt picklefileRt_itemsRtsrcfileRtpkgnametpkgtpinfoRtlrtread_signatureR+RzterrorsR%RRRtfuncnametgramRRRRRR]RRR9RRRDR6tnontermstnontermt unreachabletuRtinft unused_prectnum_srtnum_rrRbRt resolutiontalready_reportedtruletrejectedt warned_never((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pytyacc s    .                  (                 #     @     @               !& (?RRRhtos.pathRRtbase64R RRRVt yaccdebugt debug_fileRt default_lrR}R~RfRR~t version_infot basestringRR/tmaxsizeRtobjectRRRRRRR4R#R'R%R"R$R&R(R,R-R1RNRRRRRRRRRRRRR"R#RRRR(((s7/tmp/pip-install-KP2Jbq/pycparser/pycparser/ply/yacc.pyt>s~               4H. T   )