Re: Writing a compiler

Manuel Collado <m.collado@lml.ls.fi.upm.es>
Fri, 24 Oct 2008 15:28:26 +0200

          From comp.compilers

Related articles
Writing a compiler andresjriofrio@gmail.com (andresj) (2008-10-20)
Re: Writing a compiler DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-10-23)
Re: Writing a compiler ademakov@gmail.com (Aleksey Demakov) (2008-10-23)
Re: Writing a compiler torbenm@pc-003.diku.dk (2008-10-23)
Re: Writing a compiler Juergen.Kahrs@vr-web.de (=?ISO-8859-1?Q?J=FCrgen_Kahrs?=) (2008-10-23)
Re: Writing a compiler m.collado@lml.ls.fi.upm.es (Manuel Collado) (2008-10-24)
Re: Writing a compiler Ibeam2000@gmail.com (Nick) (2008-10-26)
Re: Writing a compiler rajaram.officemails@gmail.com (RR) (2008-10-26)
Re: Writing a compiler andresjriofrio@gmail.com (andresj) (2008-10-29)
Re: Writing a compiler kamalpr@hp.com (kamal) (2008-10-29)
Re: Writing a compiler tony@my.net (Tony) (2008-10-31)
Re: Writing a compiler lkrupp@pssw.nospam.com.invalid (Louis Krupp) (2008-11-01)
[14 later articles]
| List of all articles for this month |
From: Manuel Collado <m.collado@lml.ls.fi.upm.es>
Newsgroups: comp.compilers
Date: Fri, 24 Oct 2008 15:28:26 +0200
Organization: Compilers Central
References: 08-10-037
Keywords: design
Posted-Date: 25 Oct 2008 06:37:33 EDT

andresj escribis:
> Hello, I am designing a programming language that will run natively.
> That is to say, it will run like C, without a need of an interpreter
> nor a standard library (well, there will be, but I want to be able to
> write an operating system, too.)
>
> The language parsing (converting a=b into <assignment><variable
> name="a"/><variable name="b"/></assignment>---which is not necessarily
> correct, anyways) I will skip for now; I will write directly in XML
> and use a XML parser to get a tree of my program.
>
> * I need help in finding an appropiate way of structuring my XML. Any
> ideas/links?


There are several projects/tools that use XML to represent the AST.
Please look at:


      http://lml.ls.fi.upm.es/~mcollado/emu-code/emu-code-other.html


>
> The next part is where I need more help in: how to convert this tree
> into assembly language.


Just use XSLT to generate the assembler code.


>
> * Is there any documentation on this part of writing a compiler?


Look at the code generation chapters in any good compiler textbook.


--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado



Post a followup to this message

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