+
    VBiM9                     2   R t ^ RIt^RIHt R1tRtRtRt]! R4      t	R t
R tR	 tR
 tR t ! R R4      tR t ! R R]4      t ! R R]4      t]! 4       t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t]! 4       tR]n         R]n        R tR  tR! tR" t]! R#4      tR$]n         R%]n        R2R& lt R' t!R( t"R) t#R* t$]! ]4      t%R+]%n         R,]%n        ]! ]4      t&R-]&n         R.]&n        ]! ]4      t'R/]'n         R0]'n        R# )3z.
Python Lexical Analyser

Regular Expressions
N)Errorsboleoleof
c                T   \        V 4      pVP                  4        ^ p\        V4      p. pW#8  dx   \        W,          4      pV^,           pV^,          pW#8  d+   V\        W,          4      8  d   V^,          pV^,          pK0  VP	                  V4       VP	                  V4       K}  V# )z
Return a list of character codes consisting of pairs
[code1a, code1b, code2a, code2b,...] which cover all
the characters in |s|.
)listsortlenordappend)s	char_listinresultcode1code2s   &      8/usr/lib/python3.14/site-packages/Cython/Plex/Regexps.pychars_to_rangesr      s     QINN	AIAF
%IL!		QeY\!22QJEFAeeM    c                    \        V \        R4      4      p\        V\        R4      ^,           4      pW#8  d,   \        R4      \        R4      ,
          pW$,           W4,           3# R# )z~
If the range of characters from code1 to code2-1 includes any
lower case letters, return the corresponding upper case range.
azANmaxr   minr   r   code3code4ds   &&   r   uppercase_ranger"   3   Q    
 s3x Es3x!|$E}Hs3x	59%%r   c                    \        V \        R4      4      p\        V\        R4      ^,           4      pW#8  d,   \        R4      \        R4      ,
          pW$,           W4,           3# R# )z~
If the range of characters from code1 to code2-1 includes any
upper case letters, return the corresponding lower case range.
r   Zr   Nr   r   s   &&   r   lowercase_ranger&   A   r#   r   c           	         \        ^ \        V 4      ^4       Uu. uF"  p\        W,          W^,           ,          4      NK$  	  pp\        V!  # u upi )zw
Given a list of codes as returned by chars_to_ranges, return
an RE which will match a character in any of the ranges.
)ranger
   	CodeRangeAlt)	code_listr   re_lists   &  r   
CodeRangesr-   O   sJ    
 CH3y>[\B]^B]QyyQ'78B]G^= _s   (Ac                    V \         u;8:  d   V8  d8   M M4\        \        V \         4      \        \        \         ^,           V4      4      # \        W4      # )zu
CodeRange(code1, code2) is an RE which matches any character
with a code |c| in the range |code1| <= |c| < |code2|.
)nl_coder*   RawCodeRange
RawNewliner   r   s   &&r   r)   r)   X   sE    
 %<w/!U35 	5 E))r   c                   f   a  ] tR t^it o Rt^t^tRtR tR t	R t
R tR tR tR	 tR
 tR tRtV tR# )REzRE is the base class for regular expression constructors.
The following operators are defined on REs:

     re1 + re2         is an RE which matches |re1| followed by |re2|
     re1 | re2         is an RE which matches either |re1| or |re2|
Nc                N    \        RV P                  P                  ,          4      h)a  
This method should add states to |machine| to implement this
RE, starting at |initial_state| and ending at |final_state|.
If |match_bol| is true, the RE must be able to match at the
beginning of a line. If nocase is true, upper and lower case
letters should be treated as equivalent.
z %s.build_machine not implemented)NotImplementedError	__class____name__)selfmachineinitial_statefinal_state	match_bolnocases   &&&&&&r   build_machineRE.build_machineu   s&     ""D"&.."9"9#: ; 	;r   c                j    VP                  4       pVP                  V4       VP                  W44       V# )zf
Given a state |s| of machine |m|, return a new state
reachable from |s| on character |c| or epsilon.
)	new_statelink_toadd_transition)r9   mr;   cr   s   &&&& r   	build_optRE.build_opt   s0    
 KKMa $$Q*r   c                    \        W4      # N)Seqr9   others   &&r   __add__
