# 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 re
import string
import copy
import logging
import os
import sys
from f90wrap import fortran as ft

            if not is_sub:
                ret_name = sub.ret_val.name
                if ret_name.lower() == node.name.lower() or ret_name.lower() == sub.name.lower():
                    ret_name = ret_name[0].lower() + str(node.procedures.index(sub) + 1)
                self.print_line('>    ' + ret_name + ' = ' + node.name + argl)
            else:
                self.print_line('>    call ' + node.name + argl)
                #        self.print_line(r'\end{boxedminipage}'+'\n\n')


        for a in node.doc:
            self.print_line(a)

        for sub in node.procedures:
            for a in sub.doc:
                self.print_line(a)
            self.print_line('\n\n')

        got_args = (is_sub and sum([len(x.arguments) for x in node.procedures]) != 0) or not is_sub

        func_args = []
        if got_args:
            self.print_line(r'\begin{description}')


            arg_dict = {}
            i = 0  # counter for appearance order of args
            for sub in node.procedures:
                for a in sub.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/latex.py
import re
import string
import copy
import logging
import os
import sys
from f90wrap import fortran as ft


            if not is_sub:
                ret_name = sub.ret_val.name
                if ret_name.lower() == node.name.lower() or ret_name.lower() == sub.name.lower():
                    ret_name = ret_name[0].lower() + str(node.procedures.index(sub) + 1)
                self.print_line('>    ' + ret_name + ' = ' + node.name + argl)
            else:
                self.print_line('>    call ' + node.name + argl)
                #        self.print_line(r'\end{boxedminipage}'+'\n\n')


        for a in node.doc:
            self.print_line(a)

        for sub in node.procedures:
            for a in sub.doc:
                self.print_line(a)
            self.print_line('\n\n')

        got_args = (is_sub and sum([len(x.arguments) for x in node.procedures]) != 0) or not is_sub

        func_args = []
        if got_args:
            self.print_line(r'\begin{description}')


            arg_dict = {}
            i = 0  # counter for appearance order of args
            for sub in node.procedures:
                for a in sub.arguments:

                    if isinstance(a, ft.Subroutine) or isinstance(a, Function):