From dave at badgers-in-foil.co.uk Thu Aug 2 21:10:17 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Thu, 02 Aug 2007 21:10:17 +0000 Subject: [metaas-dev] [SVN metaas] an expression-statement should actually contain 'expression-list', not 'expression' Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070802/c368025c/attachment.htm From dave at badgers-in-foil.co.uk Thu Aug 2 21:36:56 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Thu, 02 Aug 2007 21:36:56 +0000 Subject: [metaas-dev] [SVN metaas] yet another assertion to catch corruption of the token-linked-list References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070802/191ca879/attachment.htm From dave at badgers-in-foil.co.uk Fri Aug 3 00:01:28 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Fri, 03 Aug 2007 00:01:28 +0000 Subject: [metaas-dev] [SVN metaas] tweak the grammar so that the parser-generated AST matches more closely the synthetic ASTs created by metaas code References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070803/655b88b3/attachment.htm From dave at badgers-in-foil.co.uk Sun Aug 12 15:54:17 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 12 Aug 2007 15:54:17 +0000 Subject: [metaas-dev] [SVN metaas] Improve VIRTUAL_PLACEHOLDER token infrastructure. Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070812/24df6515/attachment.htm From dave at badgers-in-foil.co.uk Sun Aug 12 15:57:11 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 12 Aug 2007 15:57:11 +0000 Subject: [metaas-dev] [SVN metaas] more work trying to bring the parser-generated AST and synthetic AST into agreement about how to represent things Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070812/6e1d9ca4/attachment.htm From dave at badgers-in-foil.co.uk Sun Aug 12 16:07:02 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 12 Aug 2007 16:07:02 +0000 Subject: [metaas-dev] [SVN metaas] ensure SWITCH_STATEMENT_LIST node are placeholders, if required Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070812/09b66b85/attachment-0001.htm From dave at badgers-in-foil.co.uk Sun Aug 12 16:28:07 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 12 Aug 2007 16:28:07 +0000 Subject: [metaas-dev] [SVN metaas] ANNOTATION_PARAM wasn't actually used by the parser, so don't use it in the Java code either Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070812/519bdb1a/attachment.htm From dave at badgers-in-foil.co.uk Sun Aug 12 16:46:06 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 12 Aug 2007 16:46:06 +0000 Subject: [metaas-dev] [SVN metaas] while the annotatableDirective rule gave a nice grammar structure, it was messing up our carefully crafted start/stop tokens References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070812/e26514d3/attachment.htm From dave at badgers-in-foil.co.uk Sat Aug 18 11:56:34 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sat, 18 Aug 2007 11:56:34 +0000 Subject: [metaas-dev] [SVN metaas] Try to avoid weirdness in token lists by breaking any existing links when new ones are being created References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070818/be313235/attachment.htm From dave at badgers-in-foil.co.uk Sat Aug 18 11:58:01 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sat, 18 Aug 2007 11:58:01 +0000 Subject: [metaas-dev] [SVN metaas] Since this node is the only one, there's no need to try and make it the subtree root with ^() References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070818/073fa08e/attachment.htm From dave at badgers-in-foil.co.uk Sat Aug 18 11:58:57 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sat, 18 Aug 2007 11:58:57 +0000 Subject: [metaas-dev] [SVN metaas] Special representation for PLACEHOLDER nodes in the graphviz diagram References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070818/ce33ba2c/attachment.htm From dave at badgers-in-foil.co.uk Sat Aug 18 12:14:01 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sat, 18 Aug 2007 12:14:01 +0000 Subject: [metaas-dev] [SVN metaas] Fix problems due to the '<' seen by the AS3Parser at the start of an Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070818/68af8194/attachment.htm From dave at badgers-in-foil.co.uk Sun Aug 19 20:36:47 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 19 Aug 2007 20:36:47 +0000 Subject: [metaas-dev] [SVN metaas] I keep tripping over these assertions, in difficult to avoid situations, so remove them again References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070819/c57fc5d0/attachment.htm From dave at badgers-in-foil.co.uk Sun Aug 19 21:00:59 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 19 Aug 2007 21:00:59 +0000 Subject: [metaas-dev] [SVN metaas] I'd started making a change here, but I forget the details, and it breaks the unit tests, so reverting References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070819/0503d260/attachment.htm From dave at badgers-in-foil.co.uk Sun Aug 19 23:43:31 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Sun, 19 Aug 2007 23:43:31 +0000 Subject: [metaas-dev] [SVN metaas] Fix problems in the formatting of javadoc added to ASTs produced by the parser. Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070819/3579c2b1/attachment.htm From dave at badgers-in-foil.co.uk Sun Aug 19 23:47:00 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sun, 19 Aug 2007 23:47:00 +0000 Subject: [metaas-dev] New comment block In-Reply-To: <20070724214932.GA31480@badgers-in-foil.co.uk> References: <7B361321E6507E4FB61DB46C2C71398404D27DF0@csg2kexc06> <20070719153614.GA10840@badgers-in-foil.co.uk> <20070724214932.GA31480@badgers-in-foil.co.uk> Message-ID: <20070819234700.GA8204@badgers-in-foil.co.uk> On Tue, Jul 24, 2007 at 09:49:32PM +0000, David Holroyd wrote: > On Thu, Jul 19, 2007 at 03:36:14PM +0000, David Holroyd wrote: > > > The problem I have is that the method signature > > > is present on the same line as the newly generated end comment block tag > > > e.g. > > > > > > /** > > > * TODO: Add your constructor comments here. > > > */public function DateFormatter():void > > > > Well, I use this stuff myself and dodn't see that problem. Maybe > > because I've been adding comments in 'new' .as files, rather than > > modifying existing ones. > > So I have made a testcase which demonstrates the problem; it does seem > to happen when attempting to modify a parsed file, while for code > generated from scratch, adding comments looks ok. I've comitted some modifications which will hopefully improve JavaDoc formatting in this case. Are you able to build from SVN, to give it a whirl? ta, dave -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Sun Aug 19 23:49:30 2007 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sun, 19 Aug 2007 23:49:30 +0000 Subject: [metaas-dev] parse tree manipulation In-Reply-To: References: <20070725101924.GA7314@badgers-in-foil.co.uk> Message-ID: <20070819234930.GB8204@badgers-in-foil.co.uk> Hey Leo, Do you still need a proper dupTree() implementation? On Wed, Jul 25, 2007 at 10:33:49AM -0700, Leo Meyerovich wrote: > >I'm not familiar with CPS transforms; what are they good for? Are you > >adding tail-call optimisation to AS3 or something like that? > > > Yes, or user-level threading, etc (see narrative js). > > FYI, I did make a start at exposing expression-level stuff in the > >hand-crafted DOM interfaces (there should be some of this in Subversion) > >but lately I've been spending most of my hack-time on projects built on > >top of metaas, rather than on metaas itself. > > > Any tips at what to look at? My basic, exact scenario is that I want to add > some function applications throughout expressions, like > > a * b + 3 => f(plus, f(time, a, b), 3) > > I would have done it at the antlr level, but I want to do some optimizations > and deal with shadowed variables etc in special ways. > > > >Yep. Support for this is simply not implemented yet. LinkedListTree > >probably needs to supply its own implementation of dupTree() to > >duplicate all the subclass-specific state. The fiddly bit will be > >duplicating the relevant sub-segment of the token-linked-list, and then > >assigning the correct start/stop tokens in the duplicate tree nodes. > > > Yeah, as I've slowly realized what's going on underneath :) > > In the cases where the manipulation doesn't fail, does the code look > >'sane' when serialised back to text again? If you're using dupTree() I > >would expect it to be quite broken. > > > Most of the time (if I encounter them again, I'll let you know). > > So, it would be really helpful if you could send some simplified > >unit tests that demonstrate these problems. I can then work to make the > >tests pass. > > > When I encounter more, I'll try. > > For anyone else on the list, what I ended up doing for particularly hairy > bits of my visitor so far is writing a function astToString, and writing the > ast I wanted the subtree to be transformed into as a string with the > original subtree being transformed using that function. I'd then run the > string through the fragment parser and return the generated ast for > reinsertion (which needs lots of testing). The main trick is writing > astToString (reuse the tree printer internals, except you need to > temporarily disconnect a subtree from a parent if it is connected to get the > tokens right, and swap it back in after - I checked if the parent = > parent.parent, and swapped in a dummy node temporarily if so in order to not > disturb tokens). > > - Leo > _______________________________________________ > metaas-dev mailing list > metaas-dev at lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/metaas-dev -- http://david.holroyd.me.uk/ From dave at badgers-in-foil.co.uk Fri Aug 31 07:54:14 2007 From: dave at badgers-in-foil.co.uk (dave at badgers-in-foil.co.uk) Date: Fri, 31 Aug 2007 07:54:14 +0000 Subject: [metaas-dev] [SVN metaas] Improve AST consistency. In particular, use PROP_OR_IDENT in the identifier rule of the grammar, the same as we do elsewhere. Message-ID: An HTML attachment was scrubbed... URL: http://lists.badgers-in-foil.co.uk/pipermail/metaas-dev/attachments/20070831/f376f1e5/attachment.htm