RE.__add__       4r   c                    \        W4      # rJ   )r*   rL   s   &&r   __or__	RE.__or__   rP   r   c                ^    V P                   '       d   V P                   # V P                  4       # rJ   )strcalc_strr9   s   &r   __str__
RE.__str__   s     88888O==?"r   c                Z    \        V\        4      '       g   V P                  WR 4       R# R# )zPlex.RE instanceN)
isinstancer4   
wrong_typer9   numvalues   &&&r   check_reRE.check_re   s#    %$$OOC(:; %r   c                T    \        V4      \        Jd   V P                  WR 4       R# R# )stringN)typerU   r\   r]   s   &&&r   check_stringRE.check_string   s!    ;c!OOC1 "r   c                    V P                  W4       \        V4      ^8w  d=   \        P                  ! RWP                  P
                  \        V4      3,          4      hR# )   zOInvalid value for argument %d of Plex.%s.Expected a string of length 1, got: %sN)re   r
   r   PlexValueErrorr7   r8   reprr]   s   &&&r   
check_charRE.check_char   s[    #%u:?'' )Q,/1H1H$u+TW)W X X r   c                    \         P                  ! R VR RV P                  P                   RV R\	        V4      P
                   24      h)zInvalid type for argument r!   z of z (expected z, got )r   PlexTypeErrorr7   __qualname__rd   r8   )r9   r^   r_   expecteds   &&&&r   r\   RE.wrong_type   sQ    ""(QtDNN4O4O3P Q!
&e)=)=(>@
 	
r    )r8   
__module__ro   __firstlineno____doc__nullablematch_nlrU   r?   rG   rN   rR   rX   r`   re   rk   r\   __static_attributes____classdictcell____classdict__s   @r   r4   r4   i   sN      HH
C
;  #<2X
 
r   r4   c                    \        V 4      ^8X  d'   \        \        V 4      \        V 4      ^,           4      pM\        V 4      pR\	        V 4      ,          Vn        V# )z3
Char(c) is an RE which matches the character |c|.
zChar(%s))r
   r)   r   SpecialSymbolrj   rU   )rF   r   s   & r   Charr~      sF     1v{3q63q6A:.q!d1g%FJMr   c                   J   a  ] tR t^t o Rt^ t^ tRtRtRt	R t
R tR tRtV tR# )r0   z
RawCodeRange(code1, code2) is a low-level RE which matches any character
with a code |c| in the range |code1| <= |c| < |code2|, where the range
does not include newline. For internal use only.
Nc                V    W3V n         \        W4      V n        \        W4      V n        R # rJ   )r(   r"   r&   )r9   r   r   s   &&&r   __init__RawCodeRange.__init__   s%    ^
.u<.u<r   c                J   V'       d   V P                  W\        4      pVP                  V P                  V4       V'       da   V P                  '       d   VP                  V P                  V4       V P
                  '       d   VP                  V P
                  V4       R # R # R # rJ   )rG   BOLrD   r(   r"   r&   r9   rE   r;   r<   r=   r>   s   &&&&&&r   r?   RawCodeRange.build_machine   sz     NN1SAM$$TZZ=###,,T-A-A;O###,,T-A-A;O $ r   c                @    R V P                   V P                  3,          # )zCodeRange(%d,%d)r2   rW   s   &r   rV   RawCodeRange.calc_str   s    !TZZ$<<<r   )r&   r(   r"   )r8   rs   ro   rt   ru   rv   rw   r(   r"   r&   r   r?   rV   rx   ry   rz   s   @r   r0   r0      s:     
 HHEOO=
P= =r   r0   c                   2   a  ] tR t^t o Rt^ t^tR tRtV t	R# )_RawNewlinezX
RawNewline is a low-level RE which matches a newline character.
For internal use only.
c                    V'       d   V P                  W\        4      pV P                  W\        4      pVP                  \        \        ^,           3V4       R# rh   N)rG   r   EOLrD   r/   )r9   rE   r;   r<   r=   r>   r   s   &&&&&& r   r?   _RawNewline.build_machine   s>     NN1SAMNN1S1	'7Q;/=r   rr   N)
r8   rs   ro   rt   ru   rv   rw   r?   rx   ry   rz   s   @r   r   r      s       HH> >r   r   c                   <   a  ] tR t^t o Rt^ t^ tRtR tR t	Rt
V tR# )r}   zl
SpecialSymbol(sym) is an RE which matches the special input
symbol |sym|, which is one of BOL, EOL or EOF.
Nc                    Wn         R # rJ   sym)r9   r   s   &&r   r   SpecialSymbol.__init__   s    r   c                    V'       d,   V P                   \        8X  d   V P                  W\        4      pVP	                  V P                   V4       R # rJ   )r   r   rG   r   rD   r   s   &&&&&&r   r?   SpecialSymbol.build_machine   s5     S NN1SAM$$TXX{;r   r   )r8   rs   ro   rt   ru   rv   rw   r   r   r?   rx   ry   rz   s   @r   r}   r}      s*      HH
C< <r   r}   c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )rK   i  zYSeq(re1, re2, re3...) is an RE which matches |re1| followed by
|re2| followed by |re3|...c                D   ^p\        V4       F,  w  r4V P                  W44       T;'       d    VP                  pK.  	  Wn        W n        \	        V4      p^ pV'       d<   V^,          pW,          pVP
                  '       d   ^pMVP                  '       d   KB   WPn        R# r   )	enumerater`   rv   r,   r
   rw   )r9   r,   rv   r   rerw   s   &*    r   r   Seq.__init__	  s    w'EAMM! //BKKH (  LFAB{{{;;; r   c                d   V P                   p\        V4      ^ 8X  d   VP                  V4       R# Tp\        V4      p\        V4       Fd  w  rW^,
          8  d   VP	                  4       pMTpV
