# Path: f90wrap/fortran.py
# def _rep_des(doc, string):
#     def __init__(self, name='', filename='', doc=None,
#                  lineno=0):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __neq__(self, other):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  programs=None, modules=None, procedures=None):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  procedures=None, uses=None):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  types=None, elements=None, procedures=None,
#                  interfaces=None, uses=None, default_access='public',
#                  public_symbols=None, private_symbols=None):
#     def __hash__(self):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  arguments=None, uses=None, attributes=None,
#                  mod_name=None, type_name=None):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  arguments=None, uses=None, attributes=None,
#                  ret_val=None, ret_val_doc=None, mod_name=None, type_name=None):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  attributes=None, type='', value=''):
#     def __init__(self, name='', filename='', doc=None,
#                  lineno=0, elements=None, procedures=None, bindings=None, interfaces=None,
#                  mod_name=None):
#     def __init__(self, name='', filename='', doc=None,
#                  lineno=0, procedures=None, attributes=None, mod_name=None, type_name=None):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  type=None, attributes=None, procedures=None, mod_name=None, type_name=None):
# def iter_fields(node):
# def iter_child_nodes(node):
# def walk(node):
# def walk_modules(node):
# def find_procedure_module(tree, node):
# def walk_procedures(tree, include_ret_val=True):
# def find(tree, pattern):
#     def visit(self, node):
#     def generic_visit(self, node):
#     def generic_visit(self, node):
#     def __init__(self):
#     def generic_visit(self, node):
# def dump(node):
# def find_source(node):
# def print_source(node, out=None):
# def find_types(tree, skipped_types=None):
# def fix_argument_attributes(node):
#     def visit_Program(self, node):
#     def visit_Module(self, node):
#     def visit_Procedure(self, node):
#     def visit_Interface(self, node):
#     def visit_Binding(self, node):
#     def visit_Type(self, node):
#     def visit_Declaration(self, node):
#     def visit_Element(self, node):
#     def visit_Module(self, node):
# def strip_type(t):
#     def __init__(self):
#     def visit_Module(self, mod):
#     def visit(self, node):
#     def __init__(self):
#     def visit_Module(self, mod):
#     def visit(self, node):
# def remove_private_symbols(node):
# def derived_typename(typename):
# def is_derived_type(typename):
# def split_type_kind(typename):
# def f2c_type(typename, kind_map):
# def normalise_type(typename, kind_map):
# def fortran_array_type(typename, kind_map):
# def f2py_type(type, attributes=None):
# class Fortran(object):
# class Root(Fortran):
# class Program(Fortran):
# class Module(Fortran):
# class Procedure(Fortran):
# class Subroutine(Procedure):
# class Function(Procedure):
# class Prototype(Fortran):
# class Declaration(Fortran):
# class Element(Declaration):
# class Argument(Declaration):
# class Type(Fortran):
# class Interface(Fortran):
# class Binding(Fortran):
# class FortranVisitor(object):
# class FortranTransformer(FortranVisitor):
# class FortranTreeDumper(FortranVisitor):
# class LowerCaseConverter(FortranTransformer):
# class RepeatedInterfaceCollapser(FortranTransformer):
# class AccessUpdater(FortranTransformer):
# class PrivateSymbolsRemover(FortranTransformer):


import copy
import logging
import re
        import keyword
        import numpy.f2py.crackfortran
from f90wrap import fortran as ft
    from itertools import chain
    from itertools import chain

    def visit_Binding(self, node):
        # Remove unwrapable procedures from bindings
        new_procs = []
        for proc in node.procedures:
            new_proc = self.visit_Procedure(proc)
            if new_proc:
                new_procs.append(new_proc)
        node.procedures = new_procs
        if new_procs:
            return node
        else:
            return None  # Binding is empty; remove from type

    def visit_Procedure(self, node):
        # special case: keep all constructors and destructors, although
        # they may have pointer arguments
        for suff in self.constructors + self.destructors:
            if node.name.endswith(suff):
                return self.generic_visit(node)

        # don't wrap operator overloading routines
        if node.name.startswith('operator('):
            return None

        # FIXME don't wrap callback arguments
        if 'callback' in node.attributes:
            return None

        args = node.arguments[:]

