Packages, Compilation Units and Imports | Annotations | Declarations | Expressions | Statements | Body Level Attributes |
|---|
execT(#id, #parent, #encl, #expr)
Represents the execution of an expression in a block.
Converts an expression to a statement.
Attributes
#id: id
the unique ID assigned to this fact.
#parent: id
ID of the parent node.
#encl: methodT, constructorT, classInitializerT
ID of the enclosing element.
#expr: expression,classT
ID of the expression to be executed. In the case of a local class the ID of that class.
Sample Java Source
void myExe(){ int i =10; int j = 9; j = i * j;//corresponding code line to execT }
Its PEF Representation
methodT(#Method, _, 'myExe', [], type(basic, void, 0), [], #Block), blockT(#Block, #Method, #Method, [_, _, #ExecT]), ... execT(#ExecT, #Block, #Method, #Assign), %% execT assignT(#Assign, #ExecT, #Method, _, _), ...
AST Specification
ast_node_def('Java',execT,[
ast_arg(id, mult(1,1,no ), id, [execT]), % <-- convention!!!
ast_arg(parent, mult(1,1,no ), id, [id]), % <-- convention!!!
ast_arg(encl, mult(1,1,no ), id, [methodT, constructorT, classInitializerT]),
ast_arg(expr, mult(1,1,no ), id, [expressionType,classT])
]).


