Re: SIDE NOTE: CIL Schema

Martin Klang <[email protected]> Sun, 9 Jan 2005 17:56:51 +0000
Newsgroups gmane.text.xml.o-xml
Message-ID <[email protected]>
(cc'd to o:XML list, MLML discussion follows below)

On 22 Dec 2004, at 9:59, Alexander Genaud wrote:

> Is it too early to try Java -> MLML -> CIL and reverse?

It's going to require work. I'm currently playing around with the Antlr 
parser generator, and its Java grammar in particular - I'm looking at 
ways of making it generate XML output from its AST. That would take 
care of Java -> MLML. Unfortunately I don't have much time to play 
around with stuff...
Also, CIL is not really a language per se - if you mean Java -> C# via 
MLML, then these two are quite different. Eg there are no pointers or 
references in Java (at the source-code-level, that is).

> Again, my interest in this project came simply from using
> Javascript on a serious project.
> ... (description of serious project) ...

sounds like a cool project.

> I should be able to WRITE IT IN JAVA and as long as I had not
> imported any classes, I should be able to convert it to my javascript
> framework.

Java -> MLML -> Javascript
The middle step would involve some code mangling, eg to change 
polymorphic function calls to your Javascript framework. That could be 
done as MLML to MLML transformations.

> I've recreated the wheel on too many steps.

We all do!
Enter MLML. Even if you don't use MLML for language translation, you 
can use it:
- to generate HTML/DocBook/PDF docs
- to generate UML models in XMI format
- to run language analysers, stats tools etc
(the first two are already available)
If you have a transformation from MLML back to your source language, 
you can
- generate code from UML models (XMI -> MLML available)
- apply stereotypes and code transformations using generic MLML tools - 
eg insert trace/log calls, Design by Contract assertions, simple AOSD.

anyhow, I may be rambling now.. Thanks for your interest! Do get 
involved! Want to write an MLML -> Javascript transformation?!

later,

/m