So, you'd like to have a PJArrayVariableAccessorNode and PJArrayVariableDeclarationNode as well to supportšhttp://docs.oracle.com/javase/specs/jls/se7/html/jls-10.html#jls-10.4šandšhttp://docs.oracle.com/javase/specs/jls/se7/html/jls-10.html#jls-10.2š? šhow granular do you want the AST?

Or am I not understanding what you are asking? šI am having a hard time trying to understand how to translate that web-site into a Node design.

-Chris


On Fri, Jun 28, 2013 at 8:56 AM, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
To be short IMHO it should be as close tošhttp://docs.oracle.com/javase/specs/jls/se7/html/index.htmlšas possible.

îÁĦÓÌÁÎÏ Ú iPhone

28 ÞÅÒ×. 2013 Ï 18:24 Chris Cunningham <cunningham.cb@gmail.com> ÎÁÐÉÓÁ×(ÌÁ):

Hi Yuriy,

So, let's talk this through. šIf a variable is being type cast as something else, how would you model it? šA wrapping node that holds the cast? šI chose to inline it with the accessor itself as being simpler.

When a variable access is being negated, šyou would also wrap the accessor with a PJNegationNode, maybe?

And, as for the arrayIndexes, if the accessor is an accessor to a point in the array of objects, well, how do you model that?

How would you want the models for this java expression:

š š !super.(OtherType)booleanArray[1][8]

The nodes work for my purposes as-is - I can trace the flow of data through the program, which is my main intent. šThat said, I have no objection to it being modeled better/different, but I do want it modeled at least this well and with at least this much detail.

What is it that you want? Do you want to go back to the way it was? šor do you have a specific destination in mind?

-Chris


On Fri, Jun 28, 2013 at 7:39 AM, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
What negation is doing in MethodInvocation node? And what negation is doing in the VariableAccessorNode? What type cast is doing in VariableAccessorNode? Why does variable accessor has array? Is't not accessor_s_. Accessor. Only one. Accessor only knows only name of the variable it's accessing and the target of access. During parsing PJVariableAccessorNode is created as part of identifierWithAccessors, primary and selector grammars.

As for me this is madness. Yes, I made some mess to when I created InfixOperation instead of all the additive expressions, multiplicative expressions, etc... But to do it right now you just have to define a new node and create it for a related grammar instead of infix expression node.

I think that right now PetitJava is a bigger mess than it was

îÁĦÓÌÁÎÏ Ú iPhone
_______________________________________________
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

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