help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fortran


From: John R. Levine
Subject: Re: Fortran
Date: 17 Feb 2003 23:19:12 -0500

>>I don't want to loose time to develop this project, so I'm asking to you if
>>you know there is a pseudo-grammar for Fortran or other references can help
>>me!
>
>You might try the Usenet newsgroup comp.compilers and its FAQ which is
>published regularly in that newsgroup.

Yes indeed, it tells you where to find my Fortran 77 subset parser.
The parser is written in yacc and is pretty straightforward.  The
lexer is written in C, and is pretty gross.

Lexing Fortran isn't very hard once you realize that you have to make a prepass 
over
each statement to figure out whether it's an assignment or something else.  
Once you
know that, the token boundaries are easy to find, but flex is definitely the 
wrong
tool for the job.

Regards,
John Levine, comp.compilers moderator, 
address@hidden, http://compilers.iecc.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]