To install this package, run in Emacs:
M-x package-install RET f90-interface-browser RET
You write (or work on) large, modern fortran code bases. These make heavy use of function overloading and generic interfaces. Your brain is too small to remember what all the specialisers are called. Therefore, your editor should help you. This is an attempt to do this for Emacs.
f90-interface-browser.el is a (simple-minded) parser of fortran that understands a little about generic interfaces and derived types.
f90-parse-interfaces-in-dir
f90-parse-all-interfaces
f90-browse-interface-specialisers
f90-find-tag-interface
find-tag
.f90-list-in-scope-vars
f90-show-type-definition
f90-file-extensions
The parser assumes you write fortran in the style espoused in Metcalf, Reid and Cohen. Particularly, variable declarations use a double colon to separate the type from the name list.
Here's an example of a derived type definition:
type foo real, allocatable, dimension(:) :: a integer, pointer :: b, c(:) type(bar) :: d end type foo
Here's a subroutine declaration:
subroutine foo(a, b) integer, intent(in) :: a real, intent(inout), dimension(:,:) :: b ... end subroutine foo
Local procedures whose names conflict with global ones will likely confuse the parser. For example:
subroutine foo(a, b) ... end subroutine foo subroutine bar(a, b) ... call subroutine foo ... contains subroutine foo ... end subroutine foo end subroutine bar
Also not handled are overloaded operators, scalar precision modifiers,
like integer(kind=c_int)
, for which the precision is just ignored, and
many other of the hairier aspects of the fortran language.
f90-interface-browser-1.1.0.20210420.234920.tar.lz | 2021-Apr-21 | 11.8 KiB |
f90-interface-browser-1.1.0.20210420.194920.tar.lz | 2021-Oct-09 | 11.9 KiB |
f90-interface-browser-1.1.0.20201127.235549.tar.lz | 2020-Dec-14 | 11.7 KiB |