About
metaas provides Java applications with a 'Document Object Model' for
ActionScript 3 code. Its primary function is generating code, but it allows
existing .as source files to be loaded, and simple modifications to be
made.
Note, metaas does not actually generate Flash movies or ActionScript
bytecode. You will still need the Flash IDE for Flex for that.
metaas is released under the terms of the Apache License,
version 2.0.
Why not just use Velocity?
Velocity
and other templating languages are great for general text-generation
tasks, but metaas' special knowledge of ActionScript can make the life of
the metaprogrammer easier when handling the complicated stuff.
For instance, metaas can,
- auto-indent generated code, so
you don't have to worry how the output will look
- enforce syntax rules, so
attempting to generate syntactically invalid ActionScript should
fail
- allow postprocessing, e.g. an
'organise imports' process runs before code is written to disk
- modify existing code, whereas a
basic templating system could only generate new code
Documentation
Read the API documentation.
Downloads
Subscribe to release announcements
Current
0.8 2008-03-21
metaas-0.8-bin.zip
Changes since 0.7:
- Switched to Apache License, version 2.0
- Initial support for ActionScript expressions in the DOM
- Provide for
dynamic
and final
class
modifiers - Support for
break
, continue
,
default xml namespace
try catch finally
and
throw
statements - Fix broken assumptions that statement bodies will be
code-blocks
- Many bugs fixed!
Previous
0.7 2007-03-17
metaas-0.7-bin.zip
Changes since 0.6:
- Added more support for creating and reading JavaDoc-style
documentation comments, including shortcuts for describing method
parameters.
- Fixed a brace-formatting bug in for-loops
- Added support for parsing and creating 'rest' parameters which
use the '
...
' operator. - Prevented an error calling
getType()
on an ASArg
declared with type '*
'. - Fixed broken formatting when an expression is added to an
ASReturnStatement
.
0.6 2007-02-17
metaas-0.6-bin.zip
Changes since 0.5:
- Fixed the embarrassing bug that broke example code on the
documentation front page
- Added representations for most types of ActionScript statement,
so that the application can modify these.
- Added a method to list the ActionScript statements in a
StatementContainer
0.5 2007-01-30
metaas-0.5-bin.zip
Changes since 0.4:
- Seperated auto-import processing out from
ActionScriptProject#writeAll()
- the new
performAutoImport()
method must now be used - Fixed several bugs in interface-related code generation
- Added a 'classpath' to
ActionScriptProject
to
support the auto-import process with project-external code - Allow for regular-expression-literals, so we no longer raise
SyntaxException on encountering one
- Assorted parser fixes to accept more examples of valid AS
syntax, including several instances of 'keywords' that are also valid
as identifiers
0.4 2006-12-17
metaas-0.4-bin.zip
Changes since 0.3:
- Added support for metadata tags (e.g.
[Bindable]
) - Renamed some interfaces so that use of 'AS' prefix is
consistent (e.g.
ASSourceFactory
is now
ActionScriptFactory
, CompilationUnit
is now
ASCompilationUnit
). All 'AS'-prefixed interfaces moded to
a 'dom' subpackage. No more renamings planned! - Allow for E4X XML-literals, so we no longer raise
SyntaxException on encountering one
- Extracted a common
Documentable
interface for
types and members - Fixed incorrect formatting when a single-line-comment is
inserted
- Fixed some bugs in auto-import code
ASMethod#addParam()
now returns ASArg
rather than void
- Now supports the
default xml namespace
statement
0.3 2006-09-24
metaas-0.3-bin.zip
Changes since 0.2:
- API improvements to cover a bit more AS3 syntax
- Major rewrite to port internals from ANTLRv2 to ANTLRv3
- Improved code formatting for generated code
- Preserves formatting of imported code
- New 'ASProject' helper for managing the generation of groups
of files in one run
- New 'auto import' feature to simplify management of references
between files
0.2 2006-08-01
metaas-0.2.tar.gz
Changes since 0.1:
- Allows access to several parts of the source code which the 0.1
release didn't, including fields, interfaces, documentation-comments,
superclasses/superinterfaces. This includes the ability to remove most
of these things from the code.
- Fixed a bug in floating-point number recognition
- Hopefully fixed byte-order-marker handling
- Helper methods aid in the construction of control statements
like loops and conditionals.
0.1 2006-07-16
metaas-0.1.tar.gz
- Initial relase
- Don't rely on the API too much yet
Code
To obtain a copy of the latest code, use the
Subversion
repository at the URL:
http://svn.badgers-in-foil.co.uk/metaas/trunk/
See also the
Maven2-generated
metaas code reports site.
Contact
If you have any questions or have some code to contribute, please
subscribe to the
mailing
list.
Due Credit
metaas was inspired by the
JaxMe JavaSource
framework for generating Java code.
metaas was originally based on the ActionScript 3
ANTLR
grammer from the ASDT
project, though the metaas fork is now significantly different. Authorship of the
original as3 grammar
appears to be claimed by Martin Schnabel. Many thanks to him, and the
other ASDT authors for their hard work.
Related Software
Projects using metaas:
Code Generators:
Websites:
Language Metamodels / Document Object Models:
What the Industry is Saying...
People here are strange human beings; they've been gave up a long
time ago on using friendly timelines and now discussing only freak things
like "getting as2 out of java code" rather than fancy "make my movie
smart".