P                  WWV4       TpV
P                  ;'       g    T;'       d    V
P                  pKf  	  R#     N)r,   r
   rC   r   rB   r?   rw   rv   )r9   rE   r;   r<   r=   r>   r,   s1r   r   r   s2s   &&&&&&      r   r?   Seq.build_machine  s    ,,w<1!!+.BGA"7+1u9B$B  v>KKFFI,E,E"++	 ,r   c                b    R RP                  \        \        V P                  4      4      ,          # )zSeq(%s),joinmaprU   r,   rW   s   &r   rV   Seq.calc_str,  !    388CT\\$:;;;r   )rw   rv   r,   N
r8   rs   ro   rt   ru   r   r?   rV   rx   ry   rz   s   @r   rK   rK     s     "!&G < <r   rK   c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )r*   i0  zNAlt(re1, re2, re3...) is an RE which matches either |re1| or
|re2| or |re3|...c                2   Wn         ^ p^ p. p. p^pV Fh  pV P                  Wg4       VP                  '       d   VP                  V4       ^pMVP                  V4       VP                  '       d   ^pV^,          pKj  	  W@n        WPn        W n        W0n        R# r   )r,   r`   rv   r   rw   nullable_resnon_nullable_res)r9   r,   rv   rw   r   r   r   r   s   &*      r   r   Alt.__init__4  s    BMM! {{{##B' ''+{{{FA  ) 0  r   c                   V P                    F  pVP                  WW4V4       K  	  V P                  '       dH   V'       d   V P                  W\        4      pV P                   F  pVP                  WV^ V4       K  	  R# R# r   )r   r?   r   rG   r   )r9   rE   r;   r<   r=   r>   r   s   &&&&&& r   r?   Alt.build_machineJ  sl    ##BQ{vN $    $q E++  ;6J , !r   c                b    R RP                  \        \        V P                  4      4      ,          # )zAlt(%s)r   r   rW   s   &r   rV   Alt.calc_strS  r   r   )rw   r   rv   r   r,   Nr   rz   s   @r   r*   r*   0  s     !,K< <r   r*   c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )Rep1iW  z@Rep1(re) is an RE which matches one or more repetitions of |re|.c                z    V P                  ^V4       Wn        VP                  V n        VP                  V n        R# r   )r`   r   rv   rw   )r9   r   s   &&r   r   Rep1.__init__Z  s+    ar   c                "   VP                  4       pVP                  4       pVP                  V4       V P                  P                  YYt;'       g    V P                  P                  V4       VP                  V4       VP                  V4       R # rJ   )rB   rC   r   r?   rw   )r9   rE   r;   r<   r=   r>   r   r   s   &&&&&&  r   r?   Rep1.build_machine`  se    [[][[]b!aR)F)Fdgg6F6FO


2


