Path: utzoo!attcan!uunet!tank!ncar!boulder!sunybcs!rutgers!mailrus!tut.cis.ohio-state.edu!bloom-beacon!spdcc!ima!johnl From: johnl@ima.ima.isc.com (John R. Levine) Newsgroups: comp.lang.fortran Subject: Re: FORTRAN 8x parser/lexer .NE. compiler Summary: Parsing is easy, optimizing is hard Keywords: FORTRAN 8x Message-ID: <2791@ima.ima.isc.com> Date: 19 Oct 88 16:31:55 GMT References: <656@convex.UUCP> Reply-To: johnl@ima.UUCP (John R. Levine) Distribution: comp.lang.fortran Organization: Not much Lines: 27 In article <656@convex.UUCP> rowan@convex.COM (Steve Rowan) writes: >Anyone that expects the lexer and parser for any language, even FORTRAN >8x or Ada, to take more than 5% of the development time does not >understand the problem. Anyone who has taken an undergraduate compiler >course should be able to create a lexer and parser for FORTRAN 8x in six >months. ... Six months? I wrote a lexer and parser for F77 last week, for some program analysis experiments I'm doing. Parsing Fortran is, if anything, easier than parsing other languages because once you've found the token boudaries, the syntax is very simple. Tokenizing is kludgy but by the application of some well-known (to Fortran compiler writers, at least) techniques, it's no big deal. F88 syntax is doubtless more complicated, but I doubt it's an order of magnitude more complicated. Based on some experience writing INfort, an early F77 compiler, I'd say that the mandatory data analysis (common, equivalence, adjustable dimensioned arrays) would take another week or two, a simple code generator a month or two, optimized code another year or two, and correct optimized code a year after that. Don't expect to see any working F88 compilers before 1991, even if they approve the standard tomorrow. -- John R. Levine, IECC, PO Box 349, Cambridge MA 02238-0349, +1 617 492 3869 { bbn | think | decvax | harvard | yale }!ima!johnl, Levine@YALE.something Rome fell, Babylon fell, Scarsdale will have its turn. -G. B. Shaw