ÿØÿà JFIF      ÿÛ „ 	 ( %!1"%)+...383-7(-.+



-%%--------+------------/----------------------------ÿÀ  ¶" ÿÄ               ÿÄ @       !1AQaq‘¡"±ÁÑð2’BRráS‚ñ3b¢CT²Ò #cÿÄ             ÿÄ '        1!AQ2a"‘±#ÿÚ   ? ò(/p‘—–¢·,M|¯G»R£üešT. ôŸEoCFñ‡ 4ÔkåóxR|µÁ¨ÓDà!Ç´µ˜‡p ÍQ‹§!þž^õWsŒy  åÁ§$á«%ºq˜™JyyË0y«^Ï
-3ÃÏËÈ£Æ\P’ä„s&•‹Üs üô'àWt¹pñCp$bÚF`·7.^)¾!)ÒÙ˜–ÅÏš^h¾ø³·ìe±ŒaeÖ—Í,e=B}Jéß¦$$½—šÙÜCC¯¶è8Î²–Åkèwx
LÉngT±æ¹£Ócœ¿Í/©Éÿ ‰ÚCÒ­mq;Tt¶–}0"zÖPcd1š­¤tˆ„ÐÓâqú[™öUCŠ2Þ¿Ø¯­É(¸ßúçšmW,Ò ºf‹Ån™ÄLêÃ8üÁkÁ€L¥ÍuJ1œôrÂSŒÓöt!7EUíïb)AËi¬â-ÙHk8òÁiXYwÅ)O^"ÇØriÛô{»wRUKÙÏÚlÓ¬€‚’×©T]
ªb—ÊîKC^×M“xùäñz¬zJ×{4[¹M'IÆeH1LCWÕ]œûº WDæà°OÅ‚¹c²ÞuA–rL`HšpCez‡V’— Ž‚Ë„–ñ­'µR0ÕÖ=À:±G»C\nÆÉ5*¢ †3šhQ4ýÒi$Õ1"Ü]¢p-q3zcQ$ªö¨¥æf›‘»´ÝÚHá„e²JÇ–iÊ:·à¬Øc5Åk»Laª*wi
[0Ówk ¦a¦0Õ²ÅÅ‚T¸’³q:Æ<¹ú	Ò˜Æ}2VE•Ð€p¡Ô3Úº …h³^Ç‡ºçì¥Ánó|˜ÖˆÎˆ+«¦dø‘Mº–d\ªDðÛ„Ì×LÝ——Ð9Ç|•FèçVm™¨€™3õS–9Äå¢<Ì‰Ìm¢±`·º˜&Z²ž Ë®D«¶»6™‰©­HÈÀá«h­i³04æ’hxœi3ï¨(ÓL·†‹¶ËpŒ
ƒÜÒ?	:õdsÀ–3æÓ·Üjâ¬9—]8n¼&]I F£¼…ì–—Œ0v°LÇÅfÛ2TÖ’aµ˜N@ÖBSÏ^à´4-±°b×nÈÈœÆD=KdŒø…ÄÈK,›ÖR§fjü$^ÔÎ!„6^ s:Üun\ôkCÞò÷<—Lúl
Í›G¹ÀPá¼Nc¡šÒ…ÙWÍ³œ±vÊáÐ„×9‹P‰cEØ‘™›µŸP<×g1
º©Ø¬wiÁ^l5×I/';Ë+´Z‡ÓÄFÕp[Èð’
HÄ	ó
9¬Dl4“é±Ï”V=^Hð;žLädÉa‚°Ë,#/Ž~²BÔÛ
QãñQtIeórVB,ÏÂf‹4#Îœc‹É3ZIÖ Œ¢¥·üxa‡Ãçè„jŠ[5 Ä!U?,3žÎ×…ðdÓ÷háŠA‰ìÄ4÷ÃÜZÃE{‰®+W\ZÍE[‰»µk»MÝ­`¢©†˜ÃV‹-f¢¡†¢a«eŠ%«Y¨©q%jâd,Ôq`) ¤¦…šˆ ¦E>0Ùb²t–Ÿ
÷jsÏ‚Ò’KÈcø(é›;k(’#ôŒQ
™C>
õ³M9óºÆµ¤çâ;uÀ)5>RÔ¸fÓ~È¦—’-$fe«"FâUˆÊwµPÏu
w+"åÉoÌ¨6s™Û9(À¨ù©hE°½†n`m~“@©›p!Vkhµ Á1šbEqqÊ@ºèl›2 –Yã%‘‚hÛ{a¶‡ÅÞM²¬çL34®Çl]®‹ŽØŒm'RÜe35æöˆ­Á­ cP9šeÁköo´L³Ì=p8]”‡B¶,šº|ÉdzXˆØk*ÇÚ{#ñ‰pã(€¶‡9ý'šÜ³½¯kƒ†Â’ëSOƒ•Å®H6+a¢µˆ‹Y¨b˜b+XˆÖ!°u!¢"µˆˆn2ˆ Å0Ä`Å Ô®c(ÓÜGº•Ä»Œ âWî%q.áÐÄ÷î%umÍ£+ÜQ,Vn¦-GphU¸¢X­&,Gt
·K¢ÅÅ·¥RÄÊÉbKn
N­R2g$VµÕó
Qr#–ÓZUÏð0ÎtÙÀœz
ëöo“Îk¯n„T°"SÞ+³/…€½"ižãO%Í%&Î”â‘ËØ´IˆÓ°Ë‰ÞM<J•›C=ìu*Ü§„Ã¤GËŠô;5ŒÁ£ñùä¬6Ì2¦‘žh¸Rº<Õš%÷ …Ç	‚g‡.
>3.™yçÁzit›`4C`k¢¼á!álÄï sÂ[×!¤l¾æo"ƒIÔ'@ªu)3›ô®“@Z
à¾]
üœ'‡4¸PÞkÁ-qÄH‰ÓÍBd´ÿ —¹°ÄA&ÊUC„öz‚‚RæŠtf¬>˜ÑidšEçÑL÷áý¡V±h§­c¿¥¨ƒ@g¼…Ýö^ÞËc.Å¾„æ“I[ª+·zÐÒÚ,½Ð»¶€C›7jk$à¹–€Ž¾ÅÙpp¶ÍþéÎ¤ ½ØÎŒq ñpæžÅ¥#Øâ49ÃÂK^MYV“,¶Éz_òæ:…;Õ«¦I3âJ£¤û5$7Èxün\â]Êe¯(Ÿ&Ž‹¶2<6Ä†f× æ¢Æ±qWÄ±[(ÙÂŽç‚T7¨@ÈÉÍß‚ïÙ"&3TYlGŽ†)†#5ŠA©^T2ÆÁ†)©†©†¤yGXÁ†©"†)©¼ÅV WS†#©]R–r‹q5ÕbâWþBh¯u+ªÅÄ×ü„nÑ^êkªÁj‰jeœWˆÕÕ`µDµ2Ì+Ä µDµµ5Ô{¤Þ0RF’H÷AÛ<ÊÁ§ Æˆæ0Ñ£ê4 öÚµ[¬/1²€â<-¬šö²r×0o×w ´xÐÒË„
g01¬„åEMè›‡Ã\6µE›‘fÙO	k÷CºnÓ1`iîÒ²áÂ!ÑLÄÿ 
³¬\õ*:M=Ç»c‹2[‰ØsÕLò\ŒK L^™üÄN\¶#»
Ç\……ßïIœÉ$¸ÎñÍ®ÔHÃ‡	Ûí/´>Li”„†g^$ 7NÍÑÑ2M2ªNg=k½Ð}Ÿl6‡	—JWˆ”ÞéT·+µ¦üÂFè¢Vs6ýÆ4»2+2IÝ9ô9®ÇGÙÇ1+Ä8;*Õ§ž½D*îÑWÚçá3Ma¤·ˆ¥t}š²Ü…Q+Æüµ8HíS”üxGéÁˆ¦Ël„éÈ	5 µÄƒ6äÜ(kIš¯S†fÖ&¸®×v|Äyˆ*ç¦ŒÉù@7-®Ä[]ÎÖ¿ê`º…=:…žJVnÝ³vðÖKE¼‚ »mà ÷f®:Ë™–4rð¡4` Ü¹çž~‹C=œ…¾Ïj|VDtK.ƒ"9	Ï
­–éXá³6WÒïIL-Ð‡
Ç
usr/lib/python2.7/site-packages/babel/plural.pyo                                                    0000644                 00000062242 15267247013 0015525 0                                                                                                    ustar 00                                                                                                                                                                                                                                                       ó
H¶ÜXc           @   sü  d  Z  d d l Z d d l m Z d5 Z d	 Z d
 „  Z d e f d „  ƒ  YZ d „  Z	 d „  Z
 d „  Z d „  Z d „  Z d „  Z d e f d „  ƒ  YZ d Z d e j d e j ƒ f d e j d j e ƒ ƒ f d e j d ƒ f d e j d ƒ f d e j d e j ƒ f g Z d „  Z d d  „ Z d d! „ Z d" „  Z d# „  Z d$ „  Z d% „  Z d& e f d' „  ƒ  YZ d( „  Z d) „  Z  d* „  Z! d+ e f d, „  ƒ  YZ" d- e" f d. „  ƒ  YZ# d/ e" f d0 „  ƒ  YZ$ d1 e$ f d2 „  ƒ  YZ% d3 e" f d4 „  ƒ  YZ& d S(6   s«   
    babel.numbers
    ~~~~~~~~~~~~~

    CLDR Plural support.  See UTS #35.

    :copyright: (c) 2013 by the Babel Team.
    :license: BSD, see LICENSE for more details.
iÿÿÿÿN(   t   decimalt   zerot   onet   twot   fewt   manyt   otherc         C   s)  t  |  ƒ } t | ƒ } t | t ƒ rT | | k r< | } qT t j t | ƒ ƒ } n  t | t j ƒ r| j ƒ  } | j } | d k  r” | j	 | n d } d j
 d „  | Dƒ ƒ } | j d ƒ } t | ƒ } t | ƒ }	 t | pæ d ƒ }
 t | pø d ƒ } n d } }	 }
 } | | | |	 |
 | f S(   s"  Extract operands from a decimal, a float or an int, according to `CLDR rules`_.

    The result is a 6-tuple (n, i, v, w, f, t), where those symbols are as follows:

    ====== ===============================================================
    Symbol Value
    ------ ---------------------------------------------------------------
    n      absolute value of the source number (integer and decimals).
    i      integer digits of n.
    v      number of visible fraction digits in n, with trailing zeros.
    w      number of visible fraction digits in n, without trailing zeros.
    f      visible fractional digits in n, with trailing zeros.
    t      visible fractional digits in n, without trailing zeros.
    ====== ===============================================================

    .. _`CLDR rules`: http://www.unicode.org/reports/tr35/tr35-33/tr35-numbers.html#Operands

    :param source: A real number
    :type source: int|float|decimal.Decimal
    :return: A n-i-v-w-f-t tuple
    :rtype: tuple[decimal.Decimal, int, int, int, int, int]
    i    t    c         s   s   |  ] } t  | ƒ Vq d  S(   N(   t   str(   t   .0t   d(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pys	   <genexpr>A   s    t   0(    (   t   abst   intt
   isinstancet   floatR    t   DecimalR   t   as_tuplet   exponentt   digitst   joint   rstript   len(   t   sourcet   nt   it	   dec_tuplet   expt   fraction_digitst   trailingt   no_trailingt   vt   wt   ft   t(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   extract_operands   s$    		t
   PluralRulec           B   st   e  Z d  Z d Z d „  Z d „  Z e d „  ƒ Z e d „  ƒ Z	 e d „  d d	 ƒZ
 d
 „  Z d „  Z d „  Z RS(   se  Represents a set of language pluralization rules.  The constructor
    accepts a list of (tag, expr) tuples or a dict of `CLDR rules`_. The
    resulting object is callable and accepts one parameter with a positive or
    negative number (both integer and float) for the number that indicates the
    plural form for a string and returns the tag for the format:

    >>> rule = PluralRule({'one': 'n is 1'})
    >>> rule(1)
    'one'
    >>> rule(2)
    'other'

    Currently the CLDR defines these tags: zero, one, two, few, many and
    other where other is an implicit default.  Rules should be mutually
    exclusive; for a given numeric value, only one rule should apply (i.e.
    the condition should only be true for one of the plural rule elements.

    .. _`CLDR rules`: http://www.unicode.org/reports/tr35/tr35-33/tr35-numbers.html#Language_Plural_Rules
    t   abstractt   _funcc         C   sÐ   t  | t ƒ r | j ƒ  } n  t ƒ  } g  |  _ x™ t t | ƒ ƒ D]… \ } } | t k rn t d | ƒ ‚ n | | k r� t d | ƒ ‚ n  | j	 | ƒ t
 | ƒ j } | rC |  j j | | f ƒ qC qC Wd S(   s$  Initialize the rule instance.

        :param rules: a list of ``(tag, expr)``) tuples with the rules
                      conforming to UTS #35 or a dict with the tags as keys
                      and expressions as values.
        :raise RuleError: if the expression is malformed
        s   unknown tag %rs   tag %r defined twiceN(   R   t   dictt   itemst   setR%   t   sortedt   listt   _plural_tagst
   ValueErrort   addt   _Parsert   astt   append(   t   selft   rulest   foundt   keyt   exprR0   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   __init__c   s    		c      	   C   sV   |  j  } d t |  ƒ j d j g  t D]& } | | k r% d | | | f ^ q% ƒ f S(   Ns   <%s %r>s   , s   %s: %s(   R3   t   typet   __name__R   R,   (   R2   R3   t   tag(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   __repr__y   s
    	c         C   s   t  | |  ƒ r | S|  | ƒ S(   s
  Create a `PluralRule` instance for the given rules.  If the rules
        are a `PluralRule` object, that object is returned.

        :param rules: the rules as list or dict, or a `PluralRule` object
        :raise RuleError: if the expression is malformed
        (   R   (   t   clsR3   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   parse�   s    c         C   s>   t  ƒ  j } t g  |  j D] \ } } | | | ƒ f ^ q ƒ S(   sŸ   The `PluralRule` as a dict of unicode plural rules.

        >>> rule = PluralRule({'one': 'n is 1'})
        >>> rule.rules
        {'one': 'n is 1'}
        (   t   _UnicodeCompilert   compileR'   R%   (   R2   t   _compileR:   R0   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR3   �   s    c         C   s$   t  g  |  j D] } | d ^ q ƒ S(   Ni    (   t	   frozensetR%   (   t   xR   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   <lambda>˜   R   t   docs°   
        A set of explicitly defined tags in this rule.  The implicit default
        ``'other'`` rules is not part of this set unless there is an explicit
        rule for it.c         C   s   |  j  S(   N(   R%   (   R2   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   __getstate__�   s    c         C   s   | |  _  d  S(   N(   R%   (   R2   R%   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   __setstate__    s    c         C   s.   t  |  d ƒ s! t |  ƒ |  _ n  |  j | ƒ S(   NR&   (   t   hasattrt	   to_pythonR&   (   R2   R   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   __call__£   s    (   R%   R&   (   R9   t
   __module__t   __doc__t	   __slots__R7   R;   t   classmethodR=   t   propertyR3   t   tagsRE   RF   RI   (    (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR$   L   s   					c         C   ss   t  ƒ  j } d g } x= t j |  ƒ j D]) \ } } | j d | | ƒ | f ƒ q( W| j d t ƒ d j | ƒ S(   s‚  Convert a list/dict of rules or a `PluralRule` object into a JavaScript
    function.  This function depends on no external library:

    >>> to_javascript({'one': 'n is 1'})
    "(function(n) { return (n == 1) ? 'one' : 'other'; })"

    Implementation detail: The function generated will probably evaluate
    expressions involved into range operations multiple times.  This has the
    advantage that external helper functions are not required and is not a
    big performance hit for these simple calculations.

    :param rule: the rules as list or dict, or a `PluralRule` object
    :raise RuleError: if the expression is malformed
    s   (function(n) { return s
   %s ? %r : s   %r; })R   (   t   _JavaScriptCompilerR?   R$   R=   R%   R1   t   _fallback_tagR   (   t   rulet   to_jst   resultR:   R0   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   to_javascript©   s    	!c         C   sÁ   i t  d 6t d 6t d 6t d 6} t ƒ  j } d d g } xC t j |  ƒ j D]/ \ } } | j	 d | | ƒ t
 | ƒ f ƒ qM W| j	 d t ƒ t d	 j | ƒ d
 d ƒ } t | | ƒ | d S(   s<  Convert a list/dict of rules or a `PluralRule` object into a regular
    Python function.  This is useful in situations where you need a real
    function and don't are about the actual rule object:

    >>> func = to_python({'one': 'n is 1', 'few': 'n in 2..4'})
    >>> func(1)
    'one'
    >>> func(3)
    'few'
    >>> func = to_python({'one': 'n in 1,11', 'few': 'n in 3..10,13..19'})
    >>> func(11)
    'one'
    >>> func(15)
    'few'

    :param rule: the rules as list or dict, or a `PluralRule` object
    :raise RuleError: if the expression is malformed
    t   INt   WITHINt   MODR#   s   def evaluate(n):s'    n, i, v, w, f, t = extract_operands(n)s    if (%s): return %rs
    return %rs   
s   <rule>t   exect   evaluate(   t   in_range_listt   within_range_listt   cldr_moduloR#   t   _PythonCompilerR?   R$   R=   R%   R1   R   RQ   R   t   eval(   RR   t	   namespacet   to_python_funcRT   R:   R0   t   code(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRH   À   s    
	'c         C   sÍ   t  j |  ƒ }  |  j t t g ƒ B} t ƒ  j } g  t D] } | | k r8 | ^ q8 j } d t	 | ƒ g } x: |  j
 D]/ \ } } | j d | | ƒ | | ƒ f ƒ qv W| j d | t ƒ ƒ d j | ƒ S(   s~  The plural rule as gettext expression.  The gettext expression is
    technically limited to integers and returns indices rather than tags.

    >>> to_gettext({'one': 'n is 1', 'two': 'n is 2'})
    'nplurals=3; plural=((n == 1) ? 0 : (n == 2) ? 1 : 2)'

    :param rule: the rules as list or dict, or a `PluralRule` object
    :raise RuleError: if the expression is malformed
    s   nplurals=%d; plural=(s
   %s ? %d : s   %d)R   (   R$   R=   RO   R)   RQ   t   _GettextCompilerR?   R,   t   indexR   R%   R1   R   (   RR   t	   used_tagsR@   R:   t
   _get_indexRT   R0   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt
   to_gettextè   s    
('c         C   s   |  t  |  ƒ k o t |  | ƒ S(   s™  Integer range list test.  This is the callback for the "in" operator
    of the UTS #35 pluralization rule language:

    >>> in_range_list(1, [(1, 3)])
    True
    >>> in_range_list(3, [(1, 3)])
    True
    >>> in_range_list(3, [(1, 3), (5, 8)])
    True
    >>> in_range_list(1.2, [(1, 4)])
    False
    >>> in_range_list(10, [(1, 4)])
    False
    >>> in_range_list(10, [(1, 4), (6, 8)])
    False
    (   R   R\   (   t   numt
   range_list(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR[   ÿ   s    c            s   t  ‡  f d †  | Dƒ ƒ S(   s¶  Float range test.  This is the callback for the "within" operator
    of the UTS #35 pluralization rule language:

    >>> within_range_list(1, [(1, 3)])
    True
    >>> within_range_list(1.0, [(1, 3)])
    True
    >>> within_range_list(1.2, [(1, 4)])
    True
    >>> within_range_list(8.8, [(1, 4), (7, 15)])
    True
    >>> within_range_list(10, [(1, 4)])
    False
    >>> within_range_list(10.5, [(1, 4), (20, 30)])
    False
    c         3   s-   |  ]# \ } } ˆ  | k o$ ˆ  | k Vq d  S(   N(    (   R	   t   min_t   max_(   Rh   (    s0   /usr/lib/python2.7/site-packages/babel/plural.pys	   <genexpr>$  s    (   t   any(   Rh   Ri   (    (   Rh   s0   /usr/lib/python2.7/site-packages/babel/plural.pyR\     s    c         C   s_   d } |  d k  r% |  d 9}  d } n  | d k  r> | d 9} n  |  | } | r[ | d 9} n  | S(   sî   Javaish modulo.  This modulo operator returns the value with the sign
    of the dividend rather than the divisor like Python does:

    >>> cldr_modulo(-3, 5)
    -3
    >>> cldr_modulo(-3, -5)
    -3
    >>> cldr_modulo(3, 5)
    3
    i    iÿÿÿÿi   (    (   t   at   bt   reverset   rv(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR]   '  s    
	
t	   RuleErrorc           B   s   e  Z d  Z RS(   s   Raised if a rule is malformed.(   R9   RJ   RK   (    (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRq   >  s   t   nivwfts   \s+t   words)   \b(and|or|is|(?:with)?in|not|mod|[{0}])\bt   values   \d+t   symbols   %|,|!=|=t   ellipsiss   \.{2,3}|\u2026c         C   sÊ   |  j  d ƒ d }  g  } d } t |  ƒ } x‹ | | k  r¸ xx t D]\ \ } } | j |  | ƒ } | d  k	 rA | j ƒ  } | r™ | j | | j ƒ  f ƒ n  PqA qA Wt d |  | ƒ ‚ q. W| d  d  d … S(   Nt   @i    s5   malformed CLDR pluralization rule.  Got unexpected %riÿÿÿÿ(	   t   splitR   t   _RULESt   matcht   Nonet   endR1   t   groupRq   (   t   sRT   t   posR|   t   tokRR   Rz   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   tokenize_ruleM  s    c         C   s8   |  o7 |  d d | k o7 | d  k p7 |  d d | k S(   Niÿÿÿÿi    i   (   R{   (   t   tokenst   type_Rt   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   test_next_token`  s    c         C   s    t  |  | | ƒ r |  j ƒ  Sd  S(   N(   R„   t   pop(   R‚   Rƒ   Rt   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt
   skip_tokene  s    c         C   s   d |  f f S(   NRt   (    (   Rt   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt
   value_nodej  s    c         C   s
   |  d f S(   N(    (    (   t   name(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt
   ident_noden  s    c         C   s
   d |  f S(   NRi   (    (   Ri   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   range_list_noder  s    c         C   s   d |  f f S(   Nt   not(    (   Rp   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   negatev  s    R/   c           B   sn   e  Z d  Z d „  Z d d d „ Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z RS(   sò  Internal parser.  This class can translate a single rule into an abstract
    tree of tuples. It implements the following grammar::

        condition     = and_condition ('or' and_condition)*
                        ('@integer' samples)?
                        ('@decimal' samples)?
        and_condition = relation ('and' relation)*
        relation      = is_relation | in_relation | within_relation
        is_relation   = expr 'is' ('not')? value
        in_relation   = expr (('not')? 'in' | '=' | '!=') range_list
        within_relation = expr ('not')? 'within' range_list
        expr          = operand (('mod' | '%') value)?
        operand       = 'n' | 'i' | 'f' | 't' | 'v' | 'w'
        range_list    = (range | value) (',' range_list)*
        value         = digit+
        digit         = 0|1|2|3|4|5|6|7|8|9
        range         = value'..'value
        samples       = sampleRange (',' sampleRange)* (',' ('…'|'...'))?
        sampleRange   = decimalValue '~' decimalValue
        decimalValue  = value ('.' value)?

    - Whitespace can occur between or around any of the above tokens.
    - Rules should be mutually exclusive; for a given numeric value, only one
      rule should apply (i.e. the condition should only be true for one of
      the plural rule elements).
    - The in and within relations can take comma-separated lists, such as:
      'n in 3,5,7..15'.
    - Samples are ignored.

    The translator parses the expression on instanciation into an attribute
    called `ast`.
    c         C   s_   t  | ƒ |  _ |  j s% d  |  _ d  S|  j ƒ  |  _ |  j r[ t d |  j d d ƒ ‚ n  d  S(   Ns   Expected end of rule, got %riÿÿÿÿi   (   R�   R‚   R{   R0   t	   conditionRq   (   R2   t   string(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR7   œ  s    			c         C   s“   t  |  j | | ƒ } | d  k	 r% | S| d  k rR t | d  k rF | pI | ƒ } n  |  j sn t d | ƒ ‚ n  t d | |  j d d f ƒ ‚ d  S(   Ns#   expected %s but end of rule reacheds   expected %s but got %riÿÿÿÿi   (   R†   R‚   R{   t   reprRq   (   R2   Rƒ   Rt   t   termt   token(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   expect¨  s    !	c         C   sD   |  j  ƒ  } x1 t |  j d d ƒ r? d | |  j  ƒ  f f } q W| S(   NRs   t   or(   t   and_conditionR†   R‚   (   R2   t   op(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR�   ²  s    c         C   sD   |  j  ƒ  } x1 t |  j d d ƒ r? d | |  j  ƒ  f f } q W| S(   NRs   t   and(   t   relationR†   R‚   (   R2   R•   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR”   ¸  s    c         C   sñ   |  j  ƒ  } t |  j d d ƒ rR t |  j d d ƒ r< d p? d | |  j ƒ  f f St |  j d d ƒ } d } t |  j d d ƒ r‹ d } n7 t |  j d d ƒ sÂ | rµ t d ƒ ‚ n  |  j | ƒ Sd | | |  j ƒ  f f } | rí t | ƒ S| S(	   NRs   t   isR‹   t   isnott   int   withins#   Cannot negate operator based rules.R—   (   R6   R†   R‚   Rt   Rq   t   newfangled_relationRi   RŒ   (   R2   t   leftt   negatedt   methodRp   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR—   ¾  s    	c         C   sw   t  |  j d d ƒ r t } n* t  |  j d d ƒ r< t } n t d ƒ ‚ d d | |  j ƒ  f f } | rs t | ƒ S| S(   NRu   t   =s   !=s'   Expected "=" or "!=" or legacy relationR—   Rš   (   R†   R‚   t   Falset   TrueRq   Ri   RŒ   (   R2   R�   Rž   Rp   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRœ   Ï  s    		c         C   s<   |  j  ƒ  } t |  j d ƒ r. | |  j  ƒ  f S| | f Sd  S(   NRv   (   Rt   R†   R‚   (   R2   R�   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   range_or_valueÙ  s    c         C   sH   |  j  ƒ  g } x, t |  j d d ƒ r= | j |  j  ƒ  ƒ q Wt | ƒ S(   NRu   t   ,(   R£   R†   R‚   R1   RŠ   (   R2   Ri   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRi   à  s    c         C   s³   t  |  j d ƒ } | d  k s. | d t k r= t d ƒ ‚ n  | d } t  |  j d d ƒ rx d | d f |  j ƒ  f f St  |  j d d ƒ r© d | d f |  j ƒ  f f St | ƒ S(	   NRs   i   s   Expected identifier variablet   modRu   t   %(    (    (   R†   R‚   R{   t   _VARSRq   Rt   R‰   (   R2   Rs   Rˆ   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR6   æ  s    
c         C   s   t  t |  j d ƒ d ƒ ƒ S(   NRt   i   (   R‡   R   R’   (   R2   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRt   ñ  s    N(   R9   RJ   RK   R7   R{   R’   R�   R”   R—   Rœ   R£   Ri   R6   Rt   (    (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR/   z  s    	
				
			c            s   ‡  f d †  S(   s%   Compiler factory for the `_Compiler`.c            s    ˆ  |  j  | ƒ |  j  | ƒ f S(   N(   R?   (   R2   t   lt   r(   t   tmpl(    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC   ÷  R   (    (   Rª   (    (   Rª   s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   _binary_compilerõ  s    c            s   ‡  f d †  S(   s%   Compiler factory for the `_Compiler`.c            s   ˆ  |  j  | ƒ S(   N(   R?   (   R2   RB   (   Rª   (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC   ü  R   (    (   Rª   (    (   Rª   s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   _unary_compilerú  s    c         C   s   d S(   NR   (    (   RB   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC   ÿ  R   t	   _Compilerc           B   s§   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 e d	 ƒ Z e d
 ƒ Z e d ƒ Z e d ƒ Z e d ƒ Z e d ƒ Z d „  Z RS(   sZ   The compilers are able to transform the expressions into multiple
    output formats.
    c         C   s#   | \ } } t  |  d | ƒ | Œ  S(   Nt   compile_(   t   getattr(   R2   t   argR•   t   args(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR?     s    c         C   s   d S(   NR   (    (   RB   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC     R   c         C   s   d S(   NR   (    (   RB   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC     R   c         C   s   d S(   NR   (    (   RB   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC     R   c         C   s   d S(   NR    (    (   RB   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC     R   c         C   s   d S(   NR!   (    (   RB   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC     R   c         C   s   d S(   NR"   (    (   RB   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC     R   c         C   s
   t  | ƒ S(   N(   R   (   RB   R   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC     R   s
   (%s && %s)s
   (%s || %s)s   (!%s)s
   (%s %% %s)s
   (%s == %s)s
   (%s != %s)c         C   s   t  ƒ  ‚ d  S(   N(   t   NotImplementedError(   R2   RŸ   R6   Ri   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   compile_relation  s    (   R9   RJ   RK   R?   t	   compile_nt	   compile_it	   compile_vt	   compile_wt	   compile_ft	   compile_tt   compile_valueR«   t   compile_andt
   compile_orR¬   t   compile_nott   compile_modt
   compile_ist   compile_isnotR³   (    (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR­     s    								R^   c           B   sG   e  Z d  Z e d ƒ Z e d ƒ Z e d ƒ Z e d ƒ Z d „  Z	 RS(   s!   Compiles an expression to Python.s   (%s and %s)s
   (%s or %s)s   (not %s)s   MOD(%s, %s)c      	   C   s`   d d j  g  | d D]" } d t t |  j | ƒ ƒ ^ q ƒ } d | j ƒ  |  j | ƒ | f S(   Ns   [%s]R¤   i   s   (%s, %s)s
   %s(%s, %s)(   R   t   tuplet   mapR?   t   upper(   R2   RŸ   R6   Ri   t   range_t   compile_range_list(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR³   %  s
    	4(
   R9   RJ   RK   R«   R»   R¼   R¬   R½   R¾   R³   (    (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR^     s   Rc   c           B   s8   e  Z d  Z e j Z e Z e Z e Z	 e Z
 d „  Z RS(   s)   Compile into a gettext plural expression.c         C   s«   g  } |  j  | ƒ } x‚ | d D]v } | d | d k ra | j d | |  j  | d ƒ f ƒ q  t |  j  | ƒ \ } } | j d | | | | f ƒ q  Wd d j | ƒ S(   Ni   i    s
   (%s == %s)s   (%s >= %s && %s <= %s)s   (%s)s    || (   R?   R1   RÂ   R   (   R2   RŸ   R6   Ri   Rp   t   itemt   mint   max(    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR³   6  s    		(   R9   RJ   RK   R­   R´   Rµ   t   compile_zeroR¶   R·   R¸   R¹   R³   (    (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRc   -  s   	RP   c           B   s8   e  Z d  Z d „  Z e Z e Z e Z e Z d „  Z	 RS(   s/   Compiles the expression to plain of JavaScript.c         C   s   d S(   Ns   parseInt(n, 10)(    (   RB   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRC   O  R   c         C   sM   t  j |  | | | ƒ } | d k rI |  j | ƒ } d | | | f } n  | S(   NRš   s   (parseInt(%s, 10) == %s && %s)(   Rc   R³   R?   (   R2   RŸ   R6   Ri   Rb   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR³   U  s    (
   R9   RJ   RK   Rµ   RÉ   R¶   R·   R¸   R¹   R³   (    (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyRP   J  s   	R>   c           B   s_   e  Z d  Z e d ƒ Z e d ƒ Z e d ƒ Z e d ƒ Z e d ƒ Z d „  Z	 e
 d „ Z RS(   s+   Returns a unicode pluralization rule again.s   %s is %ss   %s is not %ss	   %s and %ss   %s or %ss	   %s mod %sc         C   s   |  j  d t | d Œ S(   NRž   i   (   R³   R¢   (   R2   R—   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR½   k  s    c         C   s¡   g  } xf | d D]Z } | d | d k rH | j  |  j | d ƒ ƒ q | j  d t t |  j | ƒ ƒ ƒ q Wd |  j | ƒ | rŠ d p� d | d j | ƒ f S(   Ni   i    s   %s..%ss
   %s%s %s %ss    notR   R¤   (   R1   R?   RÁ   RÂ   R   (   R2   RŸ   R6   Ri   Rž   t   rangesRÆ   (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR³   n  s    '(   R9   RJ   RK   R«   R¿   RÀ   R»   R¼   R¾   R½   R¡   R³   (    (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyR>   ^  s   	(   R   R   R   R   R   R   ('   RK   t   ret   babel._compatR    R,   RQ   R#   t   objectR$   RU   RH   Rg   R[   R\   R]   t	   ExceptionRq   R§   R{   R?   t   UNICODEt   formatRy   R�   R„   R†   R‡   R‰   RŠ   RŒ   R/   R«   R¬   RÉ   R­   R^   Rc   RP   R>   (    (    (    s0   /usr/lib/python2.7/site-packages/babel/plural.pyt   <module>
   sH   	8]		(									{			                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              