From Omega-Psi at gmx.de Tue May 6 07:17:23 2008 From: Omega-Psi at gmx.de (Florian Salihovic) Date: Tue, 06 May 2008 09:17:23 +0200 Subject: [metaas-dev] Sorting methods by name output parameters Message-ID: <20080506071723.270840@gmx.net> Hey everybody! I'm currently working on a code generator for my own needs. Metaas is a great help so far. But in order to navigate through my classes a lil easier i have this habit to write my methods in alphabetical order. I thought of sorting the code regarding my needs with metaas, but the list regarding the methods is read only. Do i have to sort the classes by hand? Also i'd like to know if some sort of output parameters are planned to be implemented in the nearer future (whitespaces between operands and operators, additional linebreaks between methods...). Best regards from Germany, Florian -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf at gmx From zjuyyl at gmail.com Tue May 6 12:44:42 2008 From: zjuyyl at gmail.com (Yuliang-Yang) Date: Tue, 6 May 2008 20:44:42 +0800 Subject: [metaas-dev] method.addStmt("super.executeNextCommand()") Message-ID: Hi all when I use method.addStmt("super.executeNextCommand()"); the compiler complains,, this method is override method of the super class. Exception in thread "main" uk.co.badgersinfoil.metaas.SyntaxException: Unexpected token DOT in "super.executeNextCommand()" at line 1 at uk.co.badgersinfoil.metaas.impl.ASTUtils.buildSyntaxException(ASTUtils.java:224) at uk.co.badgersinfoil.metaas.impl.AS3FragmentParser.parseStatement(AS3FragmentParser.java:44) at uk.co.badgersinfoil.metaas.impl.ASTStatementList.addStmt(ASTStatementList.java:72) at uk.co.badgersinfoil.metaas.impl.ASTASMethod.addStmt(ASTASMethod.java:96) Caused by: NoViableAltException(110!=[800:1: arguments : ( LPAREN expressionList RPAREN -> ^( ARGUMENTS expressionList ) | LPAREN RPAREN -> ARGUMENTS );]) at org.asdt.core.internal.antlr.AS3Parser.arguments(AS3Parser.java:10442) at org.asdt.core.internal.antlr.AS3Parser.superStatement(AS3Parser.java:4889) at org.asdt.core.internal.antlr.AS3Parser.statement(AS3Parser.java:4615) at uk.co.badgersinfoil.metaas.impl.AS3FragmentParser.parseStatement(AS3FragmentParser.java:42) ... 5 more and I also haven't find define a method with modifier "override",maybe this is cause by not modifiy with "override"; -- best regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080506/e9811b72/attachment.htm From dave at badgers-in-foil.co.uk Wed May 7 21:58:25 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 7 May 2008 21:58:25 +0000 Subject: [metaas-dev] method.addStmt("super.executeNextCommand()") In-Reply-To: References: Message-ID: <20080507215824.GA4514@badgers-in-foil.co.uk> On Tue, May 06, 2008 at 08:44:42PM +0800, Yuliang-Yang wrote: > when I use method.addStmt("super.executeNextCommand()"); > the compiler complains,, > this method is override method of the super class. > Exception in thread "main" uk.co.badgersinfoil.metaas.SyntaxException: > Unexpected token DOT in "super.executeNextCommand()" at line 1 Unfortunatly, this is due to incompleteness of the AS3 parser built into metaas. Several people have reported this problem so I'll try to tackle this first when I get back on to metaas stuff. Sorry about that! > and I also haven't find define a method with modifier "override",maybe this > is cause by not modifiy with "override"; I don't think that the message related to 'override' is coming from metaas. Something to do with your application? ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Wed May 7 22:16:58 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 7 May 2008 22:16:58 +0000 Subject: [metaas-dev] Sorting methods by name output parameters In-Reply-To: <20080506071723.270840@gmx.net> References: <20080506071723.270840@gmx.net> Message-ID: <20080507221657.GB4514@badgers-in-foil.co.uk> Hi there! On Tue, May 06, 2008 at 09:17:23AM +0200, Florian Salihovic wrote: > I'm currently working on a code generator for my own needs. Metaas is > a great help so far. But in order to navigate through my classes a lil > easier i have this habit to write my methods in alphabetical order. I > thought of sorting the code regarding my needs with metaas, but the > list regarding the methods is read only. Do i have to sort the classes > by hand? Well, I'm sorry to say that in-place modification of the contents of code blocks is not supported yet :( The underlying Abstract Syntax Tree data structure could allow this kind of change with a bit of work, but the public API doesn't have the features yet. I accept patches! ;) The only way of really doing this currently might be to walk the entire contents of the ASCompilationUnit, creating a duplicate of everything, but adding the duplicate methods in alphabetical order. That would really be a lot of effort though. > Also i'd like to know if some sort of output parameters are planned to > be implemented in the nearer future (whitespaces between operands and > operators, additional linebreaks between methods...). I have had some thoughts, and getting the configuration data to the places that need it seems to be the main challenge. i.e. it should be possible to tweak the settings in the ActionScriptFactory and then an ASBlock.newIf(...) should just do the right thing -- however, I don't yet have a simple way to get at that info from within the ASTStatementlList instance. Maybe one could walk up the AST to the root node, and have the instance object there hold a reference to the factory..? Well, there are other bugs to fix first I think. It is on my TODO list though! ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Wed May 7 22:25:48 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 7 May 2008 22:25:48 +0000 Subject: [metaas-dev] Reusing the ANTLR grammar In-Reply-To: References: Message-ID: <20080507222547.GC4514@badgers-in-foil.co.uk> Hello, On Mon, Apr 28, 2008 at 02:28:50PM -0700, Don-Duong Quach wrote: > I'm trying to build an Actionscript 3 to haxe http://haxe.org translator, > and I've been taking a closer look at metaas to see if I could reuse the AS3 > and island grammars as the basis for it. I thought I might as well try to > build something robust with ANTLR than hand code a translator, but I've into > a couple snags with building the project. > > 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'm still > learning how to use ANTLR. > > 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. I stopped trying to resolve them at > that point because I wanted to focus on the task of the tree grammar. I'm afraid I have no experience of Netbeans/Maven integration, so I can't really help out there. Were you able to get things to work with the plain-old Maven command line interface? > I've been reading through the docs and examples, but I don't know I would > translate the certain parser rewrites into a tree grammar rule. For > example: > > classDefinition[LinkedListTree annos, LinkedListTree mods] > : CLASS ident > classExtendsClause > implementsClause > typeBlock > -> ^(CLASS_DEF {$annos} {$mods} ident classExtendsClause > implementsClause typeBlock) > ; > > In The Definitive Guide to ANTLR, Terrence Parr says to copy the rules over > like so: > > classDefinition[LinkedListTree annos, LinkedListTree mods] > : ^(CLASS_DEF {$annos} {$mods} ident classExtendsClause > implementsClause typeBlock) > ; Note that you would not need to pass the [annos,mods] arguments to this rule in the tree parser. The main parser will already have inserted these into the resulting tree. > But what would I do about the {$annos} and {$mods} elements in the rule? I > figure the parameter clause should be removed, but what should I use to > reference the annos and mods elements in the AST? You need to consider what structure the tree parser will actually observe. In the above example, {$annos} and {$mods} are references (passed as arguments to the rule) to some subtrees. In your tree parser, you would need to address the concrete tree structure that will be produced that these points. If you look at the rules that may invoke the classDefinition rule, you'll see that $annos and $mods are the subtrees produced by the rules 'annotations' and 'modifiers' respectively. Therefore, you could write the rule in the tree parser like... classDefinition : ^(CLASS_DEF annotations modifiers ident classExtendsClause implementsClause typeBlock) does that make sense? ta, dave -- http://david.holroyd.me.uk/ From zjuyyl at gmail.com Thu May 8 13:06:33 2008 From: zjuyyl at gmail.com (Yuliang-Yang) Date: Thu, 8 May 2008 21:06:33 +0800 Subject: [metaas-dev] metaas-dev Digest, Vol 17, Issue 3 In-Reply-To: References: Message-ID: 2008/5/8, metaas-dev-request at lists.badgers-in-foil.co.uk < metaas-dev-request at lists.badgers-in-foil.co.uk>: > > Send metaas-dev mailing list submissions to > metaas-dev at lists.badgers-in-foil.co.uk > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.badgers-in-foil.co.uk/mailman/listinfo/metaas-dev > or, via email, send a message with subject or body 'help' to > metaas-dev-request at lists.badgers-in-foil.co.uk > > You can reach the person managing the list at > metaas-dev-owner at lists.badgers-in-foil.co.uk > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of metaas-dev digest..." > > > Today's Topics: > > 1. Re: method.addStmt("super.executeNextCommand()") (David Holroyd) > 2. Re: Sorting methods by name output parameters (David Holroyd) > 3. Re: Reusing the ANTLR grammar (David Holroyd) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 7 May 2008 21:58:25 +0000 > From: David Holroyd > Subject: Re: [metaas-dev] method.addStmt("super.executeNextCommand()") > To: metaas-dev at lists.badgers-in-foil.co.uk > Message-ID: <20080507215824.GA4514 at badgers-in-foil.co.uk> > Content-Type: text/plain; charset=us-ascii > > On Tue, May 06, 2008 at 08:44:42PM +0800, Yuliang-Yang wrote: > > when I use method.addStmt("super.executeNextCommand()"); > > the compiler complains,, > > this method is override method of the super class. > > Exception in thread "main" uk.co.badgersinfoil.metaas.SyntaxException: > > Unexpected token DOT in "super.executeNextCommand()" at line 1 > > Unfortunatly, this is due to incompleteness of the AS3 parser built into > metaas. Several people have reported this problem so I'll try to tackle > this first when I get back on to metaas stuff. > > Sorry about that! > > > > and I also haven't find define a method with modifier "override",maybe > this > > is cause by not modifiy with "override"; > > I don't think that the message related to 'override' is coming from > metaas. Something to do with your application? My usecase is that i want generate a subclass of A,which is B, and class A have a method executeNextCommand, when I generate B's executeNextCommand I just use ASMethod method = clazz.newMethod("executeNextCommand",,,somemodify), and then use method.addStmt("super.executeNextCommand()"); so the parser complain :( ta, > dave > > -- > http://david.holroyd.me.uk/ > > > > ------------------------------ > > Message: 2 > Date: Wed, 7 May 2008 22:16:58 +0000 > From: David Holroyd > Subject: Re: [metaas-dev] Sorting methods by name output parameters > To: metaas-dev at lists.badgers-in-foil.co.uk > Message-ID: <20080507221657.GB4514 at badgers-in-foil.co.uk> > Content-Type: text/plain; charset=us-ascii > > Hi there! > > On Tue, May 06, 2008 at 09:17:23AM +0200, Florian Salihovic wrote: > > I'm currently working on a code generator for my own needs. Metaas is > > a great help so far. But in order to navigate through my classes a lil > > easier i have this habit to write my methods in alphabetical order. I > > thought of sorting the code regarding my needs with metaas, but the > > list regarding the methods is read only. Do i have to sort the classes > > by hand? > > Well, I'm sorry to say that in-place modification of the contents of > code blocks is not supported yet :( > > The underlying Abstract Syntax Tree data structure could allow this kind > of change with a bit of work, but the public API doesn't have the > features yet. > > I accept patches! ;) > > The only way of really doing this currently might be to walk the entire > contents of the ASCompilationUnit, creating a duplicate of everything, > but adding the duplicate methods in alphabetical order. That would > really be a lot of effort though. > > > > Also i'd like to know if some sort of output parameters are planned to > > be implemented in the nearer future (whitespaces between operands and > > operators, additional linebreaks between methods...). > > I have had some thoughts, and getting the configuration data to the > places that need it seems to be the main challenge. > > i.e. it should be possible to tweak the settings in the > ActionScriptFactory and then an ASBlock.newIf(...) should just do the > right thing -- however, I don't yet have a simple way to get at that > info from within the ASTStatementlList instance. Maybe one could walk > up the AST to the root node, and have the instance object there hold a > reference to the factory..? Well, there are other bugs to fix first I > think. > > It is on my TODO list though! > > > ta, > dave > > -- > http://david.holroyd.me.uk/ > > > > ------------------------------ > > Message: 3 > Date: Wed, 7 May 2008 22:25:48 +0000 > From: David Holroyd > Subject: Re: [metaas-dev] Reusing the ANTLR grammar > To: metaas-dev at lists.badgers-in-foil.co.uk > Message-ID: <20080507222547.GC4514 at badgers-in-foil.co.uk> > Content-Type: text/plain; charset=us-ascii > > Hello, > > On Mon, Apr 28, 2008 at 02:28:50PM -0700, Don-Duong Quach wrote: > > I'm trying to build an Actionscript 3 to haxe http://haxe.orgtranslator, > > and I've been taking a closer look at metaas to see if I could reuse the > AS3 > > and island grammars as the basis for it. I thought I might as well try > to > > build something robust with ANTLR than hand code a translator, but I've > into > > a couple snags with building the project. > > > > 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'm still > > learning how to use ANTLR. > > > > 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. I stopped trying to resolve them > at > > that point because I wanted to focus on the task of the tree grammar. > > I'm afraid I have no experience of Netbeans/Maven integration, so I > can't really help out there. Were you able to get things to work with > the plain-old Maven command line interface? > > > > I've been reading through the docs and examples, but I don't know I > would > > translate the certain parser rewrites into a tree grammar rule. For > > example: > > > > classDefinition[LinkedListTree annos, LinkedListTree mods] > > : CLASS ident > > classExtendsClause > > implementsClause > > typeBlock > > -> ^(CLASS_DEF {$annos} {$mods} ident classExtendsClause > > implementsClause typeBlock) > > ; > > > > In The Definitive Guide to ANTLR, Terrence Parr says to copy the rules > over > > like so: > > > > classDefinition[LinkedListTree annos, LinkedListTree mods] > > : ^(CLASS_DEF {$annos} {$mods} ident classExtendsClause > > implementsClause typeBlock) > > ; > > Note that you would not need to pass the [annos,mods] arguments to this > rule in the tree parser. The main parser will already have inserted > these into the resulting tree. > > > > But what would I do about the {$annos} and {$mods} elements in the > rule? I > > figure the parameter clause should be removed, but what should I use to > > reference the annos and mods elements in the AST? > > You need to consider what structure the tree parser will actually > observe. > > In the above example, {$annos} and {$mods} are references (passed as > arguments to the rule) to some subtrees. In your tree parser, you would > need to address the concrete tree structure that will be produced that > these points. > > If you look at the rules that may invoke the classDefinition rule, > you'll see that $annos and $mods are the subtrees produced by the rules > 'annotations' and 'modifiers' respectively. > > Therefore, you could write the rule in the tree parser like... > > > classDefinition > : ^(CLASS_DEF annotations modifiers ident classExtendsClause > implementsClause typeBlock) > > > does that make sense? > > > ta, > dave > > -- > http://david.holroyd.me.uk/ > > > > ------------------------------ > > _______________________________________________ > metaas-dev mailing list > metaas-dev at lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/metaas-dev > > > End of metaas-dev Digest, Vol 17, Issue 3 > ***************************************** > -- best regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080508/af6af565/attachment.htm From geekrelief at gmail.com Thu May 8 23:12:35 2008 From: geekrelief at gmail.com (Don-Duong Quach) Date: Thu, 8 May 2008 16:12:35 -0700 Subject: [metaas-dev] Reusing the ANTLR grammar In-Reply-To: <20080507222547.GC4514@badgers-in-foil.co.uk> References: <20080507222547.GC4514@badgers-in-foil.co.uk> Message-ID: Thanks for reply. the funny thing is after I sent the email, I realized what I was missing, but I came across some new rules I was sure how to translate. such as: propOrIdent[LinkedListTree identPrimary, Token startToken] : { retval.start = startToken; } d=DOT propId=qualifiedIdent -> ^(PROPERTY_OR_IDENTIFIER[$d] {$identPrimary} $propId) ; and xmlLiteral @init { LinkedListTree xml = null; } : LT { xml=parseXMLLiteral(); } -> ^(XML_LITERAL {xml}) ; I haven't found any leads on how to translate the "action inserted" {} nodes. I'm not sure what to call them. Looking at the resulting parser code comments for the xmlLiteral rule it doesn't look like ANTLR sees the special nodes. root_0 = (LinkedListTree)adaptor.nil(); // 1121:3: -> ^( XML_LITERAL ) { // AS3.g3:1121:6: ^( XML_LITERAL ) { LinkedListTree root_1 = (LinkedListTree)adaptor.nil(); root_1 = (LinkedListTree)adaptor.becomeRoot(adaptor.create(XML_LITERAL, "XML_LITERAL"), root_1); adaptor.addChild(root_1, xml); adaptor.addChild(root_0, root_1); } } So how would I go about translating the rules in a tree grammar? xmlLiteral : ^(XML_LITERAL WHATGOESHERE?) ; Thanks, Don On Wed, May 7, 2008 at 3:25 PM, David Holroyd wrote: > Hello, > > On Mon, Apr 28, 2008 at 02:28:50PM -0700, Don-Duong Quach wrote: > > I'm trying to build an Actionscript 3 to haxe http://haxe.orgtranslator, > > and I've been taking a closer look at metaas to see if I could reuse the > AS3 > > and island grammars as the basis for it. I thought I might as well try > to > > build something robust with ANTLR than hand code a translator, but I've > into > > a couple snags with building the project. > > > > 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'm still > > learning how to use ANTLR. > > > > 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. I stopped trying to resolve them > at > > that point because I wanted to focus on the task of the tree grammar. > > I'm afraid I have no experience of Netbeans/Maven integration, so I > can't really help out there. Were you able to get things to work with > the plain-old Maven command line interface? > > > > I've been reading through the docs and examples, but I don't know I would > > translate the certain parser rewrites into a tree grammar rule. For > > example: > > > > classDefinition[LinkedListTree annos, LinkedListTree mods] > > : CLASS ident > > classExtendsClause > > implementsClause > > typeBlock > > -> ^(CLASS_DEF {$annos} {$mods} ident classExtendsClause > > implementsClause typeBlock) > > ; > > > > In The Definitive Guide to ANTLR, Terrence Parr says to copy the rules > over > > like so: > > > > classDefinition[LinkedListTree annos, LinkedListTree mods] > > : ^(CLASS_DEF {$annos} {$mods} ident classExtendsClause > > implementsClause typeBlock) > > ; > > Note that you would not need to pass the [annos,mods] arguments to this > rule in the tree parser. The main parser will already have inserted > these into the resulting tree. > > > > But what would I do about the {$annos} and {$mods} elements in the rule? > I > > figure the parameter clause should be removed, but what should I use to > > reference the annos and mods elements in the AST? > > You need to consider what structure the tree parser will actually > observe. > > In the above example, {$annos} and {$mods} are references (passed as > arguments to the rule) to some subtrees. In your tree parser, you would > need to address the concrete tree structure that will be produced that > these points. > > If you look at the rules that may invoke the classDefinition rule, > you'll see that $annos and $mods are the subtrees produced by the rules > 'annotations' and 'modifiers' respectively. > > Therefore, you could write the rule in the tree parser like... > > > classDefinition > : ^(CLASS_DEF annotations modifiers ident classExtendsClause > implementsClause typeBlock) > > > does that make sense? > > > ta, > dave > > -- > http://david.holroyd.me.uk/ > > _______________________________________________ > metaas-dev mailing list > metaas-dev at lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/metaas-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080508/1ffe0015/attachment-0001.htm From zjuyyl at gmail.com Sun May 18 12:57:04 2008 From: zjuyyl at gmail.com (Yuliang-Yang) Date: Sun, 18 May 2008 19:57:04 +0800 Subject: [metaas-dev] can metaas parser flex framework? Message-ID: I use ActionScriptParser to parser flex as class,,but it failed,, Exception in thread "main" uk.co.badgersinfoil.metaas.SyntaxException: Unexpected token SUPER at line 484 at uk.co.badgersinfoil.metaas.impl.ASTUtils.buildSyntaxException(ASTUtils.java:224) at uk.co.badgersinfoil.metaas.impl.ASTActionScriptParser.parse(ASTActionScriptParser.java:37) at com.ronadia.java.ASGeneratorUtil.parser(ASGeneratorUtil.java:24) at com.ronadia.java.ASGeneratorUtil.parser(ASGeneratorUtil.java:31) at com.ronadia.java.ASGeneratorUtil.parser(ASGeneratorUtil.java:31) at com.ronadia.java.ASGeneratorUtil.main(ASGeneratorUtil.java:56) Caused by: NoViableAltException(81!=[1010:1: unaryExpression : (in= INC unaryExpression -> ^( PRE_INC[$in] unaryExpression ) | de= DEC unaryExpression -> ^( PRE_DEC[$de] unaryExpression ) | MINUS unaryExpression -> ^( UNARY_MINUS unaryExpression ) | PLUS unaryExpression -> ^( UNARY_PLUS unaryExpression ) | unaryExpressionNotPlusMinus );]) at org.asdt.core.internal.antlr.AS3Parser.unaryExpression(AS3Parser.java:13654) at org.asdt.core.internal.antlr.AS3Parser.unaryExpressionNotPlusMinus(AS3Parser.java:14106) at org.asdt.core.internal.antlr.AS3Parser.unaryExpression(AS3Parser.java:13835) at org.asdt.core.internal.antlr.AS3Parser.multiplicativeExpression(AS3Parser.java:13373) at org.asdt.core.internal.antlr.AS3Parser.additiveExpression(AS3Parser.java:13236) at org.asdt.core.internal.antlr.AS3Parser.shiftExpression(AS3Parser.java:13099) at org.asdt.core.internal.antlr.AS3Parser.relationalExpression(AS3Parser.java:12406) at org.asdt.core.internal.antlr.AS3Parser.equalityExpression(AS3Parser.java:12269) at org.asdt.core.internal.antlr.AS3Parser.bitwiseAndExpression(AS3Parser.java:12183) at org.asdt.core.internal.antlr.AS3Parser.bitwiseXorExpression(AS3Parser.java:12097) at org.asdt.core.internal.antlr.AS3Parser.bitwiseOrExpression(AS3Parser.java:12011) at org.asdt.core.internal.antlr.AS3Parser.logicalAndExpression(AS3Parser.java:11874) at org.asdt.core.internal.antlr.AS3Parser.logicalOrExpression(AS3Parser.java:11737) at org.asdt.core.internal.antlr.AS3Parser.conditionalExpression(AS3Parser.java:11558) at org.asdt.core.internal.antlr.AS3Parser.assignmentExpression(AS3Parser.java:11412) at org.asdt.core.internal.antlr.AS3Parser.expression(AS3Parser.java:11256) at org.asdt.core.internal.antlr.AS3Parser.condition(AS3Parser.java:4048) at org.asdt.core.internal.antlr.AS3Parser.ifStatement(AS3Parser.java:5092) at org.asdt.core.internal.antlr.AS3Parser.statement(AS3Parser.java:4667) at org.asdt.core.internal.antlr.AS3Parser.blockEntry(AS3Parser.java:3996) at org.asdt.core.internal.antlr.AS3Parser.block(AS3Parser.java:3907) at org.asdt.core.internal.antlr.AS3Parser.methodDefinition(AS3Parser.java:2465) at org.asdt.core.internal.antlr.AS3Parser.typeBlockEntry(AS3Parser.java:2190) at org.asdt.core.internal.antlr.AS3Parser.typeBlock(AS3Parser.java:2002) at org.asdt.core.internal.antlr.AS3Parser.classDefinition(AS3Parser.java:1326) at org.asdt.core.internal.antlr.AS3Parser.packageBlockEntry(AS3Parser.java:1037) at org.asdt.core.internal.antlr.AS3Parser.packageBlock(AS3Parser.java:809) at org.asdt.core.internal.antlr.AS3Parser.packageDecl(AS3Parser.java:742) at org.asdt.core.internal.antlr.AS3Parser.as3CompilationUnit(AS3Parser.java:635) at org.asdt.core.internal.antlr.AS3Parser.compilationUnit(AS3Parser.java:369) at uk.co.badgersinfoil.metaas.impl.ASTActionScriptParser.parse(ASTActionScriptParser.java:35) ... 4 more -- best regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080518/feeec8de/attachment.html From zjuyyl at gmail.com Wed May 21 07:12:24 2008 From: zjuyyl at gmail.com (Yuliang-Yang) Date: Wed, 21 May 2008 14:12:24 +0800 Subject: [metaas-dev] metaas-dev Digest, Vol 17, Issue 5 In-Reply-To: References: Message-ID: I will try flex sdk complier.. 2008/5/19, metaas-dev-request at lists.badgers-in-foil.co.uk < metaas-dev-request at lists.badgers-in-foil.co.uk>: > > Send metaas-dev mailing list submissions to > metaas-dev at lists.badgers-in-foil.co.uk > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.badgers-in-foil.co.uk/mailman/listinfo/metaas-dev > or, via email, send a message with subject or body 'help' to > metaas-dev-request at lists.badgers-in-foil.co.uk > > You can reach the person managing the list at > metaas-dev-owner at lists.badgers-in-foil.co.uk > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of metaas-dev digest..." > > > Today's Topics: > > 1. can metaas parser flex framework? (Yuliang-Yang) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 18 May 2008 19:57:04 +0800 > From: Yuliang-Yang > Subject: [metaas-dev] can metaas parser flex framework? > To: metaas-dev at lists.badgers-in-foil.co.uk > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > I use ActionScriptParser to parser flex as class,,but it failed,, > > Exception in thread "main" uk.co.badgersinfoil.metaas.SyntaxException: > Unexpected token SUPER at line 484 > at > > uk.co.badgersinfoil.metaas.impl.ASTUtils.buildSyntaxException(ASTUtils.java:224) > at > > uk.co.badgersinfoil.metaas.impl.ASTActionScriptParser.parse(ASTActionScriptParser.java:37) > at com.ronadia.java.ASGeneratorUtil.parser(ASGeneratorUtil.java:24) > at com.ronadia.java.ASGeneratorUtil.parser(ASGeneratorUtil.java:31) > at com.ronadia.java.ASGeneratorUtil.parser(ASGeneratorUtil.java:31) > at com.ronadia.java.ASGeneratorUtil.main(ASGeneratorUtil.java:56) > Caused by: NoViableAltException(81!=[1010:1: unaryExpression : (in= INC > unaryExpression -> ^( PRE_INC[$in] unaryExpression ) | de= DEC > unaryExpression -> ^( PRE_DEC[$de] unaryExpression ) | MINUS > unaryExpression > -> ^( UNARY_MINUS unaryExpression ) | PLUS unaryExpression -> ^( UNARY_PLUS > unaryExpression ) | unaryExpressionNotPlusMinus );]) > at > > org.asdt.core.internal.antlr.AS3Parser.unaryExpression(AS3Parser.java:13654) > at > > org.asdt.core.internal.antlr.AS3Parser.unaryExpressionNotPlusMinus(AS3Parser.java:14106) > at > > org.asdt.core.internal.antlr.AS3Parser.unaryExpression(AS3Parser.java:13835) > at > > org.asdt.core.internal.antlr.AS3Parser.multiplicativeExpression(AS3Parser.java:13373) > at > > org.asdt.core.internal.antlr.AS3Parser.additiveExpression(AS3Parser.java:13236) > at > > org.asdt.core.internal.antlr.AS3Parser.shiftExpression(AS3Parser.java:13099) > at > > org.asdt.core.internal.antlr.AS3Parser.relationalExpression(AS3Parser.java:12406) > at > > org.asdt.core.internal.antlr.AS3Parser.equalityExpression(AS3Parser.java:12269) > at > > org.asdt.core.internal.antlr.AS3Parser.bitwiseAndExpression(AS3Parser.java:12183) > at > > org.asdt.core.internal.antlr.AS3Parser.bitwiseXorExpression(AS3Parser.java:12097) > at > > org.asdt.core.internal.antlr.AS3Parser.bitwiseOrExpression(AS3Parser.java:12011) > at > > org.asdt.core.internal.antlr.AS3Parser.logicalAndExpression(AS3Parser.java:11874) > at > > org.asdt.core.internal.antlr.AS3Parser.logicalOrExpression(AS3Parser.java:11737) > at > > org.asdt.core.internal.antlr.AS3Parser.conditionalExpression(AS3Parser.java:11558) > at > > org.asdt.core.internal.antlr.AS3Parser.assignmentExpression(AS3Parser.java:11412) > at org.asdt.core.internal.antlr.AS3Parser.expression(AS3Parser.java:11256) > at org.asdt.core.internal.antlr.AS3Parser.condition(AS3Parser.java:4048) > at org.asdt.core.internal.antlr.AS3Parser.ifStatement(AS3Parser.java:5092) > at org.asdt.core.internal.antlr.AS3Parser.statement(AS3Parser.java:4667) > at org.asdt.core.internal.antlr.AS3Parser.blockEntry(AS3Parser.java:3996) > at org.asdt.core.internal.antlr.AS3Parser.block(AS3Parser.java:3907) > at > > org.asdt.core.internal.antlr.AS3Parser.methodDefinition(AS3Parser.java:2465) > at > org.asdt.core.internal.antlr.AS3Parser.typeBlockEntry(AS3Parser.java:2190) > at org.asdt.core.internal.antlr.AS3Parser.typeBlock(AS3Parser.java:2002) > at > org.asdt.core.internal.antlr.AS3Parser.classDefinition(AS3Parser.java:1326) > at > > org.asdt.core.internal.antlr.AS3Parser.packageBlockEntry(AS3Parser.java:1037) > at org.asdt.core.internal.antlr.AS3Parser.packageBlock(AS3Parser.java:809) > at org.asdt.core.internal.antlr.AS3Parser.packageDecl(AS3Parser.java:742) > at > > org.asdt.core.internal.antlr.AS3Parser.as3CompilationUnit(AS3Parser.java:635) > at > org.asdt.core.internal.antlr.AS3Parser.compilationUnit(AS3Parser.java:369) > at > > uk.co.badgersinfoil.metaas.impl.ASTActionScriptParser.parse(ASTActionScriptParser.java:35) > ... 4 more > > > -- > best regards, > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080518/feeec8de/attachment-0001.html > > ------------------------------ > > _______________________________________________ > metaas-dev mailing list > metaas-dev at lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/metaas-dev > > > End of metaas-dev Digest, Vol 17, Issue 5 > ***************************************** > -- best regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080521/09f1199f/attachment.htm