Hi Yuriy,

The why is easy: I couldn't make sense of the deeply nested arrays that were present in the parts of the parsed code that weren't modeled in the existing AST, so I tried to make a model that I could have a chance of navigating.

As to the nodes themselves:
š- some of them were already there, and I just hooked them up to the parsers.
š- some I would claim aren't strange (such as the ForStatementNode),and probably don't deserve the label 'strange'.
š- several really do deserve the label 'strange', though. šThese were ones where I wasn't sure what was being parsed out, and just blindly followed the parser naming convention. šThis is where the odd/strange nodes like PrimaryWithSelector came from. šThat one, at least, has been removed with a better set of nodes to replace it (MethodInvocationNode and VariableAccessorNode). šThe rest have not been rethought to make their usage clearer.

Going forward, I plan on removing some of the nodes (PJArguments and PJTypeArguments should just be an array in the containing node; PJThisIdentifierNode and PJSuperIdentifierNode were probably bad ideas to begin with); and re-think at least one of the others: PJClassOrInterfaceNode. šIf there are others that are still strange, please let me know which.

Interestingly, Stephan has commented most of the other nodes - thanks!

-Chris


On Thu, Jun 20, 2013 at 5:52 AM, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Yes, I know, I have to talk to Chris, as he introduced a lot of strange nodes to AST, and I couldn't figure out why.

îÁĦÓÌÁÎÏ Ú iPhone

20 ÞÅÒ×. 2013 Ï 14:09 Stephan Eggermont <stephan@stack.nl> ÎÁÐÉÓÁ×(ÌÁ):

> Yuriy,
>
> Ok, I'm not in a hurry. Please note that your latest version is out of sync
> since PetitJava-MartinDias.104, and there are lots of versions to merge
> by cbc & ChrisCunningham. Automerge fails.
>
> Stephan
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev