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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/parse-tree/parse-tree.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/parse-tree/parse-tree.sml

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

revision 3390, Tue Nov 10 04:54:03 2015 UTC revision 3401, Wed Nov 11 02:21:58 2015 UTC
# Line 17  Line 17 
17      type field = Atom.atom      type field = Atom.atom
18      type dim = IntInf.int      type dim = IntInf.int
19    
20      (* binding occurrence of variable is wrapped with location info *)
21        type var_bind = var mark
22    
23      datatype program = Program of {      datatype program = Program of {
24            globals : global_dcl list,            globals : global_dcl list,
25            strand : strand_dcl,            strand : strand_dcl,
26            init : stmt option,            init : stmt option,
27            create : create,            create : create,
28            update : stmt option            update : stmt option
29          }          } mark
30    
31      and global_dcl      and global_dcl
32        = GD_Mark of global_dcl mark        = GD_Mark of global_dcl mark
33        | GD_Const of ty * var * expr option      (* constant declaration; if the expression is not *)        | GD_Const of ty * var_bind * expr option (* constant declaration; if the expression is not *)
34                                                  (* given, then it must be defined on the command-line. *)                                                  (* given, then it must be defined on the command-line. *)
35        | GD_Input of ty * var * string option * expr option        | GD_Input of ty * var_bind * string option * expr option
36                                                  (* input variable declaration with optional *)                                                  (* input variable declaration with optional *)
37                                                  (* description and optional default value *)                                                  (* description and optional default value *)
38        | GD_Var of var_dcl                       (* global variable declaration *)        | GD_Var of var_dcl                       (* global variable declaration *)
39        | GD_Func of ty * var * param list * fun_body (* function declaration *)        | GD_Func of ty * var_bind * param list * fun_body (* function declaration *)
40    
41      and strand_dcl      and strand_dcl
42        = SD_Mark of strand_dcl mark        = SD_Mark of strand_dcl mark
43        | SD_Strand of {                           (* strand declaration *)        | SD_Strand of {                           (* strand declaration *)
44              name : var,              name : var_bind,
45              params : param list,              params : param list,
46              state : state_var_dcl list,              state : state_var_dcl list,
47              methods : method list              methods : method list
# Line 56  Line 59 
59    
60      and param      and param
61        = P_Mark of param mark        = P_Mark of param mark
62        | P_Param of ty * var        | P_Param of ty * var_bind
63    
64      and ty      and ty
65        = T_Mark of ty mark        = T_Mark of ty mark
# Line 78  Line 81 
81    
82      and var_dcl      and var_dcl
83        = VD_Mark of var_dcl mark        = VD_Mark of var_dcl mark
84        | VD_Decl of ty * var * expr option        | VD_Decl of ty * var_bind * expr option
85    
86      and method      and method
87        = M_Mark of method mark        = M_Mark of method mark
# Line 107  Line 110 
110    
111      and iterator      and iterator
112        = I_Mark of iterator mark        = I_Mark of iterator mark
113        | I_Iterator of var * expr                (* x 'in' e *)        | I_Iterator of var_bind * expr           (* x 'in' e *)
114    
115      and expr      and expr
116        = E_Mark of expr mark        = E_Mark of expr mark

Legend:
Removed from v.3390  
changed lines
  Added in v.3401

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