B <ÓFd€ ã @ sl d Z ddlmZmZmZ ddgZddlZddlZddlZe dej ¡Ze dej ¡Ze dej ¡Z d d „ Ze d¡Ze d¡Ze d ¡Zdd„ Ze d¡Zdd„ Zdd„ Ze d¡Zdd„ Zdd„ Ze dej ¡Zdd„ Zdd„ ZedƒZedkrhyejd ZW n" e k r$ ej!Z"ej#Z$Y n*X e%ed ƒZ"ej& 'e¡\Z(Z)e(Z*e%e*d!ƒZ$e" +¡ Z,ee,ƒZ-e$ .e-¡ dS )"aÆ process_file(filename) takes templated file .xxx.src and produces .xxx file where .xxx is .pyf .f90 or .f using the following template rules: '<..>' denotes a template. All function and subroutine blocks in a source file with names that contain '<..>' will be replicated according to the rules in '<..>'. The number of comma-separated words in '<..>' will determine the number of replicates. '<..>' may have two different forms, named and short. For example, named:
where anywhere inside a block '
' will be replaced with
'd', 's', 'z', and 'c' for each replicate of the block.
<_c> is already defined: <_c=s,d,c,z>
<_t> is already defined: <_t=real,double precision,complex,double complex>
short:
, a short form of the named, useful when no
appears inside
a block.
In general, '<..>' contains a comma separated list of arbitrary
expressions. If these expression must contain a comma|leftarrow|rightarrow,
then prepend the comma|leftarrow|rightarrow with a backslash.
If an expression matches '\