Related articles |
---|
code generation malal884@student.liu.se (2002-01-24) |
Re: code generation idbaxter@semdesigns.com (Ira D. Baxter) (2002-01-28) |
Re: code generation boesler@ipd.info.uni-karlsruhe.de (Boris Boesler) (2002-01-28) |
Re: code generation abate@students.cs.unibo.it (Pietro) (2002-01-28) |
Re: code generation casse@netcourrier.com (=?ISO-8859-15?q?=22Cass=E9=.Hugues@free.fr) (2002-02-06) |
code generation vri@navigator.lv (Viesturs Rikards) (2004-11-14) |
Re: code generation torbenm@diku.dk (2004-11-17) |
Code generation mcvax!ruuinf!piet@uunet.uu.net (1989-02-14) |
From: | Pietro <abate@students.cs.unibo.it> |
Newsgroups: | comp.compilers |
Date: | 28 Jan 2002 01:08:40 -0500 |
Organization: | Department of Computer Science - University of Bologna |
References: | 02-01-112 |
Keywords: | code |
Posted-Date: | 28 Jan 2002 01:08:40 EST |
Hi
malal884@student.liu.se wrote:
> We are working on our master thesis about code generation. We are
> searching for a code generation method. The method should be general
> and translate from one high level language to another high level
> language.
Just a couple of ideas since I was thinking to something similar.
You can have a look at kimwitu. It is not a meta-xxx compiler but and
advanced parser generator with a lot of handy routine to allow code
transformation. It builds a parser from a grammar and gives you a sort
of api to traverse the AST. The main problem of course is that you
have to write your grammar... It is really easy to build pretty
printer with this, but it requires more work to perform complex
transformation, expecially if the two language trees are differents.
Another way could be to write a back-end for an open source compiler
(like gcc) using it to generate high level code instead of
microcode...
If you want to be less general there is a project called openc++ that
is a kind of meta-compile for c++. It could be easy used to generate
code the way you want... If fact it has a singular approach, but it is
open source and you can pick up part of the code and use it in your
project.
You can also think of building a tool to transform your language in an
tree xml and from there transform it using xslt... in fact I don't
know if I really belive on this apporach :-)
These are just few ideas. Let me know if your are more lucky than me.
best wishes,
Pietro
--
pgp key: 1024D/8A091922 2000-10-18
Pietro Abate <abateNoMoReSpAm@students.cs.unibo.it>
Key fingerprint = 5111 D91B 5E0C 5CE6 FDA3 5EF4 6120 E18E 8A09 1922
public key avalaible via public key server at wwwkeys.eu.pgp.net
Return to the
comp.compilers page.
Search the
comp.compilers archives again.