From dave at badgers-in-foil.co.uk Sun Dec 2 15:48:35 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 02 Dec 2007 15:48:35 +0000 Subject: [metaas-dev] [SVN metaas] clirr doesn't seem as nice as jdiff, but at least has a 'released' plugin version, so the report can be enabled without breaking the release process for this project References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071202/6fcbb730/attachment.htm From dave at badgers-in-foil.co.uk Sun Dec 2 15:53:40 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 02 Dec 2007 15:53:40 +0000 Subject: [metaas-dev] [SVN metaas] antlr3 plugin now released at codehaus; no need to reference b-i-f repo for it References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071202/674bb077/attachment.htm From matthew at exanimo.com Sun Dec 2 16:00:17 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Sun, 2 Dec 2007 11:00:17 -0500 Subject: [metaas-dev] ASArg.getDefault() Message-ID: <002801c834fc$7262ce20$0201a8c0@CreativeRoomPC> Is there a way to get the default value for an ASArg? (i.e. the getter equivalent of setDefault()) Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071202/54146683/attachment.htm From dave at badgers-in-foil.co.uk Sun Dec 2 16:43:11 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 02 Dec 2007 16:43:11 +0000 Subject: [metaas-dev] [SVN metaas] oops; wrong groupId References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071202/ea2a92b4/attachment.htm From dave at badgers-in-foil.co.uk Sun Dec 2 17:01:20 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 02 Dec 2007 17:01:20 +0000 Subject: [metaas-dev] [SVN metaas] Provide access to meth arg default values, as requested by Matthew J Tretter Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071202/906ea7e2/attachment.htm From dave at badgers-in-foil.co.uk Sun Dec 2 17:37:53 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sun, 2 Dec 2007 17:37:53 +0000 Subject: [metaas-dev] ASArg.getDefault() In-Reply-To: <002801c834fc$7262ce20$0201a8c0@CreativeRoomPC> References: <002801c834fc$7262ce20$0201a8c0@CreativeRoomPC> Message-ID: <20071202173752.GA8010@badgers-in-foil.co.uk> Hi, On Sun, Dec 02, 2007 at 11:00:17AM -0500, Matthew J Tretter wrote: > Is there a way to get the default value for an ASArg? (i.e. the > getter equivalent of setDefault()) There wasn't; I've just added one. Are you able to build the source from Svn? ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Sun Dec 2 21:13:37 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sun, 2 Dec 2007 21:13:37 +0000 Subject: [metaas-dev] ASArg.getDefault() In-Reply-To: <000801c83523$1334e420$0201a8c0@CreativeRoomPC> References: <002801c834fc$7262ce20$0201a8c0@CreativeRoomPC> <20071202173752.GA8010@badgers-in-foil.co.uk> <000801c83523$1334e420$0201a8c0@CreativeRoomPC> Message-ID: <20071202211337.GA12745@badgers-in-foil.co.uk> Hey Matthew (remember to copy the list address), On Sun, Dec 02, 2007 at 03:36:47PM -0500, Matthew J Tretter wrote: > I dug up the 05-14-2007 build of antlr and manually installed it but I'm > getting the following error: > > java.lang.NoClassDefFoundError: org/antlr/stringtemplate/StringTemplate [...] > at uk.co.badgersinfoil.maven.plugins.Antlr3PluginMojo.processGrammarFile(Antlr3PluginMojo.java:161) Please update the copy of pom.xml that you've got. It's using the org.codehaus.mojo release of the ANTLRv3 plugin now, rather than the one from my repository, and the new one has dependancies all set up so you don't need to grab things by hand. > Also, ASForEachInStatement.getIteratedString() seemed to always return > "in" in 0.7. Not sure if anybody else has had that problem already.. No one mentioned it. I'll take a look. thanks! dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Sun Dec 2 21:37:14 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 02 Dec 2007 21:37:14 +0000 Subject: [metaas-dev] [SVN metaas] Have StatementContainer#addStatement() actually return the Statement object Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071202/37c63cab/attachment-0001.htm From dave at badgers-in-foil.co.uk Sun Dec 2 21:37:49 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sun, 2 Dec 2007 21:37:49 +0000 Subject: [metaas-dev] ASArg.getDefault() In-Reply-To: <20071202211337.GA12745@badgers-in-foil.co.uk> References: <002801c834fc$7262ce20$0201a8c0@CreativeRoomPC> <20071202173752.GA8010@badgers-in-foil.co.uk> <000801c83523$1334e420$0201a8c0@CreativeRoomPC> <20071202211337.GA12745@badgers-in-foil.co.uk> Message-ID: <20071202213748.GB12745@badgers-in-foil.co.uk> On Sun, Dec 02, 2007 at 09:13:37PM +0000, David Holroyd wrote: > On Sun, Dec 02, 2007 at 03:36:47PM -0500, Matthew J Tretter wrote: > > Also, ASForEachInStatement.getIteratedString() seemed to always return > > "in" in 0.7. Not sure if anybody else has had that problem already.. > > No one mentioned it. I'll take a look. I've done a couple of simple tests, in addition to the unit tests already poking that bit of the API, but it seems to be working. Do you have a specific test case, or specific input file, that causes this problem with the latest code? ta, dave -- http://david.holroyd.me.uk/ From matthew at exanimo.com Sun Dec 2 21:53:44 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Sun, 2 Dec 2007 16:53:44 -0500 Subject: [metaas-dev] ASArg.getDefault() References: <002801c834fc$7262ce20$0201a8c0@CreativeRoomPC><20071202173752.GA8010@badgers-in-foil.co.uk><000801c83523$1334e420$0201a8c0@CreativeRoomPC> <20071202211337.GA12745@badgers-in-foil.co.uk> Message-ID: <002101c8352d$cfab7560$0201a8c0@CreativeRoomPC> Sorry, I'm not sure I understand... My pom.xml is updated to the latest revision (555 now) but when I try to build it tells me that org.antlr:antlr-tool:jar:05-14-2007.17 is missing. However, when I install that manually (from http://www.antlr.org/download/build/) and attempt to build, I get the afforementioned StringTemplate error. Thanks for the help. I'll let you know about the ASForEachInStatement issue as soon as I get 0.8 to build. matthew From dave at badgers-in-foil.co.uk Sun Dec 2 22:28:39 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 02 Dec 2007 22:28:39 +0000 Subject: [metaas-dev] [SVN metaas] Lets see if explicitly specifying the plugin version helps Matthew References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071202/1c81580e/attachment.htm From dave at badgers-in-foil.co.uk Sun Dec 2 22:38:30 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sun, 2 Dec 2007 22:38:30 +0000 Subject: [metaas-dev] ASArg.getDefault() In-Reply-To: <002101c8352d$cfab7560$0201a8c0@CreativeRoomPC> References: <20071202211337.GA12745@badgers-in-foil.co.uk> <002101c8352d$cfab7560$0201a8c0@CreativeRoomPC> Message-ID: <20071202223830.GA13522@badgers-in-foil.co.uk> On Sun, Dec 02, 2007 at 04:53:44PM -0500, Matthew J Tretter wrote: > My pom.xml is updated to the latest revision (555 now) but when I try to > build it tells me that org.antlr:antlr-tool:jar:05-14-2007.17 is missing. > However, when I install that manually (from > http://www.antlr.org/download/build/) and attempt to build, I get the > afforementioned StringTemplate error. Hmm. The reason I asked if pom.xml was up to date is that the version of antlr-tool you mention was a dependancy of the old plugin, uk.co.badgersinfoil.maven.plugins:maven-antlr3-plugin however, the latest POM is referencing a new location, org.codehaus.mojo:antlr3-maven-plugin the newer plugin depends on org.antlr:antlr:3.0.1, rather than the org.antlr:antlr-tool:05-14-2007.17 nightly build (which was never uploaded to the main Maven repository). I just updated the POM to explicity state the version of the plugin required, rather than allowing it to use the latest release. With that change, I can run mvn dependency:resolve-plugins and in the resulting output I see, ... [INFO] Plugin Resolved: antlr3-maven-plugin-1.0-beta-1.jar [INFO] Plugin Dependency Resolved: maven-plugin-api-2.0.jar [INFO] Plugin Dependency Resolved: maven-project-2.0.jar [INFO] Plugin Dependency Resolved: plexus-compiler-manager-1.5.3.jar [INFO] Plugin Dependency Resolved: antlr-3.0.1.jar ... What do you see when you execute this goal on your system? > Thanks for the help. I'll let you know about the ASForEachInStatement > issue as soon as I get 0.8 to build. Cool, thanks. dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Mon Dec 3 00:02:07 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 03 Dec 2007 00:02:07 +0000 Subject: [metaas-dev] [SVN metaas] another related project References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071203/d1684404/attachment.htm From dave at badgers-in-foil.co.uk Mon Dec 3 00:07:35 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 03 Dec 2007 00:07:35 +0000 Subject: [metaas-dev] [SVN metaas] test construction of ASSuperStatement from the raw AST References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071203/a3c2d8a4/attachment.htm From dave at badgers-in-foil.co.uk Mon Dec 3 00:10:37 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 03 Dec 2007 00:10:37 +0000 Subject: [metaas-dev] [SVN metaas] test creation of ASBlock from raw AST References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071203/fb18c688/attachment.htm From matthew at exanimo.com Mon Dec 3 00:24:11 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Sun, 2 Dec 2007 19:24:11 -0500 Subject: [metaas-dev] [SVN metaas] Lets see if explicitly specifying the plugin version helps Matthew References: Message-ID: <008101c83542$d4ed1500$0201a8c0@CreativeRoomPC> I think that did it! I got it to build (though there was an error in the E4X tests). Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071202/682be172/attachment-0001.htm From dave at badgers-in-foil.co.uk Mon Dec 3 00:28:13 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 03 Dec 2007 00:28:13 +0000 Subject: [metaas-dev] [SVN metaas] increase code coverage in ModifierUtils.java References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071203/00f33cfe/attachment.htm From dave at badgers-in-foil.co.uk Mon Dec 3 01:22:52 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 03 Dec 2007 01:22:52 +0000 Subject: [metaas-dev] [SVN metaas] commons-io is useful for unit tests References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071203/340f2452/attachment.htm From dave at badgers-in-foil.co.uk Mon Dec 3 01:31:05 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 03 Dec 2007 01:31:05 +0000 Subject: [metaas-dev] [SVN metaas] also test the case of a source file in a package folder References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071203/ed10245a/attachment.htm From dave at badgers-in-foil.co.uk Mon Dec 3 02:07:12 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 03 Dec 2007 02:07:12 +0000 Subject: [metaas-dev] [SVN metaas] make AS3FragmentParser a bit more robust Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071203/c127fb2e/attachment.htm From matthew at exanimo.com Tue Dec 4 00:36:53 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Mon, 3 Dec 2007 19:36:53 -0500 Subject: [metaas-dev] ForEachInStatement / ASFeild.getInitializer Message-ID: <008801c83617$bcfcc910$0201a8c0@CreativeRoomPC> With the new build, I'm no longer getting an incorrect value from ForEachInStatement.getIteratedString().. Thanks! Also, since you implemented ASArg.getDefault so quickly, I was hoping you wouldn't mind if I put in another request... could we get a getter for field initializers? Thanks again! matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071203/82db9676/attachment.htm From dave at badgers-in-foil.co.uk Tue Dec 4 21:32:23 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Tue, 04 Dec 2007 21:32:23 +0000 Subject: [metaas-dev] [SVN metaas] allow for null-literal expressions too References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071204/47e5f5c0/attachment.htm From dave at badgers-in-foil.co.uk Tue Dec 4 21:57:15 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Tue, 04 Dec 2007 21:57:15 +0000 Subject: [metaas-dev] [SVN metaas] add ASField#getInitializer() and fix setInitializer() when these's one there already Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071204/8fa02f40/attachment.htm From dave at badgers-in-foil.co.uk Tue Dec 4 23:23:20 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Tue, 04 Dec 2007 23:23:20 +0000 Subject: [metaas-dev] [SVN metaas] Allow setInitializer(ASExpression) in attition to the String varient Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071204/8b6dc034/attachment.htm From dave at badgers-in-foil.co.uk Tue Dec 4 23:23:40 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 4 Dec 2007 23:23:40 +0000 Subject: [metaas-dev] ForEachInStatement / ASFeild.getInitializer In-Reply-To: <008801c83617$bcfcc910$0201a8c0@CreativeRoomPC> References: <008801c83617$bcfcc910$0201a8c0@CreativeRoomPC> Message-ID: <20071204232339.GA13572@badgers-in-foil.co.uk> On Mon, Dec 03, 2007 at 07:36:53PM -0500, Matthew J Tretter wrote: > With the new build, I'm no longer getting an incorrect value from > ForEachInStatement.getIteratedString().. Thanks! Great! > Also, since you implemented ASArg.getDefault so quickly, I was hoping > you wouldn't mind if I put in another request... could we get a getter > for field initializers? Yep. The code in subversion now supports access to expressions, so getInitializer() returns an ASExpression. That ok? ta, dave -- http://david.holroyd.me.uk/ From matthew at exanimo.com Wed Dec 5 06:37:41 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Wed, 5 Dec 2007 01:37:41 -0500 Subject: [metaas-dev] More Annoying Requests Message-ID: <001e01c83709$56a1b250$0201a8c0@CreativeRoomPC> I'm probably getting into things-you're-already-planning-to-do territory with these, but I figure "why stop now?" At the very least, I may stumble upon something you haven't noticed yet (: 1. There are a bunch of getters that return Strings (ASIfStatement.getConditionString(), ASForInStatement.getIteratedString(), etc.). It would be really great if these could return expressions instead (or if there could be expression-returning variants). 2. Attempting to parse an else-if statement causes an error. 3. Could ASSwitchStatement include a way to get the expression that's being switched on? (i.e. "c" in "switch(c){...}")? Again, thanks for all the time and effort you've put into this. matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071205/0ef338b8/attachment.htm From dave at badgers-in-foil.co.uk Wed Dec 5 08:57:15 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 5 Dec 2007 08:57:15 +0000 Subject: [metaas-dev] More Annoying Requests In-Reply-To: <001e01c83709$56a1b250$0201a8c0@CreativeRoomPC> References: <001e01c83709$56a1b250$0201a8c0@CreativeRoomPC> Message-ID: <20071205085714.GB13572@badgers-in-foil.co.uk> On Wed, Dec 05, 2007 at 01:37:41AM -0500, Matthew J Tretter wrote: > I'm probably getting into things-you're-already-planning-to-do territory with these, but I figure "why stop now?" At the very least, I may stumble upon something you haven't noticed yet (: > > 1. There are a bunch of getters that return Strings > (ASIfStatement.getConditionString(), > ASForInStatement.getIteratedString(), etc.). It would be really great > if these could return expressions instead (or if there could be > expression-returning variants). Yeah. expression support is a relatively recent addition, so I've just not got around to adding support to all the Statement interfaces etc. If you'd like to help with that, it should be very easy in many cases; e.g. for ASTIfStatatement, the current implementation has, public String getConditionString() { return ASTUtils.stringifyNode(ast.getFirstChild().getFirstChild()); } and a version supporting expressions would be, public ASExpression getCondition() { return ExpressionBuilder.build(ast.getFirstChild().getFirstChild()); } > 2. Attempting to parse an else-if statement causes an error. Oh dear. Could you give more detail? > 3. Could ASSwitchStatement include a way to get the expression that's > being switched on? (i.e. "c" in "switch(c){...}")? Sure. I'll take a look. ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Wed Dec 5 08:58:56 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Wed, 05 Dec 2007 08:58:56 +0000 Subject: [metaas-dev] [SVN metaas] provide access to the condition-expr in a switch-statement Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071205/8830497d/attachment.htm From dave at badgers-in-foil.co.uk Mon Dec 10 12:37:47 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 10 Dec 2007 12:37:47 +0000 Subject: [metaas-dev] [SVN metaas] remove unused import References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071210/8bb837aa/attachment.htm From dave at badgers-in-foil.co.uk Mon Dec 10 13:02:36 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 10 Dec 2007 13:02:36 +0000 Subject: [metaas-dev] [SVN metaas] more asertions to use in our unit tests Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071210/9b14f632/attachment.htm From dave at badgers-in-foil.co.uk Mon Dec 10 13:05:11 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 10 Dec 2007 13:05:11 +0000 Subject: [metaas-dev] [SVN metaas] expose support for boolean literals ('true' / 'false') Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071210/86d96c59/attachment.htm From dave at badgers-in-foil.co.uk Mon Dec 10 13:11:13 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 10 Dec 2007 13:11:13 +0000 Subject: [metaas-dev] [SVN metaas] expose if-statement condition as an ASExpression Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071210/b85c5ec2/attachment.htm From dave at badgers-in-foil.co.uk Mon Dec 10 13:12:37 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Mon, 10 Dec 2007 13:12:37 +0000 Subject: [metaas-dev] [SVN metaas] fix typo References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071210/1e9fc9a9/attachment-0001.htm From matthew at exanimo.com Tue Dec 11 00:53:14 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Mon, 10 Dec 2007 19:53:14 -0500 Subject: [metaas-dev] ElseIf References: <008801c83617$bcfcc910$0201a8c0@CreativeRoomPC> <20071204232339.GA13572@badgers-in-foil.co.uk> Message-ID: <000a01c83b90$3e402620$0201a8c0@CreativeRoomPC> Hey David, Sorry I didn't write back sooner. Here's the error I'm getting: Exception in thread "main" uk.co.badgersinfoil.metaas.SyntaxException: Unsupported statement node type: CONDITION in "(b)" at uk.co.badgersinfoil.metaas.impl.StatementBuilder.build(StatementBuilder.java:57) at uk.co.badgersinfoil.metaas.impl.ASTStatementList.getStatementList(ASTStatementList.java:254) It happens when I try to call getStatementList() on the else if StatementContainer in the following code: if (a) { doSomething(); } else if (b) { doSomethingElse(); } I'm getting to the elseif statement via ASIfStatement.getElse().getStatementList(). Any thoughts? From dave at badgers-in-foil.co.uk Fri Dec 14 23:09:15 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Fri, 14 Dec 2007 23:09:15 +0000 Subject: [metaas-dev] [SVN metaas] delete random import References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071214/4320b6a9/attachment.htm From dave at badgers-in-foil.co.uk Fri Dec 14 23:25:40 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Fri, 14 Dec 2007 23:25:40 +0000 Subject: [metaas-dev] ElseIf In-Reply-To: <000a01c83b90$3e402620$0201a8c0@CreativeRoomPC> References: <008801c83617$bcfcc910$0201a8c0@CreativeRoomPC> <20071204232339.GA13572@badgers-in-foil.co.uk> <000a01c83b90$3e402620$0201a8c0@CreativeRoomPC> Message-ID: <20071214232540.GA23045@badgers-in-foil.co.uk> On Mon, Dec 10, 2007 at 07:53:14PM -0500, Matthew J Tretter wrote: > Hey David, > Sorry I didn't write back sooner. Here's the error I'm getting: > > Exception in thread "main" uk.co.badgersinfoil.metaas.SyntaxException: > Unsupported statement node type: CONDITION in "(b)" > at > uk.co.badgersinfoil.metaas.impl.StatementBuilder.build(StatementBuilder.java:57) > at > uk.co.badgersinfoil.metaas.impl.ASTStatementList.getStatementList(ASTStatementList.java:254) > > > It happens when I try to call getStatementList() on the else if > StatementContainer in the following code: > > if (a) { > doSomething(); > } else if (b) { > doSomethingElse(); > } > > I'm getting to the elseif statement via > ASIfStatement.getElse().getStatementList(). Any thoughts? Right. So the API I created there is just broken. getElse() is declared as returning an ASBlock, but it should, of course, return an instance of one of the Statement interfaces (in your example, it needs to return another ASIfStatement). There's certainly utility in having a method that automatically adds an 'else { }' to the 'if' when none exists yet, but it can't be the only option here. I'll have a think about how to deprecate this getElse() method so that apps already using it don't break when this issue is fixed. ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Sat Dec 15 00:13:34 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 15 Dec 2007 00:13:34 +0000 Subject: [metaas-dev] ElseIf In-Reply-To: <0E5E3A27-9B9A-4A91-BBC2-17F67352F2DE@exanimo.com> References: <008801c83617$bcfcc910$0201a8c0@CreativeRoomPC> <20071204232339.GA13572@badgers-in-foil.co.uk> <000a01c83b90$3e402620$0201a8c0@CreativeRoomPC> <20071214232540.GA23045@badgers-in-foil.co.uk> <0E5E3A27-9B9A-4A91-BBC2-17F67352F2DE@exanimo.com> Message-ID: <20071215001332.GB23045@badgers-in-foil.co.uk> On Fri, Dec 14, 2007 at 06:59:46PM -0500, Matthew J Tretter wrote: > If your new method returned a Statement, what would be returned in the > case of a simple if...else? Would you need to create an ElseStatement > interface as well? It's not that complicated, thankfully. The 'else' is not a separate statement, from a syntactic point of view, it's an optional part of the if-statement itself. Think, if () {} else {} vs. if () {} else if () {} in the first case the else-clause contains a block-statement. In the second case, the else-clause contains another if-statement. The else-clause could contain any other kind of statement too, e.g. and expression-statement, if () {} else foo = "bar"; etc. I think what I'll do is add a getElseStatement() method, which will return Statement, or null when no else-clause is attached to the if-statement. I'll deprecate getElse() in favour of an elseBlock() method that does the same thing (or something like that). seems fair? dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Sat Dec 15 00:58:46 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 15 Dec 2007 00:58:46 +0000 Subject: [metaas-dev] ElseIf In-Reply-To: References: <008801c83617$bcfcc910$0201a8c0@CreativeRoomPC> <20071204232339.GA13572@badgers-in-foil.co.uk> <000a01c83b90$3e402620$0201a8c0@CreativeRoomPC> <20071214232540.GA23045@badgers-in-foil.co.uk> <0E5E3A27-9B9A-4A91-BBC2-17F67352F2DE@exanimo.com> <20071215001332.GB23045@badgers-in-foil.co.uk> Message-ID: <20071215005845.GC23045@badgers-in-foil.co.uk> On Fri, Dec 14, 2007 at 07:35:41PM -0500, Matthew J Tretter wrote: > >It's not that complicated, thankfully. The 'else' is not a separate > >statement, from a syntactic point of view, it's an optional part of > >the if-statement itself. > > That makes perfect sense. However, given the following, > > if(){ > } else { > foo="bar"; > bar="foo"; > } > > wouldn't the new getElse method need to return a StatementContainer > (as opposed to a Statement)? Actually, we can have both, since the statement attached to this else-clause is a block-statement; i.e. an ASBlock instance. ASBlock implements both Statement and StatementContainer interfaces :) The reason for ASBlock and StatementContainer interfaces both existing (while essentially doing the same thing) is that we also have ASMethod implement StatementContainer, so that we can add code to methods directly, i.e. we can say, meth.addStmt(..) rather than requiring stuff like, meth.getBody().addStmt(..) ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Sat Dec 15 01:20:31 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sat, 15 Dec 2007 01:20:31 +0000 Subject: [metaas-dev] [SVN metaas] Do a better job of supporting the statement within else-clauses Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071215/5a171c2a/attachment.htm From matthew at exanimo.com Tue Dec 18 02:20:32 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Mon, 17 Dec 2007 21:20:32 -0500 Subject: [metaas-dev] Expression Subinterfaces? References: Message-ID: <000d01c8411c$91880780$0201a8c0@CreativeRoomPC> When a class is parsed (and a DOM created), are any instances of Expression subinterfaces (ASNewExpression, etc.) created? Thanks, matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071217/766d3ad6/attachment.htm From dave at badgers-in-foil.co.uk Tue Dec 18 08:54:10 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 18 Dec 2007 08:54:10 +0000 Subject: [metaas-dev] Expression Subinterfaces? In-Reply-To: <000d01c8411c$91880780$0201a8c0@CreativeRoomPC> References: <000d01c8411c$91880780$0201a8c0@CreativeRoomPC> Message-ID: <20071218085409.GA15580@badgers-in-foil.co.uk> On Mon, Dec 17, 2007 at 09:20:32PM -0500, Matthew J Tretter wrote: > When a class is parsed (and a DOM created), are any instances of > Expression subinterfaces (ASNewExpression, etc.) created? The lifecycle of DOM objects is a bit weird; when a file is parsed, the ANTLR parser creates an underlying Abstract Syntax Tree representation of the code. The DOM nodes of the metaas public API are lazily created 'as required', based on API access by client code. This isn't by way of clever design, I've just never committed to working out what the lifecycle for DOM instances _should_ be. In fact, it's currently the case that DOM API access will create another DOM object, or collection of objects, *every* time it's used. This is a bit silly, but makes the implementation very simple, and doesn't seem to cause problems in the majority of API use-cases. Since any duplicated DOM nods you may end up with still share the same underlying AST information, these different views of the code should hopefully stay mostly in sync. Problems will occur with things like identity tests on DOM nodes, or their use as keys into HashMaps. Have you come across a scenario where this becomes a problem? ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Thu Dec 20 08:49:23 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu, 20 Dec 2007 08:49:23 +0000 Subject: [metaas-dev] Expression Subinterfaces? In-Reply-To: <000301c842b4$28860f40$0201a8c0@CreativeRoomPC> References: <20071218085409.GA15580@badgers-in-foil.co.uk> <000301c842b4$28860f40$0201a8c0@CreativeRoomPC> Message-ID: <20071220084923.GA17849@badgers-in-foil.co.uk> On Wed, Dec 19, 2007 at 09:58:08PM -0500, Matthew J Tretter wrote: > what I was really trying to get at (and again, sorry for being unclear) was > whether there's any way to retrieve an ASNewExpression, > ASInvocationExpression, or any other Expression subinterface from the AST > (as opposed to just a statement). I know you've said that Expression > support is a relatively recent addition so it seems pretty likely this > isn't yet possible but I wanted to make sure before I dove in and started > messing with your source. Oops, ok; There are only a few places where the API exposes expressions, currently, ASSwitchStatement#getCondition() ASIfStatement#getCondition() ASField#getInitializer() so lots of the Statatement interfaces need extending. FYI, I suspect that not all kinds of expression have a representative interface yet (most of my own use of the API is for generating new code, and I've just been extending the API when I want to generate a new construct). I'm thinking of conditional-expressions 'a?b:c', and 'dot'-expressions 'a.b', which might be a property access or a class name (but we can't tell without doing a bit more semantic analysys). What changes would you like to make to the code? I'd be very happy to help! ta, dave -- http://david.holroyd.me.uk/ From michael_ramirez44 at yahoo.com Wed Dec 26 22:28:55 2007 From: michael_ramirez44 at yahoo.com (Michael Ramirez) Date: Wed, 26 Dec 2007 14:28:55 -0800 (PST) Subject: [metaas-dev] MetaAs C# Message-ID: <844970.85060.qm@web52506.mail.re2.yahoo.com> Are there any plans to release a C# implementation of MetaAs? Michael Ramirez ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping From dave at badgers-in-foil.co.uk Thu Dec 27 18:02:57 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu, 27 Dec 2007 18:02:57 +0000 Subject: [metaas-dev] MetaAs C# In-Reply-To: <844970.85060.qm@web52506.mail.re2.yahoo.com> References: <844970.85060.qm@web52506.mail.re2.yahoo.com> Message-ID: <20071227180257.GA9177@badgers-in-foil.co.uk> On Wed, Dec 26, 2007 at 02:28:55PM -0800, Michael Ramirez wrote: > Are there any plans to release a C# implementation of MetaAs? None at the moment -- I do very little development in C#. metaas is based on an ANTLRv3 grammar for AS3, and there is support for generating C# code from ANTLRv3 grammar definitions. The current grammar does embed a bit of Java code though, so it can't be reused without a bit of cleanup ta, dave -- http://david.holroyd.me.uk/ From matthew at exanimo.com Sat Dec 29 15:17:58 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Sat, 29 Dec 2007 10:17:58 -0500 Subject: [metaas-dev] Class initializers References: <000d01c8411c$91880780$0201a8c0@CreativeRoomPC> <20071218085409.GA15580@badgers-in-foil.co.uk> Message-ID: <001901c84a2d$ff5910f0$0201a8c0@CreativeRoomPC> Is there any way to access class initialization code? For example: package { public class A { // This code is run when the class is imported. trace('hello world!'); } } Not a big priority but something that would be nice nonetheless. matthew From matthew at exanimo.com Sat Dec 29 19:01:25 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Sat, 29 Dec 2007 14:01:25 -0500 Subject: [metaas-dev] Contributing References: Message-ID: <006201c84a4d$36d009c0$0201a8c0@CreativeRoomPC> A couple questions, 1. Do you have a system in place for allowing other to contribute to metaas? I'm making some changes now and wondering if there's any way they'll be absorbed back into the trunk. 2. Do you have any ideas for the interfaces of expressions that haven't yet been written? i.e. assignment expressions, etc. I'd like to work on them but would like to stick with any guidelines or roadmap that you're working by. 3. ASDeclarationStatement has a method named setContant (which I think is a typo). Thanks! matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071229/ebf2a431/attachment.htm From dave at badgers-in-foil.co.uk Sat Dec 29 20:11:03 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 29 Dec 2007 20:11:03 +0000 Subject: [metaas-dev] Class initializers In-Reply-To: <001901c84a2d$ff5910f0$0201a8c0@CreativeRoomPC> References: <20071218085409.GA15580@badgers-in-foil.co.uk> <001901c84a2d$ff5910f0$0201a8c0@CreativeRoomPC> Message-ID: <20071229201103.GA12420@badgers-in-foil.co.uk> On Sat, Dec 29, 2007 at 10:17:58AM -0500, Matthew J Tretter wrote: > Is there any way to access class initialization code? For example: > > package { > public class A { > // This code is run when the class is imported. > trace('hello world!'); > } > } > > Not a big priority but something that would be nice nonetheless. Well of course, the DOM doesn't expose this information, but actually, the parser can't handle this syntax either (I think statements in class or package blocks will cause a syntax error). I did try to make the parser comply with the AS3/ECMA specs in this area, but couldn't resolve the ambiguity problems that ANTLR reported. (I'm sure it's possible, but I wasn't smart enough to figure it out where my mistakes were.) As I recall, this problem was the main thing preventing the metaas parser from being able to grok some .as files included with Flex. ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Sat Dec 29 21:25:40 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 29 Dec 2007 21:25:40 +0000 Subject: [metaas-dev] Contributing In-Reply-To: <006201c84a4d$36d009c0$0201a8c0@CreativeRoomPC> References: <006201c84a4d$36d009c0$0201a8c0@CreativeRoomPC> Message-ID: <20071229212540.GB12420@badgers-in-foil.co.uk> Hey! On Sat, Dec 29, 2007 at 02:01:25PM -0500, Matthew J Tretter wrote: > 1. Do you have a system in place for allowing other to contribute to > metaas? I'm making some changes now and wondering if there's any way > they'll be absorbed back into the trunk. Send 'unified diff'-style patches. This is the default output format of a 'svn diff' on the command line, so probably not much to worry about. I'll apply the patches and commit to the repository. It would be really good to have some unit tests for new code too. (In fact the Cobertura 'checks' that are in place should mean that Maven will start failing the build if code coverage drops significantly ;) > 2. Do you have any ideas for the interfaces of expressions that > haven't yet been written? i.e. assignment expressions, etc. I'd like > to work on them but would like to stick with any guidelines or roadmap > that you're working by. I've looked to things like Spoon, http://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/index.html the Eclipse DOM, http://publib.boulder.ibm.com/infocenter/radhelp/v6r0m1/topic/org.eclipse.jdt.doc.isv/reference/api/overview-summary.html and Sun's CodeModel, https://codemodel.dev.java.net/ for inspiration in the structuring of the API. All these APIs define separate interfaces for assignments vs. other kinds of expression, so it was my intention to do the same. Then an inner class to enumerate the different assignment operator types, per ASBinaryExpression. > 3. ASDeclarationStatement has a method named setContant (which I > think is a typo). Indeed! I'll fix it... ta, dave -- http://david.holroyd.me.uk/ From matthew at exanimo.com Sat Dec 29 22:21:17 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Sat, 29 Dec 2007 17:21:17 -0500 Subject: [metaas-dev] Contributing References: <006201c84a4d$36d009c0$0201a8c0@CreativeRoomPC> <20071229212540.GB12420@badgers-in-foil.co.uk> Message-ID: <008201c84a69$229523c0$0201a8c0@CreativeRoomPC> > All these APIs define separate interfaces for assignments vs. other > kinds of expression, so it was my intention to do the same. Then an > inner class to enumerate the different assignment operator types, per > ASBinaryExpression. Sounds good. Are MUL_ASSSIGN, ADD_ASSIGN, etc good for assignment operator constants or are you trying to avoid underscores? matthew From dave at badgers-in-foil.co.uk Sat Dec 29 22:29:22 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sat, 29 Dec 2007 22:29:22 +0000 Subject: [metaas-dev] Contributing In-Reply-To: <008201c84a69$229523c0$0201a8c0@CreativeRoomPC> References: <20071229212540.GB12420@badgers-in-foil.co.uk> <008201c84a69$229523c0$0201a8c0@CreativeRoomPC> Message-ID: <20071229222922.GD12420@badgers-in-foil.co.uk> On Sat, Dec 29, 2007 at 05:21:17PM -0500, Matthew J Tretter wrote: > >All these APIs define separate interfaces for assignments vs. other > >kinds of expression, so it was my intention to do the same. Then an > >inner class to enumerate the different assignment operator types, per > >ASBinaryExpression. > > Sounds good. Are MUL_ASSSIGN, ADD_ASSIGN, etc good for assignment operator > constants or are you trying to avoid underscores? Underscores are no problem at all. ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Sat Dec 29 22:47:56 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sat, 29 Dec 2007 22:47:56 +0000 Subject: [metaas-dev] [SVN metaas] Fix typo spotted by Matthew Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071229/510d74be/attachment.htm From matthew at exanimo.com Sun Dec 30 00:32:41 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Sat, 29 Dec 2007 19:32:41 -0500 Subject: [metaas-dev] Contributing References: <006201c84a4d$36d009c0$0201a8c0@CreativeRoomPC> <20071229212540.GB12420@badgers-in-foil.co.uk> Message-ID: <00a301c84a7b$7daece20$0201a8c0@CreativeRoomPC> > Send 'unified diff'-style patches. This is the default output format of > a 'svn diff' on the command line, so probably not much to worry about. like this? -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt Url: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20071229/087eb59e/attachment-0001.txt From dave at badgers-in-foil.co.uk Mon Dec 31 16:17:50 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Mon, 31 Dec 2007 16:17:50 +0000 Subject: [metaas-dev] Contributing In-Reply-To: <00a301c84a7b$7daece20$0201a8c0@CreativeRoomPC> References: <20071229212540.GB12420@badgers-in-foil.co.uk> <00a301c84a7b$7daece20$0201a8c0@CreativeRoomPC> Message-ID: <20071231161749.GA3115@badgers-in-foil.co.uk> On Sat, Dec 29, 2007 at 07:32:41PM -0500, Matthew J Tretter wrote: > >Send 'unified diff'-style patches. This is the default output format of > >a 'svn diff' on the command line, so probably not much to worry about. > > like this? The patch looks good! Are you going to do more work on this changeset, or should I integrate these two changes now? ta, dave -- http://david.holroyd.me.uk/ From matthew at exanimo.com Mon Dec 31 18:56:48 2007 From: matthew at exanimo.com (Matthew J Tretter) Date: Mon, 31 Dec 2007 12:56:48 -0600 Subject: [metaas-dev] Contributing In-Reply-To: <20071231161749.GA3115@badgers-in-foil.co.uk> References: <20071229212540.GB12420@badgers-in-foil.co.uk> <00a301c84a7b$7daece20$0201a8c0@CreativeRoomPC> <20071231161749.GA3115@badgers-in-foil.co.uk> Message-ID: <898E6CCD-650F-417D-BFB4-9115D88BBE85@exanimo.com> I guess you can can commit those. I'm out of town this week so I won't be getting anything done and I think the next thing on my list may be those variable bindings. Fixing the order of operations issue (as mentioned in your binary operation class) is a high priority as well, but right now I'm thinking that I won't return to it until after I get a chance to look at a couple of other things. matthew On Dec 31, 2007, at 10:17 AM, David Holroyd wrote: > On Sat, Dec 29, 2007 at 07:32:41PM -0500, Matthew J Tretter wrote: >>> Send 'unified diff'-style patches. This is the default output >>> format of >>> a 'svn diff' on the command line, so probably not much to worry >>> about. >> >> like this? > > The patch looks good! Are you going to do more work on this > changeset, > or should I integrate these two changes now? > > > 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