Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!ima!johnl From: pase@ogcvax.UUCP (Douglas M. Pase) Newsgroups: comp.compilers Subject: Re: Yacc poll Message-ID: <1375@ogcvax.UUCP> Date: Tue, 4-Aug-87 16:22:57 EDT Article-I.D.: ogcvax.1375 Posted: Tue Aug 4 16:22:57 1987 Date-Received: Thu, 13-Aug-87 02:37:26 EDT References: Sender: johnl@ima.ISC.COM Reply-To: pase@ogcvax.UUCP (Douglas M. Pase) Organization: Oregon Graduate Center, Beaverton, OR Lines: 36 Approved: compilers@ima.UUCP Sometime back I was given the assignment to write a compiler for an in-house functional language which was to be used for numerical processing. Once I had a rough description of the language, I trotted off to my trusty vax and whipped out a recursive descent parser in `C'. It took me approximately 5 weeks (partly because details of the language were still fluid and I was unfamiliar with the VMS environment). Just about the time I was putting the finishing touches on the parser a mandate from Higher Up arrived which prohibited the use of `C' (or any tool which smelled of Unix). The Officially Blessed Language was Modula-2, it being a "more advanced" and "higher level" language. Back I went to the drawing board, scrapping most of what I had done. The parser this time took over seven months, of which two were spent learning Modula-2. It ran much slower, and used 5-10 times as much memory. About two months before I finished this I bought a small Unix box a (Fortune 32:16 with a 60Mb disk) with Yacc, Lex, and the gang all on board. I thought that for fun I would see what effort was required to build a parser using the available tools. The parser was completed in four evenings (about 3-4 hours each). (All three parsers were for the same language, but the language was at a different stage of development for each parser.) Part of the problem was the fluidity of the language design. Every new token meant 3 days worth of messing around with the transition tables. Then people had to dink around with the grammar (not as painful to change, but still not pleasant). Another problem was the low quality of Modula-2 compiler we were forced (at gunpoint) to use. However, all things considered the LR parser was by far the easiest, with the `C' recursive descent parser a not too distant second, and the Modula-2 R.D. parser being a very distant third. -- Doug Pase -- ...ucbvax!tektronix!ogcvax!pase or pase@Oregon-Grad.csnet -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.ARPA Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | cca}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request