+
    کhd                     :  a  R0 tH0 t R t^ RIHt ^ RIt^ RIt^ RIt^ RIH	t	 ^ RI
HtHtHtHtHtHtHtHt ^ RIHt ^ RIHtHtHt Rt]P4                  t]P6                  t]P8                  t]P:                  t]P<                  t]P>                  t]P@                  t ]PB                  t!]PD                  t"]PF                  t#]PH                  t$]PJ                  t%]PL                  t& ! R R	]4      t']	PP                  ! R
4      t)/ t*] ^ k RR/R lt+R t,RRRR/R lt-R t.R t/Rt0].! R]0,           R,           4      t1].! R]0,           R,           4      t2].! R4      t3].! R4      t4R t5 ! R R]4      t6 ! R R]64      t7 ! R R 4      t8R! t9R" t:R#R1/R$ R% llt;R& t<R'RR#R1R(R)/R* R+ llt=R, t>]?R-8X  d^   ]P                  ^,          tA]B! ]A4      ;_uu_ 4       tC]CP                  4       tERRR4       ];! ]E]! R.4      R/7       F  tF]G! ]F4       K  	  R# R#   + '       g   i     L3; i)2a  
This tokenizer has been copied from the ``tokenize.py`` standard library
tokenizer. The reason was simple: The standard library tokenizer fails
if the indentation is not right. To make it possible to do error recovery the
    tokenizer needed to be rewritten.

Basically this is a stripped down version of the standard library module, so
you can read the documentation there. Additionally we included some speed and
memory optimizations here.
)absolute_importN)BOM_UTF8)
NamedTupleTupleIteratorIterableListDictPatternSet)PythonTokenTypes)split_linesPythonVersionInfoparse_version_stringu   􏿿c                   ,   a  ] tR t^+t o V 3R ltRtV tR# )TokenCollectionc                   < V ^8  d   Qh/ S[ ;R&   S[S[,          ;R&   S[S[,          ;R&   S[S[S[ 3,          ;R&   S[ ;R&   S[S[S[3,          ;R&   S[S[,          ;R&   # )   pseudo_tokensingle_quotedtriple_quotedendpats
whitespacefstring_pattern_mapalways_break_tokens)r
   r   strr	   r   )format__classdict__s   "7/usr/lib/python3/dist-packages/parso/python/tokenize.py__annotate__TokenCollection.__annotate__+   sy      s8  s8  #w,	 
   c3h'  s#      N)__name__
__module____qualname____firstlineno____annotate_func____static_attributes____classdictcell__r   s   @r   r   r   +   s      r!   r   zutf-8captureFc                 z    V'       d   Q hR pV '       g
   VR,          pVRP                  V4      ,           R,           # )(z?:|))join)r+   choiceskwargsstarts   $*, r   groupr4   :   s4    :E388G$$s**r!   c                  "    \        V !  R ,           # )?)r4   )r1   s   *r   mayber7   C   s    '?S  r!   include_fstringonly_fstringc                    R  p. ROpR0pV '       d#   RR.pV'       d   Tp\        4       pMW5,          pMV'       d   \        4       # V F7  p\        P                  ! V4       F  pVP                  V! V4      4       K  	  K9  	  V# )c              3      "   \         P                  ! V  Uu. uF  qVP                  4       3NK  	  up!   F  pR P                  V4      x  K  	  R# u upi 5i) N)
_itertoolsproductupperr0   )prefixcss   &  r   different_case_versions5_all_string_prefixes.<locals>.different_case_versionsI   sC     ##f%Ef!'')nf%EFA''!* G%Es   AA&Ar<   ffr)brubr)setr=   permutationsupdate)r8   r9   rC   valid_string_prefixesresultrE   r@   ts   $$      r   _all_string_prefixesrQ   H   s     2TF$K$%!UF!&!	u (((0A MM1!45 1 (
 Mr!   c                 L    \         P                  ! V \         P                  4      # N)recompileUNICODE)exprs   &r   _compilerX   e   s    ::dBJJ''r!   c                      \         \        V 4      ,          #   \         d#    \        T 4      ;\         \        T 4      &   pTu # i ; irS   )_token_collection_cachetupleKeyError_create_token_collection)version_inforO   s   & r   _get_token_collectionr_   i   sG    &u\':;; $\2	3l 34vs    *AAz"[A-Za-z0-9\-]+(?: [A-Za-z0-9\-]+)*z(?:\{\{|\}\}|\\N\{z*\}|\\(?:\r\n?|\n)|\\[^\r\nN]|[^{}\r\n\\])+z\}|\\[^N]|[^{}\\])+z(?:\\(?:\r\n?|\n)|[^{}\r\n])+z[^{}]+c                    R p\        V4      pRpR\        ,           R,           pRpRpRpRp\        WVWx4      p	Rp
