+
    i=                    4   R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
  ^ RIt^RIHtHt ^RI5 ]P"                  s^sRs^ s^sRsRsRs^ s^s^s. sRsRs^s / s!Rs"^s#Rs$^ s%\J        . /s&Rs'. s(Rs). s*Rs+Rs,. s-. s.. s/R t0RR lt1^2]n2        / t3R	 F
  t4R
R/]3]4&   K  	  R F
  t4R
R/]3]4&   K  	  / t5/ t6. RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@N F  t7]7RA,           ]5]7&   ]7]6]7RA,           &   K  	  RB t8RC t9RD t:RE t;]Px                  ! RF]Pz                  4      P|                  t?]Px                  ! RG]Pz                  4      P|                  t@]Px                  ! RH]Pz                  4      P|                  tA]Px                  ! RI]Pz                  4      P                  tC. ROtD. ROtERJ tFRK tG]H^3RL ltIRMtJRNtK]Px                  ! ]JR]K]KRO3,          ]Pz                  4      R?3tL]Px                  ! ]JR]KRP,           ]KRP,           RO3,          ]Pz                  4      tM]Px                  ! ]JR,          ]Pz                  4      RQ3tN]Px                  ! ]JR,          ]Pz                  4      RQ3tORRtP]Px                  ! ]JR]P]PRO3,          ]Pz                  4      RQ3tQ]PRS,           tR]Px                  ! ]JR]R]RRO3,          ]Pz                  4      RQ3tSRTtT]Px                  ! ]JR]T]TRO3,          ]Pz                  4      RU3tURVtV]Px                  ! ]JRW]V]VRO3,          ]Pz                  4      RX3tWRYtX]Px                  ! ]JR]X]XRO3,          ]Pz                  4      RZ3tY]Px                  ! ]JR,          ]Pz                  4      R[3tZ]Px                  ! ]JR,          ]Pz                  4      R\3t[]Px                  ! ]JR,          ]Pz                  4      R]3t\]Px                  ! ]JR,          ]Pz                  4      R^3t]]Px                  ! ]JR,          ]Pz                  4      R_3t^]Px                  ! ]JR,          ]Pz                  4      R`3t_]Px                  ! ]JR,          ]Pz                  4      Ra3t`]Px                  ! ]JR,          ]Pz                  4      Rb3ta]Px                  ! ]JR,          ]Pz                  4      Rc3tb]Px                  ! ]JR,          ]Pz                  4      Rd3tc]Px                  ! ]JR,          ]Pz                  4      Re3td]Px                  ! ]JR,          ]Pz                  4      Rf3te]Px                  ! ]JR,          ]Pz                  4      Rg3tf]Px                  ! ]JR,          ]Pz                  4      Rh3tg]Px                  ! ]JR,          ]Pz                  4      Ri3th]Px                  ! ]JR,          ]Pz                  4      Rj3ti]Px                  ! ]JR,          ]Pz                  4      Rk3tj]Px                  ! ]JR,          ]Pz                  4      Rl3tk]Px                  ! ]JR,          ]Pz                  ]P                  ,          4      Rm3tm]Px                  ! Rn]P                  4      Ro3tnRp toRq tp]Px                  ! Rr]Pz                  4      tq]Px                  ! Rs]Pz                  4      tr]Px                  ! Rt]Pz                  4      tsRRu lttRv tuRRw ltvRx twRRy ltx]Px                  ! Rz]Pz                  4      ty]Px                  ! R{]Pz                  4      tz]Px                  ! R|]Pz                  4      t{]Px                  ! R}]Pz                  4      t|]Px                  ! R~]Pz                  4      t}]Px                  ! R4      t~]Px                  ! R4      t]Px                  ! R]Pz                  4      tR tR tR tR tR tR tR t]Px                  ! R]Pz                  4      t]Px                  ! R]Pz                  4      t]Px                  ! R]Pz                  4      t]Px                  ! R]Pz                  4      t]Px                  ! R]Pz                  4      tR tR tR tR tRR ltRR ltRR ltRR ltR tR tRR ltRR ltRR ltR tR tRR ltR tRR lt]Px                  ! R]Pz                  4      tR t]Px                  ! R]Pz                  4      tR tR tR tR tR tRR lt/ 3R ltR t]Px                  ! R4      P                  tR tR t]Px                  ! R]Pz                  4      tRR ltR t. 3R ltR t]Px                  ! R]Pz                  4      t]Px                  ! R]Pz                  4      t]Px                  ! R]Pz                  4      t]Px                  ! R]Pz                  4      t]Px                  ! R]Pz                  4      tR t/ 3R ltRR ltRR ltRR ltR tRR lt. sR tR tR t. R3R ltR tE\|        EP                  ]4       ]R8X  Ed   . t. t^t^ t^ t^ t]EP                  R,           EF3  t]R8X  d   K  ]^ ,          R8X  d   ^ tK  ]R8X  d   ^s^ sK,  ]R8X  d   ^s^ sK9  ]R8X  d   \&        '       d
   ]1! R^ 4       ^sRsK[  ]R8X  d   ^sKf  ]R8X  d   ^sKq  ]R8X  d   ^sRsK~  ]R8X  d	   ^ sRs^sK  ]R8X  d   ^tK  ]R8X  d   ^tK  ]R8X  d   ^tK  ]^ ,          R8X  d   ]! R]! ]4       R24       K  ]'       d   ^ t]sK  ]'       d   ^ t]sK  ]'       d.    ]! ]4      EP                  4        ]EP                  ]4       EK!  ]EP                  ]4       EK6  	  \&        '       g"   \2        '       d   \4        '       g
   ]1! R^ 4       ]! ]4      t\0        '       dP   ]1! R]! \0        4       R2^ 4       ]! ]4      t]! \0        R4      ;_uu_ 4       t]EP                  ]4       RRR4       ]'       d   ]H! ]4       R# R# R#   ] d    Rt EL2i ; i  ] d   t]! R]: R24        RtAEK	  RtAii ; i  + '       g   i     LY; i)a  
crackfortran --- read fortran (77,90) code and extract declaration information.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.


Usage of crackfortran:
======================
Command line keys: -quiet,-verbose,-fix,-f77,-f90,-show,-h <pyffilename>
                   -m <module name for f77 routines>,--ignore-contains
Functions: crackfortran, crack2fortran
The following Fortran statements/constructions are supported
(or will be if needed):
   block data,byte,call,character,common,complex,contains,data,
   dimension,double complex,double precision,end,external,function,
   implicit,integer,intent,interface,intrinsic,
   logical,module,optional,parameter,private,public,
   program,real,(sequence?),subroutine,type,use,virtual,
   include,pythonmodule
Note: 'virtual' is mapped to 'dimension'.
Note: 'implicit integer (z) static (z)' is 'implicit static (z)' (this is minor bug).
Note: code after 'contains' will be ignored until its scope ends.
Note: 'common' statement is extended: dimensions are moved to variable definitions
Note: f2py directive: <commentchar>f2py<line> is read as <line>
Note: pythonmodule is introduced to represent Python module

Usage:
  `postlist=crackfortran(files)`
  `postlist` contains declaration information read from the list of files `files`.
  `crack2fortran(postlist)` returns a fortran code to be saved to pyf-file

  `postlist` has the following structure:
 *** it is a list of dictionaries containing `blocks':
     B = {'block','body','vars','parent_block'[,'name','prefix','args','result',
          'implicit','externals','interfaced','common','sortvars',
          'commonvars','note']}
     B['block'] = 'interface' | 'function' | 'subroutine' | 'module' |
                  'program' | 'block data' | 'type' | 'pythonmodule' |
                  'abstract interface'
     B['body'] --- list containing `subblocks' with the same structure as `blocks'
     B['parent_block'] --- dictionary of a parent block:
                             C['body'][<index>]['parent_block'] is C
     B['vars'] --- dictionary of variable definitions
     B['sortvars'] --- dictionary of variable definitions sorted by dependence (independent first)
     B['name'] --- name of the block (not if B['block']=='interface')
     B['prefix'] --- prefix string (only if B['block']=='function')
     B['args'] --- list of argument names if B['block']== 'function' | 'subroutine'
     B['result'] --- name of the return value (only if B['block']=='function')
     B['implicit'] --- dictionary {'a':<variable definition>,'b':...} | None
     B['externals'] --- list of variables being external
     B['interfaced'] --- list of variables being external and defined
     B['common'] --- dictionary of common blocks (list of objects)
     B['commonvars'] --- list of variables used in common blocks (dimensions are moved to variable definitions)
     B['from'] --- string showing the 'parents' of the current block
     B['use'] --- dictionary of modules used in current block:
         {<modulename>:{['only':<0|1>],['map':{<local_name1>:<use_name1>,...}]}}
     B['note'] --- list of LaTeX comments on the block
     B['f2pyenhancements'] --- optional dictionary
          {'threadsafe':'','fortranname':<name>,
           'callstatement':<C-expr>|<multi-line block>,
           'callprotoargument':<C-expr-list>,
           'usercode':<multi-line block>|<list of multi-line blocks>,
           'pymethoddef:<multi-line block>'
           }
     B['entry'] --- dictionary {entryname:argslist,..}
     B['varnames'] --- list of variable names given in the order of reading the
                       Fortran code, useful for derived types.
     B['saved_interface'] --- a string of scanned routine signature, defines explicit interface
 *** Variable definition is a dictionary
     D = B['vars'][<variable name>] =
     {'typespec'[,'attrspec','kindselector','charselector','=','typename']}
     D['typespec'] = 'byte' | 'character' | 'complex' | 'double complex' |
                     'double precision' | 'integer' | 'logical' | 'real' | 'type'
     D['attrspec'] --- list of attributes (e.g. 'dimension(<arrayspec>)',
                       'external','intent(in|out|inout|hide|c|callback|cache|aligned4|aligned8|aligned16)',
                       'optional','required', etc)
     K = D['kindselector'] = {['*','kind']} (only if D['typespec'] =
                         'complex' | 'integer' | 'logical' | 'real' )
     C = D['charselector'] = {['*','len','kind','f2py_len']}
                             (only if D['typespec']=='character')
     D['='] --- initialization expression string
     D['typename'] --- name of the type if D['typespec']=='type'
     D['dimension'] --- list of dimension bounds
     D['intent'] --- list of intent specifications
     D['depend'] --- list of variable names on which current variable depends on
     D['check'] --- list of C-expressions; if C-expr returns zero, exception is raised
     D['note'] --- list of LaTeX comments on the variable
 *** Meaning of kind/char selectors (few examples):
     D['typespec>']*K['*']
     D['typespec'](kind=K['kind'])
     character*C['*']
     character(len=C['len'],kind=C['kind'], f2py_len=C['f2py_len'])
     (see also fortran type declaration statement formats below)

Fortran 90 type declaration statement format (F77 is subset of F90)
====================================================================
(Main source: IBM XL Fortran 5.1 Language Reference Manual)
type declaration = <typespec> [[<attrspec>]::] <entitydecl>
<typespec> = byte                          |
             character[<charselector>]     |
             complex[<kindselector>]       |
             double complex                |
             double precision              |
             integer[<kindselector>]       |
             logical[<kindselector>]       |
             real[<kindselector>]          |
             type(<typename>)
<charselector> = * <charlen>               |
             ([len=]<len>[,[kind=]<kind>]) |
             (kind=<kind>[,len=<len>])
<kindselector> = * <intlen>                |
             ([kind=]<kind>)
<attrspec> = comma separated list of attributes.
             Only the following attributes are used in
             building up the interface:
                external
                (parameter --- affects '=' key)
                optional
                intent
             Other attributes are ignored.
<intentspec> = in | out | inout
<arrayspec> = comma separated list of dimension bounds.
<entitydecl> = <name> [[*<charlen>][(<arrayspec>)] | [(<arrayspec>)]*<charlen>]
                      [/<init_expr>/ | =<init_expr>] [,<entitydecl>]

In addition, the following attributes are used: check,depend,note

TODO:
    * Apply 'parameter' attribute (e.g. 'integer parameter :: i=2' 'real x(i)'
                                   -> 'real x(2)')
    The above may be solved by creating appropriate preprocessor program, for example.

N)Path)__version__symbolic)*fix c                  z    ^s Rs^ s^sRsRsRs^ s^s^s	. s
^ s\        . /sRs^sRs. s/ s^sRsRs. s. s. s. sRsR# )   r   r   N    )	strictf77sourcecodeformquietverbosetabcharpyffilenamef77modulenameskipemptyendsignorecontainsdolowercasedebuggroupcounter	grouplistneededmoduleexpectbeginskipblocksuntilusermodulesf90modulevarsgotnextfilefilepositiontextcurrentfilenameskipfunctions	skipfuncs	onlyfuncsinclude_pathsprevious_context     w/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/numpy/f2py/crackfortran.pyreset_global_f2py_varsr)      s     INEGGKMMNKELr"ILKOKMKOMIIMr'   c                     \         '       g   R # \        '       gM   V'       d$   \        P                  P	                  \
        4       \        P                  P	                  V 4       R # R # N)r   r   sysstdoutwriter   )lineflags   &&r(   outmessr1      s>     75JJ-.

 r'   zabcdefghopqrstuvwxyz$_typespecrealijklmnintegerintdoublefloatcharshortlongvoidcasewhilereturnsignedunsignediffortypedefsizeofunionstructstaticregisternewbreakdogotoswitchcontinueelseinlineexterndeleteconstautolenrankshapeindexslensize_imaxminflenfshapestringcomplex_doublefloat_doublestdinstderrr-   typedefault_bnc                 p    V \         9   d+   \        R V  R\         V ,           R24       \         V ,          # V # )zrmbadname1: Replacing "" with "".
)badnameserrmessnames   &r(   
rmbadname1rp     s6    x)$x7GtLM~Kr'   c                 B    V  Uu. uF  p\        V4      NK  	  up# u upi r+   )rp   names_ms   & r(   	rmbadnameru     s    %*+UrJrNU+++   c                 p    V \         9   d+   \        R V  R\         V ,           R24       \         V ,          # V # )zundo_rmbadname1: Replacing "rj   rk   )invbadnamesrm   rn   s   &r(   undo_rmbadname1ry     s8    {.tfH[=N<OtTU4  Kr'   c                 B    V  Uu. uF  p\        V4      NK  	  up# u upi r+   )ry   rr   s   & r(   undo_rmbadnamer{     s    */0%BOB%000rv   z-\*-\s*fortran\s*-\*-z-\*-\s*f90\s*-\*-z-\*-\s*fix\s*-\*-z[^c*]\s*[^\s\d\t]c                   \         e0   \         P                  ! V 4      P                  4       P                  pM\	        ^ \
        P                  P                  V 4      4      p\        V R4      ;_uu_ 4       pVP                  V4      pVP                  \        P                  4      '       d   RpMrVP                  \        P                  \        P                  34      '       d   RpM:VP                  \        P                  \        P                   34      '       d   RpMRpRRR4       \        WXR7      #   + '       g   i     L; i)a:  Ensures that filename is opened with correct encoding parameter.

