Hand written or tool generated lexical analyzers for FORTRAN

"Pankaj" <pankaj.jangid@gmail.com>
14 Sep 2005 21:22:33 -0400

          From comp.compilers

Related articles
Hand written or tool generated lexical analyzers for FORTRAN pankaj.jangid@gmail.com (Pankaj) (2005-09-14)
Re: Hand written or tool generated lexical analyzers for FORTRAN gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-09-15)
Re: Hand written or tool generated lexical analyzers for FORTRAN fjscipio@rochester.rr.com (Fred J. Scipione) (2005-09-17)
Re: Hand written or tool generated lexical analyzers for FORTRAN gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-09-18)
Re: Hand written or tool generated lexical analyzers for FORTRAN pankaj.jangid@gmail.com (Pankaj) (2005-09-27)
Re: C scanners, was Hand written or tool generated lexical analyzers f rsc@swtch.com (Russ Cox) (2005-09-30)
Re: C scanners, was Hand written or tool generated lexical analyzers f nmm1@cus.cam.ac.uk (2005-10-02)
[1 later articles]
| List of all articles for this month |
From: "Pankaj" <pankaj.jangid@gmail.com>
Newsgroups: comp.compilers
Date: 14 Sep 2005 21:22:33 -0400
Organization: http://groups.google.com
Keywords: lex, Fortran
Posted-Date: 14 Sep 2005 21:22:33 EDT

Gone through load of archives and found that most of the people still
prefer to write hand written lexical analyzers when it comes to
writing a lexers for FORTRAN language.


But I still feel that a tool to generate a lexical analyzer for
FORTRAN would be a good idea. It will enable us to maintain the code
in the long run.


While designing a parser for a language, the designer should only be
required to concentrate on the grammar of the lanuage and other
aspects should be filtered at the lexical analysis level.


Some of the post and other resource write about antlr(PCCTS),
eli-project. Are they capable of generating efficient lexical
analyzers without any help of hand written code. Some people have
written FORTRAN lexers using lex with the help of some hand written C
functions.


I have still not finalized the approach. Hence posting this to collect
the point of views of all experts before going forward.


Please post your valuable comments.


-PJ
[I don't see the point. The only language with a lexical structure
like Fortran is Fortran, so once you have a Fortran lexer, you're
done. Having written a Fortran lexer, I can report that it's not
particularly hard, but it's quite context sensitive, particularly
if you want to handle old programs where blanks don't matter, so
you need some way to feed back info from the parser. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.