Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!apple!oliveb!mintaka!think!kulla!barmar From: barmar@kulla (Barry Margolin) Newsgroups: comp.object Subject: Re: OOD applied to interpreters and compilers Message-ID: <30726@news.Think.COM> Date: 2 Oct 89 22:08:44 GMT References: <26873@genrad.UUCP> <4514@internal.Apple.COM> Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 23 In article <4514@internal.Apple.COM> Piersol@apple.com (Kurt Piersol) writes: >In article <26873@genrad.UUCP> charlie@genrad.com (Charlie D. Havener) >writes: >> It is not at all clear to me how to apply OOD or to use Object >> oriented programming style to the design of program language >> compilers or interpreters. >Consider the concept of a token object, which has language specific >contents but language independent properties. In fact, I believe that Symbolics's "conventional language" compilers for their Lisp Machines are heavily object oriented. I haven't seen much of their source code, but I've been in the debugger while using their C and Fortran compilers, and I've seen lots of objects that represent tokens, expressions, statements, types, etc. It seems like OOP would be a good foundation for building universal compilers, where different front and back ends can be plugged in. It should be more elegant than defining a universal intermediate representation. Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar