Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/src/parser/parse-tree.sml
ViewVC logotype

Diff of /trunk/src/parser/parse-tree.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 25, Mon Feb 8 22:51:42 2010 UTC revision 35, Thu Feb 11 01:04:20 2010 UTC
# Line 9  Line 9 
9  structure ParseTree =  structure ParseTree =
10    struct    struct
11    
12        type 'a mark = 'a Error.mark
13    
14      type var = Atom.atom      type var = Atom.atom
     type int = IntInf.int  
     type float = ??  
15      type dim = IntInf.int      type dim = IntInf.int
16    
17      datatype program      datatype program
18        = Porgram of decl list        = Program of decl list
19    
20      and decl      and decl
21        = D_Mark of decl mark        = D_Mark of decl mark
22        | D_Actor of actor        | D_Input of ty * var * expr option       (* input variable decl with optional default *)
23          | D_Var of var_decl                       (* global variable decl *)
24          | D_Actor of {                            (* actor decl *)
25                name : var,
26                params : param list,
27                state : var_decl list,
28                methods : method list
29              }
30    
31        and param
32          = P_Mark of param mark
33          | P_Param of ty * var
34    
35      and ty      and ty
36        = T_Mark of ty mark        = T_Mark of ty mark
# Line 28  Line 39 
39        | T_Real        | T_Real
40        | T_String        | T_String
41        | T_Vec of dim        | T_Vec of dim
42          | T_Kernel of dim
43          | T_Field of dim * dim list
44          | T_Tensor of dim list
45          | T_Image of dim list
46    
47        and var_decl
48          = VD_Mark of var_decl mark
49          | VD_Decl of ty * var * expr
50    
51        and method
52          = M_Mark of method mark
53          | M_Method of var * stmt
54    
55      and stmt      and stmt
56        = E_Mark of stmt mark        = S_Mark of stmt mark
57        | E_Block of stmt list        | S_Block of stmt list
58        | E_IfThen of expr * stmt        | S_Decl of var_decl
59        | E_IfThenElse of expr * stmt * stmt        | S_IfThen of expr * stmt
60        | E_Decl of ty * var * expr        | S_IfThenElse of expr * stmt * stmt
61        | E_Assign of var * expr        | S_Assign of var * expr
62        | E_New of var * expr list        | S_New of var * expr list
63        | E_Die        | S_Die
64        | E_Stabilize        | S_Stabilize
65    
66      and expr      and expr
67        = E_Mark of expr mark        = E_Mark of expr mark
68        | E_Var of var        | E_Var of var
69        | E_Lit of literal        | E_Lit of Literal.literal
70        | E_BinOp of expr * var * expr        | E_BinOp of expr * var * expr
71          | E_UnaryOp of var * expr
72          | E_Tuple of expr list
73          | E_Apply of var * expr list
74    
75    end    end

Legend:
Removed from v.25  
changed lines
  Added in v.35

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0