Closed EdwarDDay closed 11 years ago
Which attributes do you mean? You can find attributes in the subclass (e.g.(DeclarationNodeJb) ast).getType())
There is no DeclarationNodeJb interface in the common repository. This is a javabite class. But we need something for the visualization. Therefore the attributes need to be in the ASTNode interface.
DeclarationNodeJB is the implementation of DeclarationNode (Interface). You just need the Interface of DeclarationNode
No, I mean attributes of the SDD, like 'canBreak' if an ASTNode is in a loop or 'type' from the childrenNodes of an assignment.
The changes in the ASTNode will be added tomorrow (21.06.).
In my opinion, this is not quite necessary. We AST has been developed with a ( volitional) limited scope and is almost perfect for this purpose. If you need it unconditional for the next MS3, i'm okay with changing it. But imho, if MS2 was possible with this design, why should we change the approach now? I don't see the big difference in MS3.
We have the advantage of attributes in the ASTNodes, which can be displayed in the AST-Visualisation. This could be very helpful to the students.
Ah okay, i didn't get you right... You mean it's a pure non-functional behavior? Thus the parsing, semantic analysis etc. will not depend on anything that is defined as an attribute? Well, in that case, i agree. ... just a little remark ... maybe it's more handy to use a object as attribute value?
Yeah, we can use Object. I only wanted a new Interface, because I don't like the toString() method as user output. But we have only three weeks, so Objects are fine.
Attirbutes for the semantic analyser should be saved in ASTNodes. This way the visualizer could show the attributes.
And a Attribute interface is needed:
Because of the short time to the next milestone this should be implemented after MS2.