author | lcp |
Thu, 12 Jan 1995 03:03:07 +0100 | |
changeset 855 | 4c8d0ece1f95 |
parent 780 | 567f1fe7ea39 |
child 865 | b38c67991122 |
permissions | -rw-r--r-- |
240 | 1 |
(* Title: Pure/Syntax/syn_ext.ML |
2 |
ID: $Id$ |
|
3 |
Author: Markus Wenzel, TU Muenchen |
|
4 |
||
5 |
Syntax extension (internal interface). |
|
6 |
*) |
|
7 |
||
8 |
signature SYN_EXT0 = |
|
9 |
sig |
|
10 |
val typeT: typ |
|
11 |
val constrainC: string |
|
12 |
end; |
|
13 |
||
14 |
signature SYN_EXT = |
|
15 |
sig |
|
16 |
include SYN_EXT0 |
|
17 |
structure Ast: AST |
|
18 |
local open Ast in |
|
19 |
val logic: string |
|
20 |
val args: string |
|
780 | 21 |
val any: string |
22 |
val sprop: string |
|
240 | 23 |
val applC: string |
24 |
val typ_to_nonterm: typ -> string |
|
25 |
datatype xsymb = |
|
26 |
Delim of string | |
|
27 |
Argument of string * int | |
|
28 |
Space of string | |
|
29 |
Bg of int | Brk of int | En |
|
30 |
datatype xprod = XProd of string * xsymb list * string * int |
|
31 |
val max_pri: int |
|
32 |
val chain_pri: int |
|
33 |
val delims_of: xprod list -> string list |
|
34 |
datatype mfix = Mfix of string * typ * string * int list * int |
|
35 |
datatype syn_ext = |
|
36 |
SynExt of { |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
37 |
logtypes: string list, |
240 | 38 |
xprods: xprod list, |
39 |
consts: string list, |
|
40 |
parse_ast_translation: (string * (ast list -> ast)) list, |
|
41 |
parse_rules: (ast * ast) list, |
|
42 |
parse_translation: (string * (term list -> term)) list, |
|
43 |
print_translation: (string * (term list -> term)) list, |
|
44 |
print_rules: (ast * ast) list, |
|
45 |
print_ast_translation: (string * (ast list -> ast)) list} |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
46 |
val mk_syn_ext: bool -> string list -> mfix list -> |
780 | 47 |
string list -> (string * (ast list -> ast)) list * |
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
48 |
(string * (term list -> term)) list * |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
49 |
(string * (term list -> term)) list * (string * (ast list -> ast)) list |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
50 |
-> (ast * ast) list * (ast * ast) list -> syn_ext |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
51 |
val syn_ext: string list -> mfix list -> string list -> |
240 | 52 |
(string * (ast list -> ast)) list * (string * (term list -> term)) list * |
53 |
(string * (term list -> term)) list * (string * (ast list -> ast)) list |
|
54 |
-> (ast * ast) list * (ast * ast) list -> syn_ext |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
55 |
val syn_ext_logtypes: string list -> syn_ext |
555
a7f397a14b16
removed idT, varT, tidT, tvarT (now in lexicon.ML);
wenzelm
parents:
441
diff
changeset
|
56 |
val syn_ext_const_names: string list -> string list -> syn_ext |
330
2fda15dd1e0f
changed the way a grammar is generated to allow the new parser to work;
clasohm
parents:
240
diff
changeset
|
57 |
val syn_ext_rules: string list -> (ast * ast) list * (ast * ast) list -> syn_ext |
555
a7f397a14b16
removed idT, varT, tidT, tvarT (now in lexicon.ML);
wenzelm
parents:
441
diff
changeset
|
58 |
val syn_ext_trfuns: string list -> |
a7f397a14b16
removed idT, varT, tidT, tvarT (now in lexicon.ML);
wenzelm
parents:
441
diff
changeset
|
59 |
(string * (ast list -> ast)) list * (string * (term list -> term)) list * |
a7f397a14b16
removed idT, varT, tidT, tvarT (now in lexicon.ML);
wenzelm
parents:
441
diff
changeset
|
60 |
(string * (term list -> term)) list * (string * (ast list -> ast)) list |
a7f397a14b16
removed idT, varT, tidT, tvarT (now in lexicon.ML);
wenzelm
parents:
441
diff
changeset
|
61 |
-> syn_ext |
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
62 |
val pure_ext: syn_ext |
240 | 63 |
end |
64 |
end; |
|
65 |
||
66 |
functor SynExtFun(structure Lexicon: LEXICON and Ast: AST): SYN_EXT = |
|
67 |
struct |
|
68 |
||
69 |
structure Ast = Ast; |
|
70 |
open Lexicon Ast; |
|
71 |
||
72 |
||
73 |
(** misc definitions **) |
|
74 |
||
75 |
(* syntactic categories *) |
|
76 |
||
77 |
val logic = "logic"; |
|
78 |
val logicT = Type (logic, []); |
|
79 |
||
80 |
val args = "args"; |
|
81 |
val argsT = Type (args, []); |
|
82 |
||
330
2fda15dd1e0f
changed the way a grammar is generated to allow the new parser to work;
clasohm
parents:
240
diff
changeset
|
83 |
val typeT = Type ("type", []); |
240 | 84 |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
85 |
val sprop = "#prop"; |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
86 |
val spropT = Type (sprop, []); |
240 | 87 |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
88 |
val any = "any"; |
624 | 89 |
val anyT = Type (any, []); |
90 |
||
780 | 91 |
|
240 | 92 |
(* constants *) |
93 |
||
94 |
val applC = "_appl"; |
|
95 |
val constrainC = "_constrain"; |
|
96 |
||
97 |
||
98 |
||
99 |
(** datatype xprod **) |
|
100 |
||
101 |
(*Delim s: delimiter s |
|
102 |
Argument (s, p): nonterminal s requiring priority >= p, or valued token |
|
103 |
Space s: some white space for printing |
|
104 |
Bg, Brk, En: blocks and breaks for pretty printing*) |
|
105 |
||
106 |
datatype xsymb = |
|
107 |
Delim of string | |
|
108 |
Argument of string * int | |
|
109 |
Space of string | |
|
110 |
Bg of int | Brk of int | En; |
|
111 |
||
112 |
||
113 |
(*XProd (lhs, syms, c, p): |
|
114 |
lhs: name of nonterminal on the lhs of the production |
|
115 |
syms: list of symbols on the rhs of the production |
|
116 |
c: head of parse tree |
|
117 |
p: priority of this production*) |
|
118 |
||
119 |
datatype xprod = XProd of string * xsymb list * string * int; |
|
120 |
||
121 |
val max_pri = 1000; (*maximum legal priority*) |
|
122 |
val chain_pri = ~1; (*dummy for chain productions*) |
|
123 |
||
124 |
||
125 |
(* delims_of *) |
|
126 |
||
127 |
fun delims_of xprods = |
|
128 |
let |
|
129 |
fun del_of (Delim s) = Some s |
|
130 |
| del_of _ = None; |
|
131 |
||
132 |
fun dels_of (XProd (_, xsymbs, _, _)) = |
|
133 |
mapfilter del_of xsymbs; |
|
134 |
in |
|
135 |
distinct (flat (map dels_of xprods)) |
|
136 |
end; |
|
137 |
||
138 |
||
139 |
||
140 |
(** datatype mfix **) |
|
141 |
||
142 |
(*Mfix (sy, ty, c, ps, p): |
|
143 |
sy: rhs of production as symbolic string |
|
144 |
ty: type description of production |
|
145 |
c: head of parse tree |
|
146 |
ps: priorities of arguments in sy |
|
147 |
p: priority of production*) |
|
148 |
||
149 |
datatype mfix = Mfix of string * typ * string * int list * int; |
|
150 |
||
151 |
||
152 |
(* typ_to_nonterm *) |
|
153 |
||
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
154 |
(*get nonterminal for rhs*) |
780 | 155 |
fun typ_to_nonterm (Type (c, _)) = c |
624 | 156 |
| typ_to_nonterm _ = any; |
240 | 157 |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
158 |
(*get nonterminal for lhs*) |
780 | 159 |
fun typ_to_nonterm1 (Type (c, _)) = c |
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
160 |
| typ_to_nonterm1 _ = logic; |
240 | 161 |
|
162 |
||
163 |
(* mfix_to_xprod *) |
|
164 |
||
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
165 |
fun mfix_to_xprod convert logtypes (Mfix (sy, typ, const, pris, pri)) = |
240 | 166 |
let |
167 |
fun err msg = |
|
780 | 168 |
(writeln ("Error in mixfix annotation " ^ quote sy ^ " for " |
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
169 |
^ quote const); |
240 | 170 |
error msg); |
171 |
||
172 |
fun check_pri p = |
|
173 |
if p >= 0 andalso p <= max_pri then () |
|
174 |
else err ("precedence out of range: " ^ string_of_int p); |
|
175 |
||
176 |
fun blocks_ok [] 0 = true |
|
177 |
| blocks_ok [] _ = false |
|
178 |
| blocks_ok (Bg _ :: syms) n = blocks_ok syms (n + 1) |
|
179 |
| blocks_ok (En :: _) 0 = false |
|
180 |
| blocks_ok (En :: syms) n = blocks_ok syms (n - 1) |
|
181 |
| blocks_ok (_ :: syms) n = blocks_ok syms n; |
|
182 |
||
183 |
fun check_blocks syms = |
|
184 |
if blocks_ok syms 0 then () |
|
185 |
else err "unbalanced block parentheses"; |
|
186 |
||
187 |
||
188 |
fun is_meta c = c mem ["(", ")", "/", "_"]; |
|
189 |
||
190 |
fun scan_delim_char ("'" :: c :: cs) = |
|
191 |
if is_blank c then err "illegal spaces in delimiter" else (c, cs) |
|
192 |
| scan_delim_char ["'"] = err "trailing escape character" |
|
193 |
| scan_delim_char (chs as c :: cs) = |
|
194 |
if is_blank c orelse is_meta c then raise LEXICAL_ERROR else (c, cs) |
|
195 |
| scan_delim_char [] = raise LEXICAL_ERROR; |
|
196 |
||
197 |
val scan_symb = |
|
198 |
$$ "_" >> K (Argument ("", 0)) || |
|
199 |
$$ "(" -- scan_int >> (Bg o #2) || |
|
200 |
$$ ")" >> K En || |
|
201 |
$$ "/" -- $$ "/" >> K (Brk ~1) || |
|
202 |
$$ "/" -- scan_any is_blank >> (Brk o length o #2) || |
|
203 |
scan_any1 is_blank >> (Space o implode) || |
|
204 |
repeat1 scan_delim_char >> (Delim o implode); |
|
205 |
||
206 |
||
207 |
val cons_fst = apfst o cons; |
|
208 |
||
209 |
fun add_args [] ty [] = ([], typ_to_nonterm1 ty) |
|
210 |
| add_args [] _ _ = err "too many precedences" |
|
211 |
| add_args (Argument _ :: syms) (Type ("fun", [ty, tys])) [] = |
|
212 |
cons_fst (Argument (typ_to_nonterm ty, 0)) (add_args syms tys []) |
|
213 |
| add_args (Argument _ :: syms) (Type ("fun", [ty, tys])) (p :: ps) = |
|
214 |
cons_fst (Argument (typ_to_nonterm ty, p)) (add_args syms tys ps) |
|
215 |
| add_args (Argument _ :: _) _ _ = |
|
216 |
err "more arguments than in corresponding type" |
|
217 |
| add_args (sym :: syms) ty ps = cons_fst sym (add_args syms ty ps); |
|
218 |
||
219 |
||
220 |
fun is_arg (Argument _) = true |
|
221 |
| is_arg _ = false; |
|
222 |
||
223 |
fun is_term (Delim _) = true |
|
224 |
| is_term (Argument (s, _)) = is_terminal s |
|
225 |
| is_term _ = false; |
|
226 |
||
227 |
fun rem_pri (Argument (s, _)) = Argument (s, chain_pri) |
|
228 |
| rem_pri sym = sym; |
|
229 |
||
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
230 |
fun is_delim (Delim _) = true |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
231 |
| is_delim _ = false; |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
232 |
|
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
233 |
(*replace logical types on rhs by "logic"*) |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
234 |
fun unify_logtypes copy_prod (a as (Argument (s, p))) = |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
235 |
if s mem logtypes then Argument (logic, p) |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
236 |
else a |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
237 |
| unify_logtypes _ a = a; |
240 | 238 |
|
239 |
val (raw_symbs, _) = repeat scan_symb (explode sy); |
|
240 |
val (symbs, lhs) = add_args raw_symbs typ pris; |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
241 |
val copy_prod = lhs mem ["prop", "logic"] |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
242 |
andalso const <> "" |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
243 |
andalso not (exists is_delim symbs); |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
244 |
val lhs' = if convert andalso not copy_prod then |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
245 |
(if lhs mem logtypes then logic |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
246 |
else if lhs = "prop" then sprop else lhs) |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
247 |
else lhs; |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
248 |
val symbs' = map (unify_logtypes copy_prod) symbs; |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
249 |
val xprod = XProd (lhs', symbs', const, pri); |
240 | 250 |
in |
251 |
seq check_pri pris; |
|
252 |
check_pri pri; |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
253 |
check_blocks symbs'; |
240 | 254 |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
255 |
if is_terminal lhs' then err ("illegal lhs: " ^ lhs') |
240 | 256 |
else if const <> "" then xprod |
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
257 |
else if length (filter is_arg symbs') <> 1 then |
240 | 258 |
err "copy production must have exactly one argument" |
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
259 |
else if exists is_term symbs' then xprod |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
260 |
else XProd (lhs', map rem_pri symbs', "", chain_pri) |
240 | 261 |
end; |
262 |
||
263 |
||
264 |
(** datatype syn_ext **) |
|
265 |
||
266 |
datatype syn_ext = |
|
267 |
SynExt of { |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
268 |
logtypes: string list, |
240 | 269 |
xprods: xprod list, |
270 |
consts: string list, |
|
271 |
parse_ast_translation: (string * (ast list -> ast)) list, |
|
272 |
parse_rules: (ast * ast) list, |
|
273 |
parse_translation: (string * (term list -> term)) list, |
|
274 |
print_translation: (string * (term list -> term)) list, |
|
275 |
print_rules: (ast * ast) list, |
|
276 |
print_ast_translation: (string * (ast list -> ast)) list}; |
|
277 |
||
278 |
||
279 |
(* syn_ext *) |
|
280 |
||
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
281 |
fun mk_syn_ext convert logtypes mfixes consts trfuns rules = |
240 | 282 |
let |
283 |
val (parse_ast_translation, parse_translation, print_translation, |
|
284 |
print_ast_translation) = trfuns; |
|
285 |
val (parse_rules, print_rules) = rules; |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
286 |
val logtypes' = logtypes \ "prop"; |
240 | 287 |
|
624 | 288 |
val mfix_consts = distinct (map (fn (Mfix (_, _, c, _, _)) => c) mfixes); |
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
289 |
val xprods = map (mfix_to_xprod convert logtypes') mfixes; |
240 | 290 |
in |
291 |
SynExt { |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
292 |
logtypes = logtypes', |
624 | 293 |
xprods = xprods, |
368 | 294 |
consts = filter is_xid (consts union mfix_consts), |
240 | 295 |
parse_ast_translation = parse_ast_translation, |
296 |
parse_rules = parse_rules, |
|
297 |
parse_translation = parse_translation, |
|
298 |
print_translation = print_translation, |
|
299 |
print_rules = print_rules, |
|
300 |
print_ast_translation = print_ast_translation} |
|
301 |
end; |
|
302 |
||
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
303 |
val syn_ext = mk_syn_ext true; |
240 | 304 |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
305 |
fun syn_ext_logtypes logtypes = |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
306 |
syn_ext logtypes [] [] ([], [], [], []) ([], []); |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
307 |
|
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
308 |
fun syn_ext_const_names logtypes cs = |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
309 |
syn_ext logtypes [] cs ([], [], [], []) ([], []); |
555
a7f397a14b16
removed idT, varT, tidT, tvarT (now in lexicon.ML);
wenzelm
parents:
441
diff
changeset
|
310 |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
311 |
fun syn_ext_rules logtypes rules = |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
312 |
syn_ext logtypes [] [] ([], [], [], []) rules; |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
313 |
|
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
314 |
fun syn_ext_trfuns logtypes trfuns = |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
315 |
syn_ext logtypes [] [] trfuns ([], []); |
240 | 316 |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
317 |
(* pure_ext *) |
240 | 318 |
|
764
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
319 |
val pure_ext = mk_syn_ext false [] |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
320 |
[Mfix ("_", spropT --> propT, "", [0], 0), |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
321 |
Mfix ("_", logicT --> anyT, "", [0], 0), |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
322 |
Mfix ("_", spropT --> anyT, "", [0], 0), |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
323 |
Mfix ("'(_')", logicT --> logicT, "", [0], max_pri), |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
324 |
Mfix ("'(_')", spropT --> spropT, "", [0], max_pri), |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
325 |
Mfix ("_::_", [logicT, typeT] ---> logicT, "_constrain", [4, 0], 3), |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
326 |
Mfix ("_::_", [spropT, typeT] ---> spropT, "_constrain", [4, 0], 3)] |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
327 |
[] |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
328 |
([], [], [], []) |
b60e77395d1a
changed Pure's grammar and the way types are converted to nonterminals
clasohm
parents:
624
diff
changeset
|
329 |
([], []); |
240 | 330 |
|
331 |
end; |