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 1641 - (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 : mblume 1641 | HANDLEexp of exp * fnrules
26 : blume 902 | 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 : mblume 1641 | FNexp of fnrules
33 : blume 902 | 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 pat
41 :     = 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 :     | CONpat of VarCon.datacon * Types.ty list
49 :     | RECORDpat of {fields : (Types.label * pat) list,
50 :     flex : bool, typ : Types.ty ref}
51 :     | APPpat of VarCon.datacon * Types.ty list * pat
52 :     | CONSTRAINTpat of pat * Types.ty
53 :     | LAYEREDpat of pat * pat
54 :     | ORpat of pat * pat
55 :     | VECTORpat of pat list * Types.ty
56 :     | NOpat
57 :    
58 :     and dec
59 :     = VALdec of vb list
60 :     | VALRECdec of rvb list
61 :     | TYPEdec of Types.tycon list
62 :     | DATATYPEdec of {datatycs: Types.tycon list, withtycs: Types.tycon list}
63 :     | ABSTYPEdec of {abstycs: Types.tycon list,
64 :     withtycs: Types.tycon list, body: dec}
65 :     | EXCEPTIONdec of eb list
66 :     | STRdec of strb list
67 :     | ABSdec of strb list
68 :     | FCTdec of fctb list
69 :     | SIGdec of Modules.Signature list
70 :     | FSIGdec of Modules.fctSig list
71 :     | OPENdec of (SymPath.path * Modules.Structure) list
72 :     | LOCALdec of dec * dec
73 :     | SEQdec of dec list
74 :     | OVLDdec of VarCon.var
75 :     | FIXdec of {fixity: Fixity.fixity, ops: Symbol.symbol list}
76 :     | MARKdec of dec * region
77 :    
78 :     and strexp
79 :     = VARstr of Modules.Structure
80 :     | STRstr of Bindings.binding list
81 :     | APPstr of {oper: Modules.Functor, arg: Modules.Structure,
82 :     argtycs: Types.tycpath list}
83 :     | LETstr of dec * strexp
84 :     | MARKstr of strexp * region
85 :    
86 :     and fctexp
87 :     = VARfct of Modules.Functor
88 :     | FCTfct of {param: Modules.Structure, argtycs: Types.tycpath list,
89 :     def: strexp}
90 :     | LETfct of dec * fctexp
91 :     | MARKfct of fctexp * region
92 :    
93 :     and vb = VB of {pat: pat, exp: exp, boundtvs: Types.tyvar list,
94 :     tyvars: Types.tyvar list ref}
95 :    
96 :     and rvb = RVB of {var: VarCon.var, exp: exp, boundtvs: Types.tyvar list,
97 :     resultty: Types.ty option, tyvars: Types.tyvar list ref}
98 :    
99 :     and eb = EBgen of {exn: VarCon.datacon, etype: Types.ty option, ident: exp}
100 :     | EBdef of {exn: VarCon.datacon, edef: VarCon.datacon}
101 :    
102 :     and strb = STRB of {name: Symbol.symbol, str: Modules.Structure, def: strexp}
103 :     and fctb = FCTB of {name: Symbol.symbol, fct: Modules.Functor, def: fctexp}
104 :    
105 : mblume 1641 withtype fnrules = rule list * Types.ty
106 :    
107 : blume 902 end (* signature ABSYN *)

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