ok

Mini Shell

Direktori : /lib/python2.7/site-packages/babel/messages/
Upload File :
Current File : //lib/python2.7/site-packages/babel/messages/jslexer.pyc

�
��Mc+@sdZddlZddlmZdddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.g+Zejd/��id0d16d2d36d4d56d6d76d8d96Zdejd:�fdejd;�fd<ejd=�fd>ejd?�fd@ejdA�fdBejdC�fdDejdEdj	e
eje���fdFejdG�fgZejdH�Z
ejdI�ZejdJ�ZejdKej�ZejdL�ZdMefdN��YZdO�ZdP�ZdQ�ZdS(RsJA simple JavaScript 1.5 lexer which is used for the JavaScript
extractor.
i����N(t
itemgettert+t-t*t%s!=s==t<t>s<=s>=t=s+=s-=s*=s%=s<<s>>s>>>s<<=s>>=s>>>=t&s&=t|s|=s&&s||t^s^=t(t)t[t]t{t}t!s--s++t~t,t;t.t:cCstt|�t|��S(N(tcmptlen(tatb((s:/usr/lib/python2.7/site-packages/babel/messages/jslexer.pyt<lambda>ssRstfs
tns
trs	tts\s+(?u)s<!--.*tlinecomments//.*tmultilinecomments/\*.*?\*/(?us)tnames(\$+\w*|[^\W\d]\w*)(?u)tnumbersf(?x)(
        (?:0|[1-9]\d*)
        (\.\d+)?
        ([eE][-+]?\d+)? |
        (0x[a-fA-F0-9]+)
    )toperators(%s)tstringsY(?xs)(
        '(?:[^'\\]*(?:\\.[^'\\]*)*)'  |
        "(?:[^"\\]*(?:\\.[^"\\]*)*)"
    )s/=?s)/(?:[^/\\]*(?:\\.[^/\\]*)*)/[a-zA-Z]*(?s)s(\r\n|\n|\r)s\\s[a-fA-F0-9]{1,4}tTokencBsSeZdZdZd�Zeed��Zeed��Zeed��Z	RS(s-Represents a token as returned by `tokenize`.cCstj||||f�S(N(ttuplet__new__(tclsttypetvaluetlineno((s:/usr/lib/python2.7/site-packages/babel/messages/jslexer.pyR(?siii((
t__name__t
__module__t__doc__t	__slots__R(tpropertyRR*R+R,(((s:/usr/lib/python2.7/site-packages/babel/messages/jslexer.pyR&;s	cCs)|jdkr|jdkS|jdkS(
szA helper function that helps the tokenizer to decide if the current
    token may be followed by a division operator.
    R$RRRs++s--R"R#R%tregexp(RRRs++s--(snameR#sstringR2(R*R+(ttoken((s:/usr/lib/python2.7/site-packages/babel/messages/jslexer.pytindicates_divisionGs
cCs�|r*|d|dkr*|ddks6td��tjd|dd!�}g}|j}d}x/|jd|�}|dkr�Pn||||!�||d}|tkr�|t|�n�|dkrtj||d	�}|dk	rr|j	�}t
|�d
krRy|tt|d���Wnt
k
rAqRX|d}qgn|||�|j�}qgq�||�n
||�|d	}qg|t
|�kr�|||�nd
j|�S(s�Unquote a string with JavaScript rules.  The string has to start with
    string delimiters (``'`` or ``"``.)

    :return: a string
    ii����s"'s)string provided is not properly delimiteds\1is\tuUiiiiuN(tAssertionErrortline_join_retsubtappendtfindtescapest
uni_escape_retmatchtNonetgroupRtunichrtintt
ValueErrortendtjoin(R%tresulttaddtpost
escape_post	next_chartescapedt
escaped_value((s:/usr/lib/python2.7/site-packages/babel/messages/jslexer.pytunquote_stringPsD-		




c
cs&t}d}d}t|�}x||kr!x�tD].\}}|j||�}|dk	r4Pq4q4W|r�tj||�}d}ntj||�}d}|dkr�|d7}q!n|j�}|dk	r�t|||�}	t	|	�}|	Vn|tt
j|��7}|j�}q!WdS(sGTokenize a JavaScript source.

    :return: generator of `Token`\s
    iiR$R2N(
tFalseRtrulesR=R>tdivision_retregex_reR?R&R4tline_retfindallRC(
tsourcet
may_divideRGR,RCt
token_typetruleR=ttoken_valueR3((s:/usr/lib/python2.7/site-packages/babel/messages/jslexer.pyttokenize�s0	
(R/tret
babel.utilRt	operatorstsortR;R>tcompileRDtmaptescapeRNRORPRQtpatternR7R<R'R&R4RLRX(((s:/usr/lib/python2.7/site-packages/babel/messages/jslexer.pyt<module>s6!!*)		+				:

Zerion Mini Shell 1.0