numpy.f2py.crackfortran (version <module 'numpy.f2py.__version__' from '/usr/lib/python2.6/dist-packages/numpy/f2py/__version__.pyc'>)
index
/usr/lib/python2.6/dist-packages/numpy/f2py/crackfortran.py

crackfortran --- read fortran (77,90) code and extract declaration information.
    Usage is explained in the comment block below.
 
Copyright 1999-2004 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
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.
$Date: 2005/09/27 07:13:49 $
Pearu Peterson

 
Modules
       
numpy.f2py.__version__
numpy.f2py.cfuncs
copy
fileinput
os
pprint
re
string
sys
types

 
Functions
       
_calc_depend_dict(vars)
_ensure_exprdict(r)
_eval_length(length, params)
_eval_scalar(value, params)
_free_f90_start = match(...)
match(string[, pos[, endpos]]) --> match object or None.
Matches zero or more characters at the beginning of the string
_get_depend_dict(name, vars, deps)
_has_f90_header = search(...)
search(string[, pos[, endpos]]) --> match object or None.
Scan through string looking for a match, and return a corresponding
MatchObject instance. Return None if no position in the string matches.
_has_f_header = search(...)
search(string[, pos[, endpos]]) --> match object or None.
Scan through string looking for a match, and return a corresponding
MatchObject instance. Return None if no position in the string matches.
_has_fix_header = search(...)
search(string[, pos[, endpos]]) --> match object or None.
Scan through string looking for a match, and return a corresponding
MatchObject instance. Return None if no position in the string matches.
_is_intent_callback(vdecl)
_is_kind_number = match(...)
match(string[, pos[, endpos]]) --> match object or None.
Matches zero or more characters at the beginning of the string
_kind_func(string)
_resolvenameargspattern(line)
_selected_int_kind_func(r)
_simplifyargs(argsline)
_varname_match = match(...)
match(string[, pos[, endpos]]) --> match object or None.
Matches zero or more characters at the beginning of the string
analyzeargs(block)
analyzebody(block, args, tab='')
analyzecommon(block)
analyzeline(m, case, line)
analyzevars(block)
appenddecl(decl, decl2, force=1)
appendmultiline(group, context_name, ml)
buildimplicitrules(block)
common2fortran(common, tab='')
crack2fortran(block)
crack2fortrangen(block, tab='\n')
######
crackfortran(files)
crackline(line, reset=0)
reset=-1  --- initialize
reset=0   --- crack the line
reset=1   --- final check if mismatch of blocks occured
 
Cracked data is saved in grouplist[0].
cracktypespec(typespec, selector)
cracktypespec0(typespec, ll)
determineexprtype(expr, vars, rules={})
errmess = write(...)
write(str) -> None.  Write string str to file.
 
Note that due to buffering, flush() or close() may be needed before
the file on disk reflects the data written.
get_parameters(vars, global_params={})
get_sorted_names(vars)
get_usedict(block)
get_useparameters(block, param_map=None)
getarrlen(dl, args, star='*')
getblockname(block, unknown='unknown')
getextension(name)
getlincoef(e, xset)
is_f_file = match(...)
match(string[, pos[, endpos]]) --> match object or None.
Matches zero or more characters at the beginning of the string
is_free_format(file)
Check if file is in free format Fortran.
markinnerspaces(line)
markoutercomma(line, comma=',')
markouterparen(line)
myeval(e, g=None, l=None)
outmess(line, flag=1)
postcrack(block, args=None, tab='')
TODO:
      function return values
      determine expression types if in argument list
postcrack2(block, tab='', param_map=None)
readfortrancode(ffile, dowithline=<function show at 0x4fdade8>, istop=1)
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.
removespaces(expr)
rmbadname(names)
rmbadname1(name)
setattrspec(decl, attr, force=0)
######
setcharselector(decl, sel, force=0)
setkindselector(decl, sel, force=0)
setmesstext(block)
show(o, f=0)
###### Some helper functions
sortvarnames(vars)
true_intent_list(var)
undo_rmbadname(names)
undo_rmbadname1(name)
unmarkouterparen(line)
updatevars(typespec, selector, attrspec, entitydecl)
use2fortran(use, tab='')
vars2fortran(block, vars, args, tab='')
TODO:
public sub
...

 
Data
        __file__ = '/usr/lib/python2.6/dist-packages/numpy/f2py/crackfortran.pyc'
