Ñò -!Lc@s®dZddklZlZlZlZddkZdefd„ƒYZdefd„ƒYZ defd „ƒYZ d efd „ƒYZ d efd „ƒYZ defd„ƒYZ defd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZd efd!„ƒYZd"efd#„ƒYZd$efd%„ƒYZdS(&s5defines the parse tree components for Mako templates.iÿÿÿÿ(t exceptionstasttutiltfiltersNtNodecBs>eZdZd„Zd„ZeeƒZd„Zd„ZRS(s(base class for a Node in the parse tree.cCs(||_||_||_||_dS(N(tsourcetlinenotpostfilename(tselfRRRR((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyt__init__s   cCs,h|id6|id6|id6|id6S(NRRRR(RRRR(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pytexception_kwargsscCsgS(N((R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyt get_childrenscs9‡fd†}tˆd|ii|ƒ}||ƒdS(Ncs(x!|iƒD]}|iˆƒq WdS(N(R taccept_visitor(tnodetn(tvisitor(s2/usr/lib/python2.6/site-packages/mako/parsetree.pyttraverses tvisit(tgetattrt __class__t__name__(R RRtmethod((Rs2/usr/lib/python2.6/site-packages/mako/parsetree.pyR s(Rt __module__t__doc__R R tpropertyR R (((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR s     t TemplateNodecBs)eZdZd„Zd„Zd„ZRS(s?a 'container' node that stores the overall collection of nodes.cCs5tt|ƒiddd|ƒg|_h|_dS(Nti(tsuperRR tnodestpage_attributes(R R((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR %s cCs|iS(N(R(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR *scCsdti|iƒ|ifS(NsTemplateNode(%s, %r)(Rtsorted_dict_reprRR(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyt__repr__-s(RRRR R R (((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR"s  t ControlLinecBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s‘defines a control line, a line-oriented python line or end tag. e.g.:: % if foo: (markup) % endif cKs‘tt|ƒi|||_||_||_|dj|_|iog|_g|_n.t i ||i }|i |_|i |_dS(Ntfortiftwhilettry(R"R#R$R%(RR!R ttexttkeywordtisendt is_primaryt_declared_identifierst_undeclared_identifiersRtPythonFragmentR tdeclared_identifierstundeclared_identifiers(R R'R(R&tkwargstcode((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR ;s       cCs|iS(N(R*(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR-IscCs|iS(N(R+(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR.LscCsO|htddgƒd6tddgƒd6tdgƒd6i|igƒjS(sJreturn true if the given keyword is a ternary keyword for this ControlLinetelsetelifR#texcepttfinallyR%R"(tsettgetR'(R R'((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyt is_ternaryOs cCs)d|i|i|i|i|iffS(NsControlLine(%r, %r, %r, %r)(R'R&R(RR(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR Xs (RRRR R-R.R7R (((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR!0s      tTextcBs eZdZd„Zd„ZRS(s#defines plain text in the template.cKs#tt|ƒi|||_dS(N(RR8R tcontent(R R9R/((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR cscCsd|i|i|iffS(Ns Text(%r, %r)(R9RR(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR gs(RRRR R (((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR8`s tCodecBs2eZdZd„Zd„Zd„Zd„ZRS(sÛdefines a Python code block, either inline or module level. e.g.:: inline: <% x = 12 %> module level: <%! import logger %> cKsDtt|ƒi|||_||_ti||i|_dS(N( RR:R R&tismoduleRt PythonCodeR R0(R R&R;R/((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR {s  cCs |iiS(N(R0R-(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR-scCs |iiS(N(R0R.(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR.„scCs#d|i|i|i|iffS(NsCode(%r, %r, %r)(R&R;RR(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR ‡s(RRRR R-R.R (((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR:js    tCommentcBs eZdZd„Zd„ZRS(s>defines a comment line. # this is a comment cKs#tt|ƒi|||_dS(N(RR=R R&(R R&R/((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR •scCsd|i|i|iffS(NsComment(%r, %r)(R&RR(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR ™s(RRRR R (((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR=Žs t ExpressioncBs2eZdZd„Zd„Zd„Zd„ZRS(s7defines an inline expression. ${x+y} cKs\tt|ƒi|||_||_ti||i|_ti ||i|_ dS(N( RR>R R&tescapesRt ArgumentListR t escapes_codeR<R0(R R&R?R/((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR £s   cCsgS(N((R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR-ªscCs1|iii|iiittiiƒƒƒƒS(N( R0R.tunionRAt differenceR5RtDEFAULT_ESCAPEStkeys(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR.­s  cCs&d|i|ii|i|iffS(NsExpression(%r, %r, %r)(R&RAtargsRR(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR µs (RRRR R-R.R (((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR>œs    t_TagMetacBs&eZdZhZd„Zd„ZRS(sEmetaclass to allow Tag to produce a subclass according to its keywordcCsD|idj o0||i|i <%someothertag> stuff c Ks×tt|ƒi|||_||_|i||ƒg}|D]!}||ijo ||qCqC~} t| ƒoGti ddi g} | D]} | t | ƒq”~ ƒ|i ‚nd|_g|_dS(sgconstruct a new Tag instance. this constructor not called directly, and is only called by subclasses. keyword - the tag keyword attributes - raw dictionary of attribute key/value pairs expressions - a set of identifiers that are legal attributes, which can also contain embedded expressions nonexpressions - a set of identifiers that are legal attributes, which cannot contain embedded expressions \**kwargs - other arguments passed to the Node superclass (lineno, pos) sMissing attribute(s): %st,N(RRYR R'RVt_parse_attributestparsed_attributestlenRRUtjointreprR RItparentR( R R'RVt expressionstnonexpressionstrequiredR/t_[1]trtmissingt_[2]tm((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR ås  5 1 cCs |idjS(N(R`RI(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pytis_rootscCs|iS(N(R(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR sc Cs£tƒ}h|_x|iD]v}||joÖg}x¦tid|i|ƒD]‹}tid|ƒ}|oNti|idƒ|i }|i |i ƒ}|i d|idƒƒqO|o|i t |ƒƒqOqOWdi|ƒp t dƒ|i|((snameR~sfilesimportsmodule(( RR{R R6thextabstidR}RRUR (R R'RVR/((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR Ns +cCsgS(N((R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR-]s(RRRHR R-(((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR{Ks tTextTagcBseZdZd„ZRS(R&cKsMtt|ƒi||ddd|ti|iddƒ|i|_dS(NtfilterR(((RRƒR RR@R6R t filter_args(R R'RVR/((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR cs (RRRHR (((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyRƒ`stDefTagcBs)eZdZd„Zd„Zd„ZRS(tdefc KsÇtt|ƒi||ddd||d}tid |ƒotid |i‚nti d |d|i|_ |i i |_ |i d dƒ|_ti|i d dƒ|i|_dS(Ntbufferedtcachedt cache_keyt cache_timeoutt cache_typet cache_dirt cache_urlR}R„t decorators^[\w_]+$sMissing parenthesis in %defsdef s:passR(RˆR‰RŠR‹RŒRRŽ(snamesfilters decorator(sname(RR†R RjRkRRUR Rt FunctionDeclt function_decltfuncnameR}R6RR@R…(R R'RVR/R}((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR os&  cCs |iiS(N(R‘targnames(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR-„scCseg}x6|iiD](}|tti||iiƒ7}qW|t|iiit i i ƒƒƒS(N( R‘tdefaultstlistRR<R R.R…RCRRDRE(R trestc((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR.‡s  &(RRRHR R-R.(((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR†ls  tCallTagcBs)eZdZd„Zd„Zd„ZRS(tcallcKsutt|ƒi||ddd||d|_ti|i|i|_ti|i ddƒ|i|_ dS(NRFRqR(sexpr(sexpr( RR˜R t expressionRR<R R0t FunctionArgsR6t body_decl(R R'RVR/((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR “s  cCs|iii|iiƒS(N(R0R-RBRœR“(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR-šscCs |iiS(N(R0R.(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR.s(RRRHR R-R.(((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR˜s  RScBs#eZd„Zd„Zd„ZRS(c Ksätt|ƒi|d||t|iƒƒddd |d||dig}|iiƒD].\}}|djo|d||fq`q`~ƒf|_t i |i|i |_ t i |iddƒ|i |_dS( NRORFs %s.%s(%s)RZs%s=%sR(sargs(((RRSR ttupleRER^R\t iteritemsRšRR<R R0R›R6Rœ(R R|RXRVR/Rdtktv((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR ¢s"  5cCs|iii|iiƒS(N(R0R-RBRœR“(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR-·scCs |iiS(N(R0R.(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR.ºs(RRR R-R.(((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyRS s  t InheritTagcBseZdZd„ZRS(tinheritcKs)tt|ƒi||ddd|dS(NRv(sfile((sfile(RR¡R (R R'RVR/((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR Às(RRRHR (((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR¡½stPageTagcBs eZdZd„Zd„ZRS(tpagec Ksqtt|ƒi||d d d |ti|idd ƒ|i|_ti|idd ƒ|i|_ dS( NR‰RŠR‹RŒRRŽRFtexpression_filterR(scacheds cache_keys cache_timeouts cache_types cache_dirs cache_urlsargsR¥((( RR£R RR›R6R RœR@R…(R R'RVR/((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR Ès$cCs |iiS(N(RœR“(R ((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR-×s(RRRHR R-(((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyR£Ås (RtmakoRRRRRjtobjectRRR!R8R:R=R>RQRGRYRtR{RƒR†R˜RSR¡R£(((s2/usr/lib/python2.6/site-packages/mako/parsetree.pyts&" 0 $ ` $