[metaas-dev] questions about metaas
David Holroyd
dave at badgers-in-foil.co.uk
Sat Mar 15 14:48:41 UTC 2008
Hi!
On Fri, Mar 14, 2008 at 11:30:27PM +0100, benzo wrote:
> you suggested metaas on the antlr list in a discussion I've started:
> http://www.antlr.org:8080/pipermail/antlr-interest/2008-March/027233.html
>
> - could you quick explain what metaas does and what steps are involved?
Well, metaas is a model for representing ActionScript 3 code in Java
programs. I built it to help with complex code generation tasks. For
instance, it's the basis for an XML--Object mapping framework for AS3
over here,
http://maven.badgers-in-foil.co.uk/sites/asxsd/
A couple of other projects using metaas for code-gen, that I know of,
are,
Violet AS3 Generator,
http://selfmummy.com/vasgen/
and
CairngormFlex Assistant,
http://cairngormflex.sourceforge.net/
To see some really simple examples of the API in use, look over here,
http://maven.badgers-in-foil.co.uk/sites/metaas/apidocs/overview-summary.html#overview_description
> - does it work with antlr 3.0?
metaas uses ANTLR 3 in its implementation, but you don't need to use or
understand ANTLR in order to use metaas.
You could certainly build metaas objects with the appropriate code in
ANTLR parser actions, and then save the resulting model out to a .as
file.
The preferred way to do this in ANTLR is to use StringTemplate,
since this is a generic text templating system, and can be used for any
output . The downside is that you loose out on some of the
generation-time checks that metaas will make, and will have to spend a
little more effort constructing the templates to make the resulting code
formatting work nicely.
Also note that there are systems equivalent to metaas for the Java
language itself. For instance 'Spoon',
http://spoon.gforge.inria.fr/
is actually quite a lot better at Java language analysis than metaas is
at AS3 language analysis :)
ta,
dave
--
http://david.holroyd.me.uk/
More information about the metaas-dev
mailing list