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 26, Tue Feb 9 00:43:01 2010 UTC revision 27, Tue Feb 9 02:36:31 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
# Line 19  Line 19 
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 ty      and ty
32        = T_Mark of ty mark        = T_Mark of ty mark
# Line 33  Line 40 
40        | T_Tensor of dim list        | T_Tensor of dim list
41        | T_Image of dim list        | T_Image of dim list
42    
43        and actor = Actor of var * param list *
44    
45        and var_decl
46          = VD_Mark of var_decl mark
47          | VD_Decl of ty * var * expr
48    
49      and stmt      and stmt
50        = E_Mark of stmt mark        = S_Mark of stmt mark
51        | E_Block of stmt list        | S_Block of stmt list
52        | E_IfThen of expr * stmt        | S_Decl of var_decl
53        | E_IfThenElse of expr * stmt * stmt        | S_IfThen of expr * stmt
54        | E_Decl of ty * var * expr        | S_IfThenElse of expr * stmt * stmt
55        | E_Assign of var * expr        | S_Assign of var * expr
56        | E_New of var * expr list        | S_New of var * expr list
57        | E_Die        | S_Die
58        | E_Stabilize        | S_Stabilize
59    
60      and expr      and expr
61        = E_Mark of expr mark        = E_Mark of expr mark
62        | E_Var of var        | E_Var of var
63        | E_Lit of literal        | E_Lit of Literal.literal
64        | E_BinOp of expr * var * expr        | E_BinOp of expr * var * expr
65          | E_UnaryOp of var * expr
66          | E_Tuple of expr list
67    
68    end    end

Legend:
Removed from v.26  
changed lines
  Added in v.27

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