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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 25 - (download) (annotate)
Mon Feb 8 22:51:42 2010 UTC (10 years, 4 months ago) by jhr
File size: 943 byte(s)
  Working on Diderot parser
(* 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 var = Atom.atom
    type int = IntInf.int
    type float = ??
    type dim = IntInf.int

    datatype program
      = Porgram of decl list

    and decl
      = D_Mark of decl mark
      | D_Actor of actor

    and ty
      = T_Mark of ty mark
      | T_Bool
      | T_Int
      | T_Real
      | T_String
      | T_Vec of dim

    and stmt
      = E_Mark of stmt mark
      | E_Block of stmt list
      | E_IfThen of expr * stmt
      | E_IfThenElse of expr * stmt * stmt
      | E_Decl of ty * var * expr
      | E_Assign of var * expr
      | E_New of var * expr list
      | E_Die
      | E_Stabilize

    and expr
      = E_Mark of expr mark
      | E_Var of var
      | E_Lit of literal
      | E_BinOp of expr * var * expr

  end

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