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 1332 - (view) (download) (as text)
Original Path: sml/trunk/src/compiler/ElabData/syntax/absyn.sig

1 : blume 902 (* absyn.sig
2 :     *
3 :     * (C) 2001 Lucent Technologies, Bell Labs
4 :     *)
5 :     signature ABSYN =
6 :     sig
7 :    
8 :     type region
9 :    
10 :     datatype numberedLabel = LABEL of {name: Symbol.symbol, number: int}
11 :    
12 :     datatype exp
13 :     = VARexp of VarCon.var ref * Types.ty list
14 :     | CONexp of VarCon.datacon * Types.ty list
15 :     | 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 :     | VECTORexp of exp list * Types.ty
23 :     | PACKexp of exp * Types.ty * Types.tycon list
24 :     | APPexp of exp * exp
25 :     | HANDLEexp of exp * handler
26 :     | RAISEexp of exp * Types.ty
27 :     | 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 : blume 902 | FNexp of rule list * Types.ty
33 :     | LETexp of dec * exp
34 :     | SEQexp of exp list
35 :     | CONSTRAINTexp of exp * Types.ty
36 :     | MARKexp of exp * region
37 :    
38 :     and rule = RULE of pat * exp
39 :    
40 :     and handler = HANDLER of exp
41 :    
42 :     and pat
43 :     = WILDpat
44 :     | VARpat of VarCon.var
45 :     | INTpat of IntInf.int * Types.ty
46 :     | WORDpat of IntInf.int * Types.ty
47 :     | REALpat of string
48 :     | STRINGpat of string
49 :     | CHARpat of string
50 :     | CONpat of VarCon.datacon * Types.ty list
51 :     | RECORDpat of {fields : (Types.label * pat) list,
52 :     flex : bool, typ : Types.ty ref}
53 :     | APPpat of VarCon.datacon * Types.ty list * pat
54 :     | CONSTRAINTpat of pat * Types.ty
55 :     | LAYEREDpat of pat * pat
56 :     | ORpat of pat * pat
57 :     | VECTORpat of pat list * Types.ty
58 :     | NOpat
59 :    
60 :     and dec
61 :     = VALdec of vb list
62 :     | VALRECdec of rvb list
63 :     | TYPEdec of Types.tycon list
64 :     | DATATYPEdec of {datatycs: Types.tycon list, withtycs: Types.tycon list}
65 :     | ABSTYPEdec of {abstycs: Types.tycon list,
66 :     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 :     | FIXdec of {fixity: Fixity.fixity, ops: Symbol.symbol list}
78 :     | MARKdec of dec * region
79 :    
80 :     and strexp
81 :     = VARstr of Modules.Structure
82 :     | STRstr of Bindings.binding list
83 :     | APPstr of {oper: Modules.Functor, arg: Modules.Structure,
84 :     argtycs: Types.tycpath list}
85 :     | LETstr of dec * strexp
86 :     | MARKstr of strexp * region
87 :    
88 :     and fctexp
89 :     = VARfct of Modules.Functor
90 :     | FCTfct of {param: Modules.Structure, argtycs: Types.tycpath list,
91 :     def: strexp}
92 :     | 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 :     end (* signature ABSYN *)

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