\        R	R
4      \        V
4      ,           pRV
,           p\        W4      p\        RVR,           4      p\        WV	4      p\	        4       p\        V!  p\        \	        RR7      !  p\	        RRR7      p\        V!  pRpRpRpRp\        VR,           VR,           4      p\        RRRRRRR4      pRp. R(OpV R)8  d   VP                  ^ R4       MVP                  ^ R 4       \        V!  p\        VVV4      p\        VR!,           \        R"R#4      ,           VR$,           \        R%R#4      ,           4      pVV.p R*p!V'       d    V P                  V\        V!!  ,           4       \        R&.V O5!  p"\        VRR'7      \        V"VVVVRR'7      ,           p#/ p$V FW  p%\        V4      V$V%R",           &   \        V4      V$V%R%,           &   \        V4      V$V%R,           &   \        V4      V$V%R,           &   KY  	  \        4       p&\        4       p'/ p(V FE  p)R+ F  p*V&P                  V)V*,           4       K  	  R, F  p*V'P                  V)V*,           4       K  	  KG  	  V F  p)V! F  p*V*V(V)V*,           &   K  	  K  	  R-p+\        V#4      p,\        V,V&V'V$VV(\        V+4      4      # ).z[ \f\t]*z	#[^\r\n]*u   ([A-Za-z_0-9-z]+)z0[xX](?:_?[0-9a-fA-F])+z0[bB](?:_?[01])+z0[oO](?:_?[0-7])+z(?:0(?:_?0)*|[1-9](?:_?[0-9])*)z[eE][-+]?[0-9](?:_?[0-9])*z)[0-9](?:_?[0-9])*\.(?:[0-9](?:_?[0-9])*)?z\.[0-9](?:_?[0-9])*z[0-9](?:_?[0-9])*z[0-9](?:_?[0-9])*[jJ]z[jJ]T)r8   )r8   r9   z(?:\\.|[^'\\])*'z(?:\\.|[^"\\])*"z(?:\\.|'(?!'')|[^'\\])*'''z(?:\\.|"(?!"")|[^"\\])*"""'''"""z\*\*=?z>>=?z<<=?z//=?z->z[+\-*/%&@`|^!=<>]=?~z[][(){}]z:=?:z'[^\r\n'\\]*(?:\\.[^\r\n'\\]*)*'z\\(?:\r\n?|\n)z"[^\r\n"\\]*(?:\\.[^\r\n"\\]*)*"z\\(?:\r\n?|\n)|\Z)r+   )z\.\.\.z\r\n?z\nz[;.,@])      )rf   re   rb   ra   )rf   re   )rb   ra   );importclassdeftryexceptfinallywhilewithreturncontinuebreakdelpassglobalassertnonlocal)
rX   MAX_UNICODEr4   r7   rQ   insertappendrK   addr   )-r^   
Whitespacer   CommentName	Hexnumber	Binnumber	Octnumber	Decnumber	IntnumberExponent
PointfloatExpfloatFloatnumber
ImagnumberNumberpossible_prefixesStringPrefixStringPrefixWithFfstring_prefixesFStringStartSingleDoubleSingle3Double3TripleOperatorBracketspecial_argsSpecialFunnyContStrpseudo_extra_pool
all_quotesPseudoExtrasPseudoTokenr   _prefixr   r   r   rP   quoteALWAYS_BREAK_TOKENSpseudo_token_compileds-   &                                            r   r]   r]   ~   s&    J*%JG ;.6D*I#I$I2IiIAI,HC-/16xAJ#h.H
-K/w1FGJ:I6F -.+,L3DIJ+DtT*+L !F F+G+G$u,.?%.GHF
 Ye+H
 G:LvAu%As#\"G(GW-E L#EEC!234 #EEC!2345G !&)'J  z0B!BC-B0ABL
