Re: Intermediate compiler output format

kamalp@acm.org (Kamal R. Prasad)
23 Aug 2004 12:06:26 -0400

          From comp.compilers

Related articles
Intermediate compiler output format cdiggins@videotron.ca (christopher diggins) (2004-08-15)
Re: Intermediate compiler output format cdc@maxnet.co.nz (Carl Cerecke) (2004-08-23)
Re: Intermediate compiler output format kamalp@acm.org (2004-08-23)
Re: Intermediate compiler output format nick.roberts@acm.org (Nick Roberts) (2004-08-23)
Re: Intermediate compiler output format csy1032@nitc.ac.in (2004-08-23)
Re: Intermediate compiler output format cdiggins@videotron.ca (christopher diggins) (2004-08-25)
Re: Intermediate compiler output format cdiggins@videotron.ca (christopher diggins) (2004-08-25)
| List of all articles for this month |

From: kamalp@acm.org (Kamal R. Prasad)
Newsgroups: comp.compilers
Date: 23 Aug 2004 12:06:26 -0400
Organization: http://groups.google.com
References: 04-08-100
Keywords: code, C
Posted-Date: 23 Aug 2004 12:06:26 EDT

"christopher diggins" <cdiggins@videotron.ca> wrote in message news:04-08-100...
> I was wondering if there are any particularly well-known or
> standardized formats for compilers that anyone could point me to. I am


Yes -there are, depending on the back-end you want to merge your
front-end with.


> currently designing an XML DTD for my Heron compiler output and I want
> to make sure I am not reinventing the wheel. Ideally the output format
> should be type checked, platofrm independant and relatively easily
> translated to languages like C or assembly. I am planning on
> performing optimizations on this output.
>
> TIA


C is a high-level language and assembly is a low-level language. When
you write a compiler, you want to write a front-end that takes in the
HLL as input and produce an inter-mediate output (3-address form),
which is then taken by the back-end to produce machine code. So, if
the target hw changes -you just plug in a different back-end to
adheres to the same protocol i.e i/m code format. If the objective is
to translate from HLL1 to HLL2, then you may want to adopt a different
strategy that does not generate inter-mediate code. Or maybe your
question isn't clear on why you need i/m code when translating from
XML/Heron to C.


regards
-kamal


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.