This function uses charset_normalizer package, when available, for
determining the encoding of the file to be opened. When charset_normalizer
is not available, the function detects only UTF encodings, otherwise, ASCII
encoding is used as fallback.
Nrbz	UTF-8-SIGzUTF-32zUTF-16ascii)encoding)charset_normalizer	from_pathbestr   r^   ospathgetsizeopenread
startswithcodecsBOM_UTF8BOM_UTF32_LEBOM_UTF32_BEBOM_LEBOM_BE)filenamemoder   nbytesfhandleraws   &&    r(   openhookr   +  s     %%//9>>@II R23(D!!W,,v&C~~foo..&!4!4f6I6I JKK# >??# # " 22 "!s   5A.D6$7D6D66E	c                @   Rp\        V 4      P                  P                  4       \        9   d   Rp\	        V R4      ;_uu_ 4       pVP                  4       p^p\        V4      '       d   ^ pM\        V4      '       d   ^ pRpV^ 8  d{   V'       ds   V^ ,          R8w  dS   VP                  4       '       d=   V^,          pV^ ,          R8w  d   \        VR,          4      '       g   VR	R
 R8X  d   RpMVP                  4       pK  RRR4       V#   + '       g   i     T# ; i)z(Check if file is in free format Fortran.FTr!	N   N&Nr   )
r   suffixlowerCOMMON_FREE_EXTENSIONSr   readline_has_f_header_has_f90_headerstrip_free_f90_start)fnameresultr   r/   ns   &    r(   is_free_formatr   J  s     FE{!%;;	%		!AT""AF!eAw#~$**,,QGtOR(A(Ad2bkUXFX!F##%D 
 M 
	 Ms   A
D#D4ADD	c           
     v   V'       g0   \         \        \        \        \        \
        \        \        \        3	pV . 8X  d   R# \        pRpRpRp\        P                  ! R\        P                  4      p\        P                  ! R4      p	\        P                  ! R4      p
\        P                  ! R4      pV'       d
   V! RR,4       RRrR.\        ^
4       Uu. uF  p\        V4      NK  	  up,           pRs\        P                  ! V \         R	7      p  VP#                  4       pT'       g   EMTP-                  4       '       Ed   RsTP)                  4       s^s Tp^ sRs\.        P0                  P3                  \        4      ^,          p\5        \        4      P6                  P9                  4       \:        9   d&   \=        T4      '       g   \?        T4      '       g   ^sM(\A        \        4      '       d   \?        T4      '       g   Rs\        '       d   \B        sM\D        s\G        R\I        \        4      : R\        : \        ;'       d    R;'       g    R: R24       TPK                  4       PM                  RR4      pTR8X  g   TR,,          R9  d   MTRR, pK  Rp\O        TR4      w  ppTR,          pTR,          P9                  4       R8X  d'   \O        TR-,           TR,          ,           R4      w  ppR
pTPQ                  4       R8X  d   \        R8X  d   MRpEK  \        R8X  Edj   T^ ,          R.9   d7   TR,          P9                  4       R8X  d   RTR,          ,           pR
pM,RpRpEK\  \        '       d   \S        T4      ^H8  d
   TR,          pT^ ,          T9  d   \'        R\I        T4      ,          4      hT'       d   \        '       d5   \S        T4      ^8  d%   T^,          R8X  g   TTR ,          ,           pRpRpEMT	PU                  T4      pT'       d   TPW                  R!4      pT'       d-   YzPU                  T4      PW                  R!4      ,           pRpRpEM{RTR,          ,           pT'       d   TP9                  4       pMTpTpTpEMJ\        R8X  Ed$   T'       g   XR"8X  dy   TPU                  T4      '       db   TR#,           p TP#                  4       pT'       g   \Y        R$4       M#TT,           pTPU                  T4      '       g   KG   TP[                  4       pT	PU                  T4      pT'       d   TPW                  R!4      pT'       d,   YzPU                  T4      PW                  R!4      ,           pRpRpM:T'       d-   T'       d   \]        T4      '       g   TP9                  4       MTpMTpTpTpTRJpM\_        R%\I        \        4       24      hR&TPa                  4       ^,
          \        T3,          sTPU                  T4      pT'       Ed   TPW                  R'4      p\.        P0                  Pc                  T4      '       d   \e        TT^ R(7       M\.        P0                  Pg                  \        4      .\h        ,           p^ pT FZ  p\.        P0                  Pk                  TT4      p\.        P0                  Pc                  T4      '       g   KJ  ^p\e        TT^ R(7        M	  T'       g;   \G        R)\I        T4      : R*\.        Pl                  Pk                  T4      : R+24       MT! T4       TpEK0  T'       d   TP9                  4       pMTpTpR&TPa                  4       ^,
          \        T3,          sTPU                  T4      pT'       Ed   TPW                  R'4      p\.        P0                  Pc                  T4      '       d   \e        TT^ R(7       M\.        P0                  Pg                  \        4      .\h        ,           p^ pT FZ  p\.        P0                  Pk                  TT4      p\.        P0                  Pc                  T4      '       g   KJ  ^p\e        TT^ R(7        M	  T'       g;   \G        R)\I        T4      : R*\.        Pl                  Pk                  T4      : R+24       MT! T4       RsTPo                  4        T'       d   T! R^4       R# Xw	  s ssssssssR# u upi   \$         d7   p\'        RTP)                  4        RTP+                  4        RT R24      hRp?ii ; i)/z
Read fortran codes from files and
 1) Get rid of comments, line continuations, and empty lines; lower cases.
 2) Call dowithline(line) on every line.
 3) Recursively call itself when statement "include '<filename>'" is met.
NFr   z*\s*include\s*(\'|")(?P<name>[^\'"]*)(\'|")z(?P<line>.*)&\s*\Zz(\s*&|)(?P<line>.*)z.*?''' )r   Tzreadfortrancode: reading #z failed with
zu.
It is likely that installing charset_normalizer package will help f2py determine the input file encoding correctly.r   freez	Reading file z	 (format:z,strict)
    z
r   r   z!f2pyr   NN:r	   r   Nf2pyz     :NH   Nzxreadfortrancode: Found non-(space,digit) char in the first column.
	Are you sure that this code is in fix form?
	line=%s   NNr/   .pyf
z.Unexpected end of file when reading multiline
z4Flag sourcecodeform must be either 'fix' or 'free': zLine #%d in %s:"%s"
	ro   )
dowithlineistopz-readfortrancode: could not find include file z in . Ignoring.
r   r
   )r   cr   Cr   )8r   r   r    r   r   beginpatternr   r   r   recompileIrangestr	fileinput	FileInputr   r   UnicodeDecodeError	Exceptionr   linenoisfirstliner   r   splitextr   r   r   COMMON_FIXED_EXTENSIONSr   _has_fix_headerr   beginpattern77beginpattern90r1   repr
