From dave at badgers-in-foil.co.uk Sat Mar 1 18:05:43 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sat, 01 Mar 2008 18:05:43 +0000 Subject: [metaas-dev] [SVN metaas] don't clobber any initialiser when setting the name of an ASField Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080301/cd6830f5/attachment.htm From mr.rience at gmail.com Sun Mar 2 20:10:05 2008 From: mr.rience at gmail.com (Krzysztof Adamski) Date: Sun, 2 Mar 2008 14:10:05 -0600 Subject: [metaas-dev] MetaTag problem Message-ID: Hi, I'm trying to parse a meta tag with param, value pair. Unfortunately - metaas is having a problem and is throwing an exception when asMetaTag.getParams() method is thrown. I'm posting and error here and I'm attaching simple java file which will confirm this error: Exception in thread "main" uk.co.badgersinfoil.metaas.SyntaxException: Expected ANNOTATION_PARAM, got ASSIGN at uk.co.badgersinfoil.metaas.impl.ASTASMetaTag.toParam( ASTASMetaTag.java:127) at uk.co.badgersinfoil.metaas.impl.ASTASMetaTag.getParams( ASTASMetaTag.java:120) at org.as2j.MetaTagTest.main(MetaTagTest.java:42) Best regards, Krzysztof Adamski -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080302/26ee0e4d/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: MetaTagTest.java Type: text/x-java Size: 1403 bytes Desc: not available Url : http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080302/26ee0e4d/attachment.java From dave at badgers-in-foil.co.uk Tue Mar 4 12:38:12 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 4 Mar 2008 12:38:12 +0000 Subject: [metaas-dev] Apologies Message-ID: <20080304123811.GA4092@badgers-in-foil.co.uk> ...my home internet connection has been down for the last few days, which is why I've not responded to the last few mails to the list. Once it's working again, I'll be able to have a proper look at the issues people have been reporting. Sorry again! dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Thu Mar 6 23:20:41 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Thu, 06 Mar 2008 23:20:41 +0000 Subject: [metaas-dev] [SVN metaas] missing import broke compilation References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080306/61899546/attachment.htm From dave at badgers-in-foil.co.uk Thu Mar 6 23:40:24 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu, 6 Mar 2008 23:40:24 +0000 Subject: [metaas-dev] Changing Field names in a parsed AS3 source file In-Reply-To: <47C4785B.6090809@kitkat.f9.co.uk> References: <47C4785B.6090809@kitkat.f9.co.uk> Message-ID: <20080306234023.GC18091@badgers-in-foil.co.uk> On Tue, Feb 26, 2008 at 08:36:43PM +0000, Dave N wrote: > I'm new here, new to java, fairly new to AS3 and very new to metaas - > so be gentle! I hope it's ok to post to a dev list - but i couldn't find > a user one? No worries! > I've got to convert a lot of old code in lots of files to > as3, and i've been looking for a way to automate some of it, and metaas > looks ideal. I've been playing around with it, and tried various things > - i'm probably doing something really dumb! I can change the name of a > field, but when i try to save it, it never works. I've tried allsorts of > ways and still haven't found one that works - i'm not sure if it metaas, > java or most likely just me. Should the following work? (it writes the > new file out, but without the change). > > ActionScriptFactory fact = new ActionScriptFactory(); > FileInputStream in = new FileInputStream("dungeon.as"); > InputStreamReader reader = new InputStreamReader(in); > ActionScriptParser parser = fact.newParser(); > ASCompilationUnit unit = parser.parse(reader); > > //look for variable tileColour > //ASPackage pkg = unit.getPackage(); > ASClassType asclass = (ASClassType)unit.getType(); > ASField field = asclass.getField("tileColour1"); > System.out.println(field.getName()); > field.setName("wallTileColour"); > System.out.println(field.getName()); > > //check to see if it's been updated > field = > ((ASClassType)unit.getType()).getField("wallTileColour"); > System.out.println(field.getName()); > > //ok, now add compilation unit to current project > ActionScriptProject proj = fact.newEmptyASProject("."); > proj.addCompilationUnit(unit); > proj.setOutputLocation("fixed\\"); > proj.writeAll(); Looks like it should work, so probably metaas has a bug. Is the input actually an AS2 file, or has it already had the basic transformation to AS3 done? > I also checked out the cvs version and compiled that, but just kept give > me a "NoViableAltException antlr" error but it's probably me done > something wrong - are there many important updates in the cvs? I think it might help to see the input file that you are trying to process. Can you send that too? You mentioned in another email that you've used antlrworks to compile the grammars included in the codebase. Did you try to use Maven to build the project? This is the preferred way :) thanks! dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Thu Mar 6 23:53:41 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Thu, 06 Mar 2008 23:53:41 +0000 Subject: [metaas-dev] [SVN metaas] Attempting to reproduce problem reported by Krzysztof Adamski References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080306/50f3e835/attachment.htm From dave at badgers-in-foil.co.uk Thu Mar 6 23:58:19 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu, 6 Mar 2008 23:58:19 +0000 Subject: [metaas-dev] MetaTag problem In-Reply-To: References: Message-ID: <20080306235818.GD18091@badgers-in-foil.co.uk> Hi there! On Sun, Mar 02, 2008 at 02:10:05PM -0600, Krzysztof Adamski wrote: > I'm trying to parse a meta tag with param, value pair. Unfortunately - > metaas is having a problem and is throwing an exception when > asMetaTag.getParams() method is thrown. I'm posting and error here and I'm > attaching simple java file which will confirm this error: > > Exception in thread "main" uk.co.badgersinfoil.metaas.SyntaxException: > Expected ANNOTATION_PARAM, got ASSIGN > at uk.co.badgersinfoil.metaas.impl.ASTASMetaTag.toParam( > ASTASMetaTag.java:127) > at uk.co.badgersinfoil.metaas.impl.ASTASMetaTag.getParams( > ASTASMetaTag.java:120) > at org.as2j.MetaTagTest.main(MetaTagTest.java:42) I've tried to reproduce using the latest code, but the problem you report doesn't seem to occur any more. Are you able to build the code from Svn? I can send you the latest .jar of that's easier for you. ta, dave -- http://david.holroyd.me.uk/ From mr.rience at gmail.com Fri Mar 7 08:17:52 2008 From: mr.rience at gmail.com (Krzysztof Adamski) Date: Fri, 7 Mar 2008 02:17:52 -0600 Subject: [metaas-dev] MetaTag problem In-Reply-To: <20080306235818.GD18091@badgers-in-foil.co.uk> References: <20080306235818.GD18091@badgers-in-foil.co.uk> Message-ID: Hi, Please send me latest jar if it's possible. I was using latest release. Thank you, 2008/3/6, David Holroyd : > > Hi there! > > > On Sun, Mar 02, 2008 at 02:10:05PM -0600, Krzysztof Adamski wrote: > > I'm trying to parse a meta tag with param, value pair. Unfortunately - > > metaas is having a problem and is throwing an exception when > > asMetaTag.getParams() method is thrown. I'm posting and error here and > I'm > > attaching simple java file which will confirm this error: > > > > Exception in thread "main" uk.co.badgersinfoil.metaas.SyntaxException: > > Expected ANNOTATION_PARAM, got ASSIGN > > at uk.co.badgersinfoil.metaas.impl.ASTASMetaTag.toParam( > > ASTASMetaTag.java:127) > > at uk.co.badgersinfoil.metaas.impl.ASTASMetaTag.getParams( > > ASTASMetaTag.java:120) > > at org.as2j.MetaTagTest.main(MetaTagTest.java:42) > > > I've tried to reproduce using the latest code, but the problem you > report doesn't seem to occur any more. > > Are you able to build the code from Svn? I can send you the latest .jar > of that's easier for you. > > > 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/20080307/259c268f/attachment.htm From dave at badgers-in-foil.co.uk Mon Mar 10 23:03:53 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Mon, 10 Mar 2008 23:03:53 +0000 Subject: [metaas-dev] MetaTag problem In-Reply-To: References: <20080306235818.GD18091@badgers-in-foil.co.uk> Message-ID: <20080310230352.GA19767@badgers-in-foil.co.uk> On Fri, Mar 07, 2008 at 02:17:52AM -0600, Krzysztof Adamski wrote: > Please send me latest jar if it's possible. I was using latest release. Did you have any luck getting the latest code to work? Any other problems? -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Tue Mar 11 00:13:25 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Tue, 11 Mar 2008 00:13:25 +0000 Subject: [metaas-dev] [SVN metaas] The great license switcheroo Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080311/065e4ffe/attachment-0001.htm From dave at badgers-in-foil.co.uk Tue Mar 11 00:44:56 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Tue, 11 Mar 2008 00:44:56 +0000 Subject: [metaas-dev] [SVN metaas] Dunno were the release notes for 0.7 got to; pasted from the project page. References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080311/770374b1/attachment.htm From dave at badgers-in-foil.co.uk Tue Mar 11 00:47:20 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Tue, 11 Mar 2008 00:47:20 +0000 Subject: [metaas-dev] [SVN metaas] distribute the new license in the download References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080311/82fe44dd/attachment.htm From benzofurans-mail001 at yahoo.com Fri Mar 14 22:30:27 2008 From: benzofurans-mail001 at yahoo.com (benzo) Date: Fri, 14 Mar 2008 23:30:27 +0100 Subject: [metaas-dev] questions about metaas Message-ID: hi dave you suggested metaas on the antlr list in a discussion I've started: http://www.antlr.org:8080/pipermail/antlr-interest/2008-March/027233.html - could you quick explain what metaas does and what steps are involved? - does it work with antlr 3.0? //benzo From dave at kitkat.f9.co.uk Sat Mar 15 13:04:03 2008 From: dave at kitkat.f9.co.uk (Dave Newton) Date: Sat, 15 Mar 2008 13:04:03 +0000 Subject: [metaas-dev] Changing Field names in a parsed AS3 source file In-Reply-To: <20080306234023.GC18091@badgers-in-foil.co.uk> References: <47C4785B.6090809@kitkat.f9.co.uk> <20080306234023.GC18091@badgers-in-foil.co.uk> Message-ID: <47DBC943.4050901@kitkat.f9.co.uk> David Holroyd wrote: >> I've got to convert a lot of old code in lots of files to >> as3, and i've been looking for a way to automate some of it, and metaas >> looks ideal. I've been playing around with it, and tried various things >> - i'm probably doing something really dumb! I can change the name of a >> field, but when i try to save it, it never works. I've tried allsorts of >> ways and still haven't found one that works - i'm not sure if it metaas, >> java or most likely just me. Should the following work? (it writes the >> new file out, but without the change). >> >> ActionScriptFactory fact = new ActionScriptFactory(); >> FileInputStream in = new FileInputStream("dungeon.as"); >> InputStreamReader reader = new InputStreamReader(in); >> ActionScriptParser parser = fact.newParser(); >> ASCompilationUnit unit = parser.parse(reader); >> >> //look for variable tileColour >> //ASPackage pkg = unit.getPackage(); >> ASClassType asclass = (ASClassType)unit.getType(); >> ASField field = asclass.getField("tileColour1"); >> System.out.println(field.getName()); >> field.setName("wallTileColour"); >> System.out.println(field.getName()); >> >> //check to see if it's been updated >> field = >> ((ASClassType)unit.getType()).getField("wallTileColour"); >> System.out.println(field.getName()); >> >> //ok, now add compilation unit to current project >> ActionScriptProject proj = fact.newEmptyASProject("."); >> proj.addCompilationUnit(unit); >> proj.setOutputLocation("fixed\\"); >> proj.writeAll(); >> > > Looks like it should work, so probably metaas has a bug. > > Is the input actually an AS2 file, or has it already had the basic > transformation to AS3 done? > > Thanks for the reply, and the previous help with my email address! Silly me!! The code should be AS3 already, probably some form of automatic basic transform, then manual fixes to make compile. >> I also checked out the cvs version and compiled that, but just kept give >> me a "NoViableAltException antlr" error but it's probably me done >> something wrong - are there many important updates in the cvs? >> > > I think it might help to see the input file that you are trying to > process. Can you send that too? > > You mentioned in another email that you've used antlrworks to compile > the grammars included in the codebase. Did you try to use Maven to > build the project? This is the preferred way :) > > I figured out what the xml's were for the other day and it compiled fine, and worked correctly so the cvs version is fixed :). I may have to go higher up in metaas to achive what i want though - here's an example lets say I have a class like this public var CTile { public var tile1:Tile1; public var tile11:Tile11; public function DrawTile1(tile1:Tile1):void { public var tile1Name:String = tile1.name; trace("Drawn Tile1"); } public function DrawTile11(tile11:Tile11):void { public var tile11Name:String = tile11.name; trace("Drawn Tile11"); } } and i want to change "Tile1" to "WallTile" then i can't easily search replace, but if i could access through a tokenized version like the following public var $0 { public var $1:$2; public var $3:$4; public function $5($6:$2):void { public var $7:String = $6.$8; trace("Drawn Tile1"); } public function $9($10:$4):void { public var $11:String = $10.$12; trace("Drawn Tile11"); } } then i could just replace all $2 tokens with "WallTile" in the generated ouput. How hard do you think it would be to add the functionality to metaas to change all the occurances of a token (variable, field, method, class) in a project (multiple source files)? Or maybe theres an alternative like just getting a list of places where the token is used, or just a list of tokens and then i could walk through and modify the script as necessary? I can't really see anything similar in the api - and i've not delved deeper into metaas yet. Anyway - thanks for all your help so far :) Dave From dave at badgers-in-foil.co.uk Sat Mar 15 14:48:41 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 15 Mar 2008 14:48:41 +0000 Subject: [metaas-dev] questions about metaas In-Reply-To: References: Message-ID: <20080315144840.GA2859@badgers-in-foil.co.uk> Hi! On Fri, Mar 14, 2008 at 11:30:27PM +0100, benzo wrote: > you suggested metaas on the antlr list in a discussion I've started: > http://www.antlr.org:8080/pipermail/antlr-interest/2008-March/027233.html > > - could you quick explain what metaas does and what steps are involved? Well, metaas is a model for representing ActionScript 3 code in Java programs. I built it to help with complex code generation tasks. For instance, it's the basis for an XML--Object mapping framework for AS3 over here, http://maven.badgers-in-foil.co.uk/sites/asxsd/ A couple of other projects using metaas for code-gen, that I know of, are, Violet AS3 Generator, http://selfmummy.com/vasgen/ and CairngormFlex Assistant, http://cairngormflex.sourceforge.net/ To see some really simple examples of the API in use, look over here, http://maven.badgers-in-foil.co.uk/sites/metaas/apidocs/overview-summary.html#overview_description > - does it work with antlr 3.0? metaas uses ANTLR 3 in its implementation, but you don't need to use or understand ANTLR in order to use metaas. You could certainly build metaas objects with the appropriate code in ANTLR parser actions, and then save the resulting model out to a .as file. The preferred way to do this in ANTLR is to use StringTemplate, since this is a generic text templating system, and can be used for any output . The downside is that you loose out on some of the generation-time checks that metaas will make, and will have to spend a little more effort constructing the templates to make the resulting code formatting work nicely. Also note that there are systems equivalent to metaas for the Java language itself. For instance 'Spoon', http://spoon.gforge.inria.fr/ is actually quite a lot better at Java language analysis than metaas is at AS3 language analysis :) ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Sat Mar 15 15:03:42 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 15 Mar 2008 15:03:42 +0000 Subject: [metaas-dev] Changing Field names in a parsed AS3 source file In-Reply-To: <47DBC943.4050901@kitkat.f9.co.uk> References: <47C4785B.6090809@kitkat.f9.co.uk> <20080306234023.GC18091@badgers-in-foil.co.uk> <47DBC943.4050901@kitkat.f9.co.uk> Message-ID: <20080315150340.GB2859@badgers-in-foil.co.uk> On Sat, Mar 15, 2008 at 01:04:03PM +0000, Dave Newton wrote: > I figured out what the xml's were for the other day and it compiled > fine, and worked correctly so the cvs version is fixed :). I may have to > go higher up in metaas to achive what i want though - here's an example > > lets say I have a class like this > > public var CTile { > public var tile1:Tile1; > public var tile11:Tile11; > public function DrawTile1(tile1:Tile1):void { > public var tile1Name:String = tile1.name; > trace("Drawn Tile1"); > } > public function DrawTile11(tile11:Tile11):void { > public var tile11Name:String = tile11.name; > trace("Drawn Tile11"); > } > } > > and i want to change "Tile1" to "WallTile" then i can't easily search > replace, but if i could access through a tokenized version like the > following > > public var $0 { > public var $1:$2; > public var $3:$4; > public function $5($6:$2):void { > public var $7:String = $6.$8; > trace("Drawn Tile1"); > } > public function $9($10:$4):void { > public var $11:String = $10.$12; > trace("Drawn Tile11"); > } > } > > then i could just replace all $2 tokens with "WallTile" in the generated > ouput. How hard do you think it would be to add the functionality to > metaas to change all the occurances of a token (variable, field, method, > class) in a project (multiple source files)? Or maybe theres an > alternative like just getting a list of places where the token is used, > or just a list of tokens and then i could walk through and modify the > script as necessary? I can't really see anything similar in the api - > and i've not delved deeper into metaas yet. I am going to add an implementation of the visitor/iterator pattern that will make it easier to do stuff like this. You can of course do this by hand (look at evey method / check method's return type / replace return type if required), but really metaas should be providing more help in this common scenario. It's worth noting that metaas is only exposing syntax at the moment -- it doesn't do any semantic analysis. This means that, for instance, if you had two classes called 'Tile1' that were in different packages, metaas currently doesn't do anything to help you work out which one you've actually got at a particular point in the code. One day, it would be nice to have that kind of stuff in metaas, but I don't think it even handles all of the details of AS3 syntax yet, so the complicated stuff will have to wait :) ta, dave -- http://david.holroyd.me.uk/ From dave at kitkat.f9.co.uk Sat Mar 15 16:35:26 2008 From: dave at kitkat.f9.co.uk (Dave Newton) Date: Sat, 15 Mar 2008 16:35:26 +0000 Subject: [metaas-dev] Changing Field names in a parsed AS3 source file In-Reply-To: <20080315150340.GB2859@badgers-in-foil.co.uk> References: <47C4785B.6090809@kitkat.f9.co.uk> <20080306234023.GC18091@badgers-in-foil.co.uk> <47DBC943.4050901@kitkat.f9.co.uk> <20080315150340.GB2859@badgers-in-foil.co.uk> Message-ID: <47DBFACE.6020005@kitkat.f9.co.uk> David Holroyd wrote: > On Sat, Mar 15, 2008 at 01:04:03PM +0000, Dave Newton wrote: > >> I figured out what the xml's were for the other day and it compiled >> fine, and worked correctly so the cvs version is fixed :). I may have to >> go higher up in metaas to achive what i want though - here's an example >> >> lets say I have a class like this >> >> public var CTile { >> public var tile1:Tile1; >> public var tile11:Tile11; >> public function DrawTile1(tile1:Tile1):void { >> public var tile1Name:String = tile1.name; >> trace("Drawn Tile1"); >> } >> public function DrawTile11(tile11:Tile11):void { >> public var tile11Name:String = tile11.name; >> trace("Drawn Tile11"); >> } >> } >> >> and i want to change "Tile1" to "WallTile" then i can't easily search >> replace, but if i could access through a tokenized version like the >> following >> >> public var $0 { >> public var $1:$2; >> public var $3:$4; >> public function $5($6:$2):void { >> public var $7:String = $6.$8; >> trace("Drawn Tile1"); >> } >> public function $9($10:$4):void { >> public var $11:String = $10.$12; >> trace("Drawn Tile11"); >> } >> } >> >> then i could just replace all $2 tokens with "WallTile" in the generated >> ouput. How hard do you think it would be to add the functionality to >> metaas to change all the occurances of a token (variable, field, method, >> class) in a project (multiple source files)? Or maybe theres an >> alternative like just getting a list of places where the token is used, >> or just a list of tokens and then i could walk through and modify the >> script as necessary? I can't really see anything similar in the api - >> and i've not delved deeper into metaas yet. >> > > I am going to add an implementation of the visitor/iterator pattern that > will make it easier to do stuff like this. You can of course do this by > hand (look at evey method / check method's return type / replace return > type if required), but really metaas should be providing more help in > this common scenario. > > It's worth noting that metaas is only exposing syntax at the moment -- > it doesn't do any semantic analysis. This means that, for instance, if > you had two classes called 'Tile1' that were in different packages, > metaas currently doesn't do anything to help you work out which one > you've actually got at a particular point in the code. One day, it > would be nice to have that kind of stuff in metaas, but I don't think it > even handles all of the details of AS3 syntax yet, so the complicated > stuff will have to wait :) > > > ta, > dave > > That'd be really useful - if theres anything i can do to help with implementing that i'd give it a go - it's probably a bit over my head at the moment, but maybe theres some grunt work i can do when you start looking at that functionality. I'd rather spend longer adding to metaas for everyones benefit that writing a temporary cludgy hack that would be redundant when you implement that common functionality. As for the class problems, i think i could probably watch out for those (and just report it for manual checking/changing), theres also some gotchas with untyped objects being anything, and also getDefinitionByName. I think your right that getting AS3 parsing right is more important than the more complicated functionality, as they wouldn't be much use if you couldn't throw any as3 code at it. Just being cheeky but how far down the todo list would this come? And any tips where to start looking in the metaas code to try and grasp how that'd work so i can atleast be looking to help out in the future! Thanks again :) Dave *Sorry bout the double post - for some unknown reason my thunderbird sends it to your address if i use reply, and if i use reply all it just sends it to the list - strange! From dave at badgers-in-foil.co.uk Sat Mar 15 17:06:16 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 15 Mar 2008 17:06:16 +0000 Subject: [metaas-dev] Changing Field names in a parsed AS3 source file In-Reply-To: <47DBFACE.6020005@kitkat.f9.co.uk> References: <47C4785B.6090809@kitkat.f9.co.uk> <20080306234023.GC18091@badgers-in-foil.co.uk> <47DBC943.4050901@kitkat.f9.co.uk> <20080315150340.GB2859@badgers-in-foil.co.uk> <47DBFACE.6020005@kitkat.f9.co.uk> Message-ID: <20080315170615.GA7037@badgers-in-foil.co.uk> On Sat, Mar 15, 2008 at 04:35:26PM +0000, Dave Newton wrote: > David Holroyd wrote: > > I am going to add an implementation of the visitor/iterator pattern that > > will make it easier to do stuff like this. You can of course do this by > > hand (look at evey method / check method's return type / replace return > > type if required), but really metaas should be providing more help in > > this common scenario. > That'd be really useful - if theres anything i can do to help with > implementing that i'd give it a go - it's probably a bit over my head at > the moment, but maybe theres some grunt work i can do when you start > looking at that functionality. I'd rather spend longer adding to metaas > for everyones benefit that writing a temporary cludgy hack that would be > redundant when you implement that common functionality. As for the class > problems, i think i could probably watch out for those (and just report > it for manual checking/changing), theres also some gotchas with untyped > objects being anything, and also getDefinitionByName. I think your right > that getting AS3 parsing right is more important than the more > complicated functionality, as they wouldn't be much use if you couldn't > throw any as3 code at it. > > Just being cheeky but how far down the todo list would this come? And > any tips where to start looking in the metaas code to try and grasp how > that'd work so i can atleast be looking to help out in the future! Remi Flament contributed some code that made a start on doing this, and I've already worked on it a bit more, but had decided that I wanted to do another metaas release (adding support for AS3 expressions) before I committed those changes. Current state of play attached... So, I'd say 'soon', though that's relative to the amount of free time I have -- I'm doing overtime this weekend :( ta, dave -- http://david.holroyd.me.uk/ -------------- next part -------------- A non-text attachment was scrubbed... Name: metaas-visitor-preview.tar.gz Type: application/octet-stream Size: 4041 bytes Desc: not available Url : http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080315/154463fc/attachment.obj From dave at badgers-in-foil.co.uk Fri Mar 21 23:17:20 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Fri, 21 Mar 2008 23:17:20 +0000 Subject: [metaas-dev] [SVN metaas] release notes for next release References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080321/a25d068c/attachment.htm From dave at badgers-in-foil.co.uk Fri Mar 21 23:19:24 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Fri, 21 Mar 2008 23:19:24 +0000 Subject: [metaas-dev] [SVN metaas] [maven-release-plugin] prepare release metaas-0.8 References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080321/598da836/attachment.htm From dave at badgers-in-foil.co.uk Fri Mar 21 23:23:23 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Fri, 21 Mar 2008 23:23:23 +0000 Subject: [metaas-dev] [SVN metaas] [maven-release-plugin] prepare for next development iteration References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080321/59fbf581/attachment.htm From dave at badgers-in-foil.co.uk Fri Mar 21 23:49:56 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Fri, 21 Mar 2008 23:49:56 +0000 Subject: [metaas-dev] [ANN] metaas 0.8 released Message-ID: <20080321234956.GA15922@badgers-in-foil.co.uk> Version 0.8 of metaas has finally been released, http://www.badgers-in-foil.co.uk/projects/metaas/ Highlights of this release: - Switched to Apache License, version 2.0 - Initial support for ActionScript expressions in the DOM[1] - Provide for dynamic and final class modifiers - Support for break, continue, default xml namespace try catch finally and throw statements - Fix broken assumptions that statement bodies will be code-blocks and probably a number of bugfixes that I've forgotten about. [1] http://maven.badgers-in-foil.co.uk/sites/metaas/apidocs/uk/co/badgersinfoil/metaas/dom/Expression.html Remember that metaas releases are also available from the Maven 2 repository here, http://maven.badgers-in-foil.co.uk/maven2/ ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Tue Mar 25 23:01:25 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Tue, 25 Mar 2008 23:01:25 +0000 Subject: [metaas-dev] [SVN metaas] initial work on a 'visitor' pattern implementation Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080325/ac98dbe9/attachment-0001.htm From dave at badgers-in-foil.co.uk Tue Mar 25 23:02:24 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Tue, 25 Mar 2008 23:02:24 +0000 Subject: [metaas-dev] [SVN metaas] an AS3 file that tries to exemplify all possible syntax Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080325/80fc9482/attachment.htm From dave at badgers-in-foil.co.uk Tue Mar 25 23:16:58 2008 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Tue, 25 Mar 2008 23:16:58 +0000 Subject: [metaas-dev] [SVN metaas] Support for entirely duplicating an expression (inc. the underlying token substream). Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20080325/79e1a7e3/attachment.htm From ralf.bokelberg at gmail.com Wed Mar 26 09:31:48 2008 From: ralf.bokelberg at gmail.com (Ralf Bokelberg) Date: Wed, 26 Mar 2008 10:31:48 +0100 Subject: [metaas-dev] parser: super.method() fails Message-ID: Hi guys When i tried to import a file, which contains a ActionScript statement like super.method(1,2,3), parsing failed with an error. It seems like it expects super to be a method name and not an object. Generally i wonder, why super handling is part of the grammar. Shouldn't this be part of a later stage? Keep up the good work, Ralf. From dave at badgers-in-foil.co.uk Thu Mar 27 08:09:57 2008 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu, 27 Mar 2008 08:09:57 +0000 Subject: [metaas-dev] parser: super.method() fails In-Reply-To: References: Message-ID: <20080327080957.GA470@badgers-in-foil.co.uk> Hi! On Wed, Mar 26, 2008 at 10:31:48AM +0100, Ralf Bokelberg wrote: > When i tried to import a file, which contains a ActionScript statement > like super.method(1,2,3), parsing failed with an error. It seems like > it expects super to be a method name and not an object. Generally i > wonder, why super handling is part of the grammar. Shouldn't this be > part of a later stage? Well, the spec says that 'super' is a keyword with special significance in the grammar, http://livedocs.adobe.com/specs/actionscript/3/as3_specification129.html This prevents use of 'super' in contexts where identifiers would otherwise be allowed, like, foo.super.bar.method(1,2,3); or var super = 1; Currently, metaas only supports 'super' in a super-statement, http://livedocs.adobe.com/specs/actionscript/3/as3_specification152.html When implementing that, I couldn't get the super-expression to work due to ambiguity problems in the resulting ANTLR grammar. Sorry! I know I need to make further efforts to get that working. (Do you fancy fiddling with the grammar definition? ;) Will this cause big problems for your intended application? ta, dave -- http://david.holroyd.me.uk/ From ralf.bokelberg at gmail.com Thu Mar 27 09:45:18 2008 From: ralf.bokelberg at gmail.com (Ralf Bokelberg) Date: Thu, 27 Mar 2008 10:45:18 +0100 Subject: [metaas-dev] parser: super.method() fails In-Reply-To: <20080327080957.GA470@badgers-in-foil.co.uk> References: <20080327080957.GA470@badgers-in-foil.co.uk> Message-ID: Hi Dave i wanted to write a formatter. The formatter should read in any ActionScript and output it as nicely indented and formatted. Since i don't know about antlr very much, i started to write parser manually now. Cheers Ralf. On Thu, Mar 27, 2008 at 9:09 AM, David Holroyd wrote: > Hi! > > > On Wed, Mar 26, 2008 at 10:31:48AM +0100, Ralf Bokelberg wrote: > > When i tried to import a file, which contains a ActionScript statement > > like super.method(1,2,3), parsing failed with an error. It seems like > > it expects super to be a method name and not an object. Generally i > > wonder, why super handling is part of the grammar. Shouldn't this be > > part of a later stage? > > Well, the spec says that 'super' is a keyword with special significance > in the grammar, > > http://livedocs.adobe.com/specs/actionscript/3/as3_specification129.html > > This prevents use of 'super' in contexts where identifiers would > otherwise be allowed, like, > > foo.super.bar.method(1,2,3); or var super = 1; > > Currently, metaas only supports 'super' in a super-statement, > > http://livedocs.adobe.com/specs/actionscript/3/as3_specification152.html > > When implementing that, I couldn't get the super-expression to work due > to ambiguity problems in the resulting ANTLR grammar. Sorry! > > I know I need to make further efforts to get that working. (Do you > fancy fiddling with the grammar definition? ;) > > Will this cause big problems for your intended application? > > > 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 > -- Ralf Bokelberg Flex & Flash Consultant based in Cologne/Germany