ó
³Ebc           @   s  d  Z  d d l m Z d d l m Z d d l m Z d d l m Z d d l m	 Z	 d d l m
 Z
 e d d	 d
 d d d d d d d d d g ƒ Z e d d d d d d g ƒ Z i e j d 6e j d 6e j d 6e j d 6e j d 6e j d 6Z d  e f d! „  ƒ  YZ d" S(#   s8   Parse tokens from the lexer into nodes for the compiler.i   (   t   nodes(   t   imap(   t   TemplateAssertionError(   t   TemplateSyntaxError(   t   describe_token(   t   describe_token_exprt   fort   ift   blockt   extendst   printt   macrot   includet   fromt   importt   sett   witht
   autoescapet   eqt   net   ltt   lteqt   gtt   gteqt   addt   subt   mult   divt   floordivt   modt   Parserc           B   s  e  Z d  Z d3 d3 d3 d „ Z d3 e d „ Z d „  Z d3 d „ Z d3 d3 d „ Z	 d3 d „ Z
 d3 d „ Z d „  Z e 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 d „  Z d „  Z d „  Z e e d3 e d „ Z  e d „ Z! d „  Z" d „  Z# d „  Z$ d „  Z% d  „  Z& d! „  Z' d" „  Z( d# „  Z) d$ „  Z* e d% „ Z+ d& „  Z, e e d3 e d' „ Z- d( „  Z. d) „  Z/ d* „  Z0 d+ „  Z1 d, „  Z2 d- „  Z3 d. „  Z4 e d/ „ Z5 d0 „  Z6 d3 d1 „ Z7 d2 „  Z8 RS(4   s…   This is the central parsing class Jinja uses.  It's passed to
    extensions and can be used to parse expressions or statements.
    c         C   s¢   | |  _  | j | | | | ƒ |  _ | |  _ | |  _ t |  _ i  |  _ x8 | j ƒ  D]* } x! | j	 D] } | j
 |  j | <qe WqU Wd |  _ g  |  _ g  |  _ d  S(   Ni    (   t   environmentt	   _tokenizet   streamt   namet   filenamet   Falset   closedt
   extensionst   iter_extensionst   tagst   parset   _last_identifiert
   _tag_stackt   _end_token_stack(   t   selfR   t   sourceR"   R#   t   statet	   extensiont   tag(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   __init__+   s    							c         C   s=   | d k r |  j j j } n  | | | |  j |  j ƒ ‚ d S(   s    Convenience method that raises `exc` with the message, passed
        line number or last line number as well as the current name and
        filename.
        N(   t   NoneR!   t   currentt   linenoR"   R#   (   R-   t   msgR5   t   exc(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   fail9   s    c         C   s  g  } x$ | D] } | j  t t | ƒ ƒ q W| rS d j d „  | d Dƒ ƒ } n d  } | d  k rq d g } n d | g } | rÄ | d  k	 r° | | k r° | j d | ƒ qÄ | j d | ƒ n  |  j rè | j d |  j d ƒ n  |  j d	 j | ƒ | ƒ d  S(
   Ns    or c         s   s   |  ] } d  t  | ƒ Vq d S(   s   '%s'N(   R   (   t   .0t   expr(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pys	   <genexpr>H   s    iÿÿÿÿs   Unexpected end of template.s   Encountered unknown tag '%s'.s_   You probably made a nesting mistake. Jinja is expecting this tag, but currently looking for %s.s-   Jinja was looking for the following tags: %s.s4   The innermost block that needs to be closed is '%s'.t    (   t   extendR   R   t   joinR3   t   appendR+   R8   (   R-   R"   t   end_token_stackR5   t   expectedt   exprst   currently_lookingt   message(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   _fail_ut_eofB   s.    	c         C   s   |  j  | |  j | ƒ S(   s¤   Called if the parser encounters an unknown tag.  Tries to fail
        with a human readable error message that could help to identify
        the problem.
        (   RD   R,   (   R-   R"   R5   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   fail_unknown_tagg   s    c         C   s>   t  |  j ƒ } | d k	 r+ | j | ƒ n  |  j d | | ƒ S(   s9   Like fail_unknown_tag but for end of template situations.N(   t   listR,   R3   R>   RD   (   R-   t
   end_tokensR5   t   stack(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   fail_eofn   s    c         C   s<   |  j  j j d k r t S| d k	 r8 |  j  j j | ƒ St S(   s   Are we at the end of a tuple?t   variable_endt	   block_endt   rparen(   RJ   RK   RL   N(   R!   R4   t   typet   TrueR3   t   test_anyR$   (   R-   t   extra_end_rules(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   is_tuple_endu   s
    c         C   sE   |  j  d 7_  t j t j ƒ } t j j | d |  j  d | ƒ| S(   sD   Return a new free identifier as :class:`~jinja2.nodes.InternalName`.i   s   fi%dR5   (   R*   t   objectt   __new__R    t   InternalNamet   NodeR2   (   R-   R5   t   rv(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   free_identifier}   s     c         C   s  |  j  j } | j d k r1 |  j d | j ƒ n  |  j j | j ƒ t } z¶ | j t	 k ry t
 |  d |  j  j j ƒ ƒ  S| j d k r’ |  j ƒ  S| j d k r« |  j ƒ  S|  j j | j ƒ } | d k	 rÖ | |  ƒ S|  j j ƒ  t } |  j | j | j ƒ Wd | r|  j j ƒ  n  Xd S(   s   Parse a single statement.R"   s   tag name expectedt   parse_t   callt   filterN(   R!   R4   RM   R8   R5   R+   R>   t   valueRN   t   _statement_keywordst   getattrt   parse_call_blockt   parse_filter_blockR&   t   getR3   t   popR$   RE   (   R-   t   tokent   pop_tagt   ext(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_statement„   s(    


c         C   sn   |  j  j d ƒ |  j  j d ƒ |  j | ƒ } |  j  j j d k rT |  j | ƒ n  | rj t |  j  ƒ n  | S(   sR  Parse multiple statements into a list until one of the end tokens
        is reached.  This is used to parse the body of statements as it also
        parses template data if appropriate.  The parser checks first if the
        current token is a colon and skips it if there is one.  Then it checks
        for the block end and parses until if one of the `end_tokens` is
        reached.  Per default the active token in the stream at the end of
        the call is the matched end token.  If this is not wanted `drop_needle`
        can be set to `True` and the end token is removed.
        t   colonRK   t   eof(   R!   t   skip_ift   expectt   subparseR4   RM   RI   t   next(   R-   RG   t   drop_needlet   result(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_statements    s    c         C   s•   t  |  j ƒ j } |  j d t ƒ } |  j j d ƒ rX |  j ƒ  } t j | | d | ƒS|  j	 d ƒ } |  j d d t ƒ} t j | | | d | ƒS(   s   Parse an assign statement.t   with_namespacet   assignR5   s   name:endsetRl   N(   s   name:endset(   Rk   R!   R5   t   parse_assign_targetRN   Rh   t   parse_tupleR    t   Assignt   parse_filterR3   Rn   t   AssignBlock(   R-   R5   t   targetR:   t   filter_nodet   body(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt	   parse_set»   s    c      	   C   sï   |  j  j d ƒ j } |  j d d ƒ } |  j  j d ƒ |  j d t d d ƒ } d } |  j  j d ƒ rv |  j ƒ  } n  |  j  j d ƒ } |  j	 d ƒ } t
 |  j  ƒ j d	 k r¸ g  } n |  j	 d d
 t ƒ} t j | | | | | | d | ƒS(   s   Parse a for loop.s   name:forRP   s   name:int   with_condexprs   name:recursives   name:ifs   name:endfors	   name:elset   endforRl   R5   (   s   name:in(   s   name:recursiveN(   s   name:endfors	   name:else(   s   name:endfor(   R!   Ri   R5   Rq   Rr   R$   R3   Rh   t   parse_expressionRn   Rk   R[   RN   R    t   For(   R-   R5   Rv   t   itert   testt	   recursiveRx   t   else_(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt	   parse_forÆ   s    		c         C   sã   t  j d |  j j d ƒ j ƒ } } x· |  j d t ƒ | _ |  j d ƒ | _	 g  | _
 g  | _ t |  j ƒ } | j d ƒ r° t  j d |  j j j ƒ } | j
 j | ƒ q( n* | j d ƒ rÚ |  j d	 d t ƒ| _ n  Pq( W| S(
   s   Parse an if construct.R5   s   name:ifRz   s	   name:elifs	   name:elses
   name:endifRl   (   s	   name:elifs	   name:elses
   name:endif(   s
   name:endif(   R    t   IfR!   Ri   R5   Rr   R$   R   Rn   Rx   t   elif_R   Rk   R4   R>   RN   (   R-   t   nodeRm   Rb   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_ifÙ   s    %		c         C   sÖ   t  j d t |  j ƒ j ƒ } g  } g  } x{ |  j j j d k r§ | r[ |  j j d ƒ n  |  j ƒ  } | j	 d ƒ | j
 | ƒ |  j j d ƒ | j
 |  j ƒ  ƒ q- W| | _ | | _ |  j d d t ƒ| _ | S(	   NR5   RK   t   commat   paramRp   s   name:endwithRl   (   s   name:endwith(   R    t   WithRk   R!   R5   R4   RM   Ri   Rq   t   set_ctxR>   R|   t   targetst   valuesRn   RN   Rx   (   R-   R…   R‹   RŒ   Rv   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt
   parse_withë   s    		c         C   sd   t  j d t |  j ƒ j ƒ } t  j d |  j ƒ  ƒ g | _ |  j d d t	 ƒ| _
 t  j | g ƒ S(   NR5   R   s   name:endautoescapeRl   (   s   name:endautoescape(   R    t   ScopedEvalContextModifierRk   R!   R5   t   KeywordR|   t   optionsRn   RN   Rx   t   Scope(   R-   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_autoescapeü   s    c         C   s£   t  j d t |  j ƒ j ƒ } |  j j d ƒ j | _ |  j j d ƒ | _	 |  j j
 j d k rp |  j d ƒ n  |  j d	 d t ƒ| _ |  j j d | j ƒ | S(
   NR5   R"   s   name:scopedR   sp   Block names in Jinja have to be valid Python identifiers and may not contain hyphens, use an underscore instead.s   name:endblockRl   s   name:(   s   name:endblock(   R    t   BlockRk   R!   R5   Ri   R[   R"   Rh   t   scopedR4   RM   R8   Rn   RN   Rx   (   R-   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_block  s    
c         C   s1   t  j d t |  j ƒ j ƒ } |  j ƒ  | _ | S(   NR5   (   R    t   ExtendsRk   R!   R5   R|   t   template(   R-   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_extends  s    c         C   sh   |  j  j j d d ƒ r[ |  j  j ƒ  j d ƒ r[ t |  j  ƒ j d k | _ |  j  j ƒ  n	 | | _ | S(   Ns	   name:withs   name:withouts   name:contextR   (	   R!   R4   RO   t   lookR   Rk   R[   t   with_contextt   skip(   R-   R…   t   default(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_import_context  s    	c         C   s   t  j d t |  j ƒ j ƒ } |  j ƒ  | _ |  j j j d ƒ rv |  j j	 ƒ  j d ƒ rv t
 | _ |  j j d ƒ n	 t | _ |  j | t
 ƒ S(   NR5   s   name:ignores   name:missingi   (   R    t   IncludeRk   R!   R5   R|   R—   R4   R   R™   RN   t   ignore_missingR›   R$   R   (   R-   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_include$  s    $			c         C   se   t  j d t |  j ƒ j ƒ } |  j ƒ  | _ |  j j d ƒ |  j d t	 ƒ j
 | _ |  j | t ƒ S(   NR5   s   name:ast	   name_only(   R    t   ImportRk   R!   R5   R|   R—   Ri   Rq   RN   R"   Rv   R   R$   (   R-   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_import0  s
    c            s‡  t  j d t ˆ j ƒ j ƒ ‰  ˆ j ƒ  ˆ  _ ˆ j j d ƒ g  ˆ  _ ‡  ‡ f d †  } xˆ  j rw ˆ j j d ƒ n  ˆ j j	 j
 d k rT| ƒ  r™ Pn  ˆ j d t ƒ } | j j d ƒ rÙ ˆ j d | j d	 t ƒn  ˆ j j d
 ƒ rˆ j d t ƒ } ˆ  j j | j | j f ƒ n ˆ  j j | j ƒ | ƒ  sMˆ j j	 j
 d k rdPqdq[ ˆ j j d ƒ q[ Wt ˆ  d ƒ sƒt ˆ  _ n  ˆ  S(   NR5   s   name:importc              s]   ˆ j  j j d k rY ˆ j  j ƒ  j d ƒ rY t ˆ j  ƒ j d k ˆ  _ ˆ j  j ƒ  t St	 S(   NR   t   withouts   name:context(   R   R¤   (
   R!   R4   R[   R™   R   Rk   Rš   R›   RN   R$   (    (   R…   R-   (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_context=  s     	R‡   R"   R¡   t   _s4   names starting with an underline can not be importedR7   s   name:asRš   (   R    t
   FromImportRk   R!   R5   R|   R—   Ri   t   namesR4   RM   Rq   RN   R"   t
   startswithR8   R   Rh   R>   t   hasattrR$   Rš   (   R-   R¥   Rv   t   alias(    (   R…   R-   se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt
   parse_from7  s6    	
			
c         C   sÝ   g  | _  } g  | _ } |  j j d ƒ xœ |  j j j d k rÈ | r[ |  j j d ƒ n  |  j d t ƒ } | j d ƒ |  j j	 d ƒ r¢ | j
 |  j ƒ  ƒ n | r¸ |  j d ƒ n  | j
 | ƒ q- W|  j j d ƒ d  S(   Nt   lparenRL   R‡   R¡   Rˆ   Rp   s-   non-default argument follows default argument(   t   argst   defaultsR!   Ri   R4   RM   Rq   RN   RŠ   Rh   R>   R|   R8   (   R-   R…   R®   R¯   t   arg(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_signaturea  s    c         C   s«   t  j d t |  j ƒ j ƒ } |  j j j d k rC |  j | ƒ n g  | _ g  | _	 |  j
 ƒ  | _ t | j t  j ƒ s |  j d | j ƒ n  |  j d d t ƒ| _ | S(   NR5   R­   s   expected calls   name:endcallRl   (   s   name:endcall(   R    t	   CallBlockRk   R!   R5   R4   RM   R±   R®   R¯   R|   RY   t
   isinstancet   CallR8   Rn   RN   Rx   (   R-   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR^   q  s    		c         C   sR   t  j d t |  j ƒ j ƒ } |  j d  d t ƒ| _ |  j	 d d t ƒ| _
 | S(   NR5   t   start_inlines   name:endfilterRl   (   s   name:endfilter(   R    t   FilterBlockRk   R!   R5   Rt   R3   RN   RZ   Rn   Rx   (   R-   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR_     s    c         C   s_   t  j d t |  j ƒ j ƒ } |  j d t ƒ j | _ |  j | ƒ |  j	 d d t ƒ| _
 | S(   NR5   R¡   s   name:endmacroRl   (   s   name:endmacro(   R    t   MacroRk   R!   R5   Rq   RN   R"   R±   Rn   Rx   (   R-   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_macro…  s
    c         C   sy   t  j d t |  j ƒ j ƒ } g  | _  xK |  j j j d k rt | j  r[ |  j j d ƒ n  | j  j |  j	 ƒ  ƒ q* W| S(   NR5   RK   R‡   (
   R    t   OutputRk   R!   R5   R4   RM   Ri   R>   R|   (   R-   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   parse_printŒ  s    		c         C   s  | rs |  j  j ƒ  j d k rs |  j  j d ƒ } t |  j  ƒ |  j  j d ƒ } t j | j | j d | j ƒ} ns | r¬ |  j  j d ƒ } t j	 | j d d | j ƒ} n: | rÍ |  j
 d t d | ƒ } n |  j ƒ  } | j d ƒ | j ƒ  s|  j d | j j j ƒ  | j ƒ n  | S(   s  Parse an assignment target.  As Jinja allows assignments to
        tuples, this function can parse all allowed assignment targets.  Per
        default assignments to tuples are parsed, that can be disable however
        by setting `with_tuple` to `False`.  If only assignments to names are
        wanted `name_only` can be set to `True`.  The `extra_end_rules`
        parameter is forwarded to the tuple parsing function.  If
        `with_namespace` is enabled, a namespace assignment may be parsed.
        t   dotR"   R5   t   storet
   simplifiedRP   s   can't assign to %r(   R!   R™   RM   Ri   Rk   R    t   NSRefR[   R5   t   NameRr   RN   t   parse_primaryRŠ   t
   can_assignR8   t	   __class__t   __name__t   lower(   R-   t
   with_tupleR¡   RP   Ro   Rb   t   attrRv   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRq   •  s"    $!	 c         C   s   | r |  j  ƒ  S|  j ƒ  S(   sº   Parse an expression.  Per default all expressions are parsed, if
        the optional `with_condexpr` parameter is set to `False` conditional
        expressions are not parsed.
        (   t   parse_condexprt   parse_or(   R-   Rz   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR|   º  s    
c         C   s•   |  j  j j } |  j ƒ  } xs |  j  j d ƒ r |  j ƒ  } |  j  j d ƒ r] |  j ƒ  } n d  } t j | | | d | ƒ} |  j  j j } q W| S(   Ns   name:ifs	   name:elseR5   (	   R!   R4   R5   RÈ   Rh   RÇ   R3   R    t   CondExpr(   R-   R5   t   expr1t   expr2t   expr3(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRÇ   Ã  s    c         C   sk   |  j  j j } |  j ƒ  } xI |  j  j d ƒ rf |  j ƒ  } t j | | d | ƒ} |  j  j j } q W| S(   Ns   name:orR5   (   R!   R4   R5   t	   parse_andRh   R    t   Or(   R-   R5   t   leftt   right(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRÈ   Ð  s    c         C   sk   |  j  j j } |  j ƒ  } xI |  j  j d ƒ rf |  j ƒ  } t j | | d | ƒ} |  j  j j } q W| S(   Ns   name:andR5   (   R!   R4   R5   t	   parse_notRh   R    t   And(   R-   R5   RÏ   RÐ   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRÍ   Ù  s    c         C   sJ   |  j  j j d ƒ r@ t |  j  ƒ j } t j |  j ƒ  d | ƒS|  j ƒ  S(   Ns   name:notR5   (	   R!   R4   R   Rk   R5   R    t   NotRÑ   t   parse_compare(   R-   R5   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRÑ   â  s    c         C   s5  |  j  j j } |  j ƒ  } g  } xñ |  j  j j } | t k rn t |  j  ƒ | j t j	 | |  j ƒ  ƒ ƒ n” |  j  j
 d ƒ r¢ | j t j	 d |  j ƒ  ƒ ƒ n` |  j  j j d ƒ r|  j  j ƒ  j d ƒ r|  j  j d ƒ | j t j	 d |  j ƒ  ƒ ƒ n P|  j  j j } q$ W| s| St j | | d | ƒS(   Ns   name:int   ins   name:noti   t   notinR5   (   R!   R4   R5   t   parse_math1RM   t   _compare_operatorsRk   R>   R    t   OperandRh   R   R™   R›   t   Compare(   R-   R5   R:   t   opst
   token_type(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRÔ   è  s&    ""$	"c         C   s‹   |  j  j j } |  j ƒ  } xi |  j  j j d k r† t |  j  j j } t |  j  ƒ |  j ƒ  } | | | d | ƒ} |  j  j j } q W| S(   NR   R   R5   (   R   R   (   R!   R4   R5   t   parse_concatRM   t   _math_nodesRk   (   R-   R5   RÏ   t   clsRÐ   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR×   ÿ  s    c         C   s‡   |  j  j j } |  j ƒ  g } x9 |  j  j j d k rY t |  j  ƒ | j |  j ƒ  ƒ q! Wt | ƒ d k rt | d St j	 | d | ƒS(   Nt   tildei   i    R5   (
   R!   R4   R5   t   parse_math2RM   Rk   R>   t   lenR    t   Concat(   R-   R5   R®   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRÝ   
  s    c         C   s‹   |  j  j j } |  j ƒ  } xi |  j  j j d k r† t |  j  j j } t |  j  ƒ |  j ƒ  } | | | d | ƒ} |  j  j j } q W| S(   NR   R   R   R   R5   (   R   R   R   R   (   R!   R4   R5   t	   parse_powRM   RÞ   Rk   (   R-   R5   RÏ   Rß   RÐ   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRá     s    c         C   s{   |  j  j j } |  j ƒ  } xY |  j  j j d k rv t |  j  ƒ |  j ƒ  } t j | | d | ƒ} |  j  j j } q W| S(   Nt   powR5   (   R!   R4   R5   t   parse_unaryRM   Rk   R    t   Pow(   R-   R5   RÏ   RÐ   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRä     s    c         C   sÉ   |  j  j j } |  j  j j } | d k rX t |  j  ƒ t j |  j t ƒ d | ƒ} nF | d k r’ t |  j  ƒ t j	 |  j t ƒ d | ƒ} n |  j
 ƒ  } |  j | ƒ } | rÅ |  j | ƒ } n  | S(   NR   R5   R   (   R!   R4   RM   R5   Rk   R    t   NegRæ   R$   t   PosRÀ   t   parse_postfixt   parse_filter_expr(   R-   t   with_filterRÜ   R5   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRæ   )  s    !!c         C   s  |  j  j } | j d k r¦ | j d k rN t j | j d k d | j ƒ} nH | j d k rx t j d  d | j ƒ} n t j | j d	 d | j ƒ} t	 |  j  ƒ ne| j d
 k r7t	 |  j  ƒ | j g } | j } x< |  j  j j d
 k r| j
 |  j  j j ƒ t	 |  j  ƒ qÚ Wt j d j | ƒ d | ƒ} nÔ | j d k rqt	 |  j  ƒ t j | j d | j ƒ} nš | j d k r²t	 |  j  ƒ |  j d t ƒ } |  j  j d ƒ nY | j d k rÐ|  j ƒ  } n; | j d k rî|  j ƒ  } n |  j d t | ƒ | j ƒ | S(   NR"   t   truet   falseRN   R$   R5   t   noneR3   t   loadt   stringt    t   integert   floatR­   t   explicit_parenthesesRL   t   lbrackett   lbraces   unexpected '%s'(   Rí   Rî   RN   R$   (   Rí   RN   (   Rï   R3   (   Ró   Rô   (   R!   R4   RM   R[   R    t   ConstR5   R3   R¿   Rk   R>   R=   Rr   RN   Ri   t
   parse_listt
   parse_dictR8   R   (   R-   Rb   R…   t   bufR5   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRÀ   9  s:    $	!c   	         s  ˆ  j  j j } | r! ˆ  j } n! | r3 ˆ  j } n ‡  f d †  } g  } t } xn | rj ˆ  j  j d ƒ n  ˆ  j | ƒ r} Pn  | j | ƒ  ƒ ˆ  j  j j	 d k r« t
 } n Pˆ  j  j j } qQ W| sü | rÓ | d S| sü ˆ  j d t ˆ  j  j ƒ ƒ qü n  t j | d d | ƒS(   s©  Works like `parse_expression` but if multiple expressions are
        delimited by a comma a :class:`~jinja2.nodes.Tuple` node is created.
        This method could also return a regular expression instead of a tuple
        if no commas where found.

        The default parsing mode is a full tuple.  If `simplified` is `True`
        only names and literals are parsed.  The `no_condexpr` parameter is
        forwarded to :meth:`parse_expression`.

        Because tuples do not require delimiters and may end in a bogus comma
        an extra hint is needed that marks the end of a tuple.  For example
        for loops support tuples between `for` and `in`.  In that case the
        `extra_end_rules` is set to ``['name:in']``.

        `explicit_parentheses` is true if the parsing was triggered by an
        expression in parentheses.  This is used to figure out if an empty
        tuple is a valid expression or not.
        c              s   ˆ  j  d t ƒ S(   NRz   (   R|   R$   (    (   R-   (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR)   z  s    R‡   i    s    Expected an expression, got '%s'Rð   R5   (   R!   R4   R5   RÀ   R|   R$   Ri   RQ   R>   RM   RN   R8   R   R    t   Tuple(	   R-   R½   Rz   RP   Rõ   R5   R)   R®   t   is_tuple(    (   R-   se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRr   Z  s4    	c         C   sŸ   |  j  j d ƒ } g  } x^ |  j  j j d k rx | rI |  j  j d ƒ n  |  j  j j d k rb Pn  | j |  j ƒ  ƒ q W|  j  j d ƒ t j | d | j ƒS(   NRö   t   rbracketR‡   R5   (	   R!   Ri   R4   RM   R>   R|   R    t   ListR5   (   R-   Rb   t   items(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRù   ›  s    c         C   sÖ   |  j  j d ƒ } g  } x• |  j  j j d k r¯ | rI |  j  j d ƒ n  |  j  j j d k rb Pn  |  j ƒ  } |  j  j d ƒ |  j ƒ  } | j t j | | d | j ƒƒ q W|  j  j d ƒ t j	 | d | j ƒS(   NR÷   t   rbraceR‡   Rf   R5   (
   R!   Ri   R4   RM   R|   R>   R    t   PairR5   t   Dict(   R-   Rb   R   t   keyR[   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRú   §  s    &c         C   sc   x\ |  j  j j } | d k s* | d k r< |  j | ƒ } q | d k rZ |  j | ƒ } q Pq W| S(   NR»   Rö   R­   (   R!   R4   RM   t   parse_subscriptt
   parse_call(   R-   R…   RÜ   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRê   ¶  s    c         C   sŠ   xƒ |  j  j j } | d k r0 |  j | ƒ } q | d k rc |  j  j j d k rc |  j | ƒ } q | d k r |  j | ƒ } q Pq W| S(   Nt   pipeR"   t   isR­   (   R!   R4   RM   Rt   R[   t
   parse_testR  (   R-   R…   RÜ   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRë   Ã  s    !c         C   s›  t  |  j ƒ } | j d k rÁ |  j j } t  |  j ƒ | j d k re t j | | j d d | j ƒS| j d k rŠ |  j d | j ƒ n  t j	 | j d | j ƒ} t j
 | | d d | j ƒS| j d k r„g  } xE |  j j j d k r| r|  j j d	 ƒ n  | j |  j ƒ  ƒ qÙ W|  j j d ƒ t | ƒ d
 k rM| d } n t j | d d | j ƒ} t j
 | | d d | j ƒS|  j d | j ƒ d  S(   NR»   R"   Rð   R5   Ró   s   expected name or numberRö   Rþ   R‡   i   i    s   expected subscript expression(   Rk   R!   RM   R4   R    t   GetattrR[   R5   R8   Rø   t   GetitemRi   R>   t   parse_subscribedRâ   Rü   (   R-   R…   Rb   t
   attr_tokenR°   R®   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR  Ò  s.    c         C   sR  |  j  j j } |  j  j j d k r= t |  j  ƒ d  g } n; |  j ƒ  } |  j  j j d k rb | St |  j  ƒ | g } |  j  j j d k r | j d  ƒ n8 |  j  j j d k rÈ | j |  j ƒ  ƒ n | j d  ƒ |  j  j j d k r2t |  j  ƒ |  j  j j d k r"| j |  j ƒ  ƒ q?| j d  ƒ n | j d  ƒ t j	 d | | Œ S(   NRf   Rþ   R‡   R5   (   Rþ   R‡   (   Rþ   R‡   (
   R!   R4   R5   RM   Rk   R3   R|   R>   R    t   Slice(   R-   R5   R®   R…   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR  í  s*    	c   
         s3  ˆ  j  j d ƒ ‰ g  } g  } d  } } t } ‡  ‡ f d †  } x¢ˆ  j  j j d k rä| rŠ ˆ  j  j d ƒ ˆ  j  j j d k rŠ PqŠ n  ˆ  j  j j d k r× | | d  k o· | d  k ƒ t ˆ  j  ƒ ˆ  j ƒ  } nˆ  j  j j d k r| | d  k ƒ t ˆ  j  ƒ ˆ  j ƒ  } nÃ ˆ  j  j j d k r¥ˆ  j  j ƒ  j d k r¥| | d  k ƒ ˆ  j  j j	 } ˆ  j  j
 d	 ƒ ˆ  j ƒ  }	 | j t j | |	 d
 |	 j ƒƒ n6 | | d  k oÄ| d  k oÄ| ƒ | j ˆ  j ƒ  ƒ t } qC Wˆ  j  j d ƒ | d  k r| | | | f St j | | | | | d
 ˆ j ƒS(   NR­   c            s    |  s ˆ  j  d ˆ j ƒ n  d  S(   Ns+   invalid syntax for function call expression(   R8   R5   (   R:   (   R-   Rb   (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   ensure  s    RL   R‡   R   Rå   R"   Rp   i   R5   (   R!   Ri   R3   R$   R4   RM   Rk   R|   R™   R[   R›   R>   R    R   R5   RN   R´   (
   R-   R…   R®   t   kwargst   dyn_argst
   dyn_kwargst   require_commaR  R  R[   (    (   R-   Rb   se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR    sB    
%#
c   	   	   C   s  x|  j  j j d k s | r| s4 t |  j  ƒ n  |  j  j d ƒ } | j } xC |  j  j j d k r” t |  j  ƒ | d |  j  j d ƒ j 7} qR W|  j  j j d k rÈ |  j d  ƒ \ } } } } n g  } g  } d  } } t j	 | | | | | | d | j
 ƒ} t } q W| S(   NR  R"   R»   t   .R­   R5   (   R!   R4   RM   Rk   Ri   R[   R  R3   R    t   FilterR5   R$   (	   R-   R…   Rµ   Rb   R"   R®   R  R  R  (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRt   <  s"    	!
!
c   
   	   C   s­  t  |  j ƒ } |  j j j d ƒ r: t  |  j ƒ t } n t } |  j j d ƒ j } xC |  j j j d k rš t  |  j ƒ | d |  j j d ƒ j 7} qX Wd  } } g  } |  j j j d k rÞ |  j
 d  ƒ \ } } } } nƒ |  j j j d k r[|  j j j d d d ƒ r[|  j j j d ƒ r4|  j d ƒ n  |  j ƒ  }	 |  j |	 ƒ }	 |	 g } n g  } t j | | | | | | d | j ƒ} | r©t j | d | j ƒ} n  | S(   Ns   name:notR"   R»   R  R­   Rñ   Ró   Rô   Rö   R÷   s	   name:elses   name:ors   name:ands   name:iss'   You cannot chain multiple tests with isR5   (   R"   Rñ   Ró   Rô   R­   Rö   R÷   (   Rk   R!   R4   R   RN   R$   Ri   R[   RM   R3   R  RO   R8   RÀ   Rê   R    t   TestR5   RÓ   (
   R-   R…   Rb   t   negatedR"   R  R  R  R®   t   arg_node(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR	  Q  sB    	!
      	!c            s¿  g  ‰  g  ‰ ˆ j  } | d  k	 r4 |  j j  | ƒ n  ‡  ‡ f d †  } zUxG|  j r’|  j j } | j d k r« | j r› | t j | j d | j	 ƒƒ n  t
 |  j ƒ qL | j d k rð t
 |  j ƒ | |  j d t ƒ ƒ |  j j d ƒ qL | j d k rƒ| ƒ  t
 |  j ƒ | d  k	 r8|  j j j | Œ  r8ˆ  S|  j ƒ  } t | t ƒ rcˆ  j | ƒ n ˆ  j  | ƒ |  j j d ƒ qL t d	 ƒ ‚ qL W| ƒ  Wd  | d  k	 rº|  j j ƒ  n  Xˆ  S(
   Nc             s;   ˆ r7 ˆ d j  }  ˆ  j t j ˆ d |  ƒƒ ˆ 2n  d  S(   Ni    R5   (   R5   R>   R    R¹   (   R5   (   Rx   t   data_buffer(    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt
   flush_data  s    t   dataR5   t   variable_beginRz   RJ   t   block_beginRK   s   internal parsing error(   R>   R3   R,   R!   R4   RM   R[   R    t   TemplateDataR5   Rk   Rr   RN   Ri   RO   Re   R³   RF   R<   t   AssertionErrorRa   (   R-   RG   t   add_dataR  Rb   RV   (    (   Rx   R  se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyRj   w  sB    		"	c         C   s/   t  j |  j ƒ  d d ƒ} | j |  j ƒ | S(   s0   Parse the whole template into a `Template` node.R5   i   (   R    t   TemplateRj   t   set_environmentR   (   R-   Rm   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR)   §  s    N(9   RÃ   t
   __module__t   __doc__R3   R2   R   R8   RD   RE   RI   RQ   RW   Re   R$   Rn   Ry   R‚   R†   R   R’   R•   R˜   R   R    R£   R¬   R±   R^   R_   R¸   Rº   RN   Rq   R|   RÇ   RÈ   RÍ   RÑ   RÔ   R×   RÝ   Rá   Rä   Ræ   RÀ   Rr   Rù   Rú   Rê   Rë   R  R  R  Rt   R	  Rj   R)   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyR   &   sr   		%									
			*					 										
		
	#<							0	&0N(   R$  Rò   R    t   _compatR   t
   exceptionsR   R   t   lexerR   R   t	   frozensetR\   RØ   t   Addt   Subt   Mult   Divt   FloorDivt   ModRÞ   RR   R   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/jinja2/parser.pyt   <module>   s8   