expandtabsreplacesplit_by_unquotedr   rV   matchgrouprm   rstripiscstyledirective
ValueError
filelinenoisfilereadfortrancodedirnamer$   joinpathsepclose)ffiler   r   saveglobalslocaldolowercasecont	finallinellincludelinecont1cont2
mline_markl1rt   spacedigitsfinlmsgextis_f2py_directiverl_origfinalliner   lcmfninclude_dirs	foundfileinc_dirfn1s   &&&                            r(   r   r   d  si    !#3_nV_%+6{" DI	B**5rtt=KJJ,-EJJ-.EI&J2r%U2Y7Yr3r7Y77K


eh
7C
	A ??!!llnOKBI"N''""?3A6CO$++1137NN(++q/A/A	009K9K!'y--O,n!//i66B68 9 LLN""63/r'uH$#2A!#As+B	Sb6<<>W$$Q[2b6%93?DAq $779?'
  U"t00S6<<>V+!B%A(,% D(-%q6B;#At;& !GIMa!Q R R IICFQJqts{!B%Z	 "KKNAkk!n226::B "I$&M  !B%A'$&HHJ	$&	$&MBv%C6Mj.>.>q.A.AHBMOBA!''++HHJAAGGFO++a...v66	 "# 4EIZ[]I^I^
egI "I "TMDFtNG[F\]_ _4NNq /287 7m,1Bww~~b!!zC GGOOO4 68E F	+G'',,w3Cww~~c**$%	'
!L  , !R"**//,"?A B y!HHJ		M01or43 3-(AqWWV_77>>"B:Q?GGOOO<=MLI'ggll7B/77>>#&& !I#CJaH ( Hbjjool;= > 	9IIK2q 9D	6%	%+E 8 " 	+CLLN+;1SZZ\N  & 	s   c2c7 7d81d33d8zN\s*(?P<before>%s(?=\s*(\b(%s)\b)))\s*(?P<this>(\b(%s)\b))\s*(?P<after>%s)\s*\Zzqcharacter|logical|integer|real|complex|double\s*(precision\s*(complex|)|complex)|type(?=\s*\([\w\s,=(*)]*\))|byte.*z|static|automatic|undefinedbeginzprogram|block\s*datazM|module(?!\s*procedure)|python\s*module|(abstract|)\s*interface|type(?!\s*\()z\end|endprogram|endblockdata|endmodule|endpythonmodule|endinterface|endsubroutine|endfunctionendzDend\s*(if|do|where|select|while|forall|associate|critical|enum|team)z[\w]*?endifzmodule\s*proceduremoduleprocedureimplicit	dimensionexternaloptionalrequiredpublicprivate	intrinsicintent	parameterdatacallentrycallfuncommonusecontainsformatf2pyenhancementsz2\s*(?P<before>''')(?P<this>.*?)(?P<after>''')\s*\Z	multilinec           	        \        R4      \        V4      ,          '       d   Q R4       h\        P                  ! RP                  R\        P                  ! V4       R2R\        P                  ! V4       R2RRR	7      4      pVP                  V 4      pV'       d#   VP                  4       pVR
,          VR,          3# V R3# )z
Splits the line into (line[:i], line[i:]),
where i is the index of first occurrence of one of the characters
not within quotes, or len(line) if no such index exists
z"'zcannot split by unquoted quoteszR\A(?P<before>({single_quoted}|{double_quoted}|{not_quoted})*)(?P<after>{char}.*)\Zz[^"'][z('([^'\\]|(\\.))*')z("([^"\\]|(\\.))*"))
not_quotedr9   single_quoteddouble_quotedbeforeafterr   )setr   r   r  escaper   	groupdict)r/   
charactersr   r   ds   &&   r(   r   r     s     E
S_,,P/PP-


	!!'ryy45Q7RYYz*+1-00	 "( "2	3A 	
AKKM(QwZ((":r'   c                     . p\        V 4      P                  R 4       F/  pR F  pVP                  VR4      pK  	  VP                  V4       K1  	  RP	                  V4      # )@,@z(),r   ,)markoutercommasplitr   appendr   )argslinear   r   s   &   r(   _simplifyargsr%    sV    
AH%++E2A		!S!A 	 3 88A;r'   z"\s*(?P<result>\b[a-z]+\w*\b)\s*=.*z \s*(?P<bind>\b[a-z]+\w*\b)\s*=.*zH\s*bind\(\s*(?P<lang>[^,]+)\s*,\s*name\s*=\s*"(?P<lang_name>[^"]+)"\s*\)c                
   \        V R4      w  r#V'       d   \        ^ ,          P                  V 4      '       g   \        ^ ,          P                  V 4      '       g]   V^ 8X  g   Q \	        V4      4       h\        V R4      w  rV'       d#   \        W4       \        VR,          R4      w  rK*  \        W4       R# V^ 8  dq   ^ s\        R/s\        / /s\        . /s	. \        \        ,          R&   / \        \        ,          R&   R\        \        ,          R&   R\        \        ,          R&   R&s
R&sR# V^ 8  Ed   ^ p\        '       d   \        \        8X  d   ^p\        V8  d   \        R	\	        \        4      : R
\	        \        4      : R24       \        R4       \        \        ^,
          ,          P                  \        \        ,          4       \        \        ,          \        \        ^,
          ,          R&,          R&   \        \         \        ^,
          sK  \        '       Ed   \        \        8X  Ed   \        \        ^,
          ,          P                  \        \        ,          4       \        \        ,          \        \        ^,
          ,          R&,          R&   \        \         \        ^,
          s\        \        ^,
          ,          P                  \        \        ,          4       \        \        ,          \        \        ^,
          ,          R&,          R&   \        \         \        ^,
          sR&s
R# V R8X  d   R# ^ p\        \         \"        \$        \&        \(        \*        \,        \.        \0        \2        \4        \6        \8        \:        \<        \>        \@        \B        \D        \F        \H        \J        \        \        \L        3 F.  pV^ ,          P                  V 4      pV'       d    MV^,           pK0  	  X'       Eg   \N        p	^ \        u;8:  d   \        8:  d    R#  R\        \        ,          9   Edb   \        \        ,          R,           EFD  p
V
\P        9   d   \P        V
,          p
R\        \        ,          9   d    V
\        \        ,          R,          9   d   KQ  \R        P                  ! RV
,          \U        V 4      \R        PV                  4      pV'       g   K  V	P                  VPY                  R4      4      p\[        VPY                  R4      4      pV'       d   RV
 RV RVPY                  R4       R2p M	RV
 RV R2p \\        ^ ,          P                  V 4      pV'       g   \        R\	        V 4       R24        R# \_        VRV 4        R# 	  \`        ^8  g5   \`        ^8X  dB   \b        Pe                  4       Pg                  R4      '       d   Rs4\        R\        ,          4       R# X^,          R8X  Ed   ^ \        u;8:  d   \        8  d"   M M\        ^,
          s\        \        8:  d   R# \        ^ 8:  d   \k        R\        ,          4      h\8        ^ ,          P                  V 4      pV'       dq   VPY                  R4      \        \        ,          8X  gL   \k        R\	        VPY                  R4      4      : R \	        \        \        ,          4      : R!\l        : 24      h\        \        8X  d   R&s\        \        ^,
          ,          P                  \        \        ,          4       \        \        ,          \        \        ^,
          ,          R&,          R&   \        \         \        ^,
          s\n        '       g   ^s8R# R# V^,          R"8X  dC   ^ \        u;8:  d   \        8:  d   M M\        ^,           sR# ^ s9\_        W^,          V 4       ^ s8R# V^,          R#8X  d   R# V^,          R$8X  d   \_        W^,          V 4       R# V^,          R%8X  d2   \t        '       d   R# ^ \        u;8:  d   \        8:  d    R#  \        sR# ^ \        u;8:  d   \        8:  d    R#  \_        W^,          V 4       R# )'z
reset=-1  --- initialize
reset=0   --- crack the line
reset=1   --- final check if mismatch of blocks occurred

Cracked data is saved in grouplist[0].
;r	   NNNr   bodyvarsblockro   zcrackline: groupcounter=z groupname=r   zYcrackline: Mismatch of blocks encountered. Trying to fix it by assuming "end" statement.
	externals
interfacedz5(?P<before>[^"]*)\b%s\b\s*@\(@(?P<args>[^@]*)@\)@.*\Zr  argszcallfun (z
) result (r   )z4crackline: could not resolve function call for line=.
r	  r   z"crackline:%d: No pattern for line
r   z>crackline: groupcounter(=%s) is nonpositive. Check the blocks.thiszcrackline: End group z* does not match with previous Begin group z
	r   r   r   r  r   );r   f2pyenhancementspatternr   multilinepatternr   	crackliner   	groupname
groupcacher   r   r   r   r1   r"  dimensionpatternexternalpatternintentpatternoptionalpatternrequiredpatternparameterpatterndatapatternpublicpatternprivatepatternintrinsicpatternendifpattern
endpatternformatpatternr   functionpatternsubroutinepatternimplicitpatterntypespatterncommonpatterncallpattern
usepatterncontainspatternentrypatternmoduleprocedurepatterncrackline_re_1rx   r   markouterparenr   r   r%  callfunpatternanalyzeliner   r    r   endswithr%   r   r   r   r   r   r   )r/   resetr   has_semicolonsemicolon_lineflr0   patr   re_1ro   m1m2r$  s   &&            r(   r5  r5    s4    )s3A5a8>>tDD/288>>z&4;&z0s;d"#4^B5G#M D.$qy!2&	"B'
!2&	+-
< (+-
< (,.
< )+-
< (qy=\\9BR,'i: ;lnlQ&'..z,/GH6?6MIlQ&'+F3,''!+L=\\9lQ&'..z,/GH6?6MIlQ&'+F3,''!+LlQ&'..z,/GH6?6MIlQ&'+F3,''!+LLrzD /=/ +}n jo/@}Z' & FLLax#$ 1/</ 0*\22"<0==;&&t,D:l#;;
S_H`amHn@nXXLtSUcdhUikmkokoq2BHHX$67B%bhhv&67A!)$q:bhhx>P=QQRS!)$q15&q)//5ARSWX\S]R^^abd9d3) >* Q;7a<O,A,A,C,L,LV,T,T#9\JK	Q5.,.'!+L,.1 0+- . . !_""4(&)Y|-DD!"((6"23T)L:Q5R-/  
 l* O,"#**:l+CD2;L2I	,"#B'/l##a'}K 	Q7	/</'!+LA1vt$	Q7		Q$	$A1vt$	Q:	>/</ 0&/</ 0A1vt$r'   c                     R p^ pV  FP  pVR8X  d   V^,           pV^8X  d   VR,           pK%  M"VR8X  d   V^,
          pV^ 8X  d   VR,           pKH  W,           pKR  	  V# )r   r/  @(@r0  @)@r&   )r/   r   fr   s   &   r(   rP  rP  W  sq    
A	A8AAAvI  #XAAAvIE  Hr'   c                    R p^ p\        WR,           4      w  rEW$,          pV'       d   V^ ,          V8X  d    V^ 8X  d   VRV,           R,           ,          pM>W%^ ,          ,          pV^ ,          R8X  d   V^,          pMV^ ,          R8X  d
   V^,          p\        VR,          VR,           4      w  rEW$,          pK  V'       d   Q \        W0V34      4       hV# )r   ()@r/  r0  r(  )r   r   )r/   commar   r_  r  r  s   &&    r(   r   r   i  s    
A	A%dDL9MFKA
!HAFus""AqMAQx3QqSQ)%)UT\B	$$|$$5Hr'   c                 J    V P                  R R4      P                  RR4      pV# )r]  r/  r^  r0  )r   )r/   r   s   & r(   unmarkouterparenre  |  s$    UC ((4AHr'   c                 4   V '       g   / p V'       g   V # WJ d   V # \        VP                  4       4       F  pVR 8X  d   V'       g   W09  d   W,          W&   K$  K&  VR8X  d   W,           F  p\        WV4      p K  	  KJ  VR8X  d   \        WV,          V4      p Kf  VR8X  d   \	        WV,          V4      p K  VR9   d   V'       g   W09  d   W,          W&   K  K  VR8X  d   K  VR	9   d   \        RV R24       K  \        R\        V4      ,           4      h	  V # )
r2   attrspeckindselectorcharselectornotezappenddecl: "z" not implemented.
z-appenddecl: Unknown variable definition key: )=typename)r  checkr   r   r   depend)listkeyssetattrspecsetkindselectorsetcharselectorrm   r   r   )decldecl2forcekr   s   &&&  r(   
appenddeclrx    s   }%**,
?( &*_XX"4E2 . "4q59D. "4q59D##( &&[ ) )mA3&:;<KF# $ $)  , Kr'   zD\s*(?P<this>(@\(@.*?@\)@|\*[\d*]+|\*\s*@\(@.*?@\)@|))(?P<after>.*)\Zz[(?:,(?P<attributes>[\w(),]+))?(::)?(?P<name>\b[a-z$_][\w$]*\b)(?:\((?P<params>[\w,]*)\))?\Zz\s*(?P<name>\b[\w$]+\b)\s*(@\(@\s*(?P<args>[\w\s,]*)\s*@\)@|)\s*((result(\s*@\(@\s*(?P<result>\b[\w$]+\b)\s*@\)@|))|(bind\s*@\(@\s*(?P<bind>(?:(?!@\)@).)*)\s*@\)@))*\s*\ZzF\s*(?P<scheme>(operator|assignment))@\(@\s*(?P<name>[^)]+)\s*@\)@\s*\Zz9\s*(?P<name>\b[\w$]+\b)\s*@\(@\s*(?P<args>.*)\s*@\)@\s*\Zz4([-+]?(?:\d+(?:\.\d*)?|\d*\.\d+))[dD]((?:[-+]?\d+)?)zA([-+]?((?:\d+(?:\.\d*)?|\d*\.\d+))[eE]((?:[-+]?\d+)?)|(\d+\.\d*))zintent\s*\(.*?\bcallback\bc                 t    V P                  R . 4       F!  p\        P                  V4      '       g   K    ^# 	  ^ # )rg  )get_intentcallbackpatternr   )vdeclr$  s   & r(   _is_intent_callbackr}    s0    YYz2&!''** ' r'   c                 z   R P                  V P                  4       4      p \        P                  V 4      p\	        W4       V'       dl   VP                  R4      pV'       d/   VP                  R4       Uu. uF  q3P                  4       NK  	  upM. pVP                  R4      W!P                  R4      3# R. R3# u upi )r   
attributesr  ro   paramsN)r   r!  typedefpatternr   printr   r   )r/   rZ  attrsr$  s   &   r(   _resolvetypedefpatternr    s    774::< D			d	#B	$O	&9>EKK$45$4q$45Bxx(:::T> 6s   4B8c                     \         P                  ! R \         P                  4      pVP                  V 4      pRpV'       d<   VP	                  ^ 4      pV RVP                  4        WP                  4       R ,           p W3# )zObind\(\s*(?P<lang>[^,]+)(?:\s*,\s*name\s*=\s*["\'](?P<name>[^"\']+)["\']\s*)?\)N)r   r   r   searchr   startr   )r/   patternr   bind_statements   &   r(   parse_name_for_bindr    sh    jjkmomqmqrGNN4 ENQNU[[]#d99;<&88r'   c                    \        V 4      w  r\        V 4      p \        P                  V 4      pV'       d4   VP	                  R 4      VP	                  R4      VP	                  R4      V3# \
        P                  V 4      pV'       d<   VP	                  R4      R,           VP	                  R 4      ,           R,           pV. RR3# \        P                  V 4      pV'       d%   VP	                  R 4      VP	                  R4      RR3# R. RR3# )ro   r.  r   schemer/  r0  N)r  rP  nameargspatternr   r   operatorpatterncallnameargspattern)r/   
bind_cnamerZ  ro   s   &   r(   _resolvenameargspatternr    s    *40D$D			t	$B	xx&!1288H3EzQQ			t	$B	xx!C'"((6*::S@Rt##		"	"4	(B	xx&!14==T4r'   c                 F   V P                  R4      pVR8w  d   Rs\        '       Ed   VR9  d   \        '       g   \        ^8  d   \
        P                  P                  \        4      P                  R4      ^ ,          p\        RV R	24       ^ s\        ^,           sR
\        \        &   / \        \        &   . \        \        &   . \        \        ,          R&   / \        \        ,          R&   R
\        \        ,          R&   V\        \        ,          R&   R\        \        ,          R&   ^ sVR9   Ed   VP                  4       p\         P"                  ! RV\         P$                  4      '       d   RpM]\         P"                  ! RV\         P$                  4      '       d   RpM.\         P"                  ! RV\         P$                  4      '       d   RpVR8X  d@   \'        V P                  R4      4      w  rVpRV/\        \        ,          R,          V&   . pRp	M\)        V P                  R4      4      w  rXrVf   VR8X  d   RpMRpVR9  d   \        R4       W5\        3sV'       dC   \+        \-        V4      P                  R4       Uu. uF  pVP/                  4       NK  	  up4      pM. pRV9   d&   RV9   d   VP1                  R4       K  \        R4       ^ p^ pVR9   d   ^pR\        \        ,          9  d   R# V\        \        ,          R,          9  d   R# \        \        ,           F  pVR,          V8X  g   K   R# 	  V\        \        ,          R ,          9   d   R# RR!RR"/V,          p\2        '       d/   \4        R8X  d$   \        ^8:  d   \        ^,           s^pVR9  d   ^p\        ^,           s/ \        \        &   . \        \        &   V'       d   \6        ^8  d!   \        R#\9        \2        4      ,          ^ 4       R$\        \        &   R\        \        ,          R&   \2        \        \        ,          R&   R\        \        ,          R&   . \        \        ,          R&   . \        \        ,          R%&   . \        \        ,          R &   / \        \        ,          R&   \        ^,           s/ \        \        &   . \        \        &   V'       Ed$   \6        ^8  d   \        R&\        ,          ^ 4       R\        \        &   R\        \        ,          R&   R'\        \        ,          R&   \        \        ^,
          ,          R,          : R(\        \        ^,
          ,          R,          : 2\        \        ,          R&   . \        \        ,          R&   . \        \        ,          R%&   . \        \        ,          R &   / \        \        ,          R&   \        ^,           s/ \        \        &   . \        \        &   V\        \        &   V\        \        ,          R&   V'       g   R)VP;                  R*R+4      ,           pV P                  R,4      \        \        ,          R-&   \=        V4      \        \        ,          R&   V	\        \        ,          R.&   \        ^8X  d   \        \        \        ,          R&   M\2        '       dI   \        ^8X  d>   \        \        ^,
          ,          R,          : R(\        : 2\        \        ,          R&   MU\        \        ^,
          ,          R,          : R(\        \        ^,
          ,          R,          : 2\        \        ,          R&   \?        \        \        ,          PA                  4       4       F5  p\        \        ,          V,          '       d   K#  \        \        ,          V K7  	  V\        \        ,          R&   . \        \        ,          R&   . \        \        ,          R%&   . \        \        ,          R &   / \        \        ,          R&   / \        \        ,          R/&   VR8X  d   . \        \        ,          R0&   VR9   d   V\        \        ^,
          ,          R%,          9  d/   \        \        ^,
          ,          R%,          PC                  V4       \D        PF                  ! \        \        ^,
          ,          R,          4      \        \        ,          R&    \        \        ,          R,          V,          \        \        ,          R,          V,          R,          PI                  R14       VR9   Ed   X
'       d   \         PL                  ! \N        V
4      pV'       d   V/ /\        \        ,          R2&   VP                  R34      \        \        ,          R2,          V,          R3&   VP                  R44      '       d2   VP                  R44      \        \        ,          R2,          V,          R&    \Q        \        \        ,          R,          V,          \        \        ^,
          ,          R,          R,          4      \        \        ,          R,          V&   VR8X  d   V	'       d   V	\        \        ,          R,          9   df   WY8X  g`   \Q        \        \        ,          R,          V,          \        \        ,          R,          V	,          4      \        \        ,          R,          V&    \        \        ^,
          ,          R ,          PC                  V4       VR"8X  d   \R        ^ ,          P#                  V P                  R,4      R*,           V,           4      pV'       d>   \U        VP                  R4      VP                  R4      4      w  pppp\W        VVVV4       VR9   Ed   \        \        ^,
          ,          PC                  \        \        ,          4       \        \        ,          \        \        ^,
          ,          R,          R&   \        \         \        ^,
          s\        \        ^,
          ,          PC                  \        \        ,          4       \        \        ,          \        \        ^,
          ,          R,          R&   \        \         \        ^,
          sR# R# VR/8X  d   \)        V P                  R4      4      w  rXrVe   V'       dC   \+        \-        V4      P                  R4       Uu. uF  pVP/                  4       NK  	  up4      pM. pV	e   Q \9        V	4      4       hV\        \        ,          R/,          V&   R/V\        3sR# R# VR8X  d?   \U        W0P                  R4      4      w  pppp\W        VVVV4      pVe   R5V\        3sR# R# VR9   Ed   \        \        ,          R,          pV P                  R4      P/                  4       pVPY                  R84      pV^ 8  d   VR78X  d   \[        V4      PY                  R94      ^,
          pVRV^,            R8,           VV^,           R ,           pVPY                  R84      pVVR R88X  dj   R\        \        ,          9   dT   \        R:V P                  R4      : VRV : R;24       VR<P]                  \        \        ,          R,          4      ,           pV^ 8  d   ^ pRpMVRV P/                  4       pVV^,           R p\-        V4      P                  R4      p\_        V4      ^8  d2   V^ ,          p\        R=R<P]                  VR>,          4      ,          4       Rp\-        V4      P                  R4       Uu. uF  qP/                  4       NK  	  up EF  p\`        P#                  V4      pV'       gC   VR9   d   RpMR\c        V Pe                  4       4       \        R?V: R@\9        V4      : RA24       Kc  \=        VP                  R4      4      pVR9   d    VR9   d   VVP                  R4      ,          pVV9  d   / VV&   VR68X  d   VVP                  R4      ,           pVR78X  Ed   V P                  R4      V,           p\f        P#                  V4      '       d   V\        \        ,          R,          9  d   \        ^8  d   RB\        \        ^,
          ,          R,          9  d   \        RC4       V\        \        ,          R,          8w  dR   \        RDV: RE\        \        ,          R,          : RF24       \        \        ,          R,          PC                  V4       M"\i        RGV RH24       M\i        RIV,          4       VR9   d   TpRVV,          9   d!   VV,          R,          PC                  X4       MX.VV,          R&   VR18X  d   \        \        ,          R,          R
8X  d   \        RJ4       EKg  V\        \        ,          R,          9  d   EK  R%\        \        ,          9  d   . \        \        ,          R%&   \        \        ,          R%,          PC                  V4       TpEK  	  V\        \        ,          R&   Ve   R5V\        3sR# R# VRK8X  dR   V P                  R4      P                  R<4       Uu. uF  qP/                  4       NK  	  up\        \        ,          RL&   R# VRM8X  Ed   \        \        ,          R,          pV P                  R4      P/                  4       ^R pRp\-        V4      P                  R4       EF  p VP                  RN4       Uu. uF  qP/                  4       NK  	  upw  pp\k        T4      p\=        T4      pTT9  d   / TT&   RNTT,          9   d<   TT,          RN,          T8X  g'   \        RRT: RSTT,          RN,          : RTT: R	24       \m        TT4      pT'       Ed   TPo                  RU4      RV8X  d   \?        T4      p \p        Ps                  T4       Fj  p \?        TT Pu                  4       T Pw                  4        P                  4       P;                  RWRX4      4      T T Pu                  4       T Pw                  4       % Kl  	  RP]                  T 4      pMMTPo                  RU4      RY8X  d8   TR>,          P                  4       P;                  RWRX4      P;                  R<RZ4      p \y        T/ T4      p!\9        T!4      TT,          RN&   RTT,          9   d!   TT,          R,          PC                  RM4       MRM.TT,          R&   TpEK  	  V\        \        ,          R&   Ve   R5V\        3sR# R# VR]8X  Ed   V P                  R4      P/                  4       P                  4       R^8X  d   R\        \        ,          R]&   R# V P                  R4      '       Edj   \        \        ,          Po                  R]/ 4      p#V#f   \        R_4       / p#\-        V P                  R4      4      P                  R4       EF  p/ p$\         P"                  ! R`V\         P$                  4      pV'       g   \        RaV RQ24       KE  \        P#                  VP                  R4      4      p%V%'       g   \        RbV RQ24       K  \U        V%P                  R4      V%P                  R4      4      w  pppp\        VV4      w  p&p'p(VV$RU&   V&V$Rc&   V'V$Rd&   V(V$Re&   \?        V$PA                  4       4       F  pV$V,          '       d   K  V$V K  	  \-        VP                  R4      4      P                  R4       F  p)RfV)9   d4    V)P                  Rf4       Uu. uF  qP/                  4       NK  	  upw  p*p+MV)P/                  4       ;p*p+\_        V*4      \_        V+4      u;8X  d   ^8X  g   M \        RgV) Ri24       K  \        \        V*4      \        V+4      ^,           4       F  p,V$V#\        V,4      &   K  	  K  	  EK  	  V#\        \        ,          R]&   R# R# VRj8X  Ed   . pRp-Rp.^ p/^p0^ p1V P                  R4       F  p2V1'       g)   V2Rk8X  d   V0'       * p0V2Rl8X  d   V0'       d   V/^,           p/K3  V2Rm8X  d   V1^,           p1MV2Rn8X  d
   V1^,
          p1V/^ 8X  d   V-V2,           p-Kf  V/^8X  d   V.V2,           p.Kx  V/^8X  g   K  V-P/                  4       p-V-P                  R<4      '       d   V-R>,          P/                  4       p-VPC                  V-V..4       T2p-Rp.^ p/K  	  V/^8X  dR   V-P/                  4       p-V-P                  R<4      '       d   V-R>,          P/                  4       p-VPC                  V-V..4       \        \        ,          Po                  R/ 4      p3RpV EF  p4V4^ ,          P/                  4       P                  R<4      V4^,          P/                  4       uV4^ &   V4^&   V4^ ,          P                  Rm4      '       d   \        RoV4^ ,           Rp24       K~  \        \+        \-        V4^ ,          4      P                  R4       Uu. uF  qP/                  4       NK  	  up4      4       EF?  w  p5p!V!P                  Rm4      '       d   \        RoV! Rp24       K/  RqV4^,          9   d   \        RrV4^,           Rp24       KU  V3P                  V!/ 4       V3V!,          Po                  RU4      p6\        V3V!,          4      p7V6RY8X  d   \         P                  ! RsV4^,          4      MV4^,          P                  R<4      p8 V7'       d   RtRuP]                  V84       Rv2MV8V5,          p9T3T!,          Po                  RN4      p>T>'       d   T>T98w  d   \        R{T! RST> R|T9 RQ24       T9T3T!,          RN&   T!pEKB  	  EK  	  V3\        \        ,          R&   V'       d   R5V\        3sR# R# VR}8X  Edc   V P                  R4      P/                  4       pV^ ,          Rl8X  g
   R~V,           p. p?\         P                  ! RlV^R7      w  pp@pAV@P/                  4       p@V@'       g   Rp@V?PC                  X@XA.4       / pBR}\        \        ,          9   d   \        \        ,          R},          pBV? F  p2V2^ ,          XB9  d   . XBV2^ ,          &   \-        V2^,          4      P                  R4       Uu. uF  qP/                  4       NK  	  up F,  pV'       g   K  XBV2^ ,          ,          PC                  V4       K.  	  K  	  XB\        \        ,          R}&   R}X@\        3sR# VR8X  Ed   \         P"                  ! RV P                  R4      \         P$                  4      pV'       Ed   VPe                  4       pCR\        \        ,          9  d   / \        \        ,          R&   VP                  R4      p/ \        \        ,          R,          V&   ^ pDRXC9   Ed;   XCR,          Ee-   RXC9   d   XCR,          f   ^pDXD\        \        ,          R,          V,          R&   XCR,          P                  R<4       Uu. uF  qP/                  4       NK  	  pp/ pEV F  p4RNV49   d   \         P"                  ! RV4\         P$                  4      p%V%'       dA   V%P                  R4      P/                  4       XEV%P                  R4      P/                  4       &   M\        R\9        V44       R;24       MV4XEV4&   XE\        \        ,          R,          V,          R&   K  	  R# R# R# \c        V Pe                  4       4       \        R4       R# VR9   d   R\        \        ,          9  d   / \        \        ,          R&   \        \        ,          R,          pFV P                  R4      R8X  d[   RXF9   dT   \        XFR,          \        4      '       d   XFR,          .VFR&   XFR,          PC                  V P                  R4      4       R# V P                  R4      XFV P                  R4      &   R# VR8X  d\   \        f   \6        '       d   \        R4       R# \        pG\        \        VG,          \        R,          V P                  R4      4       R# \6        ^8  d'   \c        V Pe                  4       4       \        R4       R# R# u upi   \J         d     ELi ; i  \J         d     ELi ; i  \J         d     EL$i ; iu upi u upi u upi u upi   \J         d    \        ROT RPT RQ24        EK9  i ; i  \z        \|        \~        3 d!   p"\i        R[T: R\T": R;24        Rp"?"EKn  Rp"?"ii ; iu upi   \J         d    \        RgT) Rh24        E
Ka  i ; iu upi   \         Ed    \        ;QJ d    Rw T8 4       F  '       g   K   RxM	  RyM! Rw T8 4       4      '       d   . p:T8 F  p;RzT;9   dy    T;P                  Rz4      w  p<p=T:P                  T=P/                  4       .\        T<4      ,          4       KQ    \         d$    T:PC                  T;P/                  4       4        K~  i ; iT:PC                  T;P/                  4       4       K  	  T:p8T7'       d   RtRuP]                  T84       Rv2MT8T5,          p9 ELei ; iu upi u upi )a|  
Reads each line in the input file in sequence and updates global vars.

Effectively reads and collects information from the input file to the
global variable groupcache, a dictionary containing info about each part
of the fortran module.

At the end of analyzeline, information is filtered into the correct dict
keys, but parameter values and dimensions are not yet interpreted.
r2  r  Nr  r	  rf   .z=analyzeline: no group yet. Creating program group with name "rk   programr)  r*  r+  ro   fromskyfromzblock\s*data
block datazpython\s*modulepython modulezabstract\s*interfaceabstract interfacer  rg  _BLOCK_DATA_r   	interfacez2analyzeline: No name/args pattern found for line.
r  z<analyzeline: argument list is malformed (missing argument).
r.  r-  
subroutinefunctionz&analyzeline: Creating module block %s
moduler,  zDanalyzeline: Creating additional interface block (groupcounter=%s).
unknown_interface:unknown_r   r   r  prefixr   r  varnamesr   bindlanglang	lang_namevariabler   r  ::r^  z"All arguments will have attribute r   r  zXanalyzeline: cannot handle multiple attributes without type specification. Ignoring %r.
r(  z&analyzeline: no name pattern found in z statement for . Skipping.
__user__z8analyzeline: missing __user__ module (could be nothing)
z(analyzeline: appending intent(callback)  to z arguments
zanalyzeline: intent(callback) z is ignored
z=analyzeline: intent(callback) %s is already in argument list
z(analyzeline: ignoring program arguments
r   implementedbyr  rk  zAanalyzeline: could not extract name,expr in parameter statement "" of ""
z1analyzeline: Overwriting the value of parameter "" ("z	") with "r2   r3   r  ecomplexz+1j*(z analyzeline: Failed to evaluate z. Ignoring: r   nonez<analyzeline: Overwriting earlier "implicit none" statement.
z9\s*(?P<this>.*?)\s*(\(\s*(?P<after>[a-z-, ]+)\s*\)\s*|)\Zz@analyzeline: could not extract info of implicit statement part "zIanalyzeline: could not extract types pattern of implicit statement part "rh  ri  rl  -z2analyzeline: expected "<char>-<char>" instead of "z&" in range list of implicit statement
z*" in range list of implicit statement (2)
r  '/r/  r0  zanalyzeline: implied-DO list "z" is not supported. Skipping.
r   zComment line in declaration "z\(.*?\)(/, z/)c              3   ,   "   T F
  pR V9   x  K  	  R# 5i)r   Nr&   ).0r   s   & r(   	<genexpr>analyzeline.<locals>.<genexpr>  s     5W3!8Ws   TFr   z*analyzeline: changing init expression of "") to "r
  z//)maxsplit_BLNK_r  zR\A\s*(?P<name>\b\w+\b)\s*((,(\s*\bonly\b\s*:|(?P<notonly>))\s*(?P<list>.*))|)\s*\Zro  notonlyonlyz7\A\s*(?P<local>\b\w+\b)\s*=\s*>\s*(?P<use>\b\w+\b)\s*\Zlocalz-analyzeline: Not local=>use pattern found in mapz0analyzeline: Could not crack the use statement.
r  usercodez-analyzeline: No context for multiline block.
:N   Nz+analyzeline: No code implemented for line.
)r   r  r	  rf   )r   r  r	  )r  r  r  )r  r	  r   r  r  r  r  )r   r  r   r   r   r  r  r  r  r  >   operator
assignment)r   r   r  r   r  r  )r  )Sr   r%   r   r   r   r   r   basenamer    r!  r1   r   r6  r7  r   r   r   r   r   r  r  ru   r   r   remover   r   r   r   r   rp   ro  rp  r"  copydeepcopyrY   r   r  crackline_bindlangrx  rH  cracktypespec0
updatevarsfindrP  r   rV   namepatternr  r  r{  rm   get_parametersdetermineexprtyperz  real16patternfinditerr  r   evalSyntaxError	NameError	TypeErrortypespattern4implicitcracktypespecr   ordchrr   removeprefix	enumerate
setdefaultgetdimensionfindall
IndexErroranyextendr6   r   
isinstancer   appendmultiline)Hr   r=   r/   r+  newnamero   r  r   r.  r   	bindclinex
needmoduleneedinterfaceitrw  bindcdattr2   selectorattredecl	last_namer   iplchr  rZ  apinitexprr  ttvr   implrt  r[  
kindselect
charselectrl  r   begcendcodlilr_  fcinpr   r*  r   idxvtypevdimmatchesnew_valexpanded_listr   
multipliervaluecurrent_valclbnol	commonkeymmisonlyr   r  gcsH   &&&                                                                     r(   rR  rR    sz    GGFOE{{t#GG}!1''""?399#>qAKG9TXY	[#a'"+	,#%
< "$	,+-
< (+-
< (,5
< )+2
< (+4
< (++88OUBDD11 EXX(%66#EXX-ubdd;;(EF?3AGGG4DEND6@%5HJ|$V,T2DF,CAGGGDT,U)D<$%MMMN!6'5d';'A'A%'HJ'H!  ggi'HJ KD D:*BOQ 
&&MZ55:l3F;;--f:% . z,/==\9jA$GE=\R/LA4E'!+LJ?? !#a'#%
< "$	,{A]+,-.0&.Il#0?J|$W-/<J|$V,/1J|$V,/1J|$V,46J|$[157J|$\2/1J|$V,'!+L')J|$&(Il#={_ "#$&&1Il#0;J|$W-/BJ|$V,<!+,V44jPQAQ6RSY6Z0\J|$V,/1J|$V,46J|$[157J|$\2/1J|$V,'!+L')J|$&(Il#"'	,,1
< )c3 77D-.WWX->
< *+5d+;
< (-3
< *1/>J|$V,]|q0<!+,V44o0GJ|$V, <!+,V44jPQAQ6RSY6Z0\J|$V,j.3356Al+A..|,Q/ 7 ,0
< (+-
< (02
< -13
< .+-
< (,.
< )F?35J|$Z0&&:lQ&67DD<!+,[9@@F/3}}<!+,V406J|$V,|,V4T:|,V4T::FLLZXZ ..99%7C<@":J|,Z8IQX^I_J|,Z8>vF~~k22MU^^\gMh
<0<TB6J9C|,V4T:J|VWGW<XY_<`ac<d:f
<(06 y f
<(@(HH>AK&|4V<TBJ|D\]cDdekDlBn
<08><!+,\:AA$G JQ%%aggh&7#&=&DEA2@GGFOQWWW%537/(D%8XtU;&&lQ&'..z,/GH6?6MIlQ&'+F3,''!+LlQ&'..z,/GH6?6MIlQ&'+F3,''!+L ' 
 78H IF +9$+?+E+Ee+L"N+La #$'')+L"N O >/4</>6:J|$W-d3 '|<  
*8777#+%'(D%x4?	  *I|D !	n	n<(0WWW##%GGDMq5TX%r"''.2AFQUd"RAZ/BA!"v~&J|,D"D"Ra&2 3#((:l#;F#CDDq5ABBQBAEFBB%%e,r7Q;ABoB " #	%3B%7%=%=e%DE%D'')%DEA""1%B00A!++-(d1g' (rxx/0,,6P1PRXXg&&~a{"BHHW--xWWV_r))//33
< 8 @@'!+)L1<L1Mf1UU '$_!a  !J|$<V$DD '@A:lC[\bCcCc)e !f *< 8 @ G G J#"@= QS   !69:!< =]]U1X%a$++B/(*ta$z!l+G4	AGHJ|4V<<j&>><>J|,[9<(5<<Q?Ii Fj ,1
< (  *I|D !	"	" ! 0 6 6s ;< ;1WWY ;< 	< 1		<(0WWW##%a+	#))%0A23''#,?,Qwwy,?8
 $E*F1A~aeAha(AuQx}}h0 1!(F3Aq55$.hB*33H=04$QWWYquuw7==?GGSQ1S1779QUUW- >  "wwr{HUU:&)3'|113;;CEW- 2v.
 !GE!HSMU1X%a$++K8(3}a$II 1J ,1
< (  *I|D !		777!!#))+v537J|$Z0WWWl+//
B?D|SU#AGGG$45;;EBXXPRSUWUYUY[Z[\Z]]abd*00&1ABcdecffjkm2@HHV$bhhw&739/(D%3@h4(0
J#+Z '1^$'1^$#+Z diik*A77 G + ((9:@@GAax%=>WWS\)J\'')\)JJD$ '(ggi/tt9D	6Q6PQRPSS~A "3t9c$i!m<'+SV = H1 CP 48J|$Z0] ^ 
!A8B8AACxAgcAgAv!Va!VaXXZ==%%BB		2r(#- ". 6B}}S!!V\\^IIr2h,'++FB7	A122371JAaD!A$ts##81>]^_#I.QRSTQUBVB\B\]bBc.dBcQwwyBc.d$efQ<<$$<QC?^_` !A$; ;AaD6A`ab2&QJ/#DG,:?9:L"**Z16RSTURVR\R\]`RaT=A499W#5"6b9ws|G& #1gkk#.K7$:H4P[}\cdkcllpqr&Q	W g b ,0
< ( *I|D 		www%%'Aw#~$;DhhsD15BXXZB
		2r(	z,//"<0:IAt9$"$	!A$)7!)=)C)CE)JK)JAggi)JK1adO**1- L  .7
< *$b,7	XXacdcjcjkrcsuwuyuy{2BJ|4424
<(/88F#D46J|$U+D1F|6
 6?r)}'<F@F
<(/5f=)+F)9)9#)>?)>Aggi)>?AaxXXVXY[][_[_a<>HH %='',uw rxx06689 $"OPTUVPWyXZ [] !"1CEJ|,U3D9%@  !7|( !++- GH	%	%Z%==;=J|$%78|$%78776?j(Z1_!J---!":*jM  !12!"!1Aaggfo		#wHI
2(,	) 
1akkm>? 
oJN      ."NL Ft = @ WXYWZZ`ac`ddhik0  I6 #S* +b *K( %#"TUVTWW~ A$%n /e* " T
 s5W5sss5W555(*%,E"e|!H8=C8H$5J$1$8$8%++-3z?9Z$['1 !H$1$8$8$G!H !. 4 4U[[] C &- #0=A499W#5"6b9ws|G#TV L& @sm  BD&ABD <A&BD& 4.BD8 BE
1BEJ9BEMBEMBEM6BET BF^	BG^BF<^4BGjBG#m7BG(m?BG(tBLzBLDBD#D"BD#D&BD5D4BD5D8BEEBEEBEEBF E?BF FBF9FBF4F4BF9F<BGGBG GBG G(BLG?BLHBLH.BLH=ABJJBLJ*BJ1J-BLJ0BJ1J1/BLK!BLLBLc                 r    R V 9  d   / V R &   V R ,          pW9  d   . W1&   W1,          P                  V4       R# )f2pymultilinesNr"  )r   context_namemlr  s   &&& r(   r  r    s=    u$"$AO2r'   c                    R pR p\         P                  ! RV \         P                  4      '       d   Rp MM\         P                  ! RV \         P                  4      '       d   Rp MV P                  4       P	                  4       p \
        P                  \        V4      4      pV'       g   \        R4       R # VP                  4       p\        VP                  4       4       F  p\        WV,          4      WV&   K  	  V R	9   d   VR,          pVR,          pVP                  R4      pV^ 8  d   VR V P                  4       pW^,           R  pWW13# )
Nzdouble\s*complexdouble complexzdouble\s*precisionzdouble precisionz>cracktypespec0: no kind/char_selector pattern found for line.
r2  r  r  )r  r5   logicalr3   	characterrf   )r   r   r   r   r   selectpatternrP  r1   r  ro  rp  re  r  )r2   r   r  r  rZ  r  rw  r  s   &&      r(   r  r  !  s   HD	xx#Xrtt44#	'244	8	8%>>#))+			^B/	0BM	O
A!&&(^% QQV9wZ
AAv"1v||~AZt''r'   z)\s*(?P<name>\b\w+\b)\s*(?P<after>.*)\s*\ZzB\s*(\(\s*(kind\s*=)?\s*(?P<kind>.*)\s*\)|\*\s*(?P<kind2>.*?))\s*\Zz2\s*(\((?P<lenkind>.*)\)|\*\s*(?P<charlen>.*))\s*\Zz\s*(kind\s*=\s*(?P<kind>.*?)\s*(@,@\s*len\s*=\s*(?P<len>.*)|)|(len\s*=\s*|)(?P<len2>.*?)\s*(@,@\s*(kind\s*=\s*|)(?P<kind2>.*)|(f2py_len\s*=\s*(?P<f2py_len>.*))|))\s*\Zz\s*(@\(@\s*(?!/)\s*(?P<array>.*?)\s*@\)@\s*\*\s*(?P<len>.*?)|(\*\s*(?P<len2>.*?)|)\s*(@\(@\s*(?!/)\s*(?P<array2>.*?)\s*@\)@|))\s*(=\s*(?P<init>.*?)|(@\(@|)/\s*(?P<init2>.*?)\s*/(@\)@|)|)\s*\Zc                 L   V P                  4       p \        V 4      ^8:  d   V # V ^ ,          p\        ^\        V 4      ^,
          4       FI  pW,          R8X  d+   W^,           ,          R9   g   W^,
          ,          R9   d   K:  WV,          ,           pKK  	  WR,          ,           pV# )r	   r   z()[]{}=+-/* r   )r   rV   r   )exprexpr2r  s   &  r(   removespacesr#  J  s    ::<D
4yA~GE1c$i!m$GsNq5k^+!e.Q % HELr'   c                    RpRpRpRpV  F`  pVR8X  d   VR9   d   W,          pTpK  V'       g
   VR9   d   TpWS8X  d	   V'       * pMVR8X  d   V'       d   VR,          pKV  W,          pTpKb  	  V# )	z
The function replace all spaces in the input variable line which are
surrounded with quotation marks, with the triplet "@_@".

For instance, for the input "a 'b c'" the function returns "a 'b@_@c'"

Parameters
----------
line : str

Returns
-------
str

r   FN\r   @_@)r%  r  ")r  r'  r&   )r/   fragmentinsidecurrent_quoteescapedr   s   &     r(   markinnerspacesr,  Y  s      HFMGd?q$55MHG!{*MZF#X&H  Or'   c                \   Rp\        W4      w  rVpV'       d   \        V4      P                  R4       Uu. uF  qP                  4       NK  	  pp. p	\        P
                  ! R4      p
V Fj  pV'       g   K  V
P                  V4      pV'       d4   VP                  R4      P                  4       pW\        V4      R ,           pV	P                  V4       Kl  	  T	p\        V4      P                  R4       Uu. uF  qP                  4       NK  	  pp. pV F  p\        \        \        V4      4      RR7      P                  R4       Uu. uF  qP                  4       NK  	  up F.  pV'       g   K  VP                  VP                  RR4      4       K0  	  K  	  V EF  p\        P                  V4      pV'       g   \        R	\!        V4       R
24       K;  \#        VP                  R4      4      p/ pV\$        \&        ,          R,          9   Ed   \$        \&        ,          R,          V,          P)                  4       pRV9  pV'       d   V VR&   M5V '       d.   V VR,          8X  g    \        RV: RVR,          : RV : R24       RV9  d   \(        P(                  ! V4      VR&   MV'       d   \+        VP-                  4       4       F  pVVR,          9   dP   VV,          VR,          V,          8X  g4   \        RV: RV: RVR,          V,          : RVV,          : R2	4       K`  \(        P(                  ! VV,          4      VR,          V&   K  	  RV9  d,   V'       d$   V'       d   VVR&   M\/        RV: RV: R24       MV'       d   \+        VP-                  4       4       F  pVVR,          9   dP   VV,          VR,          V,          8X  g4   \        RV: RV: RVR,          V,          : RVV,          : R2	4       K`  \(        P(                  ! VV,          4      VR,          V&   K  	  RV9  d   VVR&   M5V'       d.   VR,          V8X  g    \        RV: RVR,          : RV: R24       RV9  d   \(        P(                  ! V4      VR&   MV'       d2   V F+  pVVR,          9  g   K  VR,          P                  V4       K-  	  Mi\(        P(                  ! V 4      VR&   \(        P(                  ! V4      VR&   \(        P(                  ! V4      VR&   VVR&   \(        P(                  ! V4      VR&   RVP1                  R4      ;'       g    . 9   do   V\$        \&        ,          R,          9   dR   R\$        \&        ,          9  d   . \$        \&        ,          R&   \$        \&        ,          R,          P                  V4       VP                  R 4      '       Ed1   \2        P                  \5        VP                  R 4      4      4      pV'       Ed   VP7                  4       pR7 F4  pVVR$,           ,          f   K  VVR$,           ,          VV&   VVR$,            K6  	  \+        VP-                  4       4       F(  pVV,          e   \9        VV,          4      VV&   K%  VV K*  	  R!V9   d   R"V9   d   VR!,          R%8X  d   VR",          VR!&   VR" MV R&8X  dK   RV9  g   VR,          '       g   / VR&   R!VR,          9   d   VR,          R! VR!,          VR,          R'&   VR! MKVR",          R(,           VR!,          ,           VR"&   VR! \/        R)V : RV: R*V : RV: R+VR",          : R,24       R!V9   d   V R89   d3   RV9  g   VR,          '       g   / VR&   VR!,          VR,          R'&   VR! MPV R&8X  dJ   RV9  g   VR,          '       g   / VR&   R!VR,          9   d   VR,          R! VR!,          VR,          R'&   VR! R#V9   dP   R-V9   d=   VR-,          VR#,          8X  g(   \        R.V: RVR-,          : RVR#,          : R24       MVR#,          VR-&   R"V9   d   R/VR",           R02pRV9  g   VR,          '       g   V.VR&   MVR,          P                  V4       VR,           F>  pVR1,          R28X  g   K  VV8w  g   K  VR,          R9 \/        RV: R3V: R4V: R24        M+	  M(\        R5VVP                  R 4      ,           ,          4       \+        VP-                  4       4       F  pVV,          '       d   K  VV K  	  V\$        \&        ,          R,          V&   R6\$        \&        ,          9   d(   \$        \&        ,          R6,          P                  V4       TpEK  	  V# u upi u upi u upi ):z
Returns last_name, the variable name without special chars, parenthesis
    or dimension specifiers.

Alters groupcache to add the name, typespec, attrspec (and possibly value)
of current variable.
Nr  z(?P<start>[a-zA-Z]+)r  r   rc  z@ @r&  z-updatevars: no name pattern found for entity=r  ro   r*  r2   z+updatevars: attempt to change the type of "r  r  z". Ignoring.
rh  z0updatevars: attempt to change the kindselector "r  ri  zupdatevars:z*: attempt to change empty charselector to r   z0updatevars: attempt to change the charselector "rl  z/updatevars: attempt to change the typename of "rg  r   r.  r,  r  rV   arrayinit2r   r  r   r  zupdatevars: "z" is mapped to "r/  z)"
rk  z6updatevars: attempt to change the init expression of "
dimension(r0  N	   Nr   z: attempt to change r  z?updatevars: could not crack entity declaration "%s". Ignoring.
r  )rV   r/  r0  r  r5   r  r3   r   )r  r   r!  r   r   r   r   r   r   rV   r"  r#  r,  r   r  r1   r   rp   r7  r   r  ro  rp  rm   rz  lenarraypatternrP  r  re  )r2   r  rg  
entitydeclr  r  r  rl  r  r   r   r$  r   selel1r  e1enamer  not_has_typespecrw  rZ  d1lkdmdm1s   &&&&                       r(   r  r  ~  s2    I'4X'H$JH'5h'?'E'Ee'LM'L!GGI'LMJJ./A
AGGG$**,#a&'
NHHQK  +J7==eD	ED'')DB	E
C&4\/RSBT5U]`&a&g&ghm&no&n779&noBr

2::eS12 p  a ?QyVX1776?+J|,V44|,V4U;@@BE)6$,j!8uZ/@#@5,,h8 9U*(,		*(=n%joo/0AE.11:a=ER`LabcLd;dueN&;A&>&>
1!O P 4899Z]3Kn-a0 1 U*z#,6E.)$j2 3joo/0AE.11:a=ER`LabcLd;dueN&;A&>&>
1!O P 4899Z]3Kn-a0 1 &$,j!5#4#@5,,h8 9&$(IIh$7j!!Aj 11j)003 " !%		( 3E*$(IIj$9E.!$(IIj$9E.! (E* $		( 3E*%))J/55261
<@XY_@`;`*\"::8:
<(5|$[188;777 &&~aggg6F'GHBr\\^2B"s(|/!#BH2rCxL 3 bggiA!u( 0A 71qE	 ) B;7b=%yB$&wK5	wK![0*%7~AVAV46E.1 E.$99 %n 5e <57Yn-c2uI&(kC&7"U)&C7uI$a5"W++!G H B;#LL*%7~AVAV46E.157Yn-c2uI![0*%7~AVAV46E.1 E.$99 %n 5e <57Yn-c2uIR<e|U3Z2f:-E!5::r&zz!; < &(Zc
b=%bk]!4B!.uZ7H7H-/Dj)j)004#(#4#4C"2w+5#)$)*$5b$9 '+0#r); !< % $5 ZAGGG,,. /ejjl#A88!H $ 38
< (/L11|$Z077>	K L q N 
F ps   f5f$f)c                 j   R pR pR pV'       Ed   V R9   d   \         P                  V4      pV'       g   \        R\        V4       R24       R # VP	                  4       pVR,          VR&   VR \        VP                  4       4       F  pW%,          '       d   K  W% K  	  \        VP                  4       4       F  w  rV\        V4      W%&   K  	  EMV R8X  EdY   \        P                  V4      pV'       g   \        R\        V4       R24       R # VP	                  4       pVR,          VR&   VR VR,          '       d   \        P                  \        VR,          4      4      pVP	                  4       pR F<  pWxR	,           ,          '       d   WxR	,           ,          Wx&   Wx,          W8&   WxR	,            K>  	  VR
,          e   VR
,          VR
&   VR \        VP                  4       4       F  pW5,          '       d   K  W5 K  	  \        VP                  4       4       F  w  rV\        V4      W5&   K  	  MV R8X  dc   \        P                  ! RV\        P                  4      pV'       d   VP                  R4      pM:\        R\        W,           4      ,          4       M\        R\        V4       R24       W#V3# )Nz1cracktypespec: no kindselector pattern found for r   kind2r   r  z1cracktypespec: no charselector pattern found for charlenlenkindr1  f2py_lenrf   z\s*\(\s*(?P<name>\w+)\s*\)ro   z'cracktypespec: no typename found in %s
z$cracktypespec: no selector used for r5  )rV   kind)rh  r   r1   r   r  ro  rp  itemsrp   ri  lenkindpatternr   r   r   r   )	r2   r  r  r  rl  rw  r  rE  r?  s	   &&       r(   r  r  '  sd   JJHx@@%++H5JGXGWWYZ\#--/J(1JsO7#*//+,!}}" - Z--/0 *1
 1$%++H5JGXGWWYZ\#--/J(3JsO9%)$$(..":i#89;!++-)BCx((&-3h&7%,[JNS)	 *
 :&2-4Z-@Jz*9%*//+,!}}" - Z--/0 *1
 1xx =xNH#>>&1Bh124 5 :4>:J"MN8++r'   c                 R   V '       g   / p V'       g   V # R V 9  d	   V.V R &   V # V'       d   V R ,          P                  V4       WR ,          9   d   V # VR8X  d)   RV R ,          9  d   V R ,          P                  V4       V # VR8X  d)   RV R ,          9  d   V R ,          P                  V4       V # VR8X  d)   RV R ,          9  d   V R ,          P                  V4       V # VR8X  d)   RV R ,          9  d   V R ,          P                  V4       V # V R ,          P                  V4       V # )rg  rH   	automaticr  r  r  )rt  r  rv  s   &&&r(   rq  rq  b  s+    6ZZ%JxKtJ/??Z% K 
	j1A!AZ% K 
	D,,##D) K 
	4
++##D) K 	Z%Kr'   c                     V '       g   / p V'       g   V # R V 9  d   WR &   V # \        VP                  4       4       F,  pV'       g   W0R ,          9  g   K  W,          V R ,          V&   K.  	  V # )rh  ro  rp  rt  selrv  rw  s   &&& r(   rr  rr  }  sa    T!"^#((*A.11&)fD #  Kr'   c                     V '       g   / p V'       g   V # R V 9  d   WR &   V # \        VP                  4       4       F,  pV'       g   W0R ,          9  g   K  W,          V R ,          V&   K.  	  V # )ri  rM  rN  s   &&& r(   rs  rs    sa    T!"^#((*A.11&)fD #  Kr'   c                 &    R V 9   d
   V R ,          # V# rn   r&   )r+  unknowns   &&r(   getblocknamerS    s    V}Nr'   c                 Z     R V R,           RV R,           R2s R#   \         d     R# i ; i)zIn: r  r  ro   r   N)r   r   )r+  s   &r(   setmesstextrU    s6    !%-%-C s    **c                 z    / pR V 9   d   \        V R ,          4      pRV 9   d   VP                  V R,          4       V# )parent_blockr  )get_usedictupdate)r+  usedicts   & r(   rX  rX    s:    GeN34~uU|$Nr'   c           
         Vf   / p\        V 4      pV'       g   V# \        VP                  4       4       F  w  r4VP                  4       pV\        9  d&   \        RV: RV P                  R4      : R24       KE  \        V,          p\        V4      pV'       g   Kg  V'       d   \        RV R24       \        VP                  4       4       F5  w  rxWq9   d'   \        R\        V4      : R\        V4      : R24       WV&   K7  	  K  	  V# )	Nzget_useparameters: no module z info used by ro   r   zget_useparameters: mapping for z not impl.
z(get_useparameters: overriding parameter z with value from module )
rX  ro  rH  r   r   r1   rz  r  rm   r   )	r+  	param_maprZ  usenamemappingmvarsr  rw  r  s	   &&       r(   get_useparametersr`    s     	% G 1--/-'eii/1 2g&&5gYlKL(DA~59!Wd7mM NaL	 ) 2& r'   c           	      T   \         '       g   V # \        V \        4      '       d&   V  Uu. uF  p\        W1R ,           VR7      NK  	  ppV# \	        V 4       \        V RV R,           R2^ 4       Vf   \        V 4      pVep   RV 9   di   V R,          p\        VP                  4       4       FB  pWV,          pRV9   g   K  VR,          pRV9   g   K&  VR,          p	W9   g   K7  W),          VR&   KD  	  V R,           U
u. uF  p
\        WR ,           VR7      NK  	  pp
WR&   V # u upi u up
i )	r   )tabr\  Block: ro   r   r*  rh  rG  r)  )r   r  ro  
postcrack2rU  r1   r`  rp  )r+  rb  r\  gretr*  r   varrG  valbnew_bodys   &&&         r(   rd  rd    s)    =%1 !tyA 	 
se75=/,a0%e,	5V}diik"A'C$>*T>v,C''0~V # v(&A 1*	B&  (&ML/&(s   D ;D%c                   \        V \        4      '       dm   . p. pV  FZ  p\        V4       \        WRR,           R7      pRV9   d"   RVR,          9   d   VP	                  V4       KI  VP	                  V4       K\  	  WC,           # \        V 4       \        V \
        4      '       g#   RV 9  d   \        R\        V 4      ,           4      hRV 9   d(   V R,          R8X  g   \        V RV R,           R	2^ 4       \        V 4      p \        V 4      p \        V 4      V R
