Hi,<br>I&#39;m trying to build an Actionscript 3 to haxe <a href="http://haxe.org">http://haxe.org</a> translator, and I&#39;ve been taking a closer look at metaas to see if I could reuse the AS3 and island grammars as the basis for it.&nbsp; I thought I might as well try to build something robust with ANTLR than hand code a translator, but I&#39;ve into a couple snags with building the project.<br>
<br>I was hoping maybe David Holroyd or someone would give me some pointers on how to alter the grammar into a tree grammar for rewriting as I&#39;m still learning how to use ANTLR.<br><br>Just as a side note, I setup Netbeans with a Maven plugin to build the metaas project but ran into some dependency issues with the maven-archiver, plexus-archiver and plexus-components.&nbsp; I stopped trying to resolve them at that point because I wanted to focus on the task of the tree grammar.<br>
<br>I&#39;ve been reading through the docs and examples, but I don&#39;t know I would translate the certain parser rewrites into a tree grammar rule.&nbsp; For example:<br><br>classDefinition[LinkedListTree annos, LinkedListTree mods]<br>
&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp; CLASS ident<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; classExtendsClause<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; implementsClause<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; typeBlock<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -&gt; ^(CLASS_DEF {$annos} {$mods} ident classExtendsClause implementsClause typeBlock)<br>&nbsp;&nbsp;&nbsp; ;<br><br>In The Definitive Guide to ANTLR, Terrence Parr says to copy the rules over like so:<br>
<br>classDefinition[LinkedListTree annos, LinkedListTree mods]<br>
&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp; ^(CLASS_DEF {$annos} {$mods} ident classExtendsClause implementsClause typeBlock)<br>
&nbsp;&nbsp;&nbsp; ;<br><br>But what would I do about the {$annos} and {$mods} elements in the rule?&nbsp; I figure the parameter clause should be removed, but what should I use to reference the annos and mods elements in the AST?&nbsp; <br><br>
Thanks,<br>Don<br>