+
    Qi                        ^ RI t ^ RIt ]P                  ! R]P                  4      t]P                  ! R]P                  4      t]P                  ! R]P                  4      tR t]P                  ! R4      t]P                  ! R4      t	]P                  ! R4      t
R	 tR
 t]P                  ! R4      tR tR t]P                  ! R4      tR tR t]P                  ! R]P                  4      tR tR t]! R4      tR# )    Nz2(\n|\A)((     (\$|\*))|)\s*(subroutine|function)\bz+\n\s*end\s*(subroutine|function)\b.*(\n|\Z)z\n     (\$|\*)\s*function\bc                   . p^ p \         P                  W4      pVf    V# VP                  4       p\        P	                  WVP                  4       4      '       d1    V P                  RW$4      pVR8X  d   MTpWV^,            R8w  g   K/   V^,          p\        P                  WP                  4       4      pT;'       d     VP                  4       ^,
          ;'       g    \        V 4      ;r&VP                  WF34       K  )zReturn a list of tuples for each function or subroutine each
tuple is the start and end of a subroutine or function to be
expanded.

z
     $)
routine_start_researchstartfunction_start_rematchendrfindroutine_end_relenappend)astrspanlistindmr   ir   s   &      Y/Users/mibo/.openclaw/workspace/.venv/lib/python3.14/site-packages/numpy/f2py/_src_pyf.pyparse_structurer   7   s     H
C
##D.9 O 	""488JJtS07!a%=J.
!!$0&&1557Q;443t94%    z<\s*(\w[\w\d]*)\s*>z<\s*(\w[\w\d]*)\s*=\s*(.*?)\s*>z<\s*((.*?))\s*>c                     \         P                  V 4      p/ pV FU  pV^ ,          P                  4       ;'       g    \        V4      pV^,          P	                  RR4      p\        V4      pWbV&   KW  	  V# )r   \,@comma@)named_refindallstrip
unique_keyreplaceconv)r   repsnamesrepnamereplthelists   &      r   find_repl_patternsr'   W   sh    D!DE1v||~22E!21v~~eY/t*d	 
 Lr   c                 d    \        V 4      p\        P                  ! \        R V 4      ^ ,          p W3#  )r'   resubnr   )r   r"   s   & r   find_and_remove_repl_patternsr-   a   s+    t$E778R&q)D;r   z\A\\(?P<index>\d+)\Zc                 T   V P                  R 4      pV Uu. uF  q"P                  4       NK  	  pp\        \        V4      4       FL  p\        P                  W4,          4      pV'       g   K(  \        VP                  R4      4      pW6,          W4&   KN  	  R P                  V4      # u upi ),index)	splitr   ranger   item_rer
   intgroupjoin)r   bxlr   r   js   &      r   r    r    h   s    

3AAqAA3q6]MM!$1AGGG$%A4AD	 
 88A; 	s   B%c                    \        V P                  4       4      pRp^pV'       g   RV 2pWA9   d   V^,          pK  RpK"  X# )z'Obtain a unique key given a dictionary.F__lT)listkeys)adictallkeysdonennewkeys   &    r   r   r   r   sC    5::< GD	AqcFADMr   z\A\s*(\w[\w\d]*)\s*\Zc                   aaa V P                  R R4      p V P                  RR4      p \        V 4      o\        P                  RV 4      p V3R lp\        P                  W 4      p RpRp/ o\
        P                  V 4       F  pVS9  g   K  SP                  WQP                  VR4      4      pVf   \        RV R24      hWQ9  d   VP                  R	4      '       g   WaV&   VP                  R
