SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

research:jtransformer:api:java:pefs:3.0:nopt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +
 +----
 +
 +=== nopT(#id, #parent, #​encl). ​ ===
 +
 +Represents the no operation node, signifying a lone semicolon.
 +
 +=== Arguments ===
 +== ==
 +**#id:** id\\ 
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** id\\ 
 +ID of the parent node.
 +
 +**#encl:** [[methodT|methodT]],​ [[constructorT|constructorT]],​ [[classInitializerT|classInitializerT]]\\
 +ID of the enclosing element.
 +
 +=== Sample Java Code === 
 +==  ==
 +<Code lang-java>​
 +void myFunction(){
 + int i = 0;
 + if (i >0){
 +                    //do nothing
 + ;                  //​corresponding code line to nopT
 + }
 + else
 + System.out.print("​Do Something"​);​
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +==  ==
 +<Code lang-prolog>​
 +methodDefT(#​enclMethod,​ ..., '​myFunction',​ [], type(basic, void, 0), [], ...).
 +blockT(#​parent,​ ..., #​enclMethod,​ [#id]).
 +nopT(#id, #parent, #​enclMethod).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_def('​Java',​nopT,​[
 +     ​ast_arg(id, ​    ​mult(1,​1,​no ), id,  [nopT]), % <-- convention!!!
 +     ​ast_arg(parent,​ mult(1,1,no ), id,  [id]), % <-- convention!!!
 +     ​ast_arg(encl, ​  ​mult(1,​1,​no ), id,  [methodT, constructorT,​ classInitializerT])
 +]).
 +</​Code>​
  
research/jtransformer/api/java/pefs/3.0/nopt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019