# Path: f90wrap/fortran.py
# def _rep_des(doc, string):
#     def __init__(self, name='', filename='', doc=None,
#                  lineno=0):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __neq__(self, other):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  programs=None, modules=None, procedures=None):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  procedures=None, uses=None):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  types=None, elements=None, procedures=None,
#                  interfaces=None, uses=None, default_access='public',
#                  public_symbols=None, private_symbols=None):
#     def __hash__(self):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  arguments=None, uses=None, attributes=None,
#                  mod_name=None, type_name=None):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  arguments=None, uses=None, attributes=None,
#                  ret_val=None, ret_val_doc=None, mod_name=None, type_name=None):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  attributes=None, type='', value=''):
#     def __init__(self, name='', filename='', doc=None,
#                  lineno=0, elements=None, procedures=None, bindings=None, interfaces=None,
#                  mod_name=None):
#     def __init__(self, name='', filename='', doc=None,
#                  lineno=0, procedures=None, attributes=None, mod_name=None, type_name=None):
#     def __init__(self, name='', filename='', doc=None, lineno=0,
#                  type=None, attributes=None, procedures=None, mod_name=None, type_name=None):
# def iter_fields(node):
# def iter_child_nodes(node):
# def walk(node):
# def walk_modules(node):
# def find_procedure_module(tree, node):
# def walk_procedures(tree, include_ret_val=True):
# def find(tree, pattern):
#     def visit(self, node):
#     def generic_visit(self, node):
#     def generic_visit(self, node):
#     def __init__(self):
#     def generic_visit(self, node):
# def dump(node):
# def find_source(node):
# def print_source(node, out=None):
# def find_types(tree, skipped_types=None):
# def fix_argument_attributes(node):
#     def visit_Program(self, node):
#     def visit_Module(self, node):
#     def visit_Procedure(self, node):
#     def visit_Interface(self, node):
#     def visit_Binding(self, node):
#     def visit_Type(self, node):
#     def visit_Declaration(self, node):
#     def visit_Element(self, node):
#     def visit_Module(self, node):
# def strip_type(t):
#     def __init__(self):
#     def visit_Module(self, mod):
#     def visit(self, node):
#     def __init__(self):
#     def visit_Module(self, mod):
#     def visit(self, node):
# def remove_private_symbols(node):
# def derived_typename(typename):
# def is_derived_type(typename):
# def split_type_kind(typename):
# def f2c_type(typename, kind_map):
# def normalise_type(typename, kind_map):
# def fortran_array_type(typename, kind_map):
# def f2py_type(type, attributes=None):
# class Fortran(object):
# class Root(Fortran):
# class Program(Fortran):
# class Module(Fortran):
# class Procedure(Fortran):
# class Subroutine(Procedure):
# class Function(Procedure):
# class Prototype(Fortran):
# class Declaration(Fortran):
# class Element(Declaration):
# class Argument(Declaration):
# class Type(Fortran):
# class Interface(Fortran):
# class Binding(Fortran):
# class FortranVisitor(object):
# class FortranTransformer(FortranVisitor):
# class FortranTreeDumper(FortranVisitor):
# class LowerCaseConverter(FortranTransformer):
# class RepeatedInterfaceCollapser(FortranTransformer):
# class AccessUpdater(FortranTransformer):
# class PrivateSymbolsRemover(FortranTransformer):


# Path: f90wrap/transform.py
import copy
import logging
import re
        import keyword
        import numpy.f2py.crackfortran
from f90wrap import fortran as ft
    from itertools import chain
    from itertools import chain


    def visit_Binding(self, node):
        # Remove unwrapable procedures from bindings
        new_procs = []
        for proc in node.procedures:
            new_proc = self.visit_Procedure(proc)
            if new_proc:
                new_procs.append(new_proc)
        node.procedures = new_procs
        if new_procs:
            return node
        else:
            return None  # Binding is empty; remove from type

    def visit_Procedure(self, node):
        # special case: keep all constructors and destructors, although
        # they may have pointer arguments
        for suff in self.constructors + self.destructors:
            if node.name.endswith(suff):
                return self.generic_visit(node)

        # don't wrap operator overloading routines
        if node.name.startswith('operator('):
            return None

        # FIXME don't wrap callback arguments
        if 'callback' in node.attributes:
            return None

        args = node.arguments[:]

        if isinstance(node, ft.Function):