;r   c                (    R V P                   ,          # )zRep1(%s)r   rW   s   &r   rV   Rep1.calc_strh  s    DGG##r   )rw   rv   r   Nr   rz   s   @r   r   r   W  s     J$ $ $r   r   c                   >   a  ] tR tRt o RtRtRtR tR tR t	Rt
V tR# )
SwitchCaseil  z
SwitchCase(re, nocase) is an RE which matches the same strings as RE,
but treating upper and lower case letters according to |nocase|. If
|nocase| is true, case is ignored, otherwise it is not.
Nc                b    Wn         W n        VP                  V n        VP                  V n        R # rJ   )r   r>   rv   rw   )r9   r   r>   s   &&&r   r   SwitchCase.__init__u  s"    r   c                T    V P                   P                  WW4V P                  4       R # rJ   )r   r?   r>   r   s   &&&&&&r   r?   SwitchCase.build_machine{  s    a"kk	+r   c                X    V P                   '       d   R pMRpV: RV P                  : R2# )NoCaseCase())r>   r   )r9   names   & r   rV   SwitchCase.calc_str  s$    ;;;DD))r   )rw   r>   rv   r   )r8   rs   ro   rt   ru   r   r>   r   r?   rV   rx   ry   rz   s   @r   r   r   l  s*     
 
BF$+* *r   r   z8
    Empty is an RE which matches the empty string.
    Emptyc                t    \        \        \        \        V 4      4      !  pR\	        V 4      ,          Vn        V# )z8
Str1(s) is an RE which matches the literal string |s|.
Str(%s))rK   tupler   r~   rj   rU   r   r   s   & r   Str1r     s.     %D!%&FT!W$FJMr   c                     \        V 4      ^8X  d   \        V ^ ,          4      # \        \        \	        \        V 4      4      !  pRRP                  \	        \        V 4      4      ,          Vn        V# )z
Str(s) is an RE which matches the literal string |s|.
Str(s1, s2, s3, ...) is an RE which matches any of |s1| or |s2| or |s3|...
r   r   )r
   r   r*   r   r   r   rj   rU   )strsr   s   * r   Strr     sR    
 4yA~DG}eCdO,-#dD/!::
r   c                \    \        \        V 4      4      pR\        V 4      ,          Vn        V# )z@
Any(s) is an RE which matches any character in the string |s|.
zAny(%s))r-   r   rj   rU   r   s   & r   Anyr     s(     *+FT!W$FJMr   c                    \        V 4      pVP                  ^ \        ) 4       VP                  \        4       \	        V4      pR\        V 4      ,          Vn        V# )zd
AnyBut(s) is an RE which matches any character (including
newline) which is not in the string |s|.
z
AnyBut(%s))r   insertmaxintr   r-   rj   rU   )r   rangesr   s   &  r   AnyButr     sI    
 QF
MM!fW
MM&FQ'FJMr    zT
    AnyChar is an RE which matches any single character (including a newline).
    AnyCharc                   V'       d8   \        \        V 4      \        V4      ^,           4      pRV : RV: R2Vn        V# . p\        ^ \	        V 4      ^4       FJ  pVP                  \        \        W,          4      \        W^,           ,          4      ^,           4      4       KL  	  \        V!  pR\        V 4      ,          Vn        V# )z
Range(c1, c2) is an RE which matches any single character in the range
|c1| to |c2| inclusive.
Range(s) where |s| is a string of even length is an RE which matches
any single character in the ranges |s[0]| to |s[1]|, |s[2]| to |s[3]|,...
zRange(r   r   z	Range(%s))r)   r   rU   r(   r
   r   r*   rj   )r   r   r   r   r   s   &&   r   Ranger     s     
3r7CGaK0')2.
 M q#b'1%AMM)CJB1uI0BCD &f 48+
Mr   c                B    \        V \        4      pRV ,          Vn        V# )zA
Opt(re) is an RE which matches either |re| or the empty string.
zOpt(%s))r*   r   rU   r   r   s   & r   Optr     s     U^FRFJMr   c                J    \        \        V 4      4      pRV ,          Vn        V# )zB
Rep(re) is an RE which matches zero or more repetitions of |re|.
zRep(%s))r   r   rU   r   s   & r   Repr     s!     b]FRFJMr   c                    \        V ^R7      # )zt
NoCase(re) is an RE which matches the same strings as RE, but treating
upper and lower case letters as equivalent.
r>   r   r   s   &r   r   r     s    
 b##r   c                    \        V ^ R7      # )z
Case(re) is an RE which matches the same strings as RE, but treating
upper and lower case letters as distinct, i.e. it cancels the effect
of any enclosing NoCase().
r   r   r   s   &r   r   r     s     b##r   z=
    Bol is an RE which matches the beginning of a line.
    Bolz7
    Eol is an RE which matches the end of a line.
    Eolz9
    Eof is an RE which matches the end of the file.
    EofirJ   )(ru   typesr   r   r   r   r   EOFr   r/   r   r"   r&   r-   r)   r4   r~   r0   r   r1   r}   rK   r*   r   r   r   rU   r   r   r   r   r   r   r   r   r   r   r   r   r   rr   r   r   <module>r      s    	 
d).
*"A
 A
V	=2 =>>" > ]
<B <((<" (<V$<" $<N$2 $** *D 	  	

 *  &$$ 3i  
3i  
3i  r   