<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Teoti Graphix, LLC</title>
	<atom:link href="http://blog.teotigraphix.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.teotigraphix.com</link>
	<description>Flash[Flex] Platform Component Development and Architecture</description>
	<lastBuildDate>Wed, 25 Aug 2010 22:38:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>as3parser :: Expression building, sneak peak</title>
		<link>http://blog.teotigraphix.com/2010/08/25/as3parser-expression-building-sneak-peak/</link>
		<comments>http://blog.teotigraphix.com/2010/08/25/as3parser-expression-building-sneak-peak/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 22:24:14 +0000</pubDate>
		<dc:creator>Michael Schmalle</dc:creator>
				<category><![CDATA[as3parser-framework]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.teotigraphix.com/?p=189</guid>
		<description><![CDATA[Hi,
I have been working the last 2 days completely refactoring, actually rewriting the AS3Parser, all 2500 lines.
The old parser implementation used recursive decent but it had no idea about token stream. I have re-written the parser to use a LinkedListToken token implementation with next and previous, start and stop tokens.
This is all possible since the [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I have been working the last 2 days completely refactoring, actually rewriting the AS3Parser, all 2500 lines.</p>
<p>The old parser implementation used recursive decent but it had no idea about token stream. I have re-written the parser to use a LinkedListToken token implementation with next and previous, start and stop tokens.</p>
<p>This is all possible since the metaas Java DOM was so awesome, thanks David, I learned a lot! Well, I am using his DOM api to about 80%, it&#8217;s really intuitive and tight, check the example below.</p>
<p>Yes, we are at the lowest level, every aspect of actionscript3 will be able to be created now. Not to mention code formatters can be easily written in an AIR application.</p>
<p>The below three tests are just some eye candy right now, this dev is on the as3block branch, I havn&#8217;t committed this yet</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000000;">&#91;</span>Test<span style="color: #000000;">&#93;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> testAssignmentExpressionNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">left</span><span style="color: #000000; font-weight: bold;">:</span>IExpressionNode = factory.newExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myAnswer&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">right</span><span style="color: #000000; font-weight: bold;">:</span>IExpressionNode = factory.newExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;4&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> expression<span style="color: #000000; font-weight: bold;">:</span>IAssignmentExpressionNode = 
		factory.newAssignmentExpression<span style="color: #000000;">&#40;</span><span style="color: #004993;">left</span>, <span style="color: #004993;">right</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	assertPrintExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myAnswer = 4&quot;</span>, expression<span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #009900;">// change right expression</span>
	expression.rightExpression = factory.newExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;otherAnswer = 4&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	assertPrintExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myAnswer = otherAnswer = 4&quot;</span>, expression<span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #009900;">// change left expression to an array access</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">target</span><span style="color: #000000; font-weight: bold;">:</span>IExpressionNode = factory.newExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myObject[42]&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #6699cc; font-weight: bold;">var</span> subscript<span style="color: #000000; font-weight: bold;">:</span>IExpressionNode = factory.newExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;2&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> arrayAccessExpression<span style="color: #000000; font-weight: bold;">:</span>IArrayAccessExpressionNode = 
		factory.newArrayAccessExpression<span style="color: #000000;">&#40;</span><span style="color: #004993;">target</span>, subscript<span style="color: #000000;">&#41;</span>;
&nbsp;
	expression.leftExpression = arrayAccessExpression;
&nbsp;
	assertPrintExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myObject[42][2] = otherAnswer = 4&quot;</span>, expression<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#91;</span>Test<span style="color: #000000;">&#93;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> testArrayLiteralNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> expression<span style="color: #000000; font-weight: bold;">:</span>IArrayLiteralNode = factory.newArrayLiteral<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	expression.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>factory.newSimpleNameExpressionNode<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;a&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
	expression.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>factory.newSimpleNameExpressionNode<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;b&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
	expression.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>factory.newSimpleNameExpressionNode<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;c&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	assertPrintExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;[a, b, c]&quot;</span>, expression<span style="color: #000000;">&#41;</span>;
&nbsp;
	expression.remove<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> expression2<span style="color: #000000; font-weight: bold;">:</span>IArrayLiteralNode = factory.newArrayLiteral<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	expression2.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>factory.newNullLiteral<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
	expression2.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>factory.newSimpleNameExpressionNode<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;foo&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
	expression2.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>factory.newStringLiteral<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Hello World&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
	expression2.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>factory.newBooleanLiteral<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	expression.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>factory.newArrayAccessExpression<span style="color: #000000;">&#40;</span>
		factory.newSimpleNameExpressionNode<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;abc&quot;</span><span style="color: #000000;">&#41;</span>,
		factory.newNumberLiteral<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	expression.<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>expression2<span style="color: #000000;">&#41;</span>;
&nbsp;
	assertPrintExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;[a, b, abc[0], [null, foo, <span style="">\&quot;</span>Hello World<span style="">\&quot;</span>, true]]&quot;</span>, expression<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#91;</span>Test<span style="color: #000000;">&#93;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> testArrayAccessExpressionNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">target</span><span style="color: #000000; font-weight: bold;">:</span>IExpressionNode = factory.newExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myObject[42]&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #6699cc; font-weight: bold;">var</span> subscript<span style="color: #000000; font-weight: bold;">:</span>IExpressionNode = factory.newExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;0&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> expression<span style="color: #000000; font-weight: bold;">:</span>IArrayAccessExpressionNode = 
		factory.newArrayAccessExpression<span style="color: #000000;">&#40;</span><span style="color: #004993;">target</span>, subscript<span style="color: #000000;">&#41;</span>;
&nbsp;
	assertPrintExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myObject[42][0]&quot;</span>, expression<span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #009900;">// test changing the 'target'</span>
	<span style="color: #004993;">target</span> = factory.newExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myObject&quot;</span><span style="color: #000000;">&#41;</span>;
	expression.<span style="color: #004993;">target</span> = <span style="color: #004993;">target</span>;
&nbsp;
	assertPrintExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myObject[0]&quot;</span>, expression<span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #009900;">// test changing the 'subscript'</span>
	subscript = factory.newExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;42&quot;</span><span style="color: #000000;">&#41;</span>;
	expression.subscript = subscript;
&nbsp;
	assertPrintExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myObject[42]&quot;</span>, expression<span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #009900;">// test changing the 'subscript' to a string literal</span>
	subscript = factory.newExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;'myProp'&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// or you could use</span>
	<span style="color: #009900;">// subscript = factory.newStringLiteral(&quot;'myProp'&quot;);</span>
	expression.subscript = subscript;
&nbsp;
	assertPrintExpression<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myObject['myProp']&quot;</span>, expression<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.teotigraphix.com/2010/08/25/as3parser-expression-building-sneak-peak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>as3parser-framework :: Download first alpha SWC &#8211; parse and build!</title>
		<link>http://blog.teotigraphix.com/2010/08/23/as3parser-framework-download-first-alpha-swc-parse-and-build/</link>
		<comments>http://blog.teotigraphix.com/2010/08/23/as3parser-framework-download-first-alpha-swc-parse-and-build/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:11:46 +0000</pubDate>
		<dc:creator>Michael Schmalle</dc:creator>
				<category><![CDATA[as3parser-framework]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[swc release]]></category>

		<guid isPermaLink="false">http://blog.teotigraphix.com/?p=186</guid>
		<description><![CDATA[Hi,
I just put together the first alpha swcs for use. You can get this zip here;
as3parser-framework_0.1_alpha.zip
The zip file contains 2 SWC libraries;

as3parser-framework_0.1_alpha.swc
as3builder-framework_0.1_alpha.swc

This is very alpha, but now you can experiment without the source. These are right out of the Library project so they contain the unit tests as well. This won&#8217;t be the case in [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I just put together the first alpha swcs for use. You can get this zip here;</p>
<p><a href="http://github.com/downloads/teotigraphix/as3parser-framework/as3parser-framework_0.1_alpha.zip">as3parser-framework_0.1_alpha.zip</a></p>
<p>The zip file contains 2 SWC libraries;</p>
<ul>
<li><strong>as3parser-framework_0.1_alpha.swc</strong></li>
<li><strong>as3builder-framework_0.1_alpha.swc</strong></li>
</ul>
<p>This is very alpha, but now you can experiment without the source. These are right out of the Library project so they contain the unit tests as well. This won&#8217;t be the case in the future.</p>
<p>Have fun,<br />
Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.teotigraphix.com/2010/08/23/as3parser-framework-download-first-alpha-swc-parse-and-build/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>as3parser-framework :: Introducing the AS3FragmentParser</title>
		<link>http://blog.teotigraphix.com/2010/08/23/as3parser-framework-introducing-the-as3fragmentparser/</link>
		<comments>http://blog.teotigraphix.com/2010/08/23/as3parser-framework-introducing-the-as3fragmentparser/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 13:49:29 +0000</pubDate>
		<dc:creator>Michael Schmalle</dc:creator>
				<category><![CDATA[as3parser-framework]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[parser]]></category>

		<guid isPermaLink="false">http://blog.teotigraphix.com/?p=180</guid>
		<description><![CDATA[Hi,
Well the I figured the framework needed a static API to access the AS3Parsers internal parse methods. I finally got around to making this and unit testing it to the point of insanity. This was for a special purpose though, the TestAS3FragmentParser unit test is more like a guide on what you can pass each [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Well the I figured the framework needed a static API to access the AS3Parsers internal parse methods. I finally got around to making this and unit testing it to the point of insanity. This was for a special purpose though, the <code>TestAS3FragmentParser</code> unit test is more like a guide on what you can pass each method. If you haven&#8217;t checked out that unit test, you should.</p>
<p><strong>Wiki Docs;</strong></p>
<p>The below link shows <strong>usage </strong>and <strong>XML AST</strong> information for every method listed below, you should check it out if your interested in the <strong>AST models</strong>.</p>
<p><a href="http://as3parser.teotigraphix.com/as3parser/api/as3fragementparser">AS3FragmentParser API</a></p>
<p><strong>Source for the unit test;</strong></p>
<p><a href="http://github.com/teotigraphix/as3parser-framework/blob/master/test/org/teotigraphix/as3parser/impl/TestAS3FragmentParser.as">AS3FragmentParser Unit test</a></p>
<p><strong>Parse methods;</strong></p>
<ul>
<li><code>parseCompilationUnit()</code></li>
<li><code>parsePackage()</code></li>
<li><code>parsePackageContent()</code></li>
<li><code>parseClassContent()</code></li>
<li><code>parseInterfaceContent()</code></li>
<li><code>parseMetaData()</code></li>
<li><code>parseConstants()</code></li>
<li><code>parseVariables()</code></li>
<li><code>parseMethods()</code></li>
<li><code>parseStatement()</code></li>
<li><code>parsePrimaryExpression()</code></li>
<li><code>parseExpression()</code></li>
</ul>
<p>An example of what you will find on the wiki page.</p>
<p><code>parseCompilationUnit()</code></p>
<p><strong>Usage:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> ast<span style="color: #000000; font-weight: bold;">:</span>IParserNode = AS3FragmentParser.parseCompilationUnit<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// convoluted example but shows nesting</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>ast.getChild<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>.getChild<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>.stringValue<span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// my.domain</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>ast.getChild<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>.getLastChild<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.getChild<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>.getChild<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>.stringValue<span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// Test</span>
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>ast.getChild<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>.getLastChild<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.getChild<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>.getKind<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;mod&quot;</span><span style="color: #000000;">&#41;</span>.stringValue<span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// public</span></pre></div></div>

<p><strong>Source:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> my.<span style="color: #004993;">domain</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Test
	<span style="color: #000000;">&#123;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #9900cc; font-weight: bold;">class</span> InternalClass
<span style="color: #000000;">&#123;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><strong>AST:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compilation-unit<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;package<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>my.domain<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Test<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mod-list<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mod<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>public<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mod<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mod-list<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;content<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/package<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>InternalClass<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;content<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/content<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/compilation-unit<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><strong>Why ?</strong></p>
<p>This class was written because I&#8217;m getting into the BLOCK building, yes, you will be able to create expressions!</p>
<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.teotigraphix.com/2010/08/23/as3parser-framework-introducing-the-as3fragmentparser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>as3parser-framework :: support wiki online &#8211; framework vision</title>
		<link>http://blog.teotigraphix.com/2010/08/20/as3parser-framework-support-wiki-online-framework-vision/</link>
		<comments>http://blog.teotigraphix.com/2010/08/20/as3parser-framework-support-wiki-online-framework-vision/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 12:30:50 +0000</pubDate>
		<dc:creator>Michael Schmalle</dc:creator>
				<category><![CDATA[as3parser-framework]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.teotigraphix.com/?p=176</guid>
		<description><![CDATA[Hi,
This post will run through how this project is currently setup, it&#8217;s goals and what I won&#8217;t subscribe to.
The wiki 
For years I have used Dokuwiki and love it, this is what my support will be written with. It&#8217;s a sub domain on my site and thus remains close to me. Ever heard of the [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>This post will run through how this project is currently setup, it&#8217;s goals and what I won&#8217;t subscribe to.</p>
<p><strong>The wiki </strong></p>
<p>For years I have used <strong>Dokuwiki </strong>and love it, this is what my support will be written with. It&#8217;s a sub domain on my site and thus remains close to me. Ever heard of the underground scene in techno music? This is how this project will be done, no fancy sky scrappers and white walls, just a purely enthusiastic developer that is offering some tools for his fellow developers. If the bomb tracks leak to the mainstream, then I achieved my purpose in the dark underground. <img src='http://blog.teotigraphix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I live in New Hampshire for the simple reason of simplicity. Keeping your mind and focus clear has allowed me to create what you are looking at.</p>
<p><a href="http://as3parser.teotigraphix.com/doku.php">as3parser-framework wiki</a></p>
<p><strong>Bugs and features</strong></p>
<p>I have not decided on this, does anybody have any suggestions for an open-source project like this (that&#8217;s free)?</p>
<p><strong>Support Forum</strong></p>
<p>Google Groups seem to work well, so that is where I will answer questions directed at me.</p>
<p><a href="http://groups.google.com/group/as3parser-framework">as3parser-framework Group</a></p>
<p><strong>Git Hub source code:</strong></p>
<ul>
<li><a href="http://github.com/teotigraphix/as3parser-framework">as3parser-framework</a></li>
<li><a href="http://github.com/teotigraphix/as3builder-framework">as3builder-framework</a></li>
</ul>
<p>A note to <strong>SVN users</strong>; I was once an <strong>SVN man</strong>, didn&#8217;t think anything could be better. That was until I decided to put aside my stubbornness and try <strong>GIT</strong> on Windows. Man, I can&#8217;t go back to SVN now. If there are any SVN users that have no clue about GIT and want to check this out with their favorite <strong>SVN GUI clien</strong>t, let me know and I will write a blog post on how to do it.</p>
<p><strong>Framework Vision</strong></p>
<ul>
<li>This will not be judged as a performance parser (AS3 IDE fine and well, my intention was to <strong>empower AIR developers</strong>).</li>
<li>There will be a very intriguing <strong>Swiz application</strong> built that will view, inspect and edit Swiz application code.</li>
<li>There will be an <strong>ASDoc AIR application</strong> built with plug-in features so any grandmother that codes actionscript3 will be able to add her apple pies to your documentation.</li>
<li>There might actually be a donation button to PayPal that could really get my motor running.</p>
</ul>
<p><strong>PHP</strong></p>
<p>I <strong>love PHP</strong> and how it links to Flex/Flash applications. I am seriously kicking around the idea of creating a simple parser and AST for <strong>PHP</strong> like I have done with ActionScript3.</p>
<p><strong>The future</strong></p>
<p>I love developing Flex components, take a look at my products, may buy one. <img src='http://blog.teotigraphix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The code quality is second to none, help support this developer&#8217;s children! <img src='http://blog.teotigraphix.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><a href="http://www.teotigraphix.com/catalog">Teoti Graphix, LLC Products</a></p>
<p>Until next time,<br />
Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.teotigraphix.com/2010/08/20/as3parser-framework-support-wiki-online-framework-vision/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>as3parser-framework :: lazy as3 code creation</title>
		<link>http://blog.teotigraphix.com/2010/08/19/as3parser-framework-lazy-as3-code-creation/</link>
		<comments>http://blog.teotigraphix.com/2010/08/19/as3parser-framework-lazy-as3-code-creation/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 22:28:16 +0000</pubDate>
		<dc:creator>Michael Schmalle</dc:creator>
				<category><![CDATA[as3parser-framework]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.teotigraphix.com/?p=170</guid>
		<description><![CDATA[Hi,
I just thought I would run this past all the people that got scared at the last post knowing you can now create actionscript3 code with actionscript3 code.  
Now you can create actionscript3 code with a String of actionscript3 code, then print out the actionscript3 code again.
Lets see, how many times did I say [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I just thought I would run this past all the people that got scared at the last post knowing you can now create <strong>actionscript3 </strong>code with <strong>actionscript3</strong> code. <img src='http://blog.teotigraphix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now you can create <strong>actionscript3 </strong>code with a <strong>String</strong> of <strong>actionscript3 </strong>code, then print out the <strong>actionscript3 </strong>code again.</p>
<p>Lets see, how many times did I say <strong>actionscript3</strong>, 6, OK that&#8217;s good.</p>
<p><strong>Git Hub source code:</strong></p>
<ul>
<li><a href="http://github.com/teotigraphix/as3parser-framework">as3parser-framework</a></li>
<li><a href="http://github.com/teotigraphix/as3builder-framework">as3builder-framework</a></li>
</ul>
<p><strong>Input:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">code</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> =
	<span style="color: #990000;">&quot;package my.domain {&quot;</span> <span style="color: #000000; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;public class UnitTest {&quot;</span> <span style="color: #000000; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;protected const MY_CONSTANT:int = 42;&quot;</span> <span style="color: #000000; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;[Test]public function testMethod1():void{}&quot;</span> <span style="color: #000000; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;[Test]public function testMethod2():void{}&quot;</span> <span style="color: #000000; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;[Test]public function testMethod3():void{}&quot;</span> <span style="color: #000000; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;}}&quot;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> file<span style="color: #000000; font-weight: bold;">:</span>AS3SourceFile = <span style="color: #0033ff; font-weight: bold;">new</span> AS3SourceFile<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">null</span>, <span style="color: #0033ff; font-weight: bold;">new</span> SourceCode<span style="color: #000000;">&#40;</span><span style="color: #004993;">code</span>, <span style="color: #990000;">&quot;&quot;</span>, <span style="color: #990000;">&quot;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
file.buildAst<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> typeNode<span style="color: #000000; font-weight: bold;">:</span>ITypeNode = file.compilationNode.typeNode;
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">method</span><span style="color: #000000; font-weight: bold;">:</span>IMethodNode = typeNode.getMethod<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;testMethod2&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">method</span>.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;See, this editing a string with code is fun!&quot;</span>;
<span style="color: #004993;">method</span>.newDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;author&quot;</span>, <span style="color: #990000;">&quot;Yeah me&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> meta<span style="color: #000000; font-weight: bold;">:</span>IMetaDataNode = <span style="color: #004993;">method</span>.getMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Test&quot;</span><span style="color: #000000;">&#41;</span>;
meta.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;Just in case you didn't know, I unit test.&quot;</span>;
&nbsp;
typeNode.removeMethod<span style="color: #000000;">&#40;</span>typeNode.getMethod<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;testMethod1&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
typeNode.newMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;TestSuite&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
typeNode.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;Class documentation is good also, but I am lazy!&quot;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> result<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = BuilderFactory.instance.buildFile<span style="color: #000000;">&#40;</span>file<span style="color: #000000;">&#41;</span>;</pre></div></div>

<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> my.<span style="color: #004993;">domain</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #000000;">&#91;</span>TestSuite<span style="color: #000000;">&#93;</span>
    <span style="color: #3f5fbf;">/**
     * Class documentation is good also, but I am lazy!
     */</span>
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> UnitTest <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">protected</span> const MY_CONSTANT<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">42</span>;
        <span style="color: #3f5fbf;">/**
         * Just in case you didn't know, I unit test.
         */</span>
        <span style="color: #000000;">&#91;</span>Test<span style="color: #000000;">&#93;</span>
        <span style="color: #3f5fbf;">/**
         * See, this editing a string with code is fun!
         * 
         * @author Yeah me
         */</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> testMethod2<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#91;</span>Test<span style="color: #000000;">&#93;</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> testMethod3<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Notice this uses the parser and builder! <img src='http://blog.teotigraphix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.teotigraphix.com/2010/08/19/as3parser-framework-lazy-as3-code-creation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>as3parser-framework :: Code generation api rockin</title>
		<link>http://blog.teotigraphix.com/2010/08/19/as3parser-framework-code-generation-api-rockin/</link>
		<comments>http://blog.teotigraphix.com/2010/08/19/as3parser-framework-code-generation-api-rockin/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 19:31:01 +0000</pubDate>
		<dc:creator>Michael Schmalle</dc:creator>
				<category><![CDATA[as3parser-framework]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.teotigraphix.com/?p=123</guid>
		<description><![CDATA[Hi,
Just a quick update, I have been working hard to get the builder framework to create all API, almost there. Check out what you can do now. Look at the metadata&#8230; does it spring to mind any applications that could be built with AIR that enhance framework familiarity?  
I also created a Google Group [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Just a quick update, I have been working hard to get the <strong>builder framework</strong> to create all API, almost there. Check out what you can do now. Look at the metadata&#8230; does it spring to mind any applications that could be built with AIR that enhance framework familiarity? <img src='http://blog.teotigraphix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I also created a Google Group <strong>as3parser-framework</strong> if anybody had features, bugs or questions;</p>
<p><a href="http://groups.google.com/group/as3parser-framework">Google Group as3parser-framework</a></p>
<p><strong>Git Hub source code:</strong></p>
<ul>
<li><a href="http://github.com/teotigraphix/as3parser-framework">as3parser-framework</a></li>
<li><a href="http://github.com/teotigraphix/as3builder-framework">as3builder-framework</a></li>
</ul>
<p><strong>There might be a couple errors in the below code, I hit the wordpress 404 when publishing. It took me 30 minutes to fix this post, grr</strong></p>
<p><strong>Input:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900;">// create the file</span>
<span style="color: #6699cc; font-weight: bold;">var</span> file<span style="color: #000000; font-weight: bold;">:</span>ISourceFile = project.newClass<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain.MyClass&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> packageNode<span style="color: #000000; font-weight: bold;">:</span>IPackageNode = file.compilationNode.packageNode;
<span style="color: #6699cc; font-weight: bold;">var</span> typeNode<span style="color: #000000; font-weight: bold;">:</span>IClassTypeNode = packageNode.typeNode <span style="color: #0033ff; font-weight: bold;">as</span> IClassTypeNode;
<span style="color: #009900;">// add a package block comment</span>
packageNode.newBlockComment<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;A package block comment.&quot;</span>, <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// add imports</span>
packageNode.newImport<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.api.IInterfaceA&quot;</span><span style="color: #000000;">&#41;</span>;
packageNode.newImport<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.api.IInterfaceB&quot;</span><span style="color: #000000;">&#41;</span>;
packageNode.newImport<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain.sub.SubTest&quot;</span><span style="color: #000000;">&#41;</span>;
packageNode.newImport<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;mx.core.mx_internal&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// add and include</span>
packageNode.newInclude<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;../som/folder/includeFile.as&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// addd a use namepsace</span>
packageNode.newUse<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;mx_internal&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// make class dynamic</span>
typeNode.isDynamic = <span style="color: #0033ff; font-weight: bold;">true</span>;
<span style="color: #009900;">// add a superclass</span>
typeNode.superClass = IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;ClassA&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// add implementors</span>
typeNode.addImplementation<span style="color: #000000;">&#40;</span>IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;IInterfaceA&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
typeNode.addImplementation<span style="color: #000000;">&#40;</span>IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;IInterfaceB&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// add a [Bindable] meta to class</span>
typeNode.newMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Bindable&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// add a style</span>
<span style="color: #6699cc; font-weight: bold;">var</span> style<span style="color: #000000; font-weight: bold;">:</span>IMetaDataNode = typeNode.newMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Style&quot;</span><span style="color: #000000;">&#41;</span>;
style.addNamedStringParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;name&quot;</span>, <span style="color: #990000;">&quot;myStyle&quot;</span><span style="color: #000000;">&#41;</span>;
style.addNamedStringParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;type&quot;</span>, <span style="color: #990000;">&quot;Number&quot;</span><span style="color: #000000;">&#41;</span>;
style.addNamedStringParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;inherit&quot;</span>, <span style="color: #990000;">&quot;no&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// add a comment to the style</span>
style.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;A new style.&quot;</span>;
style.newDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;see&quot;</span>, <span style="color: #990000;">&quot;#style:theOtherStyle&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// add a class description</span>
typeNode.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;A groovy class generated by as3builder-framework!&quot;</span>;
typeNode.newDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;author&quot;</span>, <span style="color: #990000;">&quot;Michael Schmalle&quot;</span><span style="color: #000000;">&#41;</span>;
typeNode.newDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;date&quot;</span>, <span style="color: #990000;">&quot;08-19-2010&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// add a constant</span>
<span style="color: #6699cc; font-weight: bold;">var</span> constant<span style="color: #000000; font-weight: bold;">:</span>IConstantNode = typeNode.newConstant<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;MY_CONSTANT&quot;</span>, Modifier.PUBLIC, 
	IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;String&quot;</span><span style="color: #000000;">&#41;</span>, <span style="color: #990000;">&quot;<span style="">\&quot;</span>value<span style="">\&quot;</span>&quot;</span><span style="color: #000000;">&#41;</span>;
constant.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;My constant.&quot;</span>;
&nbsp;
<span style="color: #009900;">// add an attribute</span>
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">attribute</span><span style="color: #000000; font-weight: bold;">:</span>IAttributeNode = typeNode.newAttribute<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myAttribute&quot;</span>, Modifier.PROTECTED, 
	IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;IModel&quot;</span><span style="color: #000000;">&#41;</span>, <span style="color: #990000;">&quot;null&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">attribute</span>.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;My attribute.&quot;</span>;
<span style="color: #004993;">attribute</span>.newDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;private&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">attribute</span>.newMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Inject&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// add an accessor</span>
<span style="color: #6699cc; font-weight: bold;">var</span> vo<span style="color: #000000; font-weight: bold;">:</span>IIdentifierNode = IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;ValueObject&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> getter<span style="color: #000000; font-weight: bold;">:</span>IAccessorNode = typeNode.newAccessor<span style="color: #000000;">&#40;</span>
	<span style="color: #990000;">&quot;myProperty&quot;</span>, Modifier.PUBLIC, Access.READ, vo<span style="color: #000000;">&#41;</span>;
&nbsp;
getter.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;A property.&quot;</span>;
getter.newMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Bindable&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> inject<span style="color: #000000; font-weight: bold;">:</span>IMetaDataNode = getter.newMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Inject&quot;</span><span style="color: #000000;">&#41;</span>;
inject.addNamedStringParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;source&quot;</span>, <span style="color: #990000;">&quot;model.property&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
&nbsp;
<span style="color: #009900;">// add constructor</span>
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">constructor</span><span style="color: #000000; font-weight: bold;">:</span>IMethodNode = typeNode.newMethod<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;MyClass&quot;</span>, Modifier.PUBLIC, <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">constructor</span>.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;Constructor.&quot;</span>;
&nbsp;
<span style="color: #009900;">// add a method</span>
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">method</span><span style="color: #000000; font-weight: bold;">:</span>IMethodNode = typeNode.newMethod<span style="color: #000000;">&#40;</span>
	<span style="color: #990000;">&quot;myMethod&quot;</span>, Modifier.PUBLIC, IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;void&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">method</span>.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;Mediates a Swiz framework [Mediate] tag.&quot;</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> param<span style="color: #000000; font-weight: bold;">:</span>IParameterNode = <span style="color: #004993;">method</span>.newParameter<span style="color: #000000;">&#40;</span>
	<span style="color: #990000;">&quot;data&quot;</span>, IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Object&quot;</span><span style="color: #000000;">&#41;</span>, <span style="color: #990000;">&quot;null&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">method</span>.newDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;param&quot;</span>, <span style="color: #990000;">&quot;data A mediated data object&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> mediate<span style="color: #000000; font-weight: bold;">:</span>IMetaDataNode = <span style="color: #004993;">method</span>.newMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Mediate&quot;</span><span style="color: #000000;">&#41;</span>;
mediate.addNamedStringParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;event&quot;</span>, <span style="color: #990000;">&quot;MyEvent.DATA_CHANGE&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">method</span>.addReturnDescription<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Returns nothing.&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
BuilderFactory.newlinesBeforeMembers = <span style="color: #000000; font-weight:bold;">1</span>;
BuilderFactory.breakPackageBracket = <span style="color: #0033ff; font-weight: bold;">true</span>;
BuilderFactory.breakTypeBracket = <span style="color: #0033ff; font-weight: bold;">true</span>;
BuilderFactory.breakBlockBracket = <span style="color: #0033ff; font-weight: bold;">true</span>;
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> result<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = BuilderFactory.instance.buildTest<span style="color: #000000;">&#40;</span>compilationNode.node<span style="color: #000000;">&#41;</span>;</pre></div></div>

<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/**
 * A package block comment.
 */</span>
<span style="color: #9900cc; font-weight: bold;">package</span> my.<span style="color: #004993;">domain</span> 
<span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> my.api.IInterfaceA;
    <span style="color: #0033ff; font-weight: bold;">import</span> my.api.IInterfaceB;
    <span style="color: #0033ff; font-weight: bold;">import</span> my.<span style="color: #004993;">domain</span>.sub.SubTest;
    <span style="color: #0033ff; font-weight: bold;">import</span> mx.core.mx_internal;
    include <span style="color: #990000;">'../some/folder/includeFile.as'</span>
    use <span style="color: #004993;">namespace</span> mx_internal;
    <span style="color: #000000;">&#91;</span>Bindable<span style="color: #000000;">&#93;</span>
    <span style="color: #3f5fbf;">/**
     * A new style.
     * 
     * @see #style:theOtherStyle
     */</span>
    <span style="color: #000000;">&#91;</span>Style<span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;myStyle&quot;</span>,<span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;Number&quot;</span>,inherit=<span style="color: #990000;">&quot;no&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
    <span style="color: #3f5fbf;">/**
     * A groovy class generated by as3builder-framework!
     * 
     * @author Michael Schmalle
     * @date 08-19-2010
     */</span>
    <span style="color: #0033ff; font-weight: bold;">public</span> dynamic <span style="color: #9900cc; font-weight: bold;">class</span> MyClass extends ClassA implements IInterfaceA, IInterfaceB 
    <span style="color: #000000;">&#123;</span>
&nbsp;
        <span style="color: #3f5fbf;">/**
         * My constant.
         */</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> static const MY_CONSTANT<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;value&quot;</span>;
&nbsp;
        <span style="color: #000000;">&#91;</span>Inject<span style="color: #000000;">&#93;</span>
        <span style="color: #3f5fbf;">/**
         * My attribute.
         * 
         * @private 
         */</span>
        <span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #6699cc; font-weight: bold;">var</span> myAttribute<span style="color: #000000; font-weight: bold;">:</span>IModel = <span style="color: #0033ff; font-weight: bold;">null</span>;
&nbsp;
        <span style="color: #000000;">&#91;</span>Bindable<span style="color: #000000;">&#93;</span>
        <span style="color: #000000;">&#91;</span>Inject<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span>=<span style="color: #990000;">&quot;model.property&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
        <span style="color: #3f5fbf;">/**
         * A property.
         */</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> myProperty<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span>ValueObject 
        <span style="color: #000000;">&#123;</span>
            <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">null</span>;
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #3f5fbf;">/**
         * @private 
         */</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> myProperty<span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000000; font-weight: bold;">:</span>ValueObject<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> 
        <span style="color: #000000;">&#123;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #3f5fbf;">/**
         * Constructor.
         */</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> MyClass<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> 
        <span style="color: #000000;">&#123;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #000000;">&#91;</span>Mediate<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">&amp;</span>#<span style="color: #000000; font-weight:bold;">99</span>;<span style="color: #990000;">&quot;MyEvent.DATA_CHANGE&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
        <span style="color: #3f5fbf;">/**
         * Mediates a Swiz framework [Mediate] tag.
         * 
         * @param data A mediated data object
         * @return Returns nothing.
         */</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> myMethod<span style="color: #000000;">&#40;</span><span style="color: #004993;">data</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Object</span> <span style="color: #000000; font-weight: bold;">&amp;</span>#<span style="color: #000000; font-weight:bold;">99</span>; <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> 
        <span style="color: #000000;">&#123;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.teotigraphix.com/2010/08/19/as3parser-framework-code-generation-api-rockin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>as3parser-framework :: AST creation now possible (as3 code creation)</title>
		<link>http://blog.teotigraphix.com/2010/08/10/as3parser-framework-ast-creation-now-possible-as3-code-creation/</link>
		<comments>http://blog.teotigraphix.com/2010/08/10/as3parser-framework-ast-creation-now-possible-as3-code-creation/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 12:49:37 +0000</pubDate>
		<dc:creator>Michael Schmalle</dc:creator>
				<category><![CDATA[as3parser-framework]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.teotigraphix.com/?p=116</guid>
		<description><![CDATA[Hi,
Well I have been hard at work getting this framework going to the point where I could show an example of AST creation; AKA ActionScript3 code creation in an ActionScript3 class/application.  
I designed this framework to be used with applications that enhance the development of ActionScript. Mainly targeting AIR applications but, since I have [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Well I have been hard at work getting this framework going to the point where I could show an example of AST creation; AKA ActionScript3 code creation in an ActionScript3 class/application. <img src='http://blog.teotigraphix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I designed this framework to be used with applications that enhance the development of ActionScript. Mainly targeting AIR applications but, since I have made sure to put zero dependencies on AIR libraries in the core framework, browser application can also make use of the parser AST.</p>
<p>Since last week I have divided this project into 2 repositories;</p>
<ul>
<li><a href="http://github.com/teotigraphix/as3parser-framework">as3parser-framework</a></li>
<li><a href="http://github.com/teotigraphix/as3builder-framework">as3builder-framework</a></li>
</ul>
<p><strong>as3parser-framework</strong></p>
<p>This framework is the core parsers and AST goodies. Any as3 SWF (Flash, Flex, etc.) application can utilize this library.</p>
<p><strong>as3builder-framework</strong></p>
<p>This framework is dependent on AIR libraries for now. I might shave the builder classes back into the parser library sooner than later so there is no requirement on AIR when wanting to create what is displayed below.</p>
<p>So, if you want to create code you need to checkout both repositories and put them in your source paths.</p>
<p>This library also houses to <strong>as3book </strong>package that contains the processor and accessor for an as3 book. This is the API where after a full project parse you can find subclasses, superclasses, inherting members, superinterfaces etc.</p>
<p><strong>AST Code creation</strong></p>
<p><strong>NOTE:</strong> This is very alpha, so all creation implementation is not set, but I am well on the way of getting major parts done soon.</p>
<p>With the following code, it is possible to create the following source code;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900;">// where the project will be output</span>
<span style="color: #6699cc; font-weight: bold;">var</span> output<span style="color: #000000; font-weight: bold;">:</span>File = File.desktopDirectory.resolvePath<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;project/src&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// create a factory that will create AST</span>
<span style="color: #6699cc; font-weight: bold;">var</span> factory<span style="color: #000000; font-weight: bold;">:</span>AS3Factory = <span style="color: #0033ff; font-weight: bold;">new</span> AS3Factory<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// create a new project to hold .as files</span>
<span style="color: #6699cc; font-weight: bold;">var</span> project<span style="color: #000000; font-weight: bold;">:</span>IAS3Project = factory.newASProject<span style="color: #000000;">&#40;</span>output.nativePath<span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// create a public class with package 'com.acme.core'</span>
<span style="color: #6699cc; font-weight: bold;">var</span> file<span style="color: #000000; font-weight: bold;">:</span>ISourceFile = project.newClass<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;com.acme.core.HelloWorld&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> typeNode<span style="color: #000000; font-weight: bold;">:</span>IClassTypeNode = file.compilationNode.typeNode <span style="color: #0033ff; font-weight: bold;">as</span> IClassTypeNode;
<span style="color: #009900;">// mark he class final (can do the same for IsDynamic)</span>
typeNode.isFinal = <span style="color: #0033ff; font-weight: bold;">true</span>;
<span style="color: #009900;">//add metadata to the class</span>
<span style="color: #6699cc; font-weight: bold;">var</span> event<span style="color: #000000; font-weight: bold;">:</span>IMetaDataNode = typeNode.newMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Event&quot;</span><span style="color: #000000;">&#41;</span>;
event.addNamedStringParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;name&quot;</span>, <span style="color: #990000;">&quot;myEvent&quot;</span><span style="color: #000000;">&#41;</span>;
event.addNamedStringParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;type&quot;</span>, <span style="color: #990000;">&quot;flash.events.Event&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> style<span style="color: #000000; font-weight: bold;">:</span>IMetaDataNode = typeNode.newMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Style&quot;</span><span style="color: #000000;">&#41;</span>;
style.addNamedStringParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;name&quot;</span>, <span style="color: #990000;">&quot;myStyle&quot;</span><span style="color: #000000;">&#41;</span>;
style.addNamedStringParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;type&quot;</span>, <span style="color: #990000;">&quot;Number&quot;</span><span style="color: #000000;">&#41;</span>;
style.addNamedStringParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;inherit&quot;</span>, <span style="color: #990000;">&quot;no&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> bindable<span style="color: #000000; font-weight: bold;">:</span>IMetaDataNode = typeNode.newMetaData<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Bindable&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// add class comment</span>
typeNode.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;A class comment.<span style="">\n</span> &quot;</span> <span style="color: #000000; font-weight: bold;">+</span>
	<span style="color: #990000;">&quot;&lt;p&gt;Long description documentation.&lt;/p&gt;&quot;</span>;
&nbsp;
typeNode.addDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;author&quot;</span>, <span style="color: #990000;">&quot;Michael Schmalle&quot;</span><span style="color: #000000;">&#41;</span>;
typeNode.addDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;copyright&quot;</span>, <span style="color: #990000;">&quot;Teoti Graphix, LLC&quot;</span><span style="color: #000000;">&#41;</span>;
typeNode.addDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;productversion&quot;</span>, <span style="color: #990000;">&quot;1.0&quot;</span><span style="color: #000000;">&#41;</span>;
typeNode.addDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;see&quot;</span>, <span style="color: #990000;">&quot;MyOtherClass More details here.&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// add a method</span>
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">method</span><span style="color: #000000; font-weight: bold;">:</span>IMethodNode = typeNode.newMethod<span style="color: #000000;">&#40;</span>
	<span style="color: #990000;">&quot;helloTest&quot;</span>, Modifier.PUBLIC, IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;String&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// add a parameter</span>
<span style="color: #6699cc; font-weight: bold;">var</span> param<span style="color: #000000; font-weight: bold;">:</span>IParameterNode = <span style="color: #004993;">method</span>.addParameter<span style="color: #000000;">&#40;</span>
	<span style="color: #990000;">&quot;arg0&quot;</span>, IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;String&quot;</span><span style="color: #000000;">&#41;</span>, <span style="color: #990000;">&quot;''&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// add a comment to the method</span>
<span style="color: #004993;">method</span>.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;A hello test method.<span style="">\n</span> &lt;p&gt;Long description.&lt;/p&gt;&quot;</span>;
<span style="color: #004993;">method</span>.addDocTag<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;since&quot;</span>, <span style="color: #990000;">&quot;1.0&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #009900;">// add a description to the parameter</span>
param.<span style="color: #004993;">description</span> = <span style="color: #990000;">&quot;The String argument at 0&quot;</span>;
<span style="color: #009900;">// add a return tag to the method</span>
<span style="color: #004993;">method</span>.addReturnDescription<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;A String indicating the result.&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// add a method with rest</span>
<span style="color: #009900;">// add a method</span>
<span style="color: #6699cc; font-weight: bold;">var</span> methodRest<span style="color: #000000; font-weight: bold;">:</span>IMethodNode = typeNode.newMethod<span style="color: #000000;">&#40;</span>
	<span style="color: #990000;">&quot;helloRestTest&quot;</span>, Modifier.create<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;mx_internal&quot;</span><span style="color: #000000;">&#41;</span>, 
	IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain.ITest&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #009900;">// add a parameter</span>
<span style="color: #6699cc; font-weight: bold;">var</span> arg0<span style="color: #000000; font-weight: bold;">:</span>IParameterNode = methodRest.addParameter<span style="color: #000000;">&#40;</span>
	<span style="color: #990000;">&quot;arg0&quot;</span>, IdentifierNode.createType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;int&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> rest<span style="color: #000000; font-weight: bold;">:</span>IParameterNode = methodRest.addRestParameter<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;theRest&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> result<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = BuilderFactory.instance.buildFile<span style="color: #000000;">&#40;</span>file<span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>result<span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>converts to;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> com.acme.core <span style="color: #000000;">&#123;</span>
    <span style="color: #000000;">&#91;</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;myEvent&quot;</span>,<span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;flash.events.Event&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
    <span style="color: #000000;">&#91;</span>Style<span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;myStyle&quot;</span>,<span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;Number&quot;</span>,inherit=<span style="color: #990000;">&quot;no&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
    <span style="color: #000000;">&#91;</span>Bindable<span style="color: #000000;">&#93;</span>
    <span style="color: #3f5fbf;">/**
     * A class comment.
     * 
     * &lt;p&gt;Long description documentation.&lt;/p&gt; 
     * 
     * @author Michael Schmalle
     * @copyright Teoti Graphix, LLC
     * @productversion 1.0
     * @see MyOtherClass More details here.
     */</span>
    <span style="color: #0033ff; font-weight: bold;">public</span> final <span style="color: #9900cc; font-weight: bold;">class</span> HelloWorld <span style="color: #000000;">&#123;</span>
        <span style="color: #3f5fbf;">/**
         * A hello test method.
         * 
         * &lt;p&gt;Long description.&lt;/p&gt; 
         * 
         * @since 1.0
         * @param arg0 The String argument at 0
         * @return A String indicating the result.
         */</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> helloTest<span style="color: #000000;">&#40;</span>arg0<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">''</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #000000;">&#125;</span>
        mx_internal <span style="color: #339966; font-weight: bold;">function</span> helloRestTest<span style="color: #000000;">&#40;</span>arg0<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>, ...theRest<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span>ITest <span style="color: #000000;">&#123;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>That&#8217;s all for now,<br />
Mike</p>
<p><strong>Please feel free to contact me if you are at all interested in this project or contributing!</strong></p>
<p>mschmalle <em>at</em> teotigraphix.com</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.teotigraphix.com/2010/08/10/as3parser-framework-ast-creation-now-possible-as3-code-creation/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>as3parser-framework :: IAS3Book API access examples</title>
		<link>http://blog.teotigraphix.com/2010/08/03/as3parser-framework-ias3book-api-access-examples/</link>
		<comments>http://blog.teotigraphix.com/2010/08/03/as3parser-framework-ias3book-api-access-examples/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 23:35:27 +0000</pubDate>
		<dc:creator>Michael Schmalle</dc:creator>
				<category><![CDATA[as3parser-framework]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.teotigraphix.com/?p=111</guid>
		<description><![CDATA[Hello,
Well much progress on this end. The IAS3Book API is getting implemented. Using the as3book branch of the source code the following is code possible.
The class and interface member access is next on the list (it&#8217;s already written in java, just porting it over)  . 
Note: There is no SWC for this framework yet [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>Well much progress on this end. The <strong>IAS3Book API</strong> is getting implemented. Using the <strong>as3book </strong>branch of the source code the following is code possible.</p>
<p>The class and interface member access is next on the list (it&#8217;s already written in java, just porting it over) <img src='http://blog.teotigraphix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . </p>
<p><strong>Note:</strong> There is no <strong>SWC </strong>for this framework yet as it is in <strong>alpha</strong> and much API is going to be added before I am finished. As some have wondered, there <strong>is</strong> going to be a write API into the AST to create .as, .mxml and asdoc comments from actionscript code.</p>
<p>More to come later.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> loadBook<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> book<span style="color: #000000; font-weight: bold;">:</span>IAS3Book = BookFactory.instance.createBook<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> mySourcePath<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;C:<span style="">\\</span>dev<span style="">\\</span>workspace<span style="">\\</span>opensource<span style="">\\</span>as3parser-framework<span style="">\\</span>src&quot;</span>;
	<span style="color: #009900;">// create a source directory</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> srcDir<span style="color: #000000; font-weight: bold;">:</span>File = <span style="color: #0033ff; font-weight: bold;">new</span> File<span style="color: #000000;">&#40;</span>mySourcePath<span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> sources<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span>;
	<span style="color: #009900;">// get all File instances in source path recursivly</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> files<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = readFiles<span style="color: #000000;">&#40;</span>srcDir<span style="color: #000000;">&#41;</span>;
	<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #0033ff; font-weight: bold;">each</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> file<span style="color: #000000; font-weight: bold;">:</span>File <span style="color: #0033ff; font-weight: bold;">in</span> files<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #6699cc; font-weight: bold;">var</span> sourceFile<span style="color: #000000; font-weight: bold;">:</span>ISourceFile = 
			NodeFactory.instance.createSourceFile<span style="color: #000000;">&#40;</span>
				FileUtil.readFile<span style="color: #000000;">&#40;</span>file.nativePath<span style="color: #000000;">&#41;</span>,
				file.nativePath,
				mySourcePath<span style="color: #000000;">&#41;</span>;
		<span style="color: #0033ff; font-weight: bold;">try</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #009900;">// build the source file's AST</span>
			sourceFile.buildAst<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
			<span style="color: #009900;">// add the source file to the book</span>
			book.addSourceFile<span style="color: #000000;">&#40;</span>sourceFile<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0033ff; font-weight: bold;">catch</span> <span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Error</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>e.<span style="color: #004993;">message</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Error parsing &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> sourceFile.fileName<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #009900;">// proccess all SourceFile trees</span>
	book.process<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #009900;">// now you have access to all the book's accessor API</span>
&nbsp;
	<span style="color: #009900;">// Vector.&lt;IClassTypeNode&gt;</span>
	book.access.classTypes;
	<span style="color: #009900;">// Vector.&lt;IFunctionTypeNode&gt;</span>
	book.access.functionTypes;
	<span style="color: #009900;">// Vector.&lt;IInterfaceTypeNode&gt;</span>
	book.access.interfaceTypes;
	<span style="color: #009900;">// Vector.&lt;ISourceFileCollection&gt;</span>
	book.access.sourceFileCollections;
	<span style="color: #009900;">// Vector.&lt;ITypeNode&gt; of class|interface|function</span>
	book.access.types;
&nbsp;
	<span style="color: #009900;">// returns the IClassTypeNode or null</span>
	book.access.findClassType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain.Class&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// returns the IFunctionTypeNode or null</span>
	book.access.findFunctionType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain.globalFunction&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// returns the IInterfaceTypeNode or null</span>
	book.access.findInterfaceType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain.IInterface&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// returns the ITypeNode or null</span>
	book.access.findType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain.Class&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// Vector.&lt;ITypeNode&gt;</span>
	book.access.getImplementedInterfaces<span style="color: #000000;">&#40;</span>classAType<span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// Vector.&lt;ITypeNode&gt;</span>
	book.access.getInterfaceImplementors<span style="color: #000000;">&#40;</span>classAType<span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// Vector.&lt;ISourceFileCollection&gt;</span>
	book.access.getSourceFileCollection<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// Vector.&lt;ITypeNode&gt;</span>
	book.access.getSubClasses<span style="color: #000000;">&#40;</span>classAType<span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// Vector.&lt;ITypeNode&gt;</span>
	book.access.getSubInterfaces<span style="color: #000000;">&#40;</span>iInterfaceAType<span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// Vector.&lt;ITypeNode&gt;</span>
	book.access.getSuperClasses<span style="color: #000000;">&#40;</span>classAType<span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// Vector.&lt;ITypeNode&gt;</span>
	book.access.getSuperInterfaces<span style="color: #000000;">&#40;</span>iInterfaceAType<span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// returns ITypeNode</span>
	book.access.getType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain.Class&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// Vector.&lt;ITypeNode&gt; all types in package</span>
	book.access.getTypes<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain&quot;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">// Boolean</span>
	book.access.hasType<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;my.domain.Class&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> readFiles<span style="color: #000000;">&#40;</span>directory<span style="color: #000000; font-weight: bold;">:</span>File, result<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>result == <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span>
		result = <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span>;
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> directories<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = directory.getDirectoryListing<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #0033ff; font-weight: bold;">each</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> file<span style="color: #000000; font-weight: bold;">:</span>File <span style="color: #0033ff; font-weight: bold;">in</span> directories<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>file.isDirectory<span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			result = readFiles<span style="color: #000000;">&#40;</span>file, result<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>file.<span style="color: #004993;">extension</span> == <span style="color: #990000;">&quot;as&quot;</span> <span style="color: #000000; font-weight: bold;">||</span> file.<span style="color: #004993;">extension</span> == <span style="color: #990000;">&quot;mxml&quot;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			result.<span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>file<span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">return</span> result;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.teotigraphix.com/2010/08/03/as3parser-framework-ias3book-api-access-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing the as3parser-framework opensource project</title>
		<link>http://blog.teotigraphix.com/2010/08/02/announcing-the-as3parser-framework-opensource-project/</link>
		<comments>http://blog.teotigraphix.com/2010/08/02/announcing-the-as3parser-framework-opensource-project/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 19:22:24 +0000</pubDate>
		<dc:creator>Michael Schmalle</dc:creator>
				<category><![CDATA[announcements]]></category>
		<category><![CDATA[as3parser-framework]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.teotigraphix.com/?p=104</guid>
		<description><![CDATA[The as3parser-framework is a project culminating from over 5 years of actionscript3 lexing, scanning, tokenizing and parsing observations. This framework is fully independent of the Flex framework or any other library for that matter. A brief list of inclusions;

AS3Scanner, AS3Tokenizer, AS3Parser (full AST including block ast)
MXMLScanner, MXMLParser (full AST)
ASDocScanner, ASDocParser (full AST)
A Complete As3 DOM [...]]]></description>
			<content:encoded><![CDATA[<p>The as3parser-framework is a project culminating from over 5 years of actionscript3 lexing, scanning, tokenizing and parsing observations. This framework is fully independent of the Flex framework or any other library for that matter. A brief list of inclusions;</p>
<ul>
<li><strong>AS3Scanner</strong>, <strong>AS3Tokenizer</strong>, <strong>AS3Parser</strong> (full AST including block ast)</li>
<li><strong>MXMLScanner</strong>, <strong>MXMLParser </strong>(full AST)</li>
<li><strong>ASDocScanner</strong>, <strong>ASDocParser </strong>(full AST)</li>
<li>A Complete <strong>As3 DOM decorator framework</strong> wrapping the abstract parser node</li>
<li>100&#8217;s of unit tests covering all classes</li>
</ul>
<p>Thanks to the PMD project in java, a rock solid as3 recursive decent parser was ported. All the other scanners and parser I created myself and tested0. The DOM framework comes mostly from the ASDoc documentor I created in java a couple years ago, that I still use when documenting all of my product components.</p>
<p>Here is the source code;</p>
<p><a href="http://github.com/teotigraphix/as3parser-framework">http://github.com/teotigraphix/as3parser-framework</a></p>
<p>All the code is released under the <strong>Apache 2 license</strong>.</p>
<p>How would you like to parse <strong>as3/mxml string data</strong>, or an <strong>.as file</strong> or an <strong>.mxml file</strong> from an AIR application or browser application? Well now you can with full AST.</p>
<p>The following is an example of the decorator node DOM.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> sourceFile<span style="color: #000000; font-weight: bold;">:</span>IAS3SourceFile = NodeFactory.instance.
	createSourceFile<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span>, <span style="color: #990000;">&quot;/home/src/my/domain/internal.as&quot;</span>, <span style="color: #990000;">&quot;/home/src&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">as</span> IAS3SourceFile;
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> compilationNode<span style="color: #000000; font-weight: bold;">:</span>ICompilationNode = sourceFile.buildAst<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>sourceFile.fileName<span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>sourceFile.compilationNode.packageNode.<span style="color: #004993;">name</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>sourceFile.compilationNode.packageNode.qualifiedName<span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>sourceFile.compilationNode.packageNode.typeNode.methods<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span>.<span style="color: #004993;">name</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>sourceFile.compilationNode.packageNode.typeNode.methods<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span>.<span style="color: #004993;">parameters</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span>.<span style="color: #004993;">name</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>sourceFile.compilationNode.packageNode.typeNode.methods<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span>.<span style="color: #004993;">comment</span>.shortDescription<span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>sourceFile.compilationNode.packageNode.typeNode.methods<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span>.<span style="color: #004993;">comment</span>.getDocTags<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;see&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>I have a large Swiz project that will be using this framework, stay tuned.</p>
<p>Mike</p>
<p>For giggles, here is a class file it digests easily and converts into AST;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/*fpkg*/</span><span style="color: #9900cc; font-weight: bold;">package</span> foo.bar <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> pkg.Stuff;
	<span style="color: #0033ff; font-weight: bold;">import</span> mx.core.mx_internal;
	use <span style="color: #004993;">namespace</span> mx_internal;
&nbsp;
	<span style="color: #3f5fbf;">/**
	 * Class meta.
	 */</span>
	<span style="color: #000000;">&#91;</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;myEvent&quot;</span>,<span style="color: #004993;">type</span>=<span style="color: #990000;">&quot;flash.events.Event&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
&nbsp;
	<span style="color: #3f5fbf;">/**
	 * java doc
	 */</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> <span style="color: #3f5fbf;">/*f*/</span>Blat extends Bing implements Febraz, Goo <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">data</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">data</span><span style="color: #000000; font-weight: bold;">:*</span> = womble<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
		<span style="color: #3f5fbf;">/** asdoc for property */</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> property<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#123;</span><span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">null</span>;<span style="color: #000000;">&#125;</span>
		<span style="color: #3f5fbf;">/** @private */</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> property<span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Blat<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">return</span>;
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #000000;">&#91;</span>Annotate<span style="color: #000000;">&#93;</span>
		<span style="color: #000000;">&#91;</span>Basic<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
		<span style="color: #3f5fbf;">/**
		 * Meta doccomment.
		 */</span>
		<span style="color: #000000;">&#91;</span><span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;foo&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
		<span style="color: #000000;">&#91;</span>Num<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
		<span style="color: #000000;">&#91;</span>Bool<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
		<span style="color: #000000;">&#91;</span>Arg<span style="color: #000000;">&#40;</span>foo=<span style="color: #990000;">&quot;bar&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
		<span style="color: #000000;">&#91;</span>List<span style="color: #000000;">&#40;</span>foo=<span style="color: #990000;">&quot;bar&quot;</span>, that=<span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
		<span style="color: #000000;">&#91;</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;alpha&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
		<span style="color: #000000;">&#91;</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;beta&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">x</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #000000; font-weight:bold;">1</span>;
		<span style="color: #3f5fbf;">/** javadoc? */</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> func<span style="color: #000000;">&#40;</span>arg<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Number</span>, foo=<span style="color: #0033ff; font-weight: bold;">null</span>, ...rest<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">default</span> xml <span style="color: #004993;">namespace</span> = <span style="color: #990000;">&quot;http://example.com/&quot;</span>;
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">b</span>=<span style="color: #000000; font-weight:bold;">1</span>;b<span style="color: #000000; font-weight: bold;">&lt;</span>=<span style="color: #000000; font-weight:bold;">10</span>;b<span style="color: #000000; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> bar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>;;<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #0033ff; font-weight: bold;">break</span>; <span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> g <span style="color: #0033ff; font-weight: bold;">in</span> blah<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #0033ff; font-weight: bold;">each</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> g <span style="color: #0033ff; font-weight: bold;">in</span> blah<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>h==<span style="color: #0033ff; font-weight: bold;">undefined</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #0033ff; font-weight: bold;">throw</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Error</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span> <span style="color: #3f5fbf;">/* bar */</span> <span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>a<span style="color: #000000;">&#41;</span> <span style="color: #004993;">b</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">while</span> <span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span> v<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">do</span> <span style="color: #000000;">&#123;</span> <span style="color: #0033ff; font-weight: bold;">continue</span>; <span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">while</span> <span style="color: #000000;">&#40;</span>m<span style="color: #000000;">&#41;</span>;
			<span style="color: #0033ff; font-weight: bold;">switch</span> <span style="color: #000000;">&#40;</span>blah<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">x</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #004993;">y</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
				<span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #000000; font-weight:bold;">4</span><span style="color: #000000; font-weight: bold;">:</span> next;
				<span style="color: #0033ff; font-weight: bold;">default</span><span style="color: #000000; font-weight: bold;">:</span> <span style="color: #004993;">x</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #004993;">y</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">try</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">with</span> <span style="color: #000000;">&#40;</span>scope<span style="color: #000000;">&#41;</span> foo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">catch</span> <span style="color: #000000;">&#40;</span>e<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> a=<span style="color: #004993;">b</span><span style="color: #000000; font-weight: bold;">?</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">x</span><span style="color: #000000; font-weight: bold;">+</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">new</span> Foo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">catch</span> <span style="color: #000000;">&#40;</span>f<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Error</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				const X=<span style="color: #0033ff; font-weight: bold;">new</span> Thing<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">try</span> <span style="color: #000000;">&#123;</span>
				foo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
			<span style="color: #000000;">&#125;</span> finally <span style="color: #000000;">&#123;</span>
				ff = <span style="color: #339966; font-weight: bold;">function</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">y</span>, z<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span>;
			<span style="color: #000000;">&#125;</span>
			l=<span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">1</span>,<span style="color: #990000;">'2'</span><span style="color: #000000;">&#93;</span>;
			xx = doc.ns<span style="color: #000000; font-weight: bold;">::</span><span style="color: #004993;">name</span>;
			m=<span style="color: #000000;">&#123;</span>a<span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#125;</span>;
<span style="color: #009900;">// TODO:			hex = 0x3;</span>
			<span style="color: #004993;">d</span> = <span style="color: #000000; font-weight: bold;">&lt;</span>foo bar=<span style="color: #990000;">&quot;{blat}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>;
			<span style="color: #004993;">d</span> = <span style="color: #000000; font-weight: bold;">&lt;</span>foo<span style="color: #000000; font-weight: bold;">&gt;</span>
					<span style="color: #000000; font-weight: bold;">&lt;</span>bar<span style="color: #000000; font-weight: bold;">/&gt;</span>
				<span style="color: #000000; font-weight: bold;">&lt;/</span>foo<span style="color: #000000; font-weight: bold;">&gt;</span>;
			r = <span style="color: #000000; font-weight: bold;">/</span>regexp<span style="color: #000000; font-weight: bold;">/</span>;
			a = <span style="color: #004993;">b</span>.<span style="color: #000000;">&#40;</span>@<span style="color: #004993;">c</span><span style="color: #000000;">&#41;</span>;
			zz = a..<span style="color: #004993;">b</span>;
			zzz = a..@<span style="color: #000000; font-weight: bold;">*</span>;
			zzzz = a..@<span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;foo&quot;</span><span style="color: #000000; font-weight: bold;">+</span><span style="color: #004993;">b</span><span style="color: #000000;">&#93;</span>;
			<span style="color: #3f5fbf;">/* unary expressions */</span>
			<span style="color: #000000; font-weight: bold;">--</span>a; <span style="color: #000000; font-weight: bold;">++</span>a; a<span style="color: #000000; font-weight: bold;">--</span>; a<span style="color: #000000; font-weight: bold;">++</span>; a = <span style="color: #000000; font-weight: bold;">-</span>a;
			<span style="color: #0033ff; font-weight: bold;">return</span> a.<span style="color: #004993;">call</span><span style="color: #000000;">&#40;</span>i.j<span style="color: #000000; font-weight: bold;">*</span>k, l<span style="color: #000000;">&#91;</span>m<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span> <span style="color: #009900;">// trailing comment</span>
<span style="color: #3f5fbf;">/**
 * internal class.
 */</span>
<span style="color: #9900cc; font-weight: bold;">class</span> InternalClass <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> foo<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> InternalClass<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #009900;">// trailing comment</span>
&nbsp;
<span style="color: #3f5fbf;">/**
 * internal function.
 */</span>
<span style="color: #339966; font-weight: bold;">function</span> myFunc<span style="color: #000000;">&#40;</span>arg<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span>Vector.<span style="color: #000000; font-weight: bold;">&lt;</span>int<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">null</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.teotigraphix.com/2010/08/02/announcing-the-as3parser-framework-opensource-project/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Git, Swiz :: what a new experience</title>
		<link>http://blog.teotigraphix.com/2010/08/02/git-swiz-what-a-new-experience/</link>
		<comments>http://blog.teotigraphix.com/2010/08/02/git-swiz-what-a-new-experience/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 10:52:32 +0000</pubDate>
		<dc:creator>Michael Schmalle</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://blog.teotigraphix.com/?p=102</guid>
		<description><![CDATA[The last 2-3 months have been full of new development for me, thus no blog posts in about 2 months (I&#8217;ve also been around a lot of new construction at my house). On the new construction tip, Swiz needs more exposure. I have spent the last two months putting together projects for this &#8220;micro framework&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>The last 2-3 months have been full of new development for me, thus no blog posts in about 2 months (I&#8217;ve also been around a lot of new construction at my house). On the new construction tip, Swiz needs more exposure. I have spent the last two months putting together projects for this &#8220;micro framework&#8221; and something else that really has been in the works for me since 2006(more on that later, blog post).</p>
<p>So how does GIT fall into this category? Well as most of you know, more and more projects are switching to github.com rather than google.com for their source code control. The past 6 months I remained naive since I was putting together component products. Now that I have been working open source projects again I decided to see what GIT was about. Being a hardcore SVN user since 2004, this was no easy task. It&#8217;s not the learning, it&#8217;s the re-learning of style. GIT has a different way of thinking.</p>
<p>Bottom line, if you havn&#8217;t looked at git source code control, you should. Just for the fact you can commit changes locally to your hearts content and then push those changes to a server whenever you want is huge. Branching is so much easier since it takes place locally as well.</p>
<p>All of these benefits together add up to a leaner and meaner way to sling the source code.</p>
<p>Mike </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.teotigraphix.com/2010/08/02/git-swiz-what-a-new-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