D1lFE7D$GHK G$!)&!1#!)&!1##+G#4% #+G#4% 	 % EMEMEa%i(  "Ea%i( "	  E-2E	*   S %[1}mW'-@)A r!   c                   H   a  ] tR t^t o ]V 3R lR l4       tV 3R ltRtV tR# )Tokenc                6   < V ^8  d   QhRS[ S[S[3,          /# )r   rr   )r   int)r   r   s   "r   r   Token.__annotate__   s     K KsCx Kr!   c                $   \        V P                  4      p\        V4      ^8  d-   V P                  ^ ,          \        V4      ,           ^,
          ^ 3# V P                  ^ ,          V P                  ^,          \        V P                  4      ,           3# )   )r   stringlen	start_pos)selfliness   & r   end_posToken.end_pos   sh    DKK(u:>>>!$s5z1A5q88>>!$dnnQ&7#dkk:J&JJJr!   c                `   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[S[S[3,          ;R&   S[;R&   # )r   typer   r   r@   )r   r   r   r   )r   r   s   "r   r   r      s;     
 K  S#X  K	 r!   r"   N)	r#   r$   r%   r&   propertyr   r'   r(   r)   r*   s   @r   r   r      s"      K K  r!   r   c                   &   a  ] tR t^t o R tRtV tR# )PythonTokenc                \    R V P                  V P                  P                  R7      ,          # )z6TokenInfo(type=%s, string=%r, start_pos=%r, prefix=%r))r   )_replacer   namer   s   &r   __repr__PythonToken.__repr__   s%    H499>>23 	4r!   r"   N)r#   r$   r%   r&   r   r(   r)   r*   s   @r   r   r      s     4 4r!   r   c                   D   a  ] tR t^t o R tR tR tR tR tR t	Rt
V tR# )	FStringNodec                J    Wn         ^ V n        RV n        RV n        ^ V n        R# )    r<   N)r   parentheses_countprevious_lineslast_string_start_posformat_spec_count)r   r   s   &&r   __init__FStringNode.__init__   s)    
!" %)" "#r!   c                8    V ;P                   ^,          un         R# r   N)r   r   	characters   &&r   open_parenthesesFStringNode.open_parentheses	  s    !#r!   c                l    V ;P                   ^,          un         V P                   ^ 8X  d
   ^ V n        R# R# r   r   r   r   s   &&r   close_parenthesesFStringNode.close_parentheses  s.    !#!!Q&%&D" 'r!   c                2    \        V P                  4      ^8H  # )rg   )r   r   r   s   &r   allow_multilineFStringNode.allow_multiline  s    4::!##r!   c                4    V P                   V P                  8  # rS   r   r   s   &r   
is_in_exprFStringNode.is_in_expr  s    %%(>(>>>r!   c                T    V P                  4       '       * ;'       d    V P                  # rS   )r   r   r   s   &r   is_in_format_specFStringNode.is_in_format_spec  s     ??$$??)?)??r!   )r   r   r   r   r   N)r#   r$   r%   r&   r   r   r   r   r   r   r(   r)   r*   s   @r   r   r      s*     #$'$?@ @r!   r   c           
         \        V 4       F  w  rVVP                  4       p\        V4      \        V4      ,
          pVP                  VP                  4      '       g   KS  \        \        VP                  W#V,           3WAR V ,           R7      p	RpVP                  '       d   Q hWR 1 V	R\        VP                  4      V,           3u # 	  R V^ 3# )Nr@   r<   )	enumeratelstripr   
startswithr   r   FSTRING_ENDr   )
fstring_stackr   line_nrcolumnadditional_prefixfstring_stack_indexnodelstripped_string
len_lstriptokens
   &&&&&     r   _close_fstring_if_necessaryr     s    %.}%=!!==?[3'7#88
&&tzz22

:-.()<<	E !#*****23"c$**o
::: &> "A%%r!   c                    VR,          pVP                  4       pVP                  4       '       d   V'       d   \        pM\        pMV'       d   \        pM\
        pVP                  W$4      pVf   VP                  V3# VP                  '       g	   W43Vn        VP                  ^ 4      p	V FR  p
W
P                  ,          P                  V	4      pVf   K*  VP                  ^ 4      R\        V
P                  4      )  p	KT  	  TpV\        V	4      ,          pV	P                  R4      '       g   V	P                  R4      '       d   V;P                  V	,          un        Rp	W3# VP                  V	,           p	W3# )r   N
r<   )r   r   fstring_format_spec_multi_linefstring_format_spec_single_linefstring_string_multi_linefstring_string_single_linematchr   r   r4   r   r   endswith)r   r   linelnumpostosr   regexr   r   fstring_stack_node	end_matchnew_poss   &&&&&        r   _find_fstring_stringr   .  sG   

