Introduction

The fparser package is a Python implementation of a Fortran 66/77/90/95/2003/2008 language parser. The code is available on the Python Package Index (https://pypi.python.org/pypi/fparser) or from github (https://github.com/stfc/fparser). The fparser project currently includes two different implementations; the first, “fparser1”, supports Fortran 66/77/90 (plus some extensions — see fparser) but only parses down to the level of individual lines of code, i.e. not the content of the Fortran expressions themselves. The second implementation, “fparser2”, additionally has support for Fortran 2003 and some Fortran 2008 (see fparser2) and is able to fully parse Fortran code.

The use of fparser2 is strongly recommended as support for fparser1 has now ceased and it will be removed in a future version of the fparser project.

The Fortran language syntax rules for Fortran2003 are implemented in Fortran2003.py, with the rules being taken from the following ISO/IEC 1539 document: https://wg5-fortran.org/N1601-N1650/N1601.pdf

The additional Fortran language syntax rules for Fortran2008 are implemented in Fortran2008.py, with the rules being taken from the following document: https://j3-fortran.org/doc/year/10/10-007r1.pdf

This code was originally developed by Pearu Peterson as part of the f2py project (https://github.com/pearu/f2py). The fparser package is used in the PSyclone (https://github.com/stfc/PSyclone) and Habakkuk (https://github.com/arporter/habakkuk) tools. If you make use of fparser and want your project added to this list, please let the developers know.

For a full list of the contributors please see the CHANGELOG.md file in the root directory.