|Lexical Analyzer for F77 email@example.com (1993-04-20)|
|Re: Lexical Analyzer for F77 firstname.lastname@example.org (1993-04-21)|
|From:||email@example.com (Andre Boivert)|
|Keywords:||Fortran, lex, question, comment|
|Date:||Tue, 20 Apr 1993 16:44:21 GMT|
I am looking for a lexical analyzer for Fortran 77 (!!!). I started to
write one using Lex, but it seems that it is not best way to go (is that
I heard of a program called 'fortlex' that could do the job.
If you have any sources (preferably in C), algorithms, references that
could help me, I would greatly appreciate.
[My Fortran subset parser in the compilers archives does a fairly respectable
job of tokenizing Fortran. You can't tokenize it without doing a certain
amount of parsing as well, e.g., "10e5" is a floating point number except
in the context "do 10e5 = 1,100" where it is the statement number 10 and
the variable name e5, or "do 10e5 = 1.100" where do10e5 is a variable name.
I'd say it's not as bad as it sounds, but it is. In the full F77 parser I
wrote for INfort 15 years ago there were at least 12 separate lexical kludges
like that. -John]
Return to the
Search the comp.compilers archives again.