Thursday, August 31, 2006

What is a good way to use XML to represent programs?

I started looking at classical stuff: s-expressions.
A definition can be:
The term S-expression or sexp (S stands for symbolic) refers to a convention for representing semi-structured data in human-readable textual form
So my point is: can we take XML and represent the statements of a program?
The result will be some kind of tree and the execution of the program can be simulated by rewriting the tree, step by step (for example basing the rewriting on a SOS).

I still haven't found exaclty what I was looking for, but here are some pointers to similar things:

XMLS, a simple XML parser for Common Lisp

Stackish—An XML Alternative

LISP is better than XML, but worse is better

Perhaps I will try to model in XML the (in)famous WHILE language :)

Oops... I forgot this nice attempt (but I find their syntax a little too verbose):
JEX - Java Extension
Jex is described as:
JEX is a redefinition of Java using an XML syntax

However... I was more thinking of a representation of abstract syntax, mostly for rewriting purposes ;)

No comments:

Post a Comment