Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.41 KB

README.org

File metadata and controls

41 lines (31 loc) · 1.41 KB

About

fortran-linter is a utility program to analyze Fortran 77 legacy code. We sure have a lot of those lying around.

License

MIT

Running the program

From the root folder, run

python -m linter.fortran analyze sample.f

for an analysis of label and variable usage in a sample legacy source file. See documentation for a list of other tasks linter.fortran can perform.

Automated testing

Run make test from the root folder.

Documentation

HTML documentation can be generated by running make -C docs html from the root folder (requires Sphinx).

Prior art

Fortran grammar

I found an EBNF (Extended Backus–Naur form) of the Fortran 77 grammar here. So far it seems to comply well with the official standard.

Parser combinators

This approach of parser construction combines parsers for sub-expressions into a parser for expressions containing them with a set of gluing operations. This implementation takes inspirations from:

Parsec

The original Haskell implementation.

parsec

He Tao’s implementation of Parsec.

pysec

Another approach with some interesting ideas.