arYc@sdZdZdZdZdZdZdZdZdZdZ d d l Z d d l Z d d l Z d d l Ze jddkrd Zn d Zy e jZWnek re jZnXd ZdefdYZdefdYZdefdYZdZdZdfdYZdfdYZdfdYZd d l Z e j dZ!defdYZ"defd YZ#d!efd"YZ$d#Z%d$efd%YZ&d&efd'YZ'd(efd)YZ(d*efd+YZ)d,Z*d-Z+d.efd/YZ,d0e)fd1YZ-d2Z.d3Z/d4efd5YZ0dee1ee1ddded6e1e1e1d7 Z2d S(8s3.4s3.2is parser.outtparsetabtLALRiii(iNcCs|jS(N(t func_code(tf((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR[scCs|jS(N(t__code__(R((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR^scCs5tjddkr"ddl}nddlj}|S(Niii(tsyst version_infotlextply.lex(R((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt load_ply_lexhst PlyLoggercBs8eZdZdZeZdZdZeZRS(cCs ||_dS(N(R(tselfR((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt__init__vscOs|jj||ddS(Ns (Rtwrite(R tmsgtargstkwargs((s,/usr/lib/python2.7/site-packages/ply/yacc.pytdebugxscOs |jjd||ddS(Ns WARNING: s (RR (R RRR((s,/usr/lib/python2.7/site-packages/ply/yacc.pytwarning|scOs |jjd||ddS(NsERROR: s (RR (R RRR((s,/usr/lib/python2.7/site-packages/ply/yacc.pyterrors(t__name__t __module__R RtinfoRRtcritical(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR us     t NullLoggercBseZdZdZRS(cCs|S(N((R tname((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt__getattribute__scOs|S(N((R RR((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt__call__s(RRRR(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRs t YaccErrorcBseZRS((RR(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRscCspt|}d|kr't|}nt|tkrJ|t d}ndt|jt||f}|S(Ns s ...s<%s @ 0x%x> (%s)(treprtlent resultlimitttypeRtid(trtrepr_strtresult((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt format_results  "cCs^t|}d|kr't|}nt|dkr=|Sdt|jt|fSdS(Ns is <%s @ 0x%x>(RRR RR!(R"R#((s,/usr/lib/python2.7/site-packages/ply/yacc.pytformat_stack_entrys   t YaccSymbolcBseZdZdZRS(cCs|jS(N(R (R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt__str__scCs t|S(N(tstr(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt__repr__s(RRR(R*(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR's tYaccProductioncBsneZd dZdZdZdZdZdZdZ dZ dZ d Z d Z RS( cCs(||_||_d|_d|_dS(N(tslicetstacktNonetlexertparser(R tsR-((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR s   cCs,|dkr|j|jS|j|jSdS(Ni(R,tvalueR-(R tn((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt __getitem__s cCs||j|_dS(N(R,R2(R R3tv((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt __setitem__scCs$g|j||!D]}|j^qS(N(R,R2(R titjR1((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt __getslice__scCs t|jS(N(RR,(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt__len__scCst|j|ddS(Ntlinenoi(tgetattrR,(R R3((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR;scCs||j|_dS(N(R,R;(R R3R;((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt set_linenoscCs<t|j|dd}t|j|d|}||fS(NR;it endlineno(R<R,(R R3t startlinetendline((s,/usr/lib/python2.7/site-packages/ply/yacc.pytlinespanscCst|j|ddS(Ntlexposi(R<R,(R R3((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRBscCs<t|j|dd}t|j|d|}||fS(NRBit endlexpos(R<R,(R R3tstartpostendpos((s,/usr/lib/python2.7/site-packages/ply/yacc.pytlexspanscCs tdS(N(t SyntaxError(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRsN(RRR.R R4R6R9R:R;R=RARBRFR(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR+s          tLRParsercBseZdZdZdZeeddedZeeededZeeddedZeeddedZ RS(cCs1|j|_|j|_|j|_||_dS(N(tlr_productionst productionst lr_actiontactiontlr_gototgotot errorfunc(R tlrtabterrorf((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR s   cCs d|_dS(Ni(terrorok(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyterrokscCsD|j2|j2t}d|_|jj||jjddS(Ns$endi(t statestacktsymstackR'R tappend(R tsym((s,/usr/lib/python2.7/site-packages/ply/yacc.pytrestarts   icCs|s trFt|tr-ttj}n|j|||||S|re|j|||||S|j|||||SdS(N( t yaccdevelt isinstancetintR Rtstderrt parsedebugtparseopttparseopt_notrack(R tinputR/Rttrackingt tokenfunc((s,/usr/lib/python2.7/site-packages/ply/yacc.pytparses c! Cs!d}g}|j}|j} |j} td} d} |jd|sat} | j}n|| _|| _|dk r|j |n|dkr|j }n|}g}||_ g}||_ || _ d}|jdt}d|_|j|d}x|jd|jd||sn|sD|}n |j}|snt}d|_qnn|jdddjg|D]}|j^qd t|fj|j}||j|}|dk r|dkr:|j||}|jd ||j|d}| r| d 8} qqn|dkr1| | }|j}|j}t}||_d|_|r|jd |jd d jg|| D]}t|j^qd| n|jd |jg| |rD|| d }||d<|rq|d }|j|_|j|_|d}t|d|j|_t|d|j|_n|| _ yg|| 3|| 3|j!| |jdt"| d|j|| |d|}|j|Wqt#k r=|j||j|j|d}d|_|}t$} d|_%qXqq1|re|j|_|j|_n|g}|| _ yW|j!| |jdt"| d|j|| |d|}|j|Wqt#k r*|j||j|j|d}d|_|}t$} d|_%qXqn|dkr|d}t|dd}|jdt"||jd|Sn|dkr|j&dddjg|D]}|j^qd t|fj| dks|j%rt$} d|_%|}|jdkrd}n|j'r|j(a(|a |j)a)|r]t*|d r]||_n|j'|}b(b b)|j%r|}d}qqq|rt*|dr|j} nd} | rt+j,j-d| |jfqt+j,j-d|jqt+j,j-ddSnt$} t|d krT|jdkrTd}d}d}|2qn|jdkrgdS|jdkr|d}|jdkrd}qnt}d|_t*|dr|j|_n||_|j||}q|j|j|d}qnt.dqdS(NisPLY: PARSE DEBUG STARTs$endts State : %ss Stack : %ss%s . %st is Action : Shift and goto state %ss3Action : Reduce rule [%s] with %s and goto state %dt[t,t]iR>RCs Result : %sRR2sDone : Returning %ssPLY: PARSE DEBUG ENDs Error : %sR/R;s(yacc: Syntax error at line %d, token=%s syacc: Syntax error, token=%ss yacc: Parse error in input. EOF syacc: internal parser error!!! (/R.RLRNRJR+RR R/R0R`ttokenRTRUR-RVR'R RtpoptjoinR)tlstriptgetRRR2R&R;RBR<R>RCR,tcallableR%RGt error_countRRRRORSRXthasattrRR\R t RuntimeError(!R R`R/RRaRbt lookaheadtlookaheadstacktactionsRNtprodtpslicet errorcountRt get_tokenRTRUterrtokenRWtstatetxxtltypetttptpnametplent_vttargtt1R3R$ttokR;((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR]s^                        @             O                                @            !         cCsd}g}|j}|j} |j} td} d} |sTt} | j}n|| _|| _|dk r|j|n|dkr|j }n|}g}||_ g}||_ || _ d}|j dt}d|_|j |d}x|sD|s|}n |j}|sDt}d|_qDn|j}||j|}|dk r4|dkr|j ||}|j |d}| r| d8} qqn|dkr | | }|j}|j}t}||_d|_|r8|| d}||d<|r|d}|j|_|j|_|d}t|d|j|_t|d|j|_n|| _yM|| 3|| 3|j| |j || |d|}|j |Wqtk r1|j ||j|j|d}d|_|}t} d|_qXqq |rY|j|_|j|_n|g}|| _y=|j| |j || |d|}|j |Wqtk r|j ||j|j|d}d|_|}t} d|_qXqn|dkr4|d}t|ddSn|dkrv| dksU|jryt} d|_|}|jdkrd}n|jr|j a |a |j!a!|rt"|d  r||_n|j|}b b b!|jrv|}d}qqvq|rbt"|d r|j}nd}|rHt#j$j%d ||jfqvt#j$j%d |jqt#j$j%d dSnt} t|dkr|jdkrd}d}d}|2qn|jdkrdS|jdkrR|d}|jdkrd}qnt}d|_t"|d r3|j|_n||_|j ||}q|j|j|d}qnt&dqdS(Nis$endiiR>RCRR2R/R;s(yacc: Syntax error at line %d, token=%s syacc: Syntax error, token=%ss yacc: Parse error in input. EOF syacc: internal parser error!!! ('R.RLRNRJR+R R/R0R`RiRTRUR-RVR'R RjRmRRR2R;RBR<R>RCR,RnRGRoRRRORSRXRpRR\R Rq(R R`R/RRaRbRrRsRtRNRuRvRwRRxRTRURyRWRzR|R}R~RRRRR3RR;((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR^Us>                                                                           !         cCsd}g}|j}|j} |j} td} d} |sTt} | j}n|| _|| _|dk r|j|n|dkr|j }n|}g}||_ g}||_ || _ d}|j dt}d|_|j |d}x|sD|s|}n |j}|sDt}d|_qDn|j}||j|}|dk r|dkr|j ||}|j |d}| r| d8} qqn|dkr| | }|j}|j}t}||_d|_|r|| d}||d<|| _yM|| 3|| 3|j| |j || |d|}|j |Wqtk r|j ||j|j|d}d|_|}t} d|_qXqq|g}|| _y=|j| |j || |d|}|j |Wqtk r~|j ||j|j|d}d|_|}t} d|_qXqn|dkr|d}t|ddSn|dkr| dks|jrt} d|_|}|jdkrd}n|jru|ja|a |ja|r?t|d r?||_n|j|}bb b|jr|}d}qqq|rt|dr|j}nd}|rt j!j"d ||jfqt j!j"d |jqt j!j"d dSnt} t|dkr6|jdkr6d}d}d}|2qn|jdkrIdS|jdkr|d}|jdkr}d}qnt}d|_t|dr|j|_n||_|j ||}q|j|j|d}qnt#d qdS( Nis$endiiRR2R/R;s(yacc: Syntax error at line %d, token=%s syacc: Syntax error, token=%ss yacc: Parse error in input. EOF syacc: internal parser error!!! ($R.RLRNRJR+R R/R0R`RiRTRUR-RVR'R RjRmRRR2R,RnRGRoRRR<RORSRXRpR;RR\R Rq(R R`R/RRaRbRrRsRtRNRuRvRwRRxRTRURyRWRzR|R}R~RRRR3RR;((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR_es*                                                                      !         ( RRR RSRXR.RcR]R^R_(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRHs   <s^[a-zA-Z0-9_-]+$t ProductioncBsbeZdZd d dddZdZdZdZdZdZ d Z d Z RS( itrightRdc Cs||_t||_||_||_d|_||_||_||_ t |j|_ g|_ x3|jD](}||j krs|j j |qsqsWg|_ d|_|jrd|jdj|jf|_nd|j|_dS(Ns%s -> %sRes %s -> (RttupleRutnumbertfuncR.RntfiletlinetprecRtusymsRVtlr_itemstlr_nextRkR)( R RRRut precedenceRRRR1((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR s$           %cCs|jS(N(R)(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR(scCsdt|dS(Ns Production(t)(R)(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR*scCs t|jS(N(RRu(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR:scCsdS(Ni((R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt __nonzero__scCs |j|S(N(Ru(R tindex((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR4scCs|t|jkrdSt||}yt|j|d|_Wn ttfk rfg|_nXy|j|d|_Wntk rd|_nX|S(Ni( RRuR.tLRItemt Prodnamestlr_aftert IndexErrortKeyErrort lr_before(R R3R~((s,/usr/lib/python2.7/site-packages/ply/yacc.pytlr_items   cCs |jr||j|_ndS(N(RRn(R tpdict((s,/usr/lib/python2.7/site-packages/ply/yacc.pytbinds (RiN( RRtreducedR.R R(R*R:RR4RR(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRs      tMiniProductioncBs,eZdZdZdZdZRS(cCsC||_||_||_d|_||_||_||_dS(N(RRRR.RnRRR)(R R)RRRRR((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR s      cCs|jS(N(R)(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR(scCs d|jS(NsMiniProduction(%s)(R)(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR*scCs |jr||j|_ndS(N(RRn(R R((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRs (RRR R(R*R(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRs   RcBs#eZdZdZdZRS(cCs|j|_t|j|_|j|_||_i|_|jj|dt|j|_t|j|_|j |_ dS(Nt.( RtlistRuRtlr_indext lookaheadstinsertRRR(R R~R3((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR s    cCs<|jr+d|jdj|jf}n d|j}|S(Ns%s -> %sRes %s -> (RuRRk(R R1((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR(s " cCsdt|dS(NsLRItem(R(R)(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR*s(RRR R(R*(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRs cCsIt|d}x2|dkrD|||kr7||S|d8}qWdS(Nii(RR.(tsymbolst terminalsR7((s,/usr/lib/python2.7/site-packages/ply/yacc.pytrightmost_terminals t GrammarErrorcBseZRS((RR(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR stGrammarcBseZdZdZdZdZddddZddZdZ 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 enumeratetevalRRGRRmR.RRRRRRRRVRRR(R tprodnametsymsRRRR3R1tctprecnametprodprectmaptmtpnumberR}R~((s,/usr/lib/python2.7/site-packages/ply/yacc.pytadd_productionnsn    #        cCsx|s|jdj}n||jkr;td|ntdd|g|jd<|j|jd||_dS(Nisstart symbol %s undefinedisS'(RRRRRRVR(R tstart((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt set_startscsfdix.tjtjD]}d|Wq.WdS(Ni(RRmRu(R1R~R"(tmark_reachable_fromt reachableR (s,/usr/lib/python2.7/site-packages/ply/yacc.pyRs   i(RRRRRu(R R1((RRR s,/usr/lib/python2.7/site-packages/ply/yacc.pytfind_unreachables #c CsRi}x|jD]}d||i(RRV(R tbetaR$txtx_produces_emptyR((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt_firstos     cCs|jr|jSx!|jD]}|g|j|( RRRRRRtrangeRRuRRV( R RtktdidaddR~R7tBtfstthasemptyR((s,/usr/lib/python2.7/site-packages/ply/yacc.pytcompute_follows>        cCs x|jD]}|}d}g}x|t|kr@d}nt||}y|j|j|d|_Wn ttfk rg|_nXy|j|d|_ Wntk rd|_ nX||_ |sPn|j ||}|d7}q%||_ q WdS(Nii( RRR.RRRuRRRRRRVR(R R~tlastlriR7Rtlri((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt build_lritemss.       N(RRR R:R4RR.RRRRRRRRRRRR(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR"s  $  S   A     " % ;t VersionErrorcBseZRS((RR(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRstLRTablecBs,eZdZdZdZdZRS(cCs(d|_d|_d|_d|_dS(N(R.RKRMRIt lr_method(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR s   cBse|ejr|}nGejddkr=d|dUn%i}d|||fdU|d}|jekredn|j|_ |j |_ g|_ x'|j D]}|j je|qW|j|_|jS(Niisimport %s as parsetabRs&yacc table file version is out of date(RZttypest ModuleTypeRRt _tabversiont__tabversion__Rt _lr_actionRKt_lr_gotoRMRIt_lr_productionsRVRt _lr_methodRt _lr_signature(R tmoduleRtenvR~((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt read_tables       cCsyddl}Wntk r/ddl}nXt|d}|j|}|tkritdn|j||_|j|}|j||_|j||_ |j|}g|_ x$|D]}|j j t |qW|j |S(Nitrbs&yacc table file version is out of date(tcPicklet ImportErrortpickletopentloadRRRRKRMRIRVRtclose(R tfilenameRtin_ft tabversiont signatureRJR~((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt read_pickle5s$     cCs%x|jD]}|j|q WdS(N(RIR(R RR~((s,/usr/lib/python2.7/site-packages/ply/yacc.pytbind_callablesNs(RRR RRR(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRs   c Csqi}x|D]}d|||j| gD]*} | ||kr||j| qqWqFW|||krYt||d<||||d<|j} x?| |krUt||d<||||d<|j} qWndS(Nii(RVRRtminRmtMAXINTRj( RR R-R RRRtdtreltytatelement((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRts(      t LALRErrorcBseZRS((RR(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRstLRGeneratedTablecBseZdddZdZdZdZdZdZdZ 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(RR(RtgrammarRRtlogRKRMRRIt lr_goto_cachet lr0_cidhasht _add_countt sr_conflictt rr_conflictt conflictst sr_conflictst rr_conflictsRRRtlr_parse_table(R RtmethodR((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR s,                   cCs|jd7_|}d}xx|rd}xe|D]]}xT|jD]I}t|dd|jkriqBn|j|j|j|_d}qBWq2WqW|S(Niit lr0_added(RRR<RVRR"(R tItJRR8R((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt lr0_closures   c CsB|jjt||fd}|r+|S|jj|d}|s\i}||j|| D]6}||kr3g||scsj|S(N(R7(R(R*R.R (s,/usr/lib/python2.7/site-packages/ply/yacc.pyR?s(R (R R*tntransR.RRR ((R*R.R s,/usr/lib/python2.7/site-packages/ply/yacc.pytcompute_read_setsscs4fd}fd}t|||}|S(Ncs|S(N((R(treadsets(s,/usr/lib/python2.7/site-packages/ply/yacc.pyR? scsj|gS(N(Rm(R(tinclsets(s,/usr/lib/python2.7/site-packages/ply/yacc.pyR? s(R (R R@RBRCRRR ((RCRBs,/usr/lib/python2.7/site-packages/ply/yacc.pytcompute_follow_setssc Csx|jD]\}}x|D]x\}}||jkrKg|j|RDRH(R R*R.R1RBtlookdtincludedt followsets((s,/usr/lib/python2.7/site-packages/ply/yacc.pytadd_lalr_lookaheads" s  c$ Cs!|jj}|jj}|j}|j}|j}i}|jd|j|j}|jdkrw|j |nd}x|D]} g} i} i} i} |jd|jd||jdx*| D]"}|jd|j t |qW|jdx,| D]$}|j |j dkr|jdkrOd| d <|| d t|d}|jd|t|j|fd}|ri}x|jj D]y\} } xj| j D]\\} } |j | } | sggf} | || RARDRHRLR RmRs(((s,/usr/lib/python2.7/site-packages/ply/yacc.pyRs %  " 9    + J     ycCsy tWntk rtj\}}}|j}x#|dkr]|j}|d8}q;W|jj}|j|jkr|j|jn|SXdS(Nii( RqRRfttb_frametf_backt f_globalstcopytf_localstupdate(tlevelsRltbR}Rtldict((s,/usr/lib/python2.7/site-packages/ply/yacc.pytget_caller_module_dict s    c CsOg}|j}d}|}x*|D]"}|d7}|j}|sMq%ny|ddkr|std||fn|} |d} nU|d} | }|d} |d} | dkr| dkrtd||fn|j||| | fWq%tk rq%tk rFtd |||jfq%Xq%W|S( Niit|s%s:%d: Misplaced '|'it:s::=s!%s:%d: Syntax error. Expected ':'s %s:%d: Syntax error in rule '%s'(t splitlinesR.RbRGRVt Exceptiontstrip( tdocRRRtpstringstlastptdlinetpsR~RRtassign((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt parse_grammar s6          't ParserReflectcBseZddZdZdZdZdZdZdZ dZ dZ d Z d Z d Zd Zd ZdZRS(cCsm||_d|_d|_d|_i|_g|_d|_|dkr`tt j |_ n ||_ dS(Ni( RR.Rt error_functtokenstfilesRRR RR\R(R RR((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR s        cCs6|j|j|j|j|jdS(N(t get_starttget_error_funct get_tokenstget_precedencetget_pfunctions(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pytget_all s     cCsC|j|j|j|j|j|j|jS(N(tvalidate_starttvalidate_error_functvalidate_tokenstvalidate_precedencetvalidate_pfunctionstvalidate_filesR(R ((s,/usr/lib/python2.7/site-packages/ply/yacc.pyt validate_all s      cCsg}y|jr%|j|jn|jrf|jdjg|jD]}dj|^qDn|jr|jdj|jnx/|jD]$}|dr|j|dqqWWnttfk rnXdj|S(NRdRei(RRVRRkRtpfuncst TypeErrort ValueError(R tpartsR~R((s,/usr/lib/python2.7/site-packages/ply/yacc.pyR s  8  c Cs$tjd}x|jjD]}tjj|\}}|dkrMdSy&t|}|j}|j Wnt k rqnXi}xt |D]{\}} |d7}|j | } | r| j d} |j| } | s||| |7t>|8f|6kr qn| jd%|3|7| jd&|8|3| jd%|3|7| jd&|8|3d|6|3t>|7t>|8f>sj0        0w I, T    (