&   \        V R
,          4      V R&   V P                  R4      '       d
   V R,          p\        WVR7      V R&   . pRV 9   dE   V R,          p\        VP                  4       4       F  pRV9   g   K  VP	                  V4       K  	  M/ pRp	RV 9   d
   V R,          p	V P                  R4      '       Ed   . p
RV 9   d
   V R,          p
\         P                   ! V R
,          4      pV	'       d   V	R,           pMRpW9   d!   ^pV RV 2V9   d   V^,           pK  V RV 2pRRR. R
/ RV	R,           /pV R,           EF  pW9   d   . pRpV R,           F  pV^,           pVR,          R8X  g   K  RpVR,           FE  pV^,           pRV9   g   K  VR,          V8X  g   K%  \         P                   ! V4      pVR,          V  M	  V'       g   Kz  VR,          '       g   V R,          V WP#                  V4        M	  VR,          P	                  V4       K  W9   g   K  \%        W,          4      '       d   K  W,          VR
,          V&   EK  	  VR
,          '       g   VR,          '       d2   WR&   RRRV.R
/ RVRV R,          /p/ W|&   \&        P	                  V4       V'       d   WpR&   V # )zY
TODO:
      function return values
      determine expression types if in argument list
r   rb  ro   r  r+  z0postcrack: Expected block dictionary instead of r  rc  r   r*  sortvarsr.  r)  r  r   r,  r-  __user__routinesunknown__user__routinesr   r  _user_interfacer  r   )r  ro  rU  	postcrackr"  dictr   r   r1   analyzeargsanalyzecommonanalyzevarssortvarnamesrz  analyzebodyrp  r  rY   
isexternalr   )r+  r.  rb  greturetre  userisdefineduseblockrw  ro   r-  r_  mnamer  r  r  edefjri  bbmblocks   &&&                  r(   rq  rq    s    %AN!t,A{zQvY6AA  {eT""we';JE
# $ 	$uV}0CC3%wuV}oR0!4E% E&E&M$U6]3E*yyV}5E&MM~<hmmo&AQ$$Q' ' DV}yy
5 |,J		%-(--E-E!AG1QC.M1EgQqcNEk62R0A)AC	{##AvAAAz[0"#F))B !AA%|6
a'+yy}$%fIaL % #,  4#$V99$)&M!$4 *+;+;A+> ?! ' &!((.Jux$8$8',x	&!!$+ $, V	& 1 1",,9"B|U;EWYF HOv&eLr'   c                 v   . p. p\        V P                  4       4       FI  pR W,          9   d)   W,          R ,          '       d   VP                  V4       K8  VP                  V4       KK  	  \        V4      p^ pV'       d   V^ ,          p^ pVR,           F  pWpV,          R ,          9   g   K  ^p M	  V'       dV   VR,          V.,           pV^,           pWT8  d4   \	        RRP                  V4      ,           R,           4       W,           p V# K  VP                  V4       VR,          p\        V4      p^ pK  V# )rn  r(  zTsortvarnames: failed to compute dependencies because of cyclic dependencies between r  r   )ro  rp  r"  rV   rm   r   )r*  indepdepr  r   r  rW  ws   &       r(   rv  rv  Q  s   E
C$))+tw478#4#4JJqMLLO	 
 	CA	A
FRAGH%%  b'QC-CAAu ;))C.)+/0 1  L  LLOb'CCAALr'   c           	      t   \        V 4      '       g   V # . p\        V R ,          P                  4       4       EF  p. pV R ,          V,           EF  p\        P                  ! RV\        P
                  4      pV'       Ed[   . pVP                  R4      '       dG   \        VP                  R4      4      P                  R4       Uu. uF  pVP                  4       NK  	  pp\        VP                  R4      P                  4       4      pWR,          9   dx   RV R,          V,          9   d;   V R,          V,          R,          P                  RRP                  V4       R	24       M_RRP                  V4       R	2.V R,          V,          R&   M7V'       d$   RRRP                  V4       R	2./V R,          V&   M/ V R,          V&   W9  d   VP                  V4       MTp\        R
V RV R24       VP                  V4       EK  	  W0R ,          V&   EK  	  RV 9  d   WR&   V # V R,          V,           V R&   V # u upi )r
  z2\A\s*\b(?P<name>.*?)\b\s*(\((?P<dims>.*?)\)|)\s*\Zdimsr  ro   r*  rg  r2  r  r0  z:analyzecommon: failed to extract "<name>[(<dims>)]" from "z" in common /z/.

commonvars)	hascommonro  rp  r   r   r   r   r   r!  r   rp   r"  r   rm   )	r+  r  rw  comvarsr  r   r  r  r   s	   &        r(   rt  rt  s  s   UJ%/&&()x##AEq"$$PAq776??%3AGGFO%D%J%J5%QS%Q GGI%Q  Sqwwv4467f%!U6]1%55fa(4;;($(8:< )$(8:8<fa(4"z#((4.1A%C$D(FE&M!$ (*E&M!$&%%a(PQRPSS`ab`ccghjNN17 $8 %h= *> 5 (l L $L1J>lL7Ss   H5c                    \        V 4       V R ,          P                  4        UUu/ uF  w  r4RV9  g   RVR,          9  g   K  W4bK   	  ppp. pV R,           EFq  pWR&   VR,          R9   d   Ve   VR,          V9  d   K*  VR,          pVR,          VP                  4       9   d   \        P	                  VR,          4       VR,          \        9   d   K  \
        '       d   VR,          \
        9  d   K  \        VRR	R
7      VR&   MTp\        WxVR,           R7      pVR,          R9   d1   VR,          '       g"   VP                  R4      '       g   RV9  d   EK  VR,          P                  RR4      R8X  d   \        P	                  V4       EK;  VR,          R8X  d   VR ,          \        VR,          &   VP	                  V4       EKt  	  V# u uppi )r*  rg  r  r)  rW  r+  ro   r.  r   Tas_interfacesaved_interfacer   rl  r  r  r   pythonmoduler  r  z
      r  )rU  rH  rp  r"   r"  r#   crack2fortrangenrq  rz  r   r   r   )	r+  r.  rb  keyr  maybe_privater)  ri  as_s	   &&&      r(   rw  rw    s      ---//JCU"heJ6G&G 	
/   D6]]!.W:33AfIT$9iyM..00  6+yI%yQvYi7#3>$6A  Ca#*-W:<<yy!7!7!*W:c2&.8q!zX%+,V9ai(KKN; < KKs   GGc                    \        V 4       \        p/ pR V 9   d   V R ,          f0   Rp\        ^8  d    \        R\	        V R,          4       R24       W3# \        V R ,          P                  4       4       FT  pV R ,          V,          P                  R4      R9  d   V R ,          V,          W&   K;  V R ,          V,          R,          W#&   KV  	  W3# )r   Nz2buildimplicitrules: no implicit rules for routine ro   r1  r2   )rH   rK  )rU  defaultimplicitrulesr   r1   r   ro  rp  rz  )r+  implicitrules	attrrulesrw  s   &   r(   buildimplicitrulesr    s    (MIU$ M{HeTZmI\H]]`ac ## %
+0023$Q'++J7?VV',Z'8';M$#(#4Q#7
#CIL	 4
 ##r'   c                p    \        WV4      p\        V4      \        \        39   d   V# \	        RV: 24      h)z1Like `eval` but returns only integers and floats zr=)r  rf   r6   r8   r   )r  re  r   r   s   &&& r(   myevalr    s3    Q1AAw3,
r!Z
  r'   z\A\b\w+\b\Zc                    \        \        V / / 4      4      p^ VR3#   \         d     Mi ; i\        P	                  T 4      '       d   ^^ T 3# \        T 4      pT EF^  p\        T4      T8  d   K  \        P                  ! RT,           R,           T 4      '       d   KC  \        P                  ! RT,           R,           \        P                  4      pTP	                  T 4      pT'       g   K   TP	                  T 4      pT'       d<   TP                  R4       R^  RTP                  R	4       2pTP	                  T4      pKC  \        X/ / 4      p	TP	                  T 4      pT'       d<   TP                  R4       R^ RTP                  R	4       2pTP	                  T4      pKC  \        T/ / 4      T	,
          p
TP	                  T 4      pT'       d<   TP                  R4       RR
 RTP                  R	4       2pTP	                  T4      pKC  \        T/ / 4      pTP	                  T 4      pT'       d<   TP                  R4       RR RTP                  R	4       2pTP	                  T4      pKC  \        T/ / 4      pT
R
,          T	,           T8X  d   T
R,          T	,           T8X  d   YT3u # M  \         d     Mi ; i M	  R# )a  
Obtain ``a`` and ``b`` when ``e == "a*x+b"``, where ``x`` is a symbol in
xset.

>>> getlincoef('2*x + 1', {'x'})
(2, 1, 'x')
>>> getlincoef('3*x + x*2 + 2 + 1', {'x'})
(5, 3, 'x')
>>> getlincoef('0', {'x'})
(0, 0, None)
>>> getlincoef('0*x', {'x'})
(0, 0, 'x')
>>> getlincoef('x*x', {'x'})
(None, None, None)

This can be tricked by sufficiently complex expressions

>>> getlincoef('(x - 0.5)*(x - 1.5)*(x - 1)*x + 2*x + 3', {'x'})
(2.0, 3.0, 'x')
Nz\w\s*\([^)]*\b\b(?P<before>.*?)\b\b(?P<after>.*)r  r/  r0  r  g      ?g      ?)NNN)r6   r  r   getlincoef_re_1r   rV   r   r  r   r   r   )r  xsetr   len_er  rY  r   rZ  eeri  r$  c2s   &&          r(   
getlincoefr    sk   *q"b!"!Tz Q!QwFEq6E>99&*U2A66zz.25GGNJJqM1ZZ]HHX./q1RXXg5F4GHBBB2r2&ZZ]HHX./q1RXXg5F4GHBBB2r2&*ZZ]HHX./qQrxx7H6IJBBB2r2&ZZ]HHX./qQrxx7H6IJBBBBB'GaK1$S1):7N G H s:    ++-J)A J)'A'J)A J)0A5J))J76J7z\b[a-z][\w$]*\bc                    W9   d   W,          P                  R . 4      pRW,          9   dj   \        W,          4      '       gS   \        P                  W,          R,          4       F,  pWC9  g   K  WA9   g   K  W@8w  g   K  VP	                  V4       K.  	  VR,           FI  pVP                  V. 4      ;'       g    \        WAV4       F  pWS9  g   K  VP	                  V4       K  	  KK  	  M\        R\        V 4       R24       . pW2V &   V# )rn  rk  NNNz)_get_depend_dict: no dependence info for r   )rz  isstringword_patternr  r"  _get_depend_dictr1   r   )ro   r*  depswordswordr  s   &&&   r(   r  r  /	  s    |
x,$*Xdj%9%9$,,TZ_= $$,LL&	 >
 !HHDXXdB' : :'D9:>LLO:  	;DJ<rJKJLr'   c                 f    \        V P                  4       4      p/ pV F  p\        W0V4       K  	  V# r+   )ro  rp  r  )r*  rs   depend_dictr   s   &   r(   _calc_depend_dictr  E	  s1    EK+. r'   c                    \        V 4      p. p\        VP                  4       4       F&  pW,          '       d   K  VP                  V4       W K(  	  V'       d_   \        VP	                  4       4       F?  w  r4V Uu. uF  qUV9   g   K  VNK  	  ppV'       g   VP                  V4       W K;  WaV&   KA  	  Kf  V Uu. uF  q3V 9   g   K  VNK  	  up# u upi u upi r+   )r  ro  rp  r"  rH  )r*  r  rs   ro   lstr   new_lsts   &      r(   get_sorted_namesr  M	  s    #D)KE[%%'(  LL! ) k//12ID"%:#Qk)9qq#G:T"%$+D! 3 #3UTdlDDU33 ; 4s   ;CC;CCc                     V ^ ,          R9   d   V ^R p \         P                  V 4      '       d   ^# \        P                  V 4      '       d   ^# RV ,           R,           # )    '"zkind(r0  r   )r  r   real8pattern)ra   s   &r(   
