SDA SE Wiki

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

User Tools

Site Tools



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, constructorT, classInitializerT, fieldT
ID of the enclosing element declaration.

#body: statement
ID of the body of this labeled statement.

'name': atom
the name of this label.

Sample Java Code

public void helloWorld() {
		hello:                                    //labelT
		System.out.println("Hello World!");
	}
}

Its PEF Representation

methodT(#encl, ..., 'helloWorld', [], type(basic, void, 0), [], #parent),
blockT(#parent, ... , #encl, [#id]),
labelT(#id, #parent, #encl, #body, 'hello'),

AST Specification

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])
]).
research/jtransformer/api/java/pefs/4.2/labelt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2023