C))+O
2E3E-E.EKK"E}!!3&&%)K![[^F+445;;FC	 __Q'(G#.@.F.F*G)GHF ,
 Gs6{G t 5 5f$ ? ##f,?r!   r   c          	          V ^8  d   QhR\         R\        R\        \        \        3,          R\        \
        ,          /# )r   coder^   r   rr   )r   r   r   r   r   r   )r   s   "r   r   r   V  s?     Q Q
Q 1Q>CCHoQkQr!   c               6    \        V RR7      p\        W1VR7      # )z0Generate tokens from a the source code (string).T)keepends)r^   r   )r   tokenize_lines)r   r^   r   r   s   &$$ r   tokenizer  V  s     t,E%iPPr!   c                   a  V 3R lpV# )zD
A small helper function to help debug the tokenize_lines function.
c               ?   L   <"   S! V / VB  F  p\        V4       Vx  K  	  R # 5irS   )print)argsr2   r   funcs   *, r   wrapper_print_tokens.<locals>.wrapperb  s&     4*6*E%LK +s   !$r"   )r  r  s   f r   _print_tokensr
  ^  s    
 Nr!   indentsis_first_tokenTc                    V ^8  d   QhR\         \        ,          R\        R\        \        ,          R\
        \        \        3,          R\        \        ,          /# )r   r   r^   r  r   rr   )r   r   r   r   r   r   r   r   )r   s   "r   r   r   k  s_     ZA ZAC=ZA $ZA #Y	ZA
 S#XZA kZAr!   c          
   #  f  aa.a/"   VV.V/3R lp\        V4      w  rgrp
r^ pSf   ^ .o^ pRpRpRpRpRpV^ ,          ^,
          o.. pV  EFs  pS.^,          o.^ p\        V4      pV'       dg   VP                  \        4      '       d   \        pVR,          p\        V4      pRV^,          ,          V,           pV^,          pW^,          ,          pRpV'       db   XP	                  V4      pV'       d5   VP                  ^ 4      p\        \        VVRV ,           XV4      x  RpRpMVV,           pXV,           pK  VV8  g   K  V'       d   VR,          pVP                  4       '       gM   \        V	VVS.V4      w  ppV'       d)   \        \        VVP                  RR	7      x  RVn        Kr  VV8X  d   EKm  VVR p\        VVS.VV4      w  pppVV,          pVe   Vx  K  V'       d   Tp V F  p!V!P                  p"V	V",          P	                  VV4      p#V#f   K.  V#P                  ^ 4      p$\        V$4      \        V"4      ,
          V,           \        V 4      8  g   Kq  VRV V$R\        V"4      )  ,           p K  	  VP	                  V V4      p%MVP	                  VV4      p%V%'       dd   VV%P                  ^4      ,           pRpV%P!                  ^4      w  p&pS.V&3o/V%P                  ^4      p'V'R8X  d   V'       g   Q hTpEK  V'^ ,          p(M=V
