Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/compiler/ElabData/syntax/absyn.sig
ViewVC logotype

View of /sml/trunk/compiler/ElabData/syntax/absyn.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4494 - (download) (as text) (annotate)
Sun Oct 15 03:04:17 2017 UTC (2 years, 5 months ago) by jhr
File size: 3638 byte(s)
  Working on change in integer/word literal representation.
  Stage 1 -- changed representation in Absyn.
(* absyn.sig
 *
 * COPYRIGHT (c) 2017 The Fellowship of SML/NJ (http://www.smlnj.org)
 * All rights reserved.
 *)

signature ABSYN =
  sig

    type region

    datatype numberedLabel = LABEL of {name: Symbol.symbol, number: int}

    datatype exp
      = VARexp of VarCon.var ref * Types.tyvar list (* instance type *)
      | CONexp of VarCon.datacon * Types.tyvar list (* instance type *)
      | NUMexp of num_lit
      | REALexp of string
      | STRINGexp of string
      | CHARexp of string
      | RECORDexp of (numberedLabel * exp) list
      | SELECTexp of numberedLabel * exp
      | VECTORexp of exp list * Types.ty
      | PACKexp of exp * Types.ty * Types.tycon list
      | APPexp of exp * exp
      | HANDLEexp of exp * fnrules
      | RAISEexp of exp * Types.ty
      | CASEexp of exp * rule list * bool
      | IFexp of { test: exp, thenCase: exp, elseCase: exp }
      | ANDALSOexp of exp * exp
      | ORELSEexp of exp * exp
      | WHILEexp of { test: exp, expr: exp }
      | FNexp of fnrules
      | LETexp of dec * exp
      | SEQexp of exp list
      | CONSTRAINTexp of exp * Types.ty
      | MARKexp of exp * region

    and rule = RULE of pat * exp

    and pat
      = WILDpat
      | VARpat of VarCon.var
      | NUMpat of num_lit
      | REALpat of string
      | STRINGpat of string
      | CHARpat of string
      | CONpat of VarCon.datacon * Types.tyvar list (* instance type *)
      | RECORDpat of {fields : (Types.label * pat) list,
		      flex : bool, typ : Types.ty ref}
      | APPpat of VarCon.datacon * Types.tyvar list * pat
      | CONSTRAINTpat of pat * Types.ty
      | LAYEREDpat of pat * pat
      | ORpat of pat * pat
      | VECTORpat of pat list * Types.ty
      | MARKpat of pat * region
      | NOpat

    and dec
      = VALdec of vb list
      | VALRECdec of rvb list
      | DOdec of exp
      | TYPEdec of Types.tycon list
      | DATATYPEdec of {datatycs: Types.tycon list, withtycs: Types.tycon list}
      | ABSTYPEdec of {abstycs: Types.tycon list,
		       withtycs: Types.tycon list, body: dec}
      | EXCEPTIONdec of eb list
      | STRdec of strb list
      | ABSdec of strb list
      | FCTdec of fctb list
      | SIGdec of Modules.Signature list
      | FSIGdec of Modules.fctSig list
      | OPENdec of (SymPath.path * Modules.Structure) list
      | LOCALdec of dec * dec
      | SEQdec of dec list
      | OVLDdec of VarCon.var
      | FIXdec of {fixity: Fixity.fixity, ops: Symbol.symbol list}
      | MARKdec of dec * region

    and strexp
      = VARstr of Modules.Structure
      | STRstr of Bindings.binding list
      | APPstr of {oper: Modules.Functor, arg: Modules.Structure,
		   argtycs: Types.tycpath list}
      | LETstr of dec * strexp
      | MARKstr of strexp * region

    and fctexp
      = VARfct of Modules.Functor
      | FCTfct of {param: Modules.Structure, argtycs: Types.tycpath list,
		   def: strexp}
      | LETfct of dec * fctexp
      | MARKfct of fctexp * region

    and vb = VB of {pat: pat, exp: exp, boundtvs: Types.tyvar list,
		    tyvars: Types.tyvar list ref}

    and rvb = RVB of {var: VarCon.var, exp: exp, boundtvs: Types.tyvar list,
		      resultty: Types.ty option, tyvars: Types.tyvar list ref}

    and eb = EBgen of {exn: VarCon.datacon, etype: Types.ty option, ident: exp}
	   | EBdef of {exn: VarCon.datacon, edef: VarCon.datacon}

    and strb = STRB of {name: Symbol.symbol, str: Modules.Structure, def: strexp}
    and fctb = FCTB of {name: Symbol.symbol, fct: Modules.Functor, def: fctexp}

    withtype fnrules = rule list * Types.ty
         and num_lit = Types.ty IntConst.iconst

  end (* signature ABSYN *)

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