|Is Fortran90 LL(1)? firstname.lastname@example.org (Christian Rutzinger) (1996-04-04)|
|Re: Is Fortran90 LL(1)? email@example.com (1996-04-08)|
|Is Fortran90 LL(1)? firstname.lastname@example.org (Dave Lloyd) (1996-04-08)|
|Re: Is Fortran90 LL(1)? email@example.com (1996-04-16)|
|Re: Is Fortran90 LL(1)? Robert.Corbett@Eng.Sun.COM (1996-04-18)|
|From:||Christian Rutzinger <firstname.lastname@example.org>|
|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?
[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]
Return to the
Search the comp.compilers archives again.