Browse Source

Add first parts of metamodel for the action language (in dot format, as
it is not easy to draw by hand)

Yentl Van Tendeloo 10 years ago
parent
commit
afddf2948d
1 changed files with 59 additions and 0 deletions
  1. 59 0
      AL.dot

+ 59 - 0
AL.dot

@@ -0,0 +1,59 @@
+digraph G{
+    // Inheritance links between superclasses
+    Expression -> Action [arrowhead="empty"];
+    Statement -> Action [arrowhead="empty"];
+    Action -> Any [arrowhead="empty"];
+
+    // Links on superclasses
+    Statement -> Statement [label="next"];
+
+    // Inheritance hierarchy
+    If -> Statement [arrowhead="empty"];
+    While -> Statement [arrowhead="empty"];
+    Assign -> Statement [arrowhead="empty"];
+    Call -> Statement [arrowhead="empty"];
+    Call -> Expression [arrowhead="empty"];
+    Break -> Statement [arrowhead="empty"];
+    Continue -> Statement [arrowhead="empty"];
+    Return -> Statement [arrowhead="empty"];
+    Resolve -> Statement [arrowhead="empty"];
+    Resolve -> Lvalue [arrowhead="empty"];
+    Access -> Expression [arrowhead="empty"];
+    Constant -> Expression [arrowhead="empty"];
+    Constant -> Lvalue [arrowhead="empty"];
+    Input -> Expression [arrowhead="empty"];
+    Output -> Statement [arrowhead="empty"];
+    Declare -> Statement [arrowhead="empty"];
+    Global -> Statement [arrowhead="empty"];
+
+    // Actual types
+    // If
+    If -> Expression [label="cond"];
+    If -> Statement [label="true"];
+    If -> Statement [label="false"];
+
+    // While
+    While -> Expression [label="cond"];
+    While -> Statement [label="body"];
+
+    // Assign
+    Assign -> Lvalue [label="var"];
+    Assign -> Expression [label="value"];
+
+    // Call
+    Call -> Expression [label="func"];
+    Call -> Param [label="params"];
+    Call -> Param [label="last_param"];
+
+    // Break
+    Break -> While [label="while"];
+    
+    // Continue
+    Continue -> While [label="while"];
+
+    // Return
+    Return -> Expression [label="value"];
+
+    // Resolve
+    Resolve -> Any [label="var"];
+}