_kind_funcr  _	  sQ    ayE"6""			F	#	#Vc!!r'   c                     ^
V ,          pVR8:  d   ^# VR8:  d   ^# VR8:  d   ^# VR8:  d   ^# V^^,          8:  d   ^# R# )
      i   l        l            r   r&   )r   r   s   & r(   _selected_int_kind_funcr  j	  sF    
aAF{G|G|G|AH}Ir'   c                     V ^8  d   ^# V ^8  d   ^# \         P                  ! 4       P                  4       pVP                  R4      '       d   V ^!8:  d   ^#  R# V ^8  d   ^
# V ^!8:  d   ^# R# )   )
aarch64alphaarm64	loongarchmipspowerppcriscvs390xsparcr   )platformmachiner   r   )pr   radixr  s   &&& r(   _selected_real_kind_funcr  z	  sr     	1u2v &&(Gwxx7  I	 
R	
bIr'   c           	      	   \         P                   ! V4      p\         P                   ! V4      pR \        3R\        3R\        33 F  w  rEWC9  g   K  WSV&   K  	  . p\	        V 4       F9  pRW,          9   g   K  RW,          R,          9   g   K(  VP                  V4       K;  	  \        P                  ! R\        P                  4      p\        P                  ! R\        P                  4      p	\        P                  ! R\        P                  4      p
V EF  pRW,          9   Edb   W,          R,          p\        W,          4      '       d*   VP                  4       pR F  pVP                  ! V!  pK  	  VP                  R	V4      pV	P                  R
V4      pRpRW,          9   d[   R W,          R,          9   dG   \        V4      pVP                  RW,          R,          R ,          ,           R4      p\        V4      V8  pV'       g   V
P                  V4      '       gi   VP                  R4      p\        V4      ^8  dH   RP!                  VRR 4      P                  4       P                  VR,          P                  4       R4      p\#        W,          4      '       d   \%        V4      p\&        P)                  V4       Fj  p\%        VVP+                  4       VP-                  4        P                  4       P                  RR4      4      VVP+                  4       VP-                  4       % Kl  	  RP!                  V4      pM&\/        W,          4      '       d   \1        RV R24       W,          R,           Uu. uF;  pVP3                  R4      '       g   K  VP5                  R4      P7                  4       NK=  	  up;'       g    R.^ ,          p\&        P9                  V4      '       d   ^pM\:        P9                  V4      '       d   ^p \=        WVVR7      W'&   \A        W,          4      '       d0   \C        W',          \D        4      '       d   \G        W',          4      W'&   VP                  4       pVV8w  d   W',          VV&   EKp  EKs  \I        W,          4       \1        RV: R24       EK  	  V# u upi   \>         d"   pYT&   \1        RT RT: R24        Rp?LRp?ii ; i)rG  selected_int_kindselected_real_kindrg  r  z \bkind\s*\(\s*(?P<value>.*)\s*\)z-\bselected_int_kind\s*\(\s*(?P<value>.*)\s*\)z4\bselected_(int|real)_kind\s*\(\s*(?P<value>.*)\s*\)rk  z
kind("\1")zselected_int_kind(\1)Frh  r   r   Nr  r  zAget_parameters[TODO]: implement evaluation of complex expression r   r   )dimspeczget_parameters: got "" on zget_parameters:parameter z does not have value?!
))z.false.False)z.true.Truer   )%r  r  r  r  r  r"  r   r   r   	islogicalr   r   subrV   r   r!  r   isdoublero  r  r  r  r   	iscomplexr1   r   r  r   r  r  
param_evalr   r  r  r6   r  r  )r*  global_paramsr  g_paramsro   funcparam_namesr   kind_reselected_int_kind_reselected_kind_rer  replis_replaced
orig_v_lenv_r  r   r8  r  r   nls   &&                    r(   r  r  	  s   YY}%Fyy'H
++-DE,.FGK
 !TN	K
 Kd# [DGJ4G%Gq! $ jj<bddCG::8"$$@zz?G$'>A!!GGID
 		4(A M1-A$(()A1EA  K( TW^44!$QJ		#(?(G"GLA #&a&:"5K'--a00B2w{GGBsG,224<<RV\\^RP   !W&//2A,0!'')AEEG,224<<S#F-HBqwwy) 3 GGBK47## FFGSL M "&!45!4A,,{3 <{399;!45 ? ?9=CG ##A&&$$Q''C&qFGL	
   Z	3%?%?	N	BQw#Yr
  $'N/u4LMNa b M15  Cq	/uE!bABBCs$   7R/#R/	R44S ?SS c                 *    V R9   d   R# \        W4      # )(:)(*))r  r  r   )_eval_scalar)lengthr  s   &&r(   _eval_lengthr  	  s    $$''r'   z\d+_c                    \        V 4      '       d   V P                  R 4      ^ ,          p  \        V / V4      p \        V \        4      '       d   \
        M\        ! V 4      p V #   \        \        \        3 d    T u # \         d;   p\        RT: RT : R\        TP                  4       4      : R24        Rp?T # Rp?ii ; i)r   r'  z" in evaluating z (available names: r   N)_is_kind_numberr!  r  r  r   r   r  r  r  r   rm   ro  rp  )r  r  r   s   && r(   r  r  	  s    uC #	5UB'#E3//S8%@ L {I.  5tFKKM24 	5 	5 L	5s#   5A" "C <C C /B;;C c                *  a@aA \        V 4       \        V 4      w  r\        P                  ! V R,          4      pV R,          R8X  d   V R,          V9  d   / W0R,          &   RV R,          9   d   VR RV R,          R,          9   d}   V R,          R,          R,          p\        V4      V R,           Uu0 uF  qUR,          kK  	  up,           F2  pRH F)  pWt9   g   K  \	        VP                  V/ 4      V4      W6&   K+  	  K4  	  . pV R,          p	V	 F  p
 W:,           VP                  V
4       K  	  \        VP                  4       4       F  pWi9  g   K  VP                  V4       K  	  \        V\        V 4      4      p/ p\        P                  ! R	4      P                  p\        VP                  4       4       F>  pV! V4      pV'       g   K  WP                  4       VP!                  4        p W,           K@  	  V EF  pV^ ,          \        VP                  4       4      9   d"   \	        W6,          W&^ ,          ,          4      W6&   RW6,          9  Ed   RW6,          9   d   RW6,          R,          9   g   V'       d   V^ ,          P%                  4       p\        VV,          P                  4       4       F}  pVR8X  d   VV,          V,          R8X  d   K!  WsV,          9  d   VV,          V,          W6,          V&   KI  VR8X  g   KR  VV,          V,           F  p\	        W6,          V4      W6&   K  	  K  	  M1W`R,          9   d%   \'        R\)        V4      : RV R,          : R24       RW6,          9   dT   RW6,          R,          9   d@   W6,          R,          R,          p \+        \-        V/ V4      4      pVW6,          R,          R&   RW6,          9   dT   RW6,          R,          9   d@   W6,          R,          R,          p \+        \-        V/ V4      4      pVW6,          R,          R&   / pRW6,          9   Ed   W6,          R,          pVP1                  4        . W6,          R&   RIw  pppppV EF   p
V
R,          R8X  d   V
R,          P3                  4       ^RJ pMV
R,          R8X  d   V
R,          P3                  4       ^RJ pMV
R,          R8X  d   V
R,          P3                  4       ^RJ pMfV
R,          R8X  d   V
R,          P3                  4       ^RJ pM=V
R ,          R!8X  d   V
R",          P3                  4       ^RJ pM\	        W6,          V
4      W6&   V'       d   RW6,          9  d   . W6,          R&   \5        V4      P7                  R#4       Uu. uF  pVP3                  4       NK  	  up FI  pVP9                  R$R4      pVW6,          R,          9  g   K+  W6,          R,          P                  V4       KK  	  RpV'       d_   VP9                  R%R&4      pVP9                  R'R(4      pR!W6,          9  d   V.W6,          R!&   MW6,          R!,          P                  V4       RpVe   RW6,          9  d   . W6,          R&   \;        \5        V4      P7                  R#4       Uu. uF  pVP3                  4       NK  	  up4       F7  pVW6,          R,          9  g   K  W6,          R,          P                  V4       K9  	  RpVf   EK  RW6,          9  d   . W6,          R&   \5        V4      P7                  R#4       Uu. uF  pVP3                  4       NK  	  up F7  pVW6,          R,          9  g   K  W6,          R,          P                  V4       K9  	  RpEK#  	  V'       EdM   RW6,          9  Ed?   . W6,          R&   \;        \5        V4      P7                  R#4       Uu. uF  pVP3                  4       NK  	  up4       EF  p \=        VV4      pVR*8X  d   R*MR+pVV8X  d   V.pM\5        VR*4      P7                  R,4      p\C        V4      ^8X  d   R+V9   d   R+.pR+p\C        V4      ^8X  d   V^ ,          V8w  d   R-V^ ,          .p\C        V4      ^8X  Ed8   \E        \F        PH                  PJ                  V4      w  pp V V,
          ^,           p!V!PM                  \F        PN                  PP                  R.7      p/ p"V R,           F  p\F        PR                  ! V4      p#V!PU                  V#4      '       g   K2   V!PW                  V#4      w  rW3R/ lp$\        V
PY                  4       4      p%V%P[                  VPY                  4       4       V% U#u0 uF"  p#V#P^                  V9   g   K  V#P^                  kK$  	  p'p#V$\        V'4      3V"V&   K  	  V"VV&   W6,          R,          P                  V4       EK  	  RW6,          9  Edf   RV 9   Ed^   W`R,          9   EdP   W6,          P                  R. 4      p(. p)\a        \b        \d        \f        4      ! W6,          4      p*\i        W6,          4      '       Ed    \k        W6,          R,          4       EF  w  p+pVP                  V4      o@S@f   EMV*'       Ed   S@Pm                  4        EF  w  pw  p,p-V@VA3R0 loA\        4       p.SA! VV.4       VV(9   g   R1W>,          9   g   RW>,          9   d   KG  V,e   VV.9  d   R2p/V,! \F        PR                  ! R3V R4V+ R524      4      p0V0PM                  \F        PN                  PP                  R.7      p0V0W>,          R1&   V.V-,           W>,          R&   RW>,          9  d   R3V R4V+ R6V 2.W>,          R&   MwR7p/RW>,          9  d   . W>,          R&   R8W>,          R,          9  d   W>,          R,          P                  R84       V(P                  V4       V)P                  R3V R4V+ R6V 24       W>,          P                  R. 4      p1R9V19   g#   R:V19   g   T1P                  V/'       d   R:MR94       V1'       g   EK  V1W>,          R&   EK  	  S@f   EK  S@Pm                  4        F  w  pw  p,p-W>,          P                  R. 4      p'W>,          P                  R. 4       F^  p2V2Po                  R4      '       g   K  RPq                  V2P7                  4       4      p2V'Ps                  V2^RJ P7                  R;4      4       K`  	  V''       d   \        \        V'4      4      W>,          R&   VV'9  g   K  V(P                  V4       K  	  EK  	  M\u        W6,          4      '       d   RW6,          9   d   R+W6,          R,          9   d4   \w        W6,          R,          R+,          V4      p3V3W6,          R,          R+&   MVRW6,          R,          9   dC   \w        W6,          R,          R,          V4      p3W6,          R,          R V3W6,          R,          R+&   V)'       d   V)W6,          R&   V('       d   \        \        V(4      4      W6,          R&   R1W6,          9   g   EKl  RW6,          9  d   . W6,          R&   R9W6,          R,          9  d3   R:W6,          R,          9  d   W6,          R,          P                  R94       RW6,          9  d   . W6,          R&   \        VPm                  4       4       F@  w  rV! W6,          R1,          4      '       g   K"  W6,          R,          P                  V4       KB  	  W6,          R,          '       g
   W6,          R \y        W6,          4      '       g   EKw  \{        W6,          R1,          V4      W6,          R1&   EK  	  \        VP                  4       4       EF   pW`R,          8X  g   K  R!W6,          9   d   W6,          R!,          V R!&   V R,          R8X  g   KB  R<V 9   d0   V R<,          V9   d"   \}        W6,          W0R<,          ,          4      W6&   R=V 9   g   K  V R=,          p4V4P9                  R>R4      p5V4V58X  * p6V5P9                  R?R4      p4V4V58X  * p7\~        ^ ,          P                  V44      pV'       Ed   \        VP                  R@4      VP                  RA4      4      w  p8p9pp:\        V8V94      w  p;p<p=V8W6,          R&    V R<,          '       d   V8W0R<,          ,          R&   T;'       d+   RT;9   d    \-        T;R,          / T4      T;R&   T;Y6,          R&   T<'       d   T<Y6,          R&   T='       d   T=Y6,          RB&   T6'       d   \	        Y6,          R>4      Y6&   T7'       d   \	        Y6,          R?4      Y6&   EK  EK  \'        RC\)        V R=,          4       RD24       EK  	  V R,          RK9  Ed   REV 9   d-   \        P                  ! V R,          V RE,          ,           4      p>M\        P                  ! V R,          4      p>\        VP                  4       4       F<  p\a        \        \        4      ! W6,          4      '       g   K+  V>P                  V4       K>  	  RFV 9   d   V>Ps                  \        V RF,          P                  4       4      4       \        V RF,          P                  4       4       F4  pV RF,          V,           F  pVV>9  g   K  V>P                  V4       K  	  K6  	  V R,          R8X  d9   R<V 9   d   V>P                  V R<,          4       MV>P                  V R,          4       V R,          RL9   d2   V R,          p?V?V9   d"   RVV?,          9   d   VV?,          R,          V R&   V R,          RG8X  d)   V>Ps                  \        VP                  4       4      4       \        VP                  4       4       F  pVV>9  g   K  W6 K  	  V# u upi   \         d     EK  i ; i  \         d>    \        P                  ! R
T,          \        P"                  4      P                  Y&    EK  i ; i  \.         d     ELi ; i  \.         d     ELTi ; iu upi u upi u upi u upi   \>        \@        \        3 d    \'        R)T: R(24        ELi ; i  \\         d'   p&Rp$\        T!PY                  4       4      p% Rp&?&EL_Rp&?&ii ; iu up#i   \.         d     ELi ; i  \.         d     ELi ; i)Mz@
Sets correct dimension information for each variable/parameter
r*  r+  r  ro   r   rg  r)  r.  z[A-Za-z][\w$]*z.*\b%s\br2   r   	undefinedz"analyzevars: typespec of variable z is not defined in routine r1  ri  rV   rh  rG  Nr3  r   :r4  NN:Nr   Nr  r   rn  r   rm  r   :N   Nrj  :r  NNr  r   z\n\nz

z\n r   z4analyzevars: could not parse dimension for variable r  r   z@:@1)languagec                      W,
          V,          # r+   r&   )r8  r$  ri  s   &&&r(   solve_vanalyzevars.<locals>.solve_v
  s    01{(:r'   c                    < SP                  V R . .4      ^,           F$  pW!9  g   K  VP                  V4       S! W!4       K&  	  R # r+   )rz  add)r  r  v1coeffs_and_depscompute_depss   && r(   r  !analyzevars.<locals>.compute_deps
  s?    *9*=*=a$*LQ*O*OB')~(,(4R(> +Pr'   rk  Fzshape(r  r0  z) == Tinr   r   r  r   r  pure	recursiver2  r  rl  zanalyzevars: prefix (z) were not used
r  r  rf   r  )NNNNNr   )r  r  r  r  )r  r  )ErU  r  r  r  rq  rz  r"  KeyErrorro  rp  r  r`  r   r   r   r  r   r   r   r1   r   r   r  r   reverser   r   r!  r   ru   param_parser   r  rV   r  r   ExprparsetostringLanguager   	as_symbolr  linear_solvesymbolsrY  RuntimeErrorr  l_orisintent_inisintent_inoutisintent_inplaceisarrayr  rH  r   r   r  r  r  isscalarr  rx  rH  r  r   r  isintent_callbackisintent_aux)Br+  r  r  r*  genri  r   rw  svarsr.  r$  r  dep_matches
name_matchr  r   ln0r   dimension_exprsr  dimr  rn  rm  rj  r  r   tmpr  dim_charr  r>  d2dsizesolver_and_depsr8  r  all_symbolsr   v_depsn_depsn_checks
n_is_inputr  solverr  all_depsis_requiredr0  v_attraar  prpr1ispureisrecr2   r  r  r  r  rl  
neededvarsro   r  r  sB   &                                                               @@r(   ru  ru  

  s    1%8M99U6]#DW~#fT(A 6]	U6]Hvr**-#J/CYU6]!C]F))]!CCC.Ax"-dhhq"oq"A / D E=D	GLLO  $))+=LLO  D"3E":;F K-.44J$))+qM1'')AEEG$AK  Q44	())!$'9qT?;DGTW$$')jDGJ<O.O A$**,C!-"4"9"9";<
