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 6214 - (view) (download) (as text)

1 : blume 902 (* absyn.sig
2 :     *
3 : jhr 4494 * COPYRIGHT (c) 2017 The Fellowship of SML/NJ (http://www.smlnj.org)
4 :     * All rights reserved.
5 : blume 902 *)
6 : jhr 4494
7 : jhr 4328 signature ABSYN =
8 : jhr 4494 sig
9 : blume 902
10 : jhr 6214 type region = Ast.region (* = int * int *)
11 : blume 902
12 : jhr 4494 datatype numberedLabel = LABEL of {name: Symbol.symbol, number: int}
13 : blume 902
14 : jhr 4494 datatype exp
15 :     = VARexp of VarCon.var ref * Types.tyvar list (* instance type *)
16 :     | CONexp of VarCon.datacon * Types.tyvar list (* instance type *)
17 : jhr 4538 | NUMexp of string * num_lit (* string is source text of literal *)
18 :     | REALexp of string * real_lit (* string is source text of literal *)
19 : jhr 4494 | STRINGexp of string
20 :     | CHARexp of string
21 :     | RECORDexp of (numberedLabel * exp) list
22 :     | SELECTexp of numberedLabel * exp
23 :     | VECTORexp of exp list * Types.ty
24 :     | APPexp of exp * exp
25 :     | HANDLEexp of exp * fnrules
26 :     | RAISEexp of exp * Types.ty
27 :     | CASEexp of exp * rule list * bool
28 :     | 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 :     | FNexp of fnrules
33 :     | LETexp of dec * exp
34 :     | SEQexp of exp list
35 :     | CONSTRAINTexp of exp * Types.ty
36 :     | MARKexp of exp * region
37 : blume 902
38 : jhr 4494 and rule = RULE of pat * exp
39 : blume 902
40 : jhr 4494 and pat
41 :     = WILDpat
42 :     | VARpat of VarCon.var
43 : jhr 4538 | NUMpat of string * num_lit (* string is source text of literal *)
44 : jhr 4494 | STRINGpat of string
45 :     | CHARpat of string
46 :     | CONpat of VarCon.datacon * Types.tyvar list (* instance type *)
47 :     | RECORDpat of {fields : (Types.label * pat) list,
48 :     flex : bool, typ : Types.ty ref}
49 :     | APPpat of VarCon.datacon * Types.tyvar list * pat
50 :     | CONSTRAINTpat of pat * Types.ty
51 :     | LAYEREDpat of pat * pat
52 :     | ORpat of pat * pat
53 :     | VECTORpat of pat list * Types.ty
54 :     | MARKpat of pat * region
55 :     | NOpat
56 : blume 902
57 : jhr 4494 and dec
58 :     = VALdec of vb list
59 :     | VALRECdec of rvb list
60 :     | DOdec of exp
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 :     | FCTdec of fctb list
68 :     | SIGdec of Modules.Signature list
69 :     | FSIGdec of Modules.fctSig list
70 :     | OPENdec of (SymPath.path * Modules.Structure) list
71 :     | LOCALdec of dec * dec
72 :     | SEQdec of dec list
73 :     | OVLDdec of VarCon.var
74 :     | FIXdec of {fixity: Fixity.fixity, ops: Symbol.symbol list}
75 :     | MARKdec of dec * region
76 : blume 902
77 : jhr 4494 and strexp
78 :     = VARstr of Modules.Structure
79 :     | STRstr of Bindings.binding list
80 :     | APPstr of {oper: Modules.Functor, arg: Modules.Structure,
81 :     argtycs: Types.tycpath list}
82 :     | LETstr of dec * strexp
83 :     | MARKstr of strexp * region
84 : blume 902
85 : jhr 4494 and fctexp
86 :     = VARfct of Modules.Functor
87 :     | FCTfct of {param: Modules.Structure, argtycs: Types.tycpath list,
88 :     def: strexp}
89 :     | LETfct of dec * fctexp
90 :     | MARKfct of fctexp * region
91 : blume 902
92 : jhr 4494 and vb = VB of {pat: pat, exp: exp, boundtvs: Types.tyvar list,
93 :     tyvars: Types.tyvar list ref}
94 : blume 902
95 : jhr 4494 and rvb = RVB of {var: VarCon.var, exp: exp, boundtvs: Types.tyvar list,
96 :     resultty: Types.ty option, tyvars: Types.tyvar list ref}
97 : blume 902
98 : jhr 4494 and eb = EBgen of {exn: VarCon.datacon, etype: Types.ty option, ident: exp}
99 :     | EBdef of {exn: VarCon.datacon, edef: VarCon.datacon}
100 : blume 902
101 : jhr 4494 and strb = STRB of {name: Symbol.symbol, str: Modules.Structure, def: strexp}
102 :     and fctb = FCTB of {name: Symbol.symbol, fct: Modules.Functor, def: fctexp}
103 : blume 902
104 : jhr 4494 withtype fnrules = rule list * Types.ty
105 : jhr 4536 and num_lit = Types.ty IntConst.t
106 :     and real_lit = Types.ty RealConst.t
107 : mblume 1641
108 : jhr 4494 end (* signature ABSYN *)

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