Related articles |
---|
XML IL acolvin@bbn.com (Alex Colvin) (2001-08-15) |
Re: XML IL jacob@jacob.remcomp.fr (jacob navia) (2001-08-17) |
Re: XML IL joachim_d@gmx.de (Joachim Durchholz) (2001-08-17) |
Re: XML IL maslen@pobox.com (Thomas Maslen) (2001-08-17) |
Re: XML IL dale@formosa.micro.lucent.com (2001-08-18) |
From: | Thomas Maslen <maslen@pobox.com> |
Newsgroups: | comp.compilers |
Date: | 17 Aug 2001 00:13:33 -0400 |
Organization: | Distributed Systems Technology CRC |
References: | 01-08-078 |
Keywords: | design |
Posted-Date: | 17 Aug 2001 00:13:33 EDT |
Alex Colvin <acolvin@bbn.com> writes:
> Has anyone tried using XML with a compiler IL?
If you were in a really silly mood, you could note that (a) compilers
involve a lot of tree-rewriting, particularly if you used e.g. a
Graham-Glanville code generator, and (b) XSLT is all about
tree-rewriting -- so you could write as much of your compiler as
possible using XSLT expressions, and have a good shot at producing the
world's most slow and bloated compiler (although heaven knows there's
stiff competition in that category).
> Besides curing cancer and squaring the circle, XML looks like it
> supports serialization (pickling)
If you're looking at serialization, rather than hand-generating DOM or
SAX code you may want to look at software that takes an XML DTD or
Schema (for your intermediate language) and generates code that
deserializes the XML and builds a tree of custom objects in memory,
and vice versa. For Java the magic buzzword is "XML Data Binding",
and there are a few contenders; I don't know the story for other
languages.
> it also looks like the XPath context patterns could be useful.
XSLT builds on XPath. (No comment about houses, sand, etc).
Thomas Maslen
maslen@pobox.com
Return to the
comp.compilers page.
Search the
comp.compilers archives again.