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

Next revision
Previous revision
research:jtransformer:api:meta:meta-model:ast_node_def [2010/12/14 22:40]
127.0.0.1 external edit
research:jtransformer:api:meta:meta-model:ast_node_def [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​languageMetamodelHeader&​fullpage&​nofooter}}
  
 + -> [[..:​..:​notation|Notation used in the following]]
 +
 +**ast_node_def**(?​Language,​ ?​AstNodeLabel : atom, ?​AstNodeArguments : list)  is nondet
 +  * The Abstract Syntax Tree (AST) for the language arg1 contains
 +    nodes with label arg2 and arguments conforming to the
 +    [[argument descriptors]] in arg3. The label (arg2) represents the AST node type.
 +    The arguments represent the AST node's id, its references to other nodes and its 
 +    attributes (that is, primitive values that are not references). See [[argument descriptors]]. ​
 +  * Example (excerpt from Java AST definition):​
 +<​Code> ​   ast_node_def(
 +        '​Java', ​          % The AST of the language '​Java'​ ...
 +        callT, ​           % ... contains nodes of type '​callT'​ ...
 +        [                 % ... that have 7 arguments:
 +          ast_arg(id, ​     mult(1,1,no ),  id,   ​[callT]),​
 +          ast_arg(parent, ​ mult(1,1,no ),  id,   ​[id]),​
 +          ast_arg(encl, ​   mult(1,1,no ),  id,   ​[methodT,​ constructorT,​ classInitializerT,​fieldT]),​
 +          ast_arg(expr, ​   mult(0,​1,​no), ​  ​id, ​  ​[expressionType,​ nullType, typeRefT]),
 +          ast_arg(name, ​   mult(1,1,no ),  attr, [atom]),
 +          ast_arg(args, ​   mult(0,​*,​ord ), id,   ​[expressionType]),​
 +          ast_arg(ref, ​    ​mult(1,​1,​no ),  id,   ​[methodT,​ constructorT])
 +        ]
 +    ). 
 +</​Code>​
research/jtransformer/api/meta/meta-model/ast_node_def.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019