P	                  VV4      p)VV)P                  4       ,          p(V)P                  4       p&S.V&3o/V'       di   V(R
9  db   V(R8w  g   V%fW   RpV^ 8X  dN   V'       gF   T&p*V*SR,          8  d&   \        \"        RS/R4      x  SP%                  V*4       V! V*4       Rj  xL
  V%'       g   V
P	                  VV4      p)V'       d.   V^ 8X  d'   V'       g   V! V)P                  4       4       Rj  xL
  V)P                  4       pRp\        \&        VV,          S.V3VV)P                  ^ 4      ,           4      x  RpV^,          pEK   V(V9   g   V(R8X  d&   X'R8w  d   V'R8w  d   \        \(        X'S/V4      x  EKS  V%P                  ^4      e   X'V9   dT   V'       g	   V'       dD   . VR&   ^ p\*        P                  ! RVRV& 4      p+V+e   V! V+P                  4       4       Rj  xL
  V'P-                  4       '       d   \        \.        V'S/V4      x  EK  \1        V'S/V4       Rj  xL
  EK  V(R9   d   \2        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   VP5                  4        V'       g%   V^ 8X  d   V'       g   \        \6        X'S/V4      x  M	VX',           pRpEK  V(R8X  d   X'P9                  R4      '       g   V'P9                  R4      '       d   Q hV'       d>   VR,          P                  4       '       d!   \        \&        V(S/V4      x  V&^,           pEK  VV',           pEK  X'V9   d]   V	V',          pVP	                  VV4      pV'       d.   VP                  ^ 4      pVV&V p'\        \        V'S/V4      x  EKo  S/pVV&R pTpEKl  V(V9   g   V'R,          V9   g   V'R,          V9   d   V'R,          R9   d`   S.V&3pV	P;                  V(4      ;'       g9    V	P;                  V'^,          4      ;'       g    V	P;                  V'^,          4      pVV&R pTpEK  \        \        V'S/V4      x  EK"  V'V9   d9   VP%                  \=        VV',          4      4       \        \>        V'S/V4      x  EKa  V(R8X  d!   VV&R R9   d   VVVV&R ,           ,          pEKy  V'R9   d,   V'       d   VR,          PA                  V'4       MV^,          pMV'R9   d4   V'       d   VR,          PC                  V'4       MV'       d
   V^,          pMzV'P                  R4      '       dd   V'       d\   VR,          PD                  VR,          PF                  ,
          ^8X  d,   VR,          ;PF                  ^,          un#        Rp'V&^,           p\        \H        V'S/V4      x  EK  	  V'       dE   \        \&        VXV4      x  VP9                  R4      '       g   VP9                  R4      '       d   RpV'       dE   VR,          pVP                  '       d*   \        \        VP                  VP                  RR	7      x  S.V3p,SR,           F'  p-SPK                  4        \        \L        RV,R4      x  K)  	  \        \N        RV,V4      x  R#  EL EL EL ELy5i)a  
A heavily modified Python standard library tokenizer.

Additionally to the default information, yields also the prefix of each
token. This idea comes from lib2to3. The prefix contains all information
that is irrelevant for the parser like newlines in parentheses or comments.
c              3      <"   V SR,          8  dR   V SR,          8  d   \        \        RSV 3R4      x  V SR&   R# SP                  4        \        \        RSR4      x  K_  R# 5i)r   r<   Nr   )r   ERROR_DEDENTpopDEDENT)r3   r  r   sposs   &r   dedent_if_necessary+tokenize_lines.<locals>.dedent_if_necessaryz  s^     gbk!wr{"!,T5M2FF#KKMfb$33 "s   A"A%N
0123456789r<   T:r   NN^Fr   z
#\.z...:NNNz	[ \f\t]*$z
c              3   J   "   T F  qP                  4       '       * x  K  	  R # 5irS   )r   ).0rE   s   & r   	<genexpr>!tokenize_lines.<locals>.<genexpr>  s     F1,,...s   !##r   r   :Nr   N:Nrg   Nz([{z)]}rd   r   )z\
z\
z\)(r_   r   r   BOM_UTF8_STRINGr   endr   STRINGr   r   FSTRING_STRINGr   r   r   r   r4   spanINDENTr|   
ERRORTOKENNUMBERrT   isidentifierNAME_split_illegal_unicode_nameanyclearNEWLINEr   getr   FSTRING_STARTr   r   r   r   OPr  r  	ENDMARKER)0r   r^   r  r   r  r  r   r   r   r   r   r   r   paren_levelmax_numcharscontstrnew_liner@   r   r   r   r   endprogendmatchcontstr_startcontliner   r   restfstring_end_tokenquote_lengthstring_liner   r   r   end_match_stringpseudomatchr3   r   initialr   indent_startmr   indentr   r  s0   &$d$$                                         @@r   r  r  k  s    4 	l+2LK#DHG HFQ<!D')M	4y//$3!Bx4y 1%,DA,CaL D"N}}T*Hll1o!Gd4Cj0!6+ + !D.#d?Dj#B'~~''"6wtUY[^"_KFC)*F55 $&  .0* d{CDzE`!%FB!#4l |#$0++ "*7&.44E ' 4 4T3 ?I ,+4??1+=(/03u:=Cc+FVV*.t*7G#e*7U*UK +8 +00cB*00s;*[->->q-AA$&!(--a0
se}#))!,B;!M6(.% ("((s3uyy{+		e}G724;K^ !#M#(L#gbk1)&"dB??|42<@@@"((s3q 02599;???iik !S	D#;%A6  %'!q8#35C<EUN!&%v>>""1%1//]k')M!$"#KtFU|<A}#6quuw#???%%''%dE4@@:5$OOOF"3FF333FFFF!'')K1$4]%gudFCC(.%C >>$//t8L8LLL ]2%6%A%A%C%C%j'4HH!)C(.%-'!%."==s3",,q/C sOE%feT6BB$(M"56lG#H M)"I."I.9& %)%KM&{{73  8  8w{{587L  8  8")++eAh"7 "56lG#H%feT6BB--$$[1DU1K%LM!-fEEDT%&\5O%O!Vd56l%::!E>$%b)::5A#q(e^$%b);;EB&'1,K%%c**})"-??'+==>ABC ""%771<7E!)C!"eT6::k n *g}fEED!!W%5%5d%;%;HB 2 2))   DjG "++&"gr22  iW.?
@@O A
 @* @ Ps5  A>f1Af1f10Af1f1	Bf1'-f1>f1A	f1&Af18Af1"f11A f11f%2f1>f1f1'f1 f(B+f1-f15>f13f+4f1'f15f.6f1f1#f1>f1f1%A f1&f1=	f1A2f1:Bf1 f1 B.f11f1 f1" f1f1A;f1Af1		f1Bf1(f1+f1.f1c              #     aaaa	"   VVV	V3R  lpRoRoVo	\        V 4       F  w  rES'       dL   VP                  4       '       d+   V! 4       x  VoRoRoV^ ,          V^,          V,           3o	KM  SV,          oKX  SV,           pVP                  4       '       d   VoK{  S'       d%   V! 4       x  RoV^ ,          V^,          V,           3o	VoRoK  	  S'       d   V! 4       x  R# R# 5i)c                  D   < \        S'       d   \        M\        S SS4      # rS   )r   r&  r)  )found
is_illegalr   r@   s   r   create_token1_split_illegal_unicode_name.<locals>.create_token  s    :uc6RRr!   r<   FTN)r   r(  )
r   r   r@   rI  ichar	new_foundrG  rH  r   s
   &&f    @@@r   r*  r*    s     S S EJ
CU#  """n$"
lIaL1$44I%%''!&.(F#A,	!q(88C!
) $, n s   =C%AC%C%$3C%C%__main__z3.10)r^   c                b    V ^8  d   Qh/ ^ \         9   d   \        \        \        3,          ;R&   # )r   rZ   )__conditional_annotations__r	   r   r   )r   s   "r   r   r      s,     	 	j G F/@A Fk	r!   )r   r   )IrP  __doc__
__future__r   sysrT   	itertoolsr=   codecsr   typingr   r   r   r   r   r	   r
   r   parso.python.tokenr   parso.utilsr   r   r   rz   r"  r)  r'  r0  r-  r%  r  r1  r&  r  r/  r#  r   r   decoder   rZ   r4   r7   rQ   rX   r_   unicode_character_namer   r   r   r   r]   r   r   r   r   r   r  r
  r  r*  r#   argvpathopenrE   readr   r   r  r   )rP  s   @r   <module>r_     sT  	 ' 
 	     0 L L 		 	 		 	 

"
"		 	 		 	 &&	((
,, ..!00**$j $ //'*DF  F+E +!
E  :( ? %2234  %225KK  #++K"L !))!4 iXKJ K4% 4@ @:&$%PQPVQ	ZA 	ZA
 "(ZA ZAzB z88A;D	dqvvx 
 $-A&-IJe K 	s   H

H	