Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents the literal node (boolean literal, character literal, number literal, string literal, type literal)
#id: id
the unique ID assigned to this fact.
#parent: id
ID of the parent node.
#encl: methodT, constructorT, classInitializerT, fieldT, classT, annotationMemberT
ID of the fact that represents the enclosing element.
TYPE: typeterm
type of the literal
'value': atom
the value of this literal.
class HelloWorld { public static void main(String[] args){ System.out.println("Hello World!"); //literalT: "Hello World!" } }
methodT(#encl, ..., 'main', ..., type(basic, void, 0), [], ...). callT(#parent, .., #encl, ..., 'println', [#id], ...), literalT(#id, #parent, #encl, type(class, #String, 0), 'Hello World!').
ast_node_def('Java',literalT,[ ast_arg(id, mult(1,1,no ), id, [literalT]), % <-- convention!!! ast_arg(parent, mult(1,1,no ), id, [id]), % <-- convention!!! ast_arg(encl, mult(1,1,no ), id, [methodT, constructorT, classInitializerT, fieldT, classT, annotationMemberT]), ast_arg(type, mult(1,1,no ), attr, [typeTermType]), ast_arg(value, mult(1,1,no ), attr, [atom]) ]).