Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents an expression in parentheses () in the source code.
#id: id
the unique ID given to this node.
#parent: id
ID if the parent node in the AST.
#encl: methodT, constructorT, classInitializerT, fieldT
ID of the fact that represents the enclosing element.
#expr: expression
ID of the expression within the parenthesis.
... int i = (4 + 8) * 2; // (4 + 8) is our precedenceT ...
localT(#Local, #Parent, #Enclosing, type(basic, int, 0), 'i', #OuterOperation) operationT(#OuterOperation, #Local, #Enclosing, [#Precedence, #Literal_15], *, 0), precedenceT(#Precedence, #OuterOperation, #Enclosing, #InnerOperation), operationT(#InnerOperation, #Precedence, #Enclosing, [#Literal_4, #Literal_8], +, 0), literalT(#Literal_4, #InnerOperation, #Enclosing, type(basic, int, 0), '4'), literalT(#Literal_8, #InnerOperation, #Enclosing, type(basic, int, 0), '8'), literalT(#Literal_15, #OuterOperation, #Enclosing, type(basic, int, 0), '15'),
ast_node_def('Java',precedenceT,[ ast_arg(id, mult(1,1,no ), id, [precedenceT]), % <-- convention!!! ast_arg(parent, mult(1,1,no ), id, [id]), % <-- convention!!! ast_arg(encl, mult(1,1,no ), id, [methodT, constructorT, classInitializerT, fieldT]), ast_arg(expr, mult(1,1,no ), id, [expressionType]) ]).