Re: Can XSL be used for code generation in Compilers?

Subject: Re: Can XSL be used for code generation in Compilers?
From: Keith Visco <kvisco@xxxxxxxxx>
Date: Fri, 25 Jun 1999 14:46:09 -0400
You could probably represent your abstract syntax trees using XML, but
you would probably want to deal with the DOM directly to generate any
machine dependant code.

--Keith

Chuck Robey wrote:
> 
> On Fri, 25 Jun 1999, Niclas Hedhman wrote:
> 
> >
> > NO. Firstly, you can not represent the intermediary code of a 'any' compiler as a
> > XML document, but you can write a compiler that uses XML to represent the
> > intermediary code. If the XML structure is VERY carefully designed, it would
> > probably be possible to write XSL stylesheets to generate a CPU/Plattform specific
> > result tree, that a _specialized_ formatter would output to either Assembler text
> > or machine code.
> >
> > But to me it sounds like crossing the river to get water...
> 
> And besides, can you imagine the speed?  It would only take three days
> to compile "hello world".  Many modern optimizations would simply be
> impossible to code.
> 
> >
> > Niclas
> >
> > S Manimaran wrote:
> >
> > > Hi,
> > >         If we can represent the intermediate code during a compiler pass
> > > as a XML document, can then XSL be used to generate assembly code? i.e Is
> > > it possible to write a XSL stylesheet for each machine architecture
> > > (Pentium, SPARC etc.,) so that the assembly code for each of this
> > > architecture is generated as the output when the intermediate code
> > > converted to XML document is given as input to a XSL engine ?
> > >
> > > Thanks,
> > > -S.Manimaran,
> > >
> > > -------------------------------------------------------------------------------
> > > URL::http://www2.csa.iisc.ernet.in/~mani/
> > > Indian Internet Chess Server IICS::telnet 144.16.67.53 5000
> > > Join frenchlist by sending a mail to french@xxxxxxxxxxxxxxxxx
> > > f16    Fingerprint16 = EC FF 4D 6C 3A 09 84 30  AA B5 F0 A2 38 A0 4C A4
> > >
> > >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> >
> >
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> >
> 
> ----------------------------+-----------------------------------------------
> Chuck Robey                 | Interests include any kind of voice or data
> chuckr@xxxxxxxxxxxxxx       | communications topic, C programming, and Unix.
> 213 Lakeside Drive Apt T-1  |
> Greenbelt, MD 20770         | I run picnic and jaunt, both FreeBSD-current.
> (301) 220-2114              |
> ----------------------------+-----------------------------------------------
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread