SCM Repository
[diderot] / trunk / src / parser / parse-tree.sml |
View of /trunk/src/parser/parse-tree.sml
Parent Directory
|
Revision Log
Revision 37 -
(download)
(annotate)
Thu Feb 11 03:51:36 2010 UTC (12 years, 4 months ago) by jhr
File size: 1675 byte(s)
Thu Feb 11 03:51:36 2010 UTC (12 years, 4 months ago) by jhr
File size: 1675 byte(s)
Added value constructor syntax
(* parse-tree.sml * * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu) * All rights reserved. * * Diderot parse-tree representation. *) structure ParseTree = struct type 'a mark = 'a Error.mark type var = Atom.atom type dim = IntInf.int datatype program = Program of decl list and decl = D_Mark of decl mark | D_Input of ty * var * expr option (* input variable decl with optional default *) | D_Var of var_decl (* global variable decl *) | D_Actor of { (* actor decl *) name : var, params : param list, state : var_decl list, methods : method list } and param = P_Mark of param mark | P_Param of ty * var and ty = T_Mark of ty mark | T_Bool | T_Int | T_Real | T_String | T_Vec of dim | T_Kernel of dim | T_Field of dim * dim list | T_Tensor of dim list | T_Image of dim list and var_decl = VD_Mark of var_decl mark | VD_Decl of ty * var * expr and method = M_Mark of method mark | M_Method of var * stmt and stmt = S_Mark of stmt mark | S_Block of stmt list | S_Decl of var_decl | S_IfThen of expr * stmt | S_IfThenElse of expr * stmt * stmt | S_Assign of var * expr | S_New of var * expr list | S_Die | S_Stabilize and expr = E_Mark of expr mark | E_Var of var | E_Lit of Literal.literal | E_BinOp of expr * var * expr | E_UnaryOp of var * expr | E_Tuple of expr list | E_Apply of var * expr list | E_Cons of ty * expr list end
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |