Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site myrias.UUCP Path: utzoo!utcsri!ubc-vision!alberta!myrias!cg From: cg@myrias.UUCP (Chris Gray) Newsgroups: net.micro.amiga Subject: Recursive descent compilers (from Re: Amiga OS) Message-ID: <215@myrias.UUCP> Date: Mon, 3-Feb-86 12:28:38 EST Article-I.D.: myrias.215 Posted: Mon Feb 3 12:28:38 1986 Date-Received: Mon, 3-Feb-86 17:04:50 EST References: <1133@caip.RUTGERS.EDU> Organization: Myrias Research, Edmonton Lines: 36 (This really ought to be in mod.compilers, but for now I'll just leave it in net.micro.amiga.) NOW HOLD ON THERE!!! Mike Meyer, while sort of flaming Matt Dillon's sort of flaming of the Amiga's OS, says: "Anybody silly enough to write a recursive descent compiler..." Mike: have you ever written a recursive descent compiler? I've written four. All have error handling quite superior to any UNIX C compiler I've seen. All do quite reasonable jobs of code generation. All run quite quickly. As an example, my Draco compiler (I invented the language, so don't worry about what it is), is written in itself using recursive descent. The compiler is one-pass (reads input source, does conditional compilation, writes out optimized machine code (NOT assembler source)), and can compile at between 1000 and 1500 lines per minute on an 8 MHz 8085 using one SSDD 8" floppy disk. The language has everything C has (except bit fields and macros) plus quite a bit more (proper type checking, overlaying of variables, typed constants, procedure prototypes, procedures at absolute addresses, etc.). The compiler produces code that is within one or two percent of anything I've seen claimed for any 8080/Z80 compiler for any language. So - why is it that it's silly to write recursive descent compilers? I'm just dying to know what I've been missing all these years. (By the way, I've watched people using things like yacc for projects - great fun!! One friend was writing an interpreted language for UNIX - he tried yacc for a while but soon switched to recursive descent after a quick demonstration of how it goes.) P.S. for anyone interested - I plan to port Draco to my Amiga, but I'm working full time, and am writing a simple game in Lattice C to learn the Amiga (and spending some time solving Hacker) so it'll be a while. Chris Gray {sask,ubc-vision,ihnp4}!alberta!myrias!cg