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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 26 - (view) (download)

1 : jhr 25 (* parse-tree.sml
2 :     *
3 :     * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu)
4 :     * All rights reserved.
5 :     *
6 :     * Diderot parse-tree representation.
7 :     *)
8 :    
9 :     structure ParseTree =
10 :     struct
11 :    
12 :     type var = Atom.atom
13 :     type int = IntInf.int
14 :     type float = ??
15 :     type dim = IntInf.int
16 :    
17 :     datatype program
18 :     = Porgram of decl list
19 :    
20 :     and decl
21 :     = D_Mark of decl mark
22 :     | D_Actor of actor
23 :    
24 :     and ty
25 :     = T_Mark of ty mark
26 :     | T_Bool
27 :     | T_Int
28 :     | T_Real
29 :     | T_String
30 :     | T_Vec of dim
31 : jhr 26 | T_Kernel of dim
32 :     | T_Field of dim * dim list
33 :     | T_Tensor of dim list
34 :     | T_Image of dim list
35 : jhr 25
36 :     and stmt
37 :     = E_Mark of stmt mark
38 :     | E_Block of stmt list
39 :     | E_IfThen of expr * stmt
40 :     | E_IfThenElse of expr * stmt * stmt
41 :     | E_Decl of ty * var * expr
42 :     | E_Assign of var * expr
43 :     | E_New of var * expr list
44 :     | E_Die
45 :     | E_Stabilize
46 :    
47 :     and expr
48 :     = E_Mark of expr mark
49 :     | E_Var of var
50 :     | E_Lit of literal
51 :     | E_BinOp of expr * var * expr
52 :    
53 :     end

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