__name__ = 'numpy.f2py.crackfortran'
__package__ = 'numpy.f2py'
_intentcallbackpattern = <_sre.SRE_Pattern object at 0x4ec7ce0>
analyzeargs_re_1 = <_sre.SRE_Pattern object at 0x4faf650>
badnames = {'_i': '_i_bn', 'auto': 'auto_bn', 'break': 'break_bn', 'case': 'case_bn', 'char': 'char_bn', 'complex_double': 'complex_double_bn', 'const': 'const_bn', 'continue': 'continue_bn', 'default': 'default_bn', 'delete': 'delete_bn', ...}
beforethisafter = r'\s*(?P<before>%s(?=\s*(\b(%s)\b)))\s*(?P<this>(\b(%s)\b))\s*(?P<after>%s)\s*\Z'
beginpattern77 = (<_sre.SRE_Pattern object at 0x4e74020>, 'begin')
beginpattern90 = (<_sre.SRE_Pattern object at 0x4e75ff0>, 'begin')
callfunpattern = (<_sre.SRE_Pattern object at 0x4e78520>, 'callfun')
callnameargspattern = <_sre.SRE_Pattern object at 0x4e7a4c0>
callpattern = (<_sre.SRE_Pattern object at 0x4ec8100>, 'call')
charselector = <_sre.SRE_Pattern object at 0x4e7af00>
commonpattern = (<_sre.SRE_Pattern object at 0x4e79020>, 'common')
containspattern = (<_sre.SRE_Pattern object at 0x4e794b0>, 'contains')
crackline_re_1 = <_sre.SRE_Pattern object at 0x4e78dc0>
currentfilename = ''
datapattern = (<_sre.SRE_Pattern object at 0x4e75940>, 'data')
debug = []
debugoptions = []
defaultimplicitrules = {'$': {'typespec': 'real'}, '_': {'typespec': 'real'}, 'a': {'typespec': 'real'}, 'b': {'typespec': 'real'}, 'c': {'typespec': 'real'}, 'd': {'typespec': 'real'}, 'e': {'typespec': 'real'}, 'f': {'typespec': 'real'}, 'g': {'typespec': 'real'}, 'h': {'typespec': 'real'}, ...}
determineexprtype_re_1 = <_sre.SRE_Pattern object at 0x4fc9418>
determineexprtype_re_2 = <_sre.SRE_Pattern object at 0x4e77be0>
determineexprtype_re_3 = <_sre.SRE_Pattern object at 0x4e77910>
determineexprtype_re_4 = <_sre.SRE_Pattern object at 0x4d76df8>
determineexprtype_re_5 = <_sre.SRE_Pattern object at 0x4e77f50>
dimensionpattern = (<_sre.SRE_Pattern object at 0x4e75b80>, 'dimension')
dolowercase = 1
endifpattern = (<_sre.SRE_Pattern object at 0x4e76d40>, 'endif')
endifs = r'(end\s*(if|do|where|select|while|forall))|(module\s*procedure)'
endpattern = (<_sre.SRE_Pattern object at 0x4e767a0>, 'end')
entrypattern = (<_sre.SRE_Pattern object at 0x4e78920>, 'entry')
expectbegin = 1
externalpattern = (<_sre.SRE_Pattern object at 0x21e4930>, 'external')
f2py_version = '2'
f2pyenhancementspattern = (<_sre.SRE_Pattern object at 0x4e7a800>, 'f2pyenhancements')
f77modulename = ''
f90modulevars = {}
filepositiontext = ''
formatpattern = (<_sre.SRE_Pattern object at 0x4e79720>, 'format')
fortrantypes = r'character|logical|integer|real|complex|double\s*...mplex|)|complex)|type(?=\s*\([\w\s,=(*)]*\))|byte'
functionpattern = (<_sre.SRE_Pattern object at 0x4e74670>, 'begin')
getlincoef_re_1 = <_sre.SRE_Pattern object at 0x4d3bf48>
gotnextfile = 1
groupbegins77 = r'program|block\s*data'
groupbegins90 = r'program|block\s*data|module(?!\s*procedure)|python\s*module|interface|type(?!\s*\()'
groupcounter = 0
groupends = 'end|endprogram|endblockdata|endmodule|endpythonmodule|endinterface'
grouplist = {0: []}
ignorecontains = 1
implicitpattern = (<_sre.SRE_Pattern object at 0x4e722c0>, 'implicit')
include_paths = []
intentpattern = (<_sre.SRE_Pattern object at 0x4e75530>, 'intent')
intrisicpattern = (<_sre.SRE_Pattern object at 0x4e77690>, 'intrisic')
invbadnames = {'_i_bn': '_i', 'auto_bn': 'auto', 'break_bn': 'break', 'case_bn': 'case', 'char_bn': 'char', 'complex_double_bn': 'complex_double', 'const_bn': 'const', 'continue_bn': 'continue', 'default_bn': 'default', 'delete_bn': 'delete', ...}
isintent_dict = {<function isoptional at 0x4f47b18>: 'OPTIONAL', <function isintent_in at 0x4f47c80>: 'INTENT_IN', <function isintent_inout at 0x4f47cf8>: 'INTENT_INOUT', <function isintent_out at 0x4f47d70>: 'INTENT_OUT', <function isintent_hide at 0x4f47de8>: 'INTENT_HIDE', <function isintent_c at 0x4f47ed8>: 'INTENT_C', <function isintent_cache at 0x4f47f50>: 'INTENT_CACHE', <function isintent_inplace at 0x4f481b8>: 'INTENT_INPLACE'}
kindselector = <_sre.SRE_Pattern object at 0x4e7b770>
lenarraypattern = <_sre.SRE_Pattern object at 0x4e7eaf0>
lenkindpattern = <_sre.SRE_Pattern object at 0x4e7cf60>
multilinepattern = (<_sre.SRE_Pattern object at 0x4e55610>, 'multiline')
n = 'default'
nameargspattern = <_sre.SRE_Pattern object at 0x4e7a0d0>
namepattern = <_sre.SRE_Pattern object at 0x4e7b150>
neededmodule = -1
onlyfuncs = []
optionalpattern = (<_sre.SRE_Pattern object at 0x4e743b0>, 'optional')
options = {}
parameterpattern = (<_sre.SRE_Pattern object at 0x4e71de0>, 'parameter')
previous_context = None
privatepattern = (<_sre.SRE_Pattern object at 0x4e77420>, 'private')
publicpattern = (<_sre.SRE_Pattern object at 0x4e730f0>, 'public')
pyffilename = ''
quiet = 0
real16pattern = <_sre.SRE_Pattern object at 0x4e79d80>
real8pattern = <_sre.SRE_Pattern object at 0x4e79980>
requiredpattern = (<_sre.SRE_Pattern object at 0x4e71b60>, 'required')
selectpattern = <_sre.SRE_Pattern object at 0x4e78b70>
skipblocksuntil = -1
skipemptyends = 0
skipfuncs = []
skipfunctions = []
sourcecodeform = 'fix'
strictf77 = 1
subroutinepattern = (<_sre.SRE_Pattern object at 0x4e749b0>, 'begin')
tabchar = ' '
typespattern = (<_sre.SRE_Pattern object at 0x4e73360>, 'type')
typespattern4implicit = <_sre.SRE_Pattern object at 0x4e72540>
usepattern = (<_sre.SRE_Pattern object at 0x4e79280>, 'use')
usermodules = []
verbose = 1
word_pattern = <_sre.SRE_Pattern object at 0x4fc9350>
wrapfuncs = 1