summaryrefslogtreecommitdiffstats
blob: 0a6ea76b3b7046f11313af4f1cdba62e67fc1ec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- @name		MSRT
-- @version		1.0
-- @authors		Mikael Barbero
-- @date		01/09/2008
-- @description	Simple metamodel to test MultiStep RefersTo resolution. Illustrate workaround of bug #214598 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=214598)
package MSRT {
	class Block {
	  attribute name : String;
	  reference subblocks[*] ordered container : Block;
	  reference statements[*] ordered container : Statement;
	}
	
	abstract class Statement {}
	
	class VariableDef extends Statement {
	  attribute varName : String;
	}
	
	abstract class VariableRef {}
	
	class SimpleVariableRef extends VariableRef {
		reference varDef : VariableDef;
	}
	
	class ComplexVariableRef extends VariableRef {
	  reference varDef : VariableDef;
	  reference ownerblock : Block; -- This to support the path to sibling blocks
	}
	
	class Assignement extends Statement {
	  reference lhs container : SimpleVariableRef;
	  reference rhs container : VariableRef;
	} 
}

package PrimitiveTypes {
	datatype Boolean;
	datatype Integer;
	datatype String;
}