?}S/A!/D/S$G+)6s);A)>DGAJ*_%23%7%:%:*5dgq*A &; = -'Qv0 1TW$//GN+E2DB/0A 23'.TW$00GN+F3DB/0A 34'/ 7:&DLLN"$DGJ/K,CR5K'R5;;=!B/CrUh&ekkmQr2FrUh&ekkmQr2FrUg%rU[[]Ab1ErUf_bEKKM1R0D)$'15DGtw.,.)1?1G1M1Me1TU1TAaggi1TUiiR0dgh&77 GH-44S9	 V
 "F<<&9D<<5DTW,+/&..t4D%tw.,.)&>&;Q;W;WX];^'_;^a	;^'_`DGH$55 GH-44Q7 a "F$dg-+-(1?1F1L1LU1ST1SAaggi1STDGG$44 GG,33A6 U !EW X s{$'1')$",:3,?,E,Ee,LM,Lq,LMA
 (62 '(3hsCHH}&Z+As399%@2w!|r	!U2w!|1(9!2a5\2w!|!$X]]%8%8"!=B "R!!NNH4E4E4G4GNH +-!&vA ( 2 21 5A$~~a00!G+0+=+=a+@DA56 %; 36aiik2BK$/$6$6qyy{$C 5@*74?q'(vv~ %+AFFK !' *7 6=d6l5J 2- "/: .=*GK(//2B $'!fo!V}:L
 W[[2.FHk>.0049Jtw%dgk&:;DAq&5&9&9!&<O&.# 2A1F1F1H-A~?
 (+uH(H5 !V$'47N$,$7
 !)%1ax6G /4'-h.@.@&,QCr!A$6/8 (9'+}}-5->->-@-@ (5 (B/3 67C$J 1#*$'#9 +12aSaS(A8CDGG$4 /3#+47#:8:DGH$5#'twx/@#@$(GH$5$<$<T$B &a 0 (&,QCr!E!$=!?%)W[[R%@F$.&$8'1V'; &2=J:!O%v6<
 3m 2In '21@1F1F1H-A~%)W[[2%>F&*gkk*b&A#%==#:#:)+)<B$*MM"Qr(..2E$F 'B  &48V4E 1  &a 0 2IE <X $'""!TW,dgn55!-dgn.Ec.J.4"67=/4$'."99!-dgn.Ee.L.4"6 GN3E:7=/4#+ $(V$5!$'>(&(
#$'*"55$'*"55
#**:6tw&$&! !2!2!45DA)003 6 wx(()  +DGCL&A[ ^ $))+f  $fW~+u$xD)@($X2GHDGu$xB**VR0C"$mF["5B!#s]E$Q--b1Aq:HGGFOQWWW-=;?7(D%;H$h<08
J.6
+!$XDL8_ 5j A &%3!)9=(26(:B:HJv$6 7ADGN3%6@DGN3#2:DGJ/!&1$'6&BDG &1$';&GDG !  3Dx4I3JJ[\^U X W~VV5 5=53F#FGJ5=1Jdiik"A%|4TW==!!!$ # ed5>#6#6#89:%.--/0w**A
*"))!, + 1 >Z'5 !!%/2!!%-0>77=Dt|DJ 6"&t*X"6h>V#d499;/0diik"A
"G # Ki "D  		"  K!#K1,=rtt!D!J!JK2 !  ! 4 V" (` U N '
H= (()uB0F (4 !G /3G25emmo2FK!G*7t  ) ! ! (1 !)$(!)s   1AO&AO+.AO>AQ	?AQAQ-AQ22AQ7AQ<
8AR*AAR.?AS"
AS"
C!AS'DAS9O+AO;O:AO;O>AAQQAQQ	AQQAQQAQ*Q)AQ*R&AR+R*AR+R.AS	R9AS	SAS	S'AS6S5AS6S9ATTATz\A[a-z]+[\w$]*\Zc           	        Vf    \        WV4      pV# \        V4      ^8  g"   VRR\        V4      ^,
          1,          R8w  d   \	        RV R24      hV^R P                  R4      p\        V4      ^8X  d   V^ ,          P                  R	4      p\        V4      ^8X  d1   \        V^ ,          V4      p\        ^\        V4      ^,           4      pM[\        V^ ,          V4      p\        V^,          V4      p	\        \        V4      \        V	4      ^,           4      pM\	        R
V R24      hV P                  R4      '       d   V ^R MT P                  R4      p . p
V  F!  p \        WV4      pV
P                  V4       K#  	  \        \        Wj4      4      pV#   \         d!   pT p\        RT RT : R24        Rp?T# Rp?ii ; i  \         d   p\        RT RT: R24        Rp?L|Rp?ii ; i)a  
Creates a dictionary of indices and values for each parameter in a
parameter array to be evaluated later.

WARNING: It is not possible to initialize multidimensional array
parameters e.g. dimension(-3:1, 4, 3:5) at this point. This is because in
Fortran initialization through array constructor requires the RESHAPE
intrinsic function. Since the right-hand side of the parameter declaration
is not executed in f2py, but rather at the compiled c/fortran extension,
later, it is not possible to execute a reshape of a parameter array.
One issue remains: if the user wants to access the array parameter from
python, we should either
1) allow them to access the parameter array using python standard indexing
   (which is often incompatible with the original fortran indexing)
2) allow the parameter array to be accessed in python as a dictionary with
   fortran indices as keys
We are choosing 2 for now.
Nzparam_eval: got "r  r   ra  zparam_eval: dimension z can't be parsedr  r  z.param_eval: multidimensional array parameters z not supportedr  r   r   )r  r   r1   rV   r   r!  r  r   r6   r   r"  rr  zip)r  r  r  r  r  r   dimrangeboundlbounduboundv_evalitems   &&&&        r(   r  r    s   & 	;Q&)A  7|a7#5S\A%5#56$>1':KLMMq}""3'H
8}A;$$S)x=AV4EQE
Q/H !f5F !f5FS[#f+/:HI#9N4 5 	5 LL&&1RA44S9AF	>/D 	d  	S"#AHK  	;A'uE!b9::	;>  	>'uE$<==	>s/   F  GG"F==GG-G((G-c                ^   RV 9   dj   V RV P                  R4       pW P                  R4      ^,           V P                  R4       p\        \        W14      4      p\	        W,          V,          4      # W9   d   \	        W,          4      # V F  p\
        P                  ! RV,           R,           \
        P                  4      pVP                  V 4      pV'       g   KQ  VP                  R4      \	        W,          4      ,           VP                  R4      ,           p VP                  V 4      pKZ  	  V # )a  Recursively parse array dimensions.

Parses the declaration of an array variable or parameter
`dimension` keyword, and is called recursively if the
dimension for this array is a previously defined parameter
(found in `params`).

Parameters
----------
d : str
    Fortran expression describing the dimension of an array.
params : dict
    Previously parsed parameters declared in the Fortran source file.

Returns
-------
out : str
    Parsed dimension expression.

Examples
--------

* If the line being analyzed is

  `integer, parameter, dimension(2) :: pa = (/ 3, 5 /)`

  then `d = 2` and we return immediately, with

>>> d = '2'
>>> param_parse(d, params)
2

* If the line being analyzed is

  `integer, parameter, dimension(pa) :: pb = (/1, 2, 3/)`

  then `d = 'pa'`; since `pa` is a previously parsed parameter,
  and `pa = 3`, we call `param_parse` recursively, to obtain

>>> d = 'pa'
>>> params = {'pa': 3}
>>> param_parse(d, params)
3

* If the line being analyzed is

  `integer, parameter, dimension(pa(1)) :: pb = (/1, 2, 3/)`

  then `d = 'pa(1)'`; since `pa` is a previously parsed parameter,
  and `pa(1) = 3`, we call `param_parse` recursively, to obtain

>>> d = 'pa(1)'
>>> params = dict(pa={1: 3, 2: 5})
>>> param_parse(d, params)
3
r/  Nr0  r  r  r  r  )
r  rfindr6   r  r   r   r   r   r   r   )r  r  dnameddimsrY   r  rY  r   s   &&      r(   r  r    s    r ax,166#;&&+/!''#,/ K./6='((	
69~A::$q(+==rttD 

1A!GGH%	N#%&WWW%56JJqM  r'   c                 L   T p\         P                  V 4      '       * pV'       d   \        V4      w  rV\        WR ,          V4      pRpV  FG  p	V	P	                  4       p	V	\
        P                  \
        P                  ,           9  d   Rp	W,           pKI  	  VR
,          R8X  d   VR,           pM	VR,           pTp WR ,          9   g   WR,          9   d   V R,           p K%  W9   d7   ^p
V \        V
4      ,           V9   d   V
^,           p
K"  V \        V
4      ,           p V'       d   XVR ,          V &   V # WR ,          9  d$   VR ,          P                  V/ 4      VR ,          V &   RV9   d@   W1R,          VR,          ,           9   d%   \        VR ,          V ,          R	4      VR ,          V &   V # )r*  e_r   r  _er.  r   r,  r-  r   r   )analyzeargs_re_1r   r  r  r   ra   ascii_lowercasedigitsr   rz  rq  )r$  r+  r.  orig_a	a_is_exprr  r  atnar   rw  s   &&&        r(   	expr2namerC  "  si   F$**1--I#5e#< q-?A	A..>>B	 
 b6S=cBdB= Av$6CAy#a&jD AAAJfa H	 &M!$V}00<E&M!%FK.@5CV.V$V*5=+;ZHE&M!Hr'   c                 ~   \        V 4       \        V 4      w  rR V 9  d   . V R &   . pV R ,           F   p\        W@V4      pVP                  V4       K"  	  W0R &   RV 9   dN   \	        V R,          P                  4       4       F)  w  rVV F  pW@R,          9  g   K  / V R,          V&   K   	  K+  	  V R,           FU  pVR,          V9   g   K  RV 9  d   . V R&   VR,          V R,          9  g   K6  V R,          P                  VR,          4       KW  	  RV 9   d)   V R,          V R,          9  d   / V R,          V R,          &   V # )r.  r  r*  r)  ro   r,  r   )rU  r  rC  r"  ro  rH  )r+  r  r   r.  r$  rw  args1ri  s   &       r(   rs  rs  D  s-   )%0MUfD6]]a%A  &M%U7^1134HA&M)')E&M!$  5
 6]]V9%'%'k"yk 22k"))!F)4  5U8_E&MA)+feHo&Lr'   z\A\(.+?,.+?\)\Zz\A[+-]?\d+(_(?P<name>\w+)|)\Zz*\A[+-]?[\d.]+[-\d+de.]*(_(?P<name>\w+)|)\Zz
\A\(.*\)\Zz\A(?P<name>\w+)\s*\(.*?\)\s*\Zc                     \        V \        4      '       d   R R/# \        V \        4      '       d   R R/# \        V \        4      '       d   R R/# \        V \        4      '       d   V # \        \        V 4      4      h)r2   r5   r3   r  )r  r6   r8   r  rr  AssertionErrorr   )r   s   &r(   _ensure_exprdictrH  g  sk    !SI&&!UF##!WI&&!T
a
!!r'   c                    W9   d   \        W,          4      # V P                  4       p \        P                  V 4      '       d   R R/# \        P                  V 4      pV'       dI   RVP                  4       9   d0   VP                  R4      '       d   \        R\        V 4       R24       R R/# \        P                  V 4      pV'       dI   RVP                  4       9   d0   VP                  R4      '       d   \        R\        V 4       R24       R R/# R Fk  p\        WR7      P                  R	V,           R	,           4       Uu. uF  qUP                  4       NK  	  up F  pWa9   g   K  \        W,          4      u u # 	  Km  	  / p\        P                  V 4      '       d   \        V ^R W4      pM\        P                  V 4      pV'       dm   VP                  R4      p\        VP                  R4      W4      pV'       d   R
V9   d   VR
 V'       g'   V^ ,          V9   d   \        W(^ ,          ,          4      # V ^ ,          R9   d	   R RRRR//# V'       g   \        R\        V 4       R24       V# u upi )r2   r  ro   z6determineexprtype: selected kind types not supported (r   r5   r3   r   r.  rb  rg  r  r  ri  z4determineexprtype: could not determine expressions (z) type.
)+r  r   r  r   )rH  r   determineexprtype_re_1r   determineexprtype_re_2r  r   r1   r   determineexprtype_re_3r   r!  determineexprtype_re_4r  determineexprtype_re_5)	r!  r*  rulesr   opr  r  r  rns	   &&&      r(   r  r  s  s   |
++::<D##D))I&&$$T*AQ[[]"qwwvHdTWXZI&&$$T*AQ[[]"qwwvHdTWXZF##"%3D%C%I%I#PR(UX.%YZ%Y'')%YZAy'00 [ # 	A##D))d1Rj$6"((.B!!''&/4?AZ1_jMa5E>+EQ%L99Aw%K#sDDB4:,iX	ZH+ [s   I0r   c                 $   \        V 4       R p\        V \        4      '       dj   V  Fa  pV'       dC   VR,          R9   d5   VR,          \        9   d   K-  \        '       d   VR,          \        9  d   KM  V\        WAVR7      ,           pKc  	  V# R pR pR pV R,          pVR8X  d   R # . p	RV 9   d
   V R,          pRV 9   d{   V R,          p
V R,           F9  p\        WV	4      p\        W,          4      '       d   K(  V	P                  V4       K;  	  V R,          R8X  g	   V	'       d   RR	P                  V	4       R
2pR pRV 9   dP   \        V R,          P                  4       4       F+  pV: V\        ,           : V: RV R,          V,          : 2pK-  	  V P                  R. 4      R,          pVR8X  d   RV9   d   VP                  R4       V'       d+   V: V\        ,           : RR	P                  V4      : RV: 2pR pRV 9   d   \        V R,          V\        ,           4      pR pRV 9   d   \        V R,          V\        ,           4      pVR8X  d   R pR pRV 9   d4   RV R,           R
2pV R,          V	9  d   V	P                  V R,          4       \        V R,          V\        ,           VR7      p\!        W R,          W\        ,           VR7      p
R pRV 9   d   V'       g   RV R,           2pRV 9   d]   R p\        V R,          P#                  4       4       F-  w  ppV V\        ,            RV RR	P                  V4       R
2pK/  	  VV,           pVR8X  d
   VR8X  d   R pV: V: V: RV: V: V: RV: V: V: V
: V: V: V: RV: RV: 2pV# ) r   r+  r  ro   r  r  r.  r*  r/  r  r0  r  r   r  r  callbackintent(z) r  r
  r  r   z	 result (r)  r  z! in r  zentry r  r  zend r  )rU  r  ro  r"   r#   r  rC  r  r"  r   rp  r   rz  r  use2fortrancommon2fortranvars2fortranrH  )r+  rb  r  rf  re  r  ro   r.  	blocktypeargslr*  r$  r  rw  
intent_lstr  r
  r   r)  messentry_stmtsr  s   &&&                   r(   r  r    s;    
C%AQwZ#==V9	)96)!;(lKKC  
FDDgIIEV}V}vA!E*A$TW--Q  >Z'5sxx'q)DU"e./4467A #-E:L4Ma4P R 8 8R(+JJ:#;*%,cGmmHHZ0$8 C~%,g6F5hw?""F5U8_-Q/?%'LLx)E&M3=|TDV}e7]ODD|uV}o&%w--/0DAq(M#-qc388A;-qQK 1k!L T^%;VYdFD:JCQUW]_cehjsuy{CJr'   c           
          R p\        V P                  4       4       FK  pVR8X  d!   V V RRP                  W,          4       2pK*  V V RV RRP                  W,          4       2pKM  	  V# )r   r  zcommon r  zcommon /z/ )ro  rp  r   )r
  rb  rf  rw  s   &&  r(   rW  rW    sp    
C&++- =E#gchhvy&9%:;CE#hqcCHHVY,?+@AC	 !
 Jr'   c                 x   R p\        V P                  4       4       EF  pV V RV R2pW,          / 8X  d   V'       d   VR	,          R8X  d   VRR	 pK8  RW,          9   d   W,          R,          '       d   V R2pRW,          9   d   W,          R,          '       dx   Rp\        W,          R,          P                  4       4       FK  pWPV,          R,          V,          8X  d   V V V 2pRpK*  V V V RW,          R,          V,           2pRpKM  	  V'       g   EK  VR	,          R8X  g   EK  VRR	 pEK  	  V# )
r   zuse r  Nr  z only:r  r   z=>r   rM  )r  rb  rf  r   r   rw  s   &&    r(   rV  rV    s    
C#((*cU$qc#6R<s2w#~#2hSVvE.CCF?sve}}A#&-,,./Aua(( E!QC.CA E!QCr#&-*:);<CA 0 33r7c>cr(C% & Jr'   c                     V R ,          p. pV F9  p \        4       RV 2,          pV! V 4      '       d   VP                  V4       K9  K;  	  V#   \         d     KM  i ; i)r  	isintent_)globalsr"  r  )rg  r  rf  r  r_  s   &    r(   true_intent_listrc    si    
h-C
C	#	IfX./A vv

6"   J  		s   AAAc           	         \        V 4       R p. pV F#  pWpR,          9   g   K  VP                  V4       K%  	  RV 9   dA   V R,           F3  pWq9   d   Wv9  d   VP                  V4       K"  K$  \        RV R24       K5  	  RV 9   d   VP                  V R,          4       V'       g:   \	        VP                  4       4       F  pWv9  g   K  VP                  V4       K  	  V EF  pRW,          9   dV   W,          R,           FB  pW9   g   K  RW,          9   g   K  WqV,          R,          9   g   K0  \        RV RV R	24       KD  	  R
V 9   d   WpR
,          9   d   \        W,          4      '       d
   V V RV 2pV V RV 2p\        W,          4      '       d
   V V RV 2pWq9   d   RW,          9  d   K  ^p	V R,           F$  p
WzR,          8X  g   K  V
R,          R8X  g   K"  ^ p	 M	  V	'       d   EK  Wq9  d   \        V4       \        RV R24       EK9  WpR,          8X  d)   V R,          R8w  g   V P                  R4      '       d   EKn  RW,          9  dW   RW,          9   d'   RW,          R,          9   d   Wr9   d
   V V RV 2pEK  \        W,          4       \        RV R24       EK  W,          R,          pVR8X  d#   RW,          9   d   V RW,          R,           R2p/ pRW,          9   d   W,          R,          pMRW,          9   d   W,          R,          pRV9   d.   VR,          R49   d   V R VR,           R2pMWV RVR,           2pMHR!V9   d,   V R"VR!,           2pR#V9   d   V R$VR#,           R2pMV R2pMR#V9   d   V R%VR#,           R2pR&pRW,          9   do   W,          R,           Uu. uF  pVR59  g   K  VNK  	  ppV'       d    R'V9   d   R(V9   d   VP                  R(4       V'       d   V R)R*P                  V4       2pR*pR+W,          9   d)   V V R,R*P                  W,          R+,          4       R2pR*pR-W,          9   d5   \        W,          4      pV'       d   V V R.R*P                  V4       R2pR*pR/W,          9   d)   V V R0R*P                  W,          R/,          4       R2pR*pRW,          9   d)   V V R1R*P                  W,          R,          4       R2pR*pR2W,          9   dX   W,          R2,          pW,          R,          R69   d*    \        V4      pRVP                   R*VP                    R2pV R3V R2V 2pMV R3V 2pV V V 2pEK  	  V# u upi   \"         d     L3i ; i)7r   r*  r  zvars2fortran: Confused?!: "z" is not defined in vars.
r  rn  z;vars2fortran: Warning: cross-dependence between variables "z" and "r  r,  zintent(callback) z	external z	optional r2   r)  ro   r+  r  z*vars2fortran: No definition for argument "rk   r   rg  r   z(vars2fortran: No typespec for argument "rf   rl  r/  r0  rh  ri  r   z*(rV   z(len=rG  z,kind=z(kind=r   z
intent(in)zintent(out)r  r  r   r2  r  rU  rm  zcheck(zdepend(rk  z :: )r   r  )r   )r  r  )rU  r"  rm   r  ro  rp  r  
isoptionalshowr1   rz  r  r   rc  r  r3   imagr   )r+  r*  r.  rb  r  rf  noutr$  r  r   ri  vardefr  r   r   r  r  r  s   &&&&&             r(   rX  rX    s   
CDfKKN  u|$$Ay=KKN ! 1!4OPR % UE*%&diik"A}A # twWX&&9TW!41gh>O9OUVWUXX_`a_bbfgi ' %A{);$; ))cU"3A37E#is+C$'""cU)A3/yZtw6D6]]&	>ajJ&>D # =J@4HIfW~+uyy/B/B
 TW$TW$twz7J)J9 E#is3CM>qcFG$V
dg 5xq!4 5Q7FTW$w~.Htw&w~.H(?}
*"82hsm_A6"81Xc]O4hxuXe_$56F!"86(6*:);1="81xxvhv&6%7q9F #wz2 .2!, A2D . 4$9N M*"82chhtn%56$'!xs*SXXdgk6J-K,LANFAtw"47+C"8A3gchhsm_A>Adgxs&$''2B)C(DAFFAtwxs'#((4783D*E)FaHFA$'>Awz"&CCQAAFF81QVVHA.A xtA3as+FxtA3'FcU6(#I J JM.@ ! s   	U9U90(U>>VVc                 F   \        R ^ 4       \        V \        4       \        R^ 4       . s\	        \
        ^ ,          4      p\        R^ 4       \         F(  p\        RVP                   R2^ 4       \        W4      pK*  	  \        R^ 4       \        V4      p\        V,           # )zReading fortran codes...
zPost-processing...
z"Applying post-processing hooks...
z  r   zPost-processing (stage 2)...
)
r1   r   r5  r   rq  r   post_processing_hooks__name__traverserd  )filespostlisthooks   &  r(   crackfortranrq    s     (!,E9%"A&K1&H115%"T]]O2&*H+ & ,a0(#H!!r'   c                 b    \        V 4      R ,           pRpR\        ,          pW!,           V,           # )r   zE!    -*- f90 -*-
! Note: the context of this file is case sensitive.
z
! This file was auto-generated with f2py (version:%s).
! See:
! https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e
)r  f2py_version)r+  pyfheaderfooters   &   r(   crack2fortranrw    s:     5
!D
(CF 	F
 <&  r'   c                     \        V \        4      ;'       d4    \        V 4      ^8H  ;'       d    \        V ^ ,          \        \        34      # )r  )r  tuplerV   r6   r   )objs   &r(   _is_visit_pairr{    sB    sE" / /CA/ /3q6C:.0r'   c                0   \        V 4      '       d>   V ^ ,          R8X  d   V # V! WV.VO5/ VB pVe   \        V4      '       g   Q hV# T pV w  rMRV 3pRp\        V \        4      '       dK   . p\        V 4       F8  w  r\	        W3VW'.,           V.VO5/ VB w  rVf   K'  VP                  V4       K:  	  MZ\        V \        4      '       dC   / pV P                  4        F+  w  r\	        W3VW'.,           V.VO5/ VB w  rVf   K'  WV&   K-  	  MT pVf   V# W3# )a  Traverse f2py data structure with the following visit function:

def visit(item, parents, result, *args, **kwargs):
    """

    parents is a list of key-"f2py data structure" pairs from which
    items are taken from.

    result is a f2py data structure that is filled with the
    return value of the visit function.

    item is 2-tuple (index, value) if parents[-1][1] is a list
    item is 2-tuple (key, value) if parents[-1][1] is a dict

    The return value of visit must be None, or of the same kind as
    item, that is, if parents[-1] is a list, the return value must
    be 2-tuple (new_index, new_value), or if parents[-1] is a
    dict, the return value must be 2-tuple (new_key, new_value).

    If new_index or new_value is None, the return value of visit
    is ignored, that is, it will not be added to the result.

    If the return value is None, the content of obj will be
    traversed, otherwise not.
    """
rW  N)r{  r  ro  r  rm  r"  rr  rH  )rz  visitparentsr   r.  kwargs
new_resultparent
result_keyrY   r  	new_indexnew_itemr  new_key	new_values   &&&&*,          r(   rm  rm    sS   8 cq6^#J3A$A&A
!!*----
C
#t
%cNLE"*E>5+2X+=v#<,0#<4:#<I $!!(+ + 
C		
))+JC!)3,*1H*<f";+/";39";G "&/7# & 
!!r'   c                   VR,          w  rVV w  rxR p	VR9   d)   VR,          ^ ,          R8X  g   Q hVR,          ^,          p
M1VR8X  d)   VR,          ^ ,          R8X  g   Q hVR,          ^,          p
MRp
RpV
e8   TpV
P                  4        F   w  r\        V4      '       g   K  V	! W4      pK"  	  MyVR8X  ds   VR,          ^,          R,          p
TpV
P                  4        FE  w  r\        V4      '       g   K  \        P                  ! RV,           R,           RV,           V4      pKG  	  Ve#   W8w  d   \	        R	V R
V RV RV R2	^4       W{3# R# )a  Previously, Fortran character was incorrectly treated as
character*1. This hook fixes the usage of the corresponding
variables in `check`, `dimension`, `=`, and `callstatement`
expressions.

The usage of `char*` in `callprotoargument` expression can be left
unchanged because C `character` is C typedef of `char`, although,
new implementations should use `character*` in the corresponding
expressions.

See https://github.com/numpy/numpy/pull/19388 for more information.

c                     \         P                  ! R V ,           R,           W4      p\         P                  ! RV ,           R,           W4      pV# )z[*]\s*\br  z\b\s*[\[]\s*0\s*[\]])r   r  )varnamer  s   &&r(   	fix_usage8character_backward_compatibility_hook.<locals>.fix_usage  s>    {W,u4gEuw)@@'r'   r*  rk  Ncallstatementz
(?<![&])\br  r   zcharacter_bc_hook[r  z]: replaced `z` -> `z`
r   )r   rm  r   )rH  ischaracterr   r  r1   )r4  r~  r   r.  r  
parent_keyparent_valuer  r  r  	vars_dictr  r  vds   &&&*,         r(   %character_backward_compatibility_hookr    s`     'r{JJC ++r{1~'''BKN		r{1~'''BKN		I	$??,KG2%g9	 - 
	BKN6*		$??,KG2 FF!G+e3S7]IO		 - 
 (AcU ;""'yk>?@B r'   __main__r(  r  z-quietz-verbosez-fixz?Use option -f90 before -fix if Fortran 90 code is in fix form.
z-skipemptyendsz--ignore-containsz-f77z-f90r   z-hz-showz-mr  zUnknown option z	OSError: a    Warning: You have specified module name for non Fortran 77 code that
  should not need one (expect if you are scanning F90 code for non
  module blocks but then you should use flag -skipemptyends and also
  be sure that the files do not contain programs without program
  statement).
zWriting fortran code to file r  r
   r   )r	   )z.f90z.f95z.f03z.f08)z.forz.ftnz.f77z.f)z([a-z]+[\w\s(=*+-/)]*?|)r  r  r   )z	[a-z\s]*?r  r  r   )r   r   r   r   )r   dimension|virtualr  r   )r   r   r   r   )r   r   r   r   )r   r   r   r   )r   r  r  r   )r   r  r  r   )r   r  r  r   )r   intent|depend|note|checkr  z\s*\(.*?\).*)r   r  r  z\s*\(.*)r   r  r  r   )r   r  r  r   )r   r  r  r   )r   r	  r	  r   )r   r
  r
  r   )r   r  r  r   )r   r  r  r   )r   r  r  r   )r   Kthreadsafe|fortranname|callstatement|callprotoargument|usercode|pymethoddefr  r   )r  )r  )rR  r+   )r   N)Nr   )r   )NN)r  r  )r   F)r   F)__doc__r   r  r   r   r  r   ra   r,   pathlibr   r   ImportErrorr   r   r   auxfuncsversionrs  r   r   r   r   r   r   r   r   r   r   r   r   r    r   r   r   r   r7  r   r   r6  r$   r   r#   r%   r   r"   r!   r   r)   r1   	_MAXCACHEr  r   rl   rx   r   rp   ru   ry   r{   r   r   r  r   r   r   r   r   r   r   r   r   rf  r   beforethisafterfortrantypesrH  r  rE  rF  groupbegins77r   groupbegins90r   	groupendsrC  endifsrB  moduleproceduresrN  rG  r8  r9  r;  r<  r?  r@  rA  r:  r=  r>  rJ  rM  rQ  rI  rK  rL  rD  Sr3  r4  r   r%  rO  crackline_bind_1r  r5  rP  r   re  rx  r  r  r  r  r  r  r  r{  r}  r  r  r  rR  r  r  r  rh  ri  rI  r6  r#  r,  r  r  rq  rr  rs  rS  rU  rX  r`  rd  rq  rv  rt  rw  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  ru  r<  r  r  rC  rs  rK  rL  rM  rN  rO  rH  r  r  rW  rV  rc  rX  rk  rq  rw  r{  rm  r  r"  rl  rn  funcsr_  f2f3showblocklistargvr   rm   r   r   r   OSErrordetailro  rt  r.   r&   r'   r(   <module>r     s,  IT    	  	  
  $
 "" 		


  
2			 	#L  	!A)62 
"	A)95 

% 
 
7 
F 
G 
V 
V 
V 
W 



(
*.
05
7@
BJ
LS



(
*/
18
:>
@F
HP
 
 
 '
 )1
 3;
 =D
 FL
 	
 	
 !	
 #*	
 ,2	
 4:	
 <@	

 

 
 
 
 
 %
 '5
 7>
 @H
 JR
 
 
A e)HQKKE	
,1 

3RTT:AA**12448??**12448??**12448>> : 8 3>4 '+! _DF Dzzr<t<<bddDEKL

?44lEb6bdh6j $jkmkokoq  **_ 0? ?@BFGNOJJ 24  457TT;<CD  (r=->>FGNO r=->>FGNO7	ZZr9i66>?DE

 zzy&&$77?@GH ) r+-=tDDbddL  **88"$$@AKL::o 18 89;?@KL **88"$$@AKL**88"$$@AKL**88"$$@AKL

44bdd<=EF66>?HI::::BDDBCNO 

? .Q QRTRVRVXYab::@@"$$HITU jj00"$$89?@jj00"$$89?@zz22BDD:;BC66>?HI

44bdd<=EFZZ..67<=
**66>?IJ

44bdd<=EF **_ 8M &M OQ  OS  OS  VX  VZ  VZ  OZ[ ]oo ::9244ABMN ( A244H::A244H ZZ kmomqmqr [%|$&
@ 

KRTTS%&(dd, ** r  tv  tx  txy***+-441 jj@"$$H 

;=zzHJ $A244H    u@p(8 jjErttLzzI244Qzz9244A235449 ** G  IK  IM  IMN"JfR7,v6<@\~D'T*Z$&! **^RTT2AH zz,bdd3,4$" $ (* bJ( **W%++ DN ::12448 ;|M`   D6 $6= $DbddK 12449 M2448 $ErttL 	" )+ (ZGT0z@  ""!0 "$D ?"D9 x   B C zEE	A	
B	
BMXXb\\7qTS[A(]EG*_GE&[yVXY[M"N""M%%N&[I"N&[I#NM$YB'\M$YBqTS[od1gYb12BKBM2QQ LLOc d 9}}  	 E"H{/[0A/B"EqIH%+s##qGGCL $X Q [m  Do  2)F:R0112" $#s5   q +)q$#r	q! q!$r+q??rr	