Is Fortran90 LL(1)?

Christian Rutzinger <rutzinger@takefive.co.at>
4 Apr 1996 00:21:48 -0500

          From comp.compilers

Related articles
Is Fortran90 LL(1)? rutzinger@takefive.co.at (Christian Rutzinger) (1996-04-04)
Re: Is Fortran90 LL(1)? mjohnson@samson.tx.hac.com (1996-04-08)
Is Fortran90 LL(1)? dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-04-08)
Re: Is Fortran90 LL(1)? dlmoore@ix.netcom.com (1996-04-16)
Re: Is Fortran90 LL(1)? Robert.Corbett@Eng.Sun.COM (1996-04-18)
| List of all articles for this month |

From: Christian Rutzinger <rutzinger@takefive.co.at>
Newsgroups: comp.compilers
Date: 4 Apr 1996 00:21:48 -0500
Organization: TakeFive Software, Salzburg, Austria
Keywords: Fortran, parse, question

I want to write a Recursive Descent Parser for Fortran90.


After taking a look on the Fortran90 Standard, I recognized at least
one problem. The Fortran code can start with a program statement or a
function (subroutine) statement. As both can begin with "INTEGER",
"TYPE", "REAL", "DOUBLE" etc. (when you do not write the "PROGRAM"
keyword in the program statement) there is an LL(1) conflict.


Am I wrong, or is (Standard) Fortran90 really a not LL(1) language?


If it is LL(1), can anybody tell me how to write the grammar?


Best Regards


    Christian Rutzinger
[Fortran predates all that wussy theory-based parsing. If you want to be
backwards compatible with F77 and F66, you can't even use spaces to tell
where the token boundaries are. -John]


--


Post a followup to this message

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