/usr/lib64/python2.6/site-packages/jinja2
NameSizeModeActions
bccache.py112940644editdlrm
bccache.pyc134770644editdlrm
bccache.pyo134770644editdlrm
compiler.py559230644editdlrm
compiler.pyc509150644editdlrm
compiler.pyo508450644editdlrm
constants.py62290644editdlrm
constants.pyc76970644editdlrm
constants.pyo76970644editdlrm
debug.py99270644editdlrm
debug.pyc101660644editdlrm
debug.pyo100940644editdlrm
defaults.py10500644editdlrm
defaults.pyc16140644editdlrm
defaults.pyo16140644editdlrm
environment.py346510644editdlrm
environment.pyc345220644editdlrm
environment.pyo341030644editdlrm
exceptions.py30730644editdlrm
exceptions.pyc47210644editdlrm
exceptions.pyo47210644editdlrm
ext.py181070644editdlrm
ext.pyc176810644editdlrm
ext.pyo176140644editdlrm
filters.py218060644editdlrm
filters.pyc247740644editdlrm
filters.pyo247740644editdlrm
lexer.py246640644editdlrm
lexer.pyc205660644editdlrm
lexer.pyo203970644editdlrm
loaders.py115070644editdlrm
loaders.pyc132180644editdlrm
loaders.pyo132180644editdlrm
meta.py28460644editdlrm
meta.pyc36670644editdlrm
meta.pyo36670644editdlrm
nodes.py234640644editdlrm
nodes.pyc381880644editdlrm
nodes.pyo376930644editdlrm
optimizer.py23020644editdlrm
optimizer.pyc28730644editdlrm
optimizer.pyo28730644editdlrm
parser.py306760644editdlrm
parser.pyc288520644editdlrm
parser.pyo288520644editdlrm
runtime.py176050644editdlrm
runtime.pyc214470644editdlrm
runtime.pyo214110644editdlrm
sandbox.py92600644editdlrm
sandbox.pyc97180644editdlrm
sandbox.pyo97180644editdlrm
tests.py32660644editdlrm
tests.pyc49220644editdlrm
tests.pyo49220644editdlrm
utils.py248940644editdlrm
utils.pyc315080644editdlrm
utils.pyo315080644editdlrm
visitor.py33160644editdlrm
visitor.pyc38500644editdlrm
visitor.pyo38500644editdlrm
_ipysupport.py9490644editdlrm
_ipysupport.pyc17760644editdlrm
_ipysupport.pyo17760644editdlrm
_speedups.so82320755editdlrm
_stringdefs.py4042560644editdlrm
_stringdefs.pyc2085250644editdlrm
_stringdefs.pyo2085250644editdlrm
__init__.py21950644editdlrm
__init__.pyc23960644editdlrm
__init__.pyo23960644editdlrm
Edit: /usr/lib64/python2.6/site-packages/jinja2/lexer.pyo (20397B)
yJc@sbdZddkZddklZddklZddklZddkl Z l Z e dZ ei dei Zei d eiZei d Zye d d d Wn"ej oei dZn1XddklZei deieifZei dZei dZedZedZedZedZedZedZ edZ!edZ"edZ#edZ$edZ%edZ&edZ'ed Z(ed!Z)ed"Z*ed#Z+ed$Z,ed%Z-ed&Z.ed'Z/ed(Z0ed)Z1ed*Z2ed+Z3ed,Z4ed-Z5ed.Z6ed/Z7ed0Z8ed1Z9ed2Z:ed3Z;ed4Z<ed5Z=ed6Z>ed7Z?ed8Z@ed9ZAed:ZBed;ZCed<ZDed=ZEed>ZFed?ZGed@ZHedAZIedBZJedCZKhedD6e3dE6edF6e"dG6e+dH6e*dI6e.dJ6e4dK6e&dL6e0dM6e'dN6e1dO6e%dP6e/dQ6e!dR6e,dS6e#dT6e$dU6e(dV6e)dW6edX6e dY6edZ6e-d[6ed\6e2d]6ZLeMgZNeLiOD]\ZPZQeNeQePfq?[NZRei d^d[iSd_eTeLd`daDZUeVeAeCeBe5e5eFeGeHgZWeVe5eIeCeHgZXdbZYdcZZdde[fdeYZ\dfe]fdgYZ^dhe[fdiYZ_dje[fdkYZ`dlZadme[fdnYZbdS(os jinja2.lexer ~~~~~~~~~~~~ This module implements a Jinja / Python combination lexer. The `Lexer` class provided by this module is used to do some preprocessing for Jinja. On the one hand it filters out invalid operators like the bitshift operators we don't allow in templates. On the other hand it separates template code and python code in expressions. :copyright: (c) 2009 by the Jinja Team. :license: BSD, see LICENSE for more details. iN(t itemgetter(tdeque(tTemplateSyntaxError(tLRUCachetnexti2s\s+s7('([^'\\]*(?:\\.[^'\\]*)*)'|"([^"\\]*(?:\\.[^"\\]*)*)")s\d+sföös tevals\b[a-zA-Z_][a-zA-Z0-9_]*\b(t _stringdefss [%s][%s]*s(?s>=ts tkeycCs t| S((tlen(RO((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pytscCstti|S(ssCount the number of newline characters in the string. This is useful for extensions that filter a stream. (RQt newline_retfindall(tvalue((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pytcount_newlinesscCsti}t|id||ift|id||ift|id||ifg}|id j o0|it|idd||ifn|i d j o0|it|i dd||i fng}t |dt D]}||d q~S( sACompiles all the rules from the environment into a list of rules.R/tblocktvariablet linestatements^\s*R4s(?:^|(?<=\S))[^\S\r\n]*treverseiN( RLRMRQtcomment_start_stringtblock_start_stringtvariable_start_stringtline_statement_prefixtNonetappendtline_comment_prefixtsortedtTrue(t environmenttetrulest_[1]RO((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyt compile_ruless tFailurecBs#eZdZedZdZRS(sjClass that raises a `TemplateSyntaxError` if called. Used by the `Lexer` to specify known errors. cCs||_||_dS(N(tmessaget error_class(tselfRjtcls((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyt__init__s cCs|i|i||dS(N(RkRj(Rltlinenotfilename((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyt__call__s(t__name__t __module__t__doc__RRnRq(((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRis tTokencBs`eZdZdZdedD\ZZZdZdZ dZ dZ dZ RS( s Token class.ccs%x|]}tt|VqWdS(N(tpropertyR(RNRO((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pys s icCs%ti||tt||fS(N(ttuplet__new__tinterntstr(RmRottypeRU((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRxscCs;|itjo t|iS|idjo|iS|iS(NR$(R{treverse_operatorsRU(Rl((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyt__str__s  cCsI|i|jotSd|jo#|idd|i|igjStS(sTest a token against a token expression. This can either be a token type or ``'token_type:token_value'``. This can only test against string values and types. RHi(R{RctsplitRUtFalse(Rltexpr((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyttests  #cGs*x#|D]}|i|otSqWtS(s(Test against multiple token expressions.(RRcR(RltiterableR((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyttest_anys  cCsd|i|i|ifS(NsToken(%r, %r, %r)(RoR{RU(Rl((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyt__repr__s(( RrRsRtt __slots__trangeRoR{RURxR}RRR(((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRus   tTokenStreamIteratorcBs)eZdZdZdZdZRS(s`The iterator for tokenstreams. Iterate over the stream until the eof token is reached. cCs ||_dS(N(tstream(RlR((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRnscCs|S(N((Rl((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyt__iter__scCsG|ii}|itjo|iitnt|i|S(N(RtcurrentR{t TOKEN_EOFtcloset StopIterationR(Rlttoken((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRs     (RrRsRtRnRR(((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRs  t TokenStreamcBseZdZdZdZdZedddZdZdZ d d Z d Z d Z d Z dZdZRS(sA token stream is an iterable that yields :class:`Token`\s. The parser however does not iterate over it but calls :meth:`next` to go one token ahead. The current active token is stored as :attr:`current`. cCs\t|i|_t|_||_||_t|_t dt d|_ t|dS(Nit( titerRt_nextRt_pushedR$RpRtclosedRut TOKEN_INITIALR(Rlt generatorR$Rp((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRns    cCs t|S(N(R(Rl((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRscCs t|ip|iitj S(N(tboolRRR{R(Rl((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyt __nonzero__ scCs| S(((RO((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRR stdocs Are we at the end of the stream?cCs|ii|dS(s Push a token back to the stream.N(RR`(RlR((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pytpushscCs/t|}|i}|i|||_|S(sLook at the next token.(RRR(Rlt old_tokentresult((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pytlooks     icCs%xt|D]}t|q WdS(sGot n tokens ahead.N(txrangeR(RltnRO((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pytskips cCs"|ii|o t|SdS(sqPerform the token test and return the token if it matched. Otherwise the return value is `None`. N(RRR(RlR((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pytnext_if scCs|i|dj S(s8Like :meth:`next_if` but only returns `True` or `False`.N(RR_(RlR((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pytskip_if'scCsw|i}|io|ii|_nK|iitj o7y|i|_Wqstj o|iqsXn|S(s)Go one token ahead and return the old one(RRtpopleftR{RRRR(Rltrv((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyR+s  cCs1t|iitd|_d|_t|_dS(sClose the stream.RN(RuRRoRR_RRcR(Rl((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyR7s cCs|ii|pd|jo|idd}n|iitjo)td||ii|i|intd|t |if|ii|i|inz |iSWdt |XdS(s}Expect a given token type and return it. This accepts the same argument as :meth:`jinja2.lexer.Token.test`. RHis(unexpected end of template, expected %r.sexpected token %r, got %rN( RRR~R{RRRoR$RpRzR(RlR((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pytexpect=s    (RrRsRtRnRRRvteosRRRRRRRR(((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRs        c Cs||i|i|i|i|i|i|i|i|i|i f }t i |}|djot |}|t |(?:\s*%s\-|%s)\s*raw\s*%s)s(?P<%s_begin>\s*%s\-|%s)s#bygroups.+troots(.*?)((?:\-%s\s*|%s)%s)s#pops(.)sMissing end of comment tags(?:\-%s\s*|%s)%ss \-%s\s*|%ss1(.*?)((?:\s*%s\-|%s)\s*endraw\s*(?:\-%s\s*|%s%s))sMissing end of raw directives \s*(\n|$)s(.*?)()(?=\n|$)((RLRMt whitespace_retTOKEN_WHITESPACER_tfloat_ret TOKEN_FLOATt integer_ret TOKEN_INTEGERtname_ret TOKEN_NAMEt string_ret TOKEN_STRINGt operator_retTOKEN_OPERATORRhRRtjoinR\Rt TOKEN_DATARt TOKEN_COMMENTtTOKEN_COMMENT_ENDRitTOKEN_COMMENT_BEGINtTOKEN_BLOCK_ENDtTOKEN_BLOCK_BEGINRtTOKEN_VARIABLE_ENDtTOKEN_VARIABLE_BEGINt TOKEN_RAW_ENDtTOKEN_RAW_BEGINtTOKEN_LINESTATEMENT_ENDtTOKEN_LINESTATEMENT_BEGINtTOKEN_LINECOMMENTtTOKEN_LINECOMMENT_ENDtTOKEN_LINECOMMENT_BEGINRf( RlRdtcRet tag_rulestroot_tag_rulestblock_suffix_reRgRtr((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRnnsd            2   "           " cCsti|i|S(s?Called for strings and template data to normlize it to unicode.(RSRR(RlRU((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyt_normalize_newlinesscCs7|i||||}t|i|||||S(sCCalls tokeniter + tokenize and wraps it in a token stream. (t tokeniterRtwrap(RltsourceR$RptstateR((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyttokenizesc csx|D]\}}}|tjoqn|djo d}n|djo d}np|djoqn\|djo|i|}n<|djo |}n%|d jot|}n|d joy/|i|d d !id did}WnItj o=}t|idd i}t||||nXyt|}Wqt j oqXnV|djot |}n9|djot |}n|djot |}nt |||VqWdS(sThis is called with the stream as returned by `tokenize` and wraps every token in a :class:`Token` and converts the value. R0R'R1R(R+R,R5tkeywordR$R%iitasciitbackslashreplacesunicode-escapeRHR#R"R&N(R+R,(tignored_tokensRRztencodetdecodet ExceptionR~tstripRt UnicodeErrortintR"t operatorsRu( RlRR$RpRoRRURetmsg((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRsF                 ccs;dit|i}d}d}dg}|dj o"|djo|i|dnd}|i|d}t|} g} xx|D]i\} } } | i||}|djoqn| o| djoqnt| t ox%t | D]\}}|i t jo|||q|d jojx|i iD]?\}}|dj o&|||fV||id7}PqNqNWtd | q|i|d}|p |tjo|||fVn||id7}qWn"|i}| d jo|d jo| idq|djo| idq|djo| idq|djod| ptd||||n| i}||jo#td||f|||qqn|p | tjo|| |fVn||id7}|i}| dj o| djo|inq| d joVx`|i iD]+\}}|dj o|i|PqnqnWtd| n|i| |i|d}n"||jotd| n|}PqW|| jodStd|||f|||qdS(sThis method tokenizes the text and returns the tokens in a generator. Use this method if you just want to tokenize a template. s iiRt_beginiR*R(R1s#bygroups?%r wanted to resolve the token dynamically but no group matchedR&RBRCR@RAR>R?sunexpected "%s"sunexpected "%s", expected "%s"s#popsC%r wanted to resolve the new state dynamically but no group matcheds,%r yielded empty string without stack changeNsunexpected char %r at %d(R*s block_endslinestatement_end(RCRAR?(Rtunicodet splitlinesR_R`RfRQtmatcht isinstanceRwt enumeratet __class__Rit groupdictt iteritemstcountt RuntimeErrortgrouptignore_if_emptyRtpoptend(RlRR$RpRtposRotstackt statetokenst source_lengthtbalancing_stacktregexttokenst new_statetmtidxRRPRUR5t expected_optpos2((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRs                               N( RrRsRtRnRR_RRR(((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyRfs  Z ,(cRtRLR&Rt collectionsRtjinja2.exceptionsRt jinja2.utilsRRRRtURRRRt SyntaxErrorRtjinja2Rt xid_startt xid_continueRRSRyt TOKEN_ADDt TOKEN_ASSIGNt TOKEN_COLONt TOKEN_COMMAt TOKEN_DIVt TOKEN_DOTtTOKEN_EQtTOKEN_FLOORDIVtTOKEN_GTt TOKEN_GTEQt TOKEN_LBRACEtTOKEN_LBRACKETt TOKEN_LPARENtTOKEN_LTt TOKEN_LTEQt TOKEN_MODt TOKEN_MULtTOKEN_NEt TOKEN_PIPEt TOKEN_POWt TOKEN_RBRACEtTOKEN_RBRACKETt TOKEN_RPARENtTOKEN_SEMICOLONt TOKEN_SUBt TOKEN_TILDERRRRRRRRRRRRRRRRRRRRRRRRtdictRgRtktvR|RRbRt frozensetRRRVRhtobjectRiRwRuRRRR(((s2/usr/lib64/python2.6/site-packages/jinja2/lexer.pyts                                                      9      +[