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:4.2:labelt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +----
 +
 +=== labelT (#id, #parent, #encl, #body, '​name'​) ​ ===
 +
 +Represents the labeled statement.
 +
 +=== Arguments ===
 +== ==
 +**#id:** id\\ 
 +the unique ID assigned to this fact.
 + 
 +**#​parent:​** id\\ 
 +ID of the parent node.
 +
 +**#encl:** [[methodt|methodT]],​ [[constructort|constructorT]],​ [[classinitializert|classInitializerT]],​ [[fieldt|fieldT]]\\ ​
 +ID of the enclosing element declaration.
 +
 +**#body:** [[plaststatement|statement]]\\ ​
 +ID of the body of this labeled statement.
 +
 +**'​name':​** atom\\ ​
 +the name of this label.
 +
 +=== Sample Java Code ===
 +==  ==
 +<Code lang-java>​
 +public void helloWorld() {
 + hello: ​                                   //labelT
 + System.out.println("​Hello World!"​);​
 + }
 +}
 +
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +==  ==
 +<Code lang-prolog>​
 +methodT(#​encl,​ ..., '​helloWorld',​ [], type(basic, void, 0), [], #parent),
 +blockT(#​parent,​ ... , #encl, [#id]),
 +labelT(#id, #parent, #encl, #body, '​hello'​),​
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_type_spec(labelT,​ [
 +     ​ast_arg(id, ​     mult(1,​1,​no),​ id,   ​[labelT]),​
 +     ​ast_arg(parent, ​ mult(1,​1,​no),​ id,   ​[id]),​
 +     ​ast_arg(encl, ​   mult(1,​1,​no),​ id,   ​[methodT,​ constructorT,​ classInitializerT,​ fieldT]),
 +     ​ast_arg(body, ​   mult(1,​1,​no),​ id,   ​[statementType]),​
 +     ​ast_arg(label, ​  ​mult(1,​1,​no),​ attr, [atom])
 +]).
 +</​Code>​
research/jtransformer/api/java/pefs/4.2/labelt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019