[antlr-interest] Looking for a fortran grammar for antlr 3.0

Kevin J. Cummings cummings at kjchome.homeip.net
Fri Nov 16 16:07:44 PST 2007


Mathew Yeates wrote:
> Hi
> Has anybody got this? There is a Fortran grammar floating around but it
> is for Antlr 2. How difficult is it to update an existing Antlr 2
> grammar (for a beginner)?

For which incarnation of FORTRAN?  I've seen some example grammars in
the PCCTS stuff (ANTLR 1), but if you need specific ANSI release
support, you may have to role your own or at least extend it.  My
company at the time (10+ years ago) was working on both an F77 and an
F90(?) grammar, but it is lost to the free world, buried under
copyrights and inherited by the company that bought out Peritus Software
Services.  FORTRAN also has some unique parsing requirements depending
on whether you are parsing the columized language or the free form
language, so that you can separate embedded keywords from run-on
identifiers.

> Mathew

-- 
Kevin J. Cummings
kjchome at rcn.com
cummings at kjchome.homeip.net
cummings at kjc386.framingham.ma.us
Registered Linux User #1232 (http://counter.li.org)


More information about the antlr-interest mailing list