4       Uu. uF  qwP                  RR
4      NK  	  pp\        V4      p	Vf   T	pVSV&   TpK  W8X  d   VSV&   K  R
P                  SV,          4      p
\        RV RV
 RV RV R2	4       K  	  S'       g   V # VV3R lpRp\        V4       F&  oV\
        P                  W4      R,           ,          pK(  	  VP                  RR4      pVP                  RR4      pV# u upi )z\>z@rightarrow@z\<z@leftarrow@z<\1>c                 $  < \        V P                  ^4      P                  RR4      4      p\        P	                  V4      '       d   RV R2# RpSP                  4        F  pSV,          V8X  g   K  TpK  	  Vf   \        S4      pVSV&   RV R2# )   r   r   <>N)r    r5   r   template_name_rer
   r>   r   )mobjr&   r$   keylnamess   &   r   listreplexpand_sub.<locals>.listrepl   s    tzz!},,UI>?!!'**wiq>!;;=Cc{g% ! <f%D"F4L4&{r   NzNo replicates found for <rH   _r/   r   z*Mismatch in number of replacements (base <=z>) for <z>. Ignoring.c                 v   < V P                  ^4      pSP                  VS^,           V.,          4      S,          # )rF   )r5   get)rJ   r$   kruless   & r   namereplexpand_sub.<locals>.namerepl   s1    zz!}yyA$/033r   r*   z

rG   )r   r'   r   sublist_retemplate_rer   rR   
ValueError
startswithr1   r   r6   printr2   )substrr"   rM   numsubs	base_rulerr&   r   rulenumrules_base_rulerU   newstrrS   rL   rT   s   &&           @@@r   
expand_subre      s   ^^E>2F^^E=1F'F\\'6*F [[*FGIE  (E>jjIIa$67G #<QCq!ABB~g&8&8&=&="a7>}}S7IJ7I!IIi-7IDJd)Ca	a"%((5+;"<   ){!O+< =S',8 9% )* 4 F7^+//(3f<<  ^^NC0F^^M3/FM7 Ks   3Gc                 4   T pR p\        V4      p^ p/ pVP                  \        4       V F^  p\        WV^ ,           4      w  rxW',          pVP                  V4       V\	        W^ ,          V^,           V4      ,          pV^,          pK`  	  W!VR ,          pV# )r*   N)r   update_special_namesr-   re   )	allstrrd   writestrstructoldendr"   rW   
cleanedstrdefss	   &        r   process_strro      s    FHV$FFE	LL 8s1v9NO
TJv!fSV4e<<Q  vwHOr   z8(\n|\A)\s*include\s*['\"](?P<name>[\w\d./\\]+\.src)['\"]c                 h   \         P                  P                  V 4      p\        V 4      ;_uu_ 4       p. pV F  p\        P                  V4      pV'       d   VP                  R 4      p\         P                  P                  V4      '       g    \         P                  P                  W4      p\         P                  P                  V4      '       d   VP                  \        V4      4       K  VP                  V4       K  VP                  V4       K  	  RRR4       V#   + '       g   i     X# ; i)r$   N)ospathdirnameopeninclude_src_rer
   r5   isabsr6   isfileextendresolve_includesr   )sourcedfidlinesliner   fns   &      r   ry   ry      s    
A	fD$$T*AWWV_ww}}R((a,B77>>"%%LL!1"!56LL&T"  
 L 
 Ls   AD AD AD  D1	c                 L    \        V 4      p\        R P                  V4      4      # r)   )ry   ro   r6   )rz   r}   s   & r   process_filer      s    V$Erwwu~&&r   z
<_c=s,d,c,z>
<_t=real,double precision,complex,double complex>
<prefix=s,d,c,z>
<ftype=real,double precision,complex,double complex>
<ctype=float,double,complex_float,complex_double>
<ftypereal=real,double precision,\0,\1>
<ctypereal=float,double,\0,\1>
)rq   r+   compileIr   r   r	   r   rY   r   rX   r'   r-   r3   r    r   rI   re   ro   ru   ry   r   rh    r   r   <module>r      s   	 	+Z ::SUWUYUYZ JBDDQJJ=rttD 8 jj/0::89
**'
( **,
- ::67 <|( WY[Y]Y]^$'
 $ % r   