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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4328 - (view) (download) (as text)

1 : blume 902 (* absyn.sig
2 :     *
3 :     * (C) 2001 Lucent Technologies, Bell Labs
4 :     *)
5 : jhr 4328 signature ABSYN =
6 : blume 902 sig
7 :    
8 : jhr 4328 type region
9 : blume 902
10 :     datatype numberedLabel = LABEL of {name: Symbol.symbol, number: int}
11 :    
12 :     datatype exp
13 : dbm 2492 = VARexp of VarCon.var ref * Types.tyvar list (* instance type *)
14 :     | CONexp of VarCon.datacon * Types.tyvar list (* instance type *)
15 : blume 902 | INTexp of IntInf.int * Types.ty
16 :     | WORDexp of IntInf.int * Types.ty
17 :     | REALexp of string
18 :     | STRINGexp of string
19 :     | CHARexp of string
20 :     | RECORDexp of (numberedLabel * exp) list
21 :     | SELECTexp of numberedLabel * exp
22 : jhr 4328 | VECTORexp of exp list * Types.ty
23 : blume 902 | PACKexp of exp * Types.ty * Types.tycon list
24 :     | APPexp of exp * exp
25 : mblume 1641 | HANDLEexp of exp * fnrules
26 : jhr 4328 | RAISEexp of exp * Types.ty
27 : blume 902 | CASEexp of exp * rule list * bool
28 : mblume 1332 | IFexp of { test: exp, thenCase: exp, elseCase: exp }
29 :     | ANDALSOexp of exp * exp
30 :     | ORELSEexp of exp * exp
31 :     | WHILEexp of { test: exp, expr: exp }
32 : mblume 1641 | FNexp of fnrules
33 : blume 902 | LETexp of dec * exp
34 :     | SEQexp of exp list
35 : jhr 4328 | CONSTRAINTexp of exp * Types.ty
36 : blume 902 | MARKexp of exp * region
37 :    
38 :     and rule = RULE of pat * exp
39 :    
40 : jhr 4328 and pat
41 : blume 902 = WILDpat
42 :     | VARpat of VarCon.var
43 :     | INTpat of IntInf.int * Types.ty
44 :     | WORDpat of IntInf.int * Types.ty
45 :     | REALpat of string
46 :     | STRINGpat of string
47 :     | CHARpat of string
48 : dbm 2492 | CONpat of VarCon.datacon * Types.tyvar list (* instance type *)
49 : jhr 4328 | RECORDpat of {fields : (Types.label * pat) list,
50 : blume 902 flex : bool, typ : Types.ty ref}
51 : dbm 2492 | APPpat of VarCon.datacon * Types.tyvar list * pat
52 : blume 902 | CONSTRAINTpat of pat * Types.ty
53 :     | LAYEREDpat of pat * pat
54 :     | ORpat of pat * pat
55 : jhr 4328 | VECTORpat of pat list * Types.ty
56 :     | MARKpat of pat * region
57 : blume 902 | NOpat
58 :    
59 : jhr 4328 and dec
60 : blume 902 = VALdec of vb list
61 :     | VALRECdec of rvb list
62 : jhr 4304 | DOdec of exp
63 : blume 902 | TYPEdec of Types.tycon list
64 :     | DATATYPEdec of {datatycs: Types.tycon list, withtycs: Types.tycon list}
65 : jhr 4328 | ABSTYPEdec of {abstycs: Types.tycon list,
66 : blume 902 withtycs: Types.tycon list, body: dec}
67 :     | EXCEPTIONdec of eb list
68 :     | STRdec of strb list
69 :     | ABSdec of strb list
70 :     | FCTdec of fctb list
71 :     | SIGdec of Modules.Signature list
72 :     | FSIGdec of Modules.fctSig list
73 :     | OPENdec of (SymPath.path * Modules.Structure) list
74 :     | LOCALdec of dec * dec
75 :     | SEQdec of dec list
76 :     | OVLDdec of VarCon.var
77 : jhr 4328 | FIXdec of {fixity: Fixity.fixity, ops: Symbol.symbol list}
78 : blume 902 | MARKdec of dec * region
79 :    
80 : jhr 4328 and strexp
81 :     = VARstr of Modules.Structure
82 : blume 902 | STRstr of Bindings.binding list
83 : jhr 4328 | APPstr of {oper: Modules.Functor, arg: Modules.Structure,
84 : blume 902 argtycs: Types.tycpath list}
85 :     | LETstr of dec * strexp
86 :     | MARKstr of strexp * region
87 :    
88 : jhr 4328 and fctexp
89 : blume 902 = VARfct of Modules.Functor
90 : jhr 4328 | FCTfct of {param: Modules.Structure, argtycs: Types.tycpath list,
91 :     def: strexp}
92 : blume 902 | LETfct of dec * fctexp
93 :     | MARKfct of fctexp * region
94 :    
95 :     and vb = VB of {pat: pat, exp: exp, boundtvs: Types.tyvar list,
96 :     tyvars: Types.tyvar list ref}
97 :    
98 :     and rvb = RVB of {var: VarCon.var, exp: exp, boundtvs: Types.tyvar list,
99 :     resultty: Types.ty option, tyvars: Types.tyvar list ref}
100 :    
101 :     and eb = EBgen of {exn: VarCon.datacon, etype: Types.ty option, ident: exp}
102 :     | EBdef of {exn: VarCon.datacon, edef: VarCon.datacon}
103 :    
104 :     and strb = STRB of {name: Symbol.symbol, str: Modules.Structure, def: strexp}
105 :     and fctb = FCTB of {name: Symbol.symbol, fct: Modules.Functor, def: fctexp}
106 :    
107 : mblume 1641 withtype fnrules = rule list * Types.ty
108 :    
109 : blume 902 end (* signature ABSYN *)

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