MEGMS logo - go to the home page
  1. Home

    1. MEGS_Log

    2. CoalLog tools

    3. Fortran Tools

      1. FF08Depends

      2. FF08Diff

      3. FF08FixedFormForEver

      4. FF08Obfuscate

      5. Internal test utilities

      6. aniso_varying_string

      7. Direct2D API bindings

      8. Fortran shared pointers

    4. Contact Us

  2. Site map

"Let's model me a mine"


Mining & Exploration Geological Modelling Services

Previous topic Parent topic Home topic Next topic

Miscellaneous FF08 test utilities

The following test utilities exercise various parts of the Fortran source code parsing library.

All of the tools are written in Fortran 2003. Intel Fortran 17.0 beta is the compiler used for development.

As these are considered internal tools, they may change radically in behaviour as they are revised.


Lists the constructs, and the statements inside those constructs, that are in a Fortran source file.

BuildTreeTest [options] source-file

Command line options:

Sets the ensure unique flag in the top level node of the tree prior to construction. This should ensure that the names for the child members of a particular node are unique (e.g. - no duplicately named module procedures in a particular module).
Carries out additional checks of tree correctness according to the syntax rules.

Statement classification considers the nested stack of constructs (the statement "tree" that is being built). Some statements, such as stmt-function-stmts, that require additional semantic information may still be classified incorrectly.

The source is available from


Lists all the syntax terms that are in a Fortran source file.

ParserTest [options] source-files...

Command line options:

--console[: form]
Reads input source from the console, after processing any other files specified on the command line. The argument to the option specifies the source form - free (the default if not specified) for free form source, fixed for fixed form.
Carries out additional checks of parse node correctness according to the syntax rules.

Parsing does not consider the semantics of the source, and only considers very limited information across statements. stmt-function-stmts may still be classified incorrectly.

The source is available from


Describes all the identifiers that are present in a Fortran source file.

AdvertiseTest [options] source-files...

Command line options:

--list[:] file
Specify a list file - each record from the given file will be added (in addition to any source files provided on the command line) to the list of source files to be processed. May be specified multiple times.
Collects and displays identifier information in a statement by statement tree form. If not specified, then identifier information is accumulated to a scope.

The entity description is limited to the use and attributes of the entity within a particular scope. It does not consider host or use association.

The source is available from


A proof of concept tool to list identifiers that appear in syntax that is known (within the limitations of parsing) to be a variable definition context.

VariableDefinitionContext [options] source-files...

Command line options:

Only lists identifers that are both considered to be in a variable definition context and that appear to be dummy arguments.

The assessment of whether an identifier is a dummy argument and/or in a variable definition context only considers information available within a particular statement. The full semantics of the source are not analysed, some variable definition contexts are not reported (particularly those where an actual argument is associated with an INTENT(INOUT) or INTENT(OUT) dummy argument) and some variables may be reported as dummy arguments when they are not.

The source is available from


Questions, queries and quibbles can be sent to