Re: Yacc poll

pase@ogcvax.UUCP (Douglas M. Pase)
4 Aug 87 20:22:57 GMT

          From comp.compilers

Related articles
Re: Yacc poll decvax!utzoo!henry (1987-08-06)
Re: Yacc poll pase@ogcvax.UUCP (1987-08-04)
Re: Yacc poll steve@hubcap.clemson.edu (1987-08-11)
Re: Yacc poll ihnp4!m10ux!mncm000) (1987-08-14)
Re: Yacc poll malcolm@keilir.UUCP (1987-08-14)
Re: Yacc poll jbn@glacier.STANFORD.EDU (1987-08-16)
Re: Yacc poll decvax!utzoo!henry (1987-08-17)
Re: Yacc poll harvard!seismo!sun!tekchips!stevev (Steve Vegdahl) (1987-08-17)
[1 later articles]
| List of all articles for this month |

From: pase@ogcvax.UUCP (Douglas M. Pase)
Date: 4 Aug 87 20:22:57 GMT
References: <ima.634>
Organization: Oregon Graduate Center, Beaverton, OR

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
--


Post a followup to this message

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