Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 Fluke 1/4/84; site fluke.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!cornell!uw-beaver!ssc-vax!fluke!kurt From: kurt@fluke.UUCP (Kurt Guntheroth) Newsgroups: net.lang Subject: Re: Parsers for small micros (8-bits) Message-ID: <1047@vax2.fluke.UUCP> Date: Tue, 5-Jun-84 11:52:08 EDT Article-I.D.: vax2.1047 Posted: Tue Jun 5 11:52:08 1984 Date-Received: Thu, 7-Jun-84 08:28:54 EDT References: <221@west44.UUCP> Organization: John Fluke Mfg. Co., Everett, WA Lines: 21 ----- I wrote a compiler using an LR parser on a miserable little microcomputer a few years ago. I generated LR tables by hand and added them to the machine code parser. 1. It is possible to construct a working compiler in this way. In fact, I had pretty good results, especially nice was the fact that I could do things on shift as well as reduce operations. I could also take extra shortcuts you couldn't take if you weren't intimately involved in the tables. 2. I would never do it again. It is quite easy to miss a transition when building the LR tables. Then you get occaisional statement forms that can't be parsed. What a hassle. 3. If I had to do it again, I'd run yacc (or some such) and get a list of the LR(0) states, then hand craft the tables. -- Kurt Guntheroth John Fluke Mfg. Co., Inc. {uw-beaver,decvax!microsof,ucbvax!lbl-csam,allegra,ssc-vax}!fluke!kurt