Related articles |
---|
Object-oriented compiler construction: ideas? op@esec.ch (Oliver Plohmann) (1996-06-01) |
Re: Object-oriented compiler construction: ideas? Malcolm_Crowe@msn.com (Malcolm Crowe) (1996-06-08) |
Re: Object-oriented compiler construction: ideas? Arthur.Chance@Smallworld.co.uk (1996-06-08) |
Re: Object-oriented compiler construction: ideas? dotw@centauri.cadre.nl (1996-06-08) |
Re: Object-oriented compiler construction: ideas? bnm@indica.bbt.com (1996-06-08) |
Re: Object-oriented compiler construction: ideas? nick@an-teallach.com (Nick Rothwell) (1996-06-08) |
Re: Object-oriented compiler construction: ideas? darius@phidani.be (Darius Blasbans) (1996-06-08) |
[17 later articles] |
From: | Oliver Plohmann <op@esec.ch> |
Newsgroups: | comp.compilers |
Date: | 1 Jun 1996 23:24:58 -0400 |
Organization: | ESEC SA |
Keywords: | OOP, question, comment |
Hello,
When I first looked into a book about compilers I saw a parse tree with
integers representing the respective keyword. I thought you could
alternatively make up the parse tree of objects, like Statement,
ConditionalBlock, Loop, etc. A ConditionalBlock would contain the
condition and the respective code to be executed. Then you could put the
knowledge of how the assembler code would look like for
aConditionalBlock into that class. Same with the other classes to
distribute responsabilities among objects to reduce complexity. This
would also greatly reduce the amount of case switches.
Then I thought that kind of parser would require much more memory than
with the traditional approach and much more function calls would have to
be made to build the tree. At the end, only the performance of the
compiler counts and this approach would make everything slow. So I
forgot about the idea.
Now I saw in the Design Pattern book from Gamma, Helm and those guys the
description of the Facade pattern. It does exactly what I described
here. So this idea keeps my brain busy again.
Does anybody know whether that kind of techiques are being applied
meanwhile? Wat do you think about it? Bogus or not ?
Regards, Olli
_______________________________________________
Oliver Plohmann +41 41 749 56 52
Software Engineer op@al.esec.ch
Autoline
ESEC SA, Cham, Switzerland
[This is syntax directed translation, an idea that dates back to the 1960s.
-John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.