3 * Stephen
Weeks (sweeks@sweeks
.com
) generated this file from the hamlet SML
4 * interpreter written by Andreas Rossberg
.
5 * The sources are from http
://www
.ps
.uni
-sb
.de
/~rossberg
/hamlet
/hamlet
.tar
7 * The file consists
of the concatenation
of all
of the source
code (plus SML
/NJ
8 * library code
) in the correct order
, with a simple test
case to test the
9 * interpreter at the
end.
11 * I also removed uses
of the nonstandard Unsafe
structure.
13 * I also made a minor change so that it could read
in from a file instead
of
17 val ins
= ref
TextIO.stdIn
19 (* start
of STAMP
.sml
*)
30 val stamp
: unit
-> stamp
31 val toString
: stamp
-> string
33 val reset
: unit
-> unit
35 val compare
: stamp
* stamp
-> order
38 (* stop
of STAMP
.sml
*)
39 (* start
of Stamp
.sml
*)
45 structure Stamp
:> STAMP
=
53 fun stamp() = (r
:= !r
+ 1; !r
)
55 val toString
= Int.toString
56 val compare
= Int.compare
59 (* stop
of Stamp
.sml
*)
60 (* start
of smlnj
-lib
/Util
/ord
-key
-sig.sml
*)
63 * COPYRIGHT (c
) 1993 by AT
&T Bell Laboratories
. See COPYRIGHT file for details
.
65 * Abstract linearly ordered keys
.
73 val compare
: ord_key
* ord_key
-> order
76 (* stop
of smlnj
-lib
/Util
/ord
-key
-sig.sml
*)
77 (* start
of smlnj
-lib
/Util
/lib
-base
-sig.sml
*)
80 * COPYRIGHT (c
) 1993 by AT
&T Bell Laboratories
. See COPYRIGHT file for details
.
86 exception Unimplemented
of string
87 (* raised to report unimplemented features
*)
88 exception Impossible
of string
89 (* raised to report internal errors
*)
92 (* raised by searching operations
*)
94 val failure
: {module
: string, func
: string, msg
: string} -> 'a
95 (* raise the
exception Fail
with a standard format message
. *)
97 val version
: {date
: string, system
: string, version_id
: int list
}
102 (* stop
of smlnj
-lib
/Util
/lib
-base
-sig.sml
*)
103 (* start
of smlnj
-lib
/Util
/lib
-base
.sml
*)
106 * COPYRIGHT (c
) 1993 by AT
&T Bell Laboratories
. See COPYRIGHT file for details
.
109 structure LibBase
: LIB_BASE
=
112 (* raised to report unimplemented features
*)
113 exception Unimplemented
of string
115 (* raised to report internal errors
*)
116 exception Impossible
of string
118 (* raised by searching operations
*)
121 (* raise the
exception Fail
with a standard format message
. *)
122 fun failure
{module
, func
, msg
} =
123 raise (Fail(concat
[module
, ".", func
, ": ", msg
]))
126 date
= "June 1, 1996",
127 system
= "SML/NJ Library",
132 |
f ([x
: int], l
) = (Int.toString x
)::l
133 |
f (x
::r
, l
) = (Int.toString x
) :: "." :: f(r
, l
)
135 val banner
= concat (
136 #system version
:: ", Version " ::
137 f (#version_id version
, [", ", #date version
]))
141 (* stop
of smlnj
-lib
/Util
/lib
-base
.sml
*)
142 (* start
of smlnj
-lib
/Util
/ord
-map
-sig.sml
*)
145 * COPYRIGHT (c
) 1996 by AT
&T Research
. See COPYRIGHT file for details
.
147 * Abstract
signature of an applicative
-style finite
maps (dictionaries
)
148 * structure over ordered monomorphic keys
.
154 structure Key
: ORD_KEY
161 val isEmpty
: 'a map
-> bool
162 (* Return
true if and only
if the map is empty
*)
164 val singleton
: (Key
.ord_key
* 'a
) -> 'a map
165 (* return the specified singleton map
*)
167 val insert
: 'a map
* Key
.ord_key
* 'a
-> 'a map
168 val insert
' : ((Key
.ord_key
* 'a
) * 'a map
) -> 'a map
169 (* Insert an item
. *)
171 val find
: 'a map
* Key
.ord_key
-> 'a option
172 (* Look for an item
, return NONE
if the item doesn
't exist
*)
174 val inDomain
: ('a map
* Key
.ord_key
) -> bool
175 (* return
true, if the key is
in the domain
of the map
*)
177 val remove
: 'a map
* Key
.ord_key
-> 'a map
* 'a
178 (* Remove an item
, returning new map
and value removed
.
179 * Raises LibBase
.NotFound
if not found
.
182 val first
: 'a map
-> 'a option
183 val firsti
: 'a map
-> (Key
.ord_key
* 'a
) option
184 (* return the first item
in the
map (or NONE
if it is empty
) *)
186 val numItems
: 'a map
-> int
187 (* Return the number
of items
in the map
*)
189 val listItems
: 'a map
-> 'a list
190 val listItemsi
: 'a map
-> (Key
.ord_key
* 'a
) list
191 (* Return an ordered list
of the
items (and their keys
) in the map
. *)
193 val listKeys
: 'a map
-> Key
.ord_key list
194 (* return an ordered list
of the keys
in the map
. *)
196 val collate
: ('a
* 'a
-> order
) -> ('a map
* 'a map
) -> order
197 (* given an ordering on the map
's range
, return an ordering
201 val unionWith
: ('a
* 'a
-> 'a
) -> ('a map
* 'a map
) -> 'a map
202 val unionWithi
: (Key
.ord_key
* 'a
* 'a
-> 'a
) -> ('a map
* 'a map
) -> 'a map
203 (* return a map whose domain is the union
of the domains
of the two input
204 * maps
, using the supplied function to define the map on elements that
205 * are
in both domains
.
208 val intersectWith
: ('a
* 'b
-> 'c
) -> ('a map
* 'b map
) -> 'c map
209 val intersectWithi
: (Key
.ord_key
* 'a
* 'b
-> 'c
) -> ('a map
* 'b map
) -> 'c map
210 (* return a map whose domain is the intersection
of the domains
of the
211 * two input maps
, using the supplied function to define the range
.
214 val app
: ('a
-> unit
) -> 'a map
-> unit
215 val appi
: ((Key
.ord_key
* 'a
) -> unit
) -> 'a map
-> unit
216 (* Apply a function to the entries
of the map
in map order
. *)
218 val map
: ('a
-> 'b
) -> 'a map
-> 'b map
219 val mapi
: (Key
.ord_key
* 'a
-> 'b
) -> 'a map
-> 'b map
220 (* Create a new map by applying a map function to the
221 * name
/value pairs
in the map
.
224 val foldl
: ('a
* 'b
-> 'b
) -> 'b
-> 'a map
-> 'b
225 val foldli
: (Key
.ord_key
* 'a
* 'b
-> 'b
) -> 'b
-> 'a map
-> 'b
226 (* Apply a folding function to the entries
of the map
227 * in increasing map order
.
230 val foldr
: ('a
* 'b
-> 'b
) -> 'b
-> 'a map
-> 'b
231 val foldri
: (Key
.ord_key
* 'a
* 'b
-> 'b
) -> 'b
-> 'a map
-> 'b
232 (* Apply a folding function to the entries
of the map
233 * in decreasing map order
.
236 val filter
: ('a
-> bool) -> 'a map
-> 'a map
237 val filteri
: (Key
.ord_key
* 'a
-> bool) -> 'a map
-> 'a map
238 (* Filter out those elements
of the map that
do not satisfy the
239 * predicate
. The filtering is done
in increasing map order
.
242 val mapPartial
: ('a
-> 'b option
) -> 'a map
-> 'b map
243 val mapPartiali
: (Key
.ord_key
* 'a
-> 'b option
) -> 'a map
-> 'b map
244 (* map a partial function over the elements
of a map
in increasing
249 (* stop
of smlnj
-lib
/Util
/ord
-map
-sig.sml
*)
250 (* start
of smlnj
-lib
/Util
/binary
-map
-fn.sml
*)
253 * COPYRIGHT (c
) 1993 by AT
&T Bell Laboratories
. See COPYRIGHT file for details
.
255 * This code was adapted from Stephen Adams
' binary tree implementation
256 * of applicative integer sets
.
258 * Copyright
1992 Stephen Adams
.
260 * This software may be used freely provided that
:
261 * 1. This copyright notice is attached to any copy
, derived work
,
262 * or work including all or part
of this software
.
263 * 2. Any derived work must contain a prominent notice stating that
264 * it has been altered from the original
.
267 * Name(s
): Stephen Adams
.
268 * Department
, Institution
: Electronics
& Computer Science
,
269 * University
of Southampton
270 * Address
: Electronics
& Computer Science
271 * University
of Southampton
272 * Southampton SO9
5NH
274 * E
-mail
: sra@ecs
.soton
.ac
.uk
278 * 1. The implementation is based on Binary search trees
of Bounded
279 * Balance
, similar to Nievergelt
& Reingold
, SIAM J
. Computing
280 * 2(1), March
1973. The main advantage
of these trees is that
281 * they keep the size
of the tree
in the node
, giving a constant
282 * time size operation
.
284 * 2. The bounded balance criterion is simpler than N
&R
's alpha
.
285 * Simply
, one subtree must not have more than `weight
' times
as
286 * many elements
as the opposite subtree
. Rebalancing is
287 * guaranteed to reinstate the criterion for weight
>2.23, but
288 * the occasional incorrect behaviour for weight
=2 is not
289 * detrimental to performance
.
293 functor BinaryMapFn (K
: ORD_KEY
) : ORD_MAP
=
300 ** fun wt i
= weight
* i
302 fun wt (i
: int) = i
+ i
+ i
320 |
numItems (T
{cnt
,...}) = cnt
322 (* return the first item
in the
map (or NONE
if it is empty
) *)
324 |
first (T
{value
, left
=E
, ...}) = SOME value
325 |
first (T
{left
, ...}) = first left
327 (* return the first item
in the map
and its
key (or NONE
if it is empty
) *)
329 |
firsti (T
{key
, value
, left
=E
, ...}) = SOME(key
, value
)
330 |
firsti (T
{left
, ...}) = firsti left
333 fun N(k
,v
,E
,E
) = T
{key
=k
,value
=v
,cnt
=1,left
=E
,right
=E
}
334 |
N(k
,v
,E
,r
as T n
) = T
{key
=k
,value
=v
,cnt
=1+(#cnt n
),left
=E
,right
=r
}
335 |
N(k
,v
,l
as T n
,E
) = T
{key
=k
,value
=v
,cnt
=1+(#cnt n
),left
=l
,right
=E
}
336 |
N(k
,v
,l
as T n
,r
as T n
') =
337 T
{key
=k
,value
=v
,cnt
=1+(#cnt n
)+(#cnt n
'),left
=l
,right
=r
}
339 fun single_L (a
,av
,x
,T
{key
=b
,value
=bv
,left
=y
,right
=z
,...}) =
340 N(b
,bv
,N(a
,av
,x
,y
),z
)
341 | single_L _
= raise Match
342 fun single_R (b
,bv
,T
{key
=a
,value
=av
,left
=x
,right
=y
,...},z
) =
343 N(a
,av
,x
,N(b
,bv
,y
,z
))
344 | single_R _
= raise Match
345 fun double_L (a
,av
,w
,T
{key
=c
,value
=cv
,left
=T
{key
=b
,value
=bv
,left
=x
,right
=y
,...},right
=z
,...}) =
346 N(b
,bv
,N(a
,av
,w
,x
),N(c
,cv
,y
,z
))
347 | double_L _
= raise Match
348 fun double_R (c
,cv
,T
{key
=a
,value
=av
,left
=w
,right
=T
{key
=b
,value
=bv
,left
=x
,right
=y
,...},...},z
) =
349 N(b
,bv
,N(a
,av
,w
,x
),N(c
,cv
,y
,z
))
350 | double_R _
= raise Match
352 fun T
' (k
,v
,E
,E
) = T
{key
=k
,value
=v
,cnt
=1,left
=E
,right
=E
}
353 | T
' (k
,v
,E
,r
as T
{right
=E
,left
=E
,...}) =
354 T
{key
=k
,value
=v
,cnt
=2,left
=E
,right
=r
}
355 | T
' (k
,v
,l
as T
{right
=E
,left
=E
,...},E
) =
356 T
{key
=k
,value
=v
,cnt
=2,left
=l
,right
=E
}
358 | T
' (p
as (_
,_
,E
,T
{left
=T _
,right
=E
,...})) = double_L p
359 | T
' (p
as (_
,_
,T
{left
=E
,right
=T _
,...},E
)) = double_R p
361 (* these cases almost never happen
with small weight
*)
362 | T
' (p
as (_
,_
,E
,T
{left
=T
{cnt
=ln
,...},right
=T
{cnt
=rn
,...},...})) =
363 if ln
< rn
then single_L p
else double_L p
364 | T
' (p
as (_
,_
,T
{left
=T
{cnt
=ln
,...},right
=T
{cnt
=rn
,...},...},E
)) =
365 if ln
> rn
then single_R p
else double_R p
367 | T
' (p
as (_
,_
,E
,T
{left
=E
,...})) = single_L p
368 | T
' (p
as (_
,_
,T
{right
=E
,...},E
)) = single_R p
370 | T
' (p
as (k
,v
,l
as T
{cnt
=ln
,left
=ll
,right
=lr
,...},
371 r
as T
{cnt
=rn
,left
=rl
,right
=rr
,...})) =
372 if rn
>= wt ln
then (*right is too big
*)
373 let val rln
= numItems rl
374 val rrn
= numItems rr
376 if rln
< rrn
then single_L p
else double_L p
379 else if ln
>= wt rn
then (*left is too big
*)
380 let val lln
= numItems ll
381 val lrn
= numItems lr
383 if lrn
< lln
then single_R p
else double_R p
386 else T
{key
=k
,value
=v
,cnt
=ln
+rn
+1,left
=l
,right
=r
}
389 fun min (T
{left
=E
,key
,value
,...}) = (key
,value
)
390 |
min (T
{left
,...}) = min left
391 | min _
= raise Match
393 fun delmin (T
{left
=E
,right
,...}) = right
394 |
delmin (T
{key
,value
,left
,right
,...}) = T
'(key
,value
,delmin left
,right
)
395 | delmin _
= raise Match
397 fun delete
' (E
,r
) = r
399 | delete
' (l
,r
) = let val (mink
,minv
) = min r
in
400 T
'(mink
,minv
,l
,delmin r
)
406 fun singleton (x
,v
) = T
{key
=x
,value
=v
,cnt
=1,left
=E
,right
=E
}
408 fun insert (E
,x
,v
) = T
{key
=x
,value
=v
,cnt
=1,left
=E
,right
=E
}
409 |
insert (T(set
as {key
,left
,right
,value
,...}),x
,v
) =
410 case K
.compare (key
,x
) of
411 GREATER
=> T
'(key
,value
,insert(left
,x
,v
),right
)
412 | LESS
=> T
'(key
,value
,left
,insert(right
,x
,v
))
413 | _
=> T
{key
=x
,value
=v
,left
=left
,right
=right
,cnt
= #cnt set
}
414 fun insert
' ((k
, x
), m
) = insert(m
, k
, x
)
416 fun inDomain (set
, x
) = let
418 |
mem (T(n
as {key
,left
,right
,...})) = (case K
.compare (x
,key
)
419 of GREATER
=> mem right
427 fun find (set
, x
) = let
429 |
mem (T(n
as {key
,left
,right
,...})) = (case K
.compare (x
,key
)
430 of GREATER
=> mem right
431 | EQUAL
=> SOME(#value n
)
438 fun remove (E
,x
) = raise LibBase
.NotFound
439 |
remove (set
as T
{key
,left
,right
,value
,...},x
) = (
440 case K
.compare (key
,x
)
442 val (left
', v
) = remove(left
, x
)
444 (T
'(key
, value
, left
', right
), v
)
447 val (right
', v
) = remove (right
, x
)
449 (T
'(key
, value
, left
, right
'), v
)
451 | _
=> (delete
'(left
,right
),value
)
454 fun listItems d
= let
456 |
d2l (T
{key
,value
,left
,right
,...}, l
) =
457 d2l(left
, value
::(d2l(right
,l
)))
462 fun listItemsi d
= let
464 |
d2l (T
{key
,value
,left
,right
,...}, l
) =
465 d2l(left
, (key
,value
)::(d2l(right
,l
)))
472 |
d2l (T
{key
,left
,right
,...}, l
) = d2l(left
, key
::(d2l(right
,l
)))
478 fun next ((t
as T
{right
, ...})::rest
) = (t
, left(right
, rest
))
480 and left (E
, rest
) = rest
481 |
left (t
as T
{left
=l
, ...}, rest
) = left(l
, t
::rest
)
483 fun collate
cmpRng (s1
, s2
) = let
484 fun cmp (t1
, t2
) = (case (next t1
, next t2
)
485 of ((E
, _
), (E
, _
)) => EQUAL
486 |
((E
, _
), _
) => LESS
487 |
(_
, (E
, _
)) => GREATER
488 |
((T
{key
=x1
, value
=y1
, ...}, r1
), (T
{key
=x2
, value
=y2
, ...}, r2
)) => (
489 case Key
.compare(x1
, x2
)
490 of EQUAL
=> (case cmpRng(y1
, y2
)
491 of EQUAL
=> cmp (r1
, r2
)
498 cmp (left(s1
, []), left(s2
, []))
504 | app
' (T
{key
,value
,left
,right
,...}) = (
505 app
' left
; f(key
, value
); app
' right
)
511 | app
' (T
{value
,left
,right
,...}) = (
512 app
' left
; f value
; app
' right
)
519 | map
' (T
{key
,value
,left
,right
,cnt
}) = let
520 val left
' = map
' left
521 val value
' = f(key
, value
)
522 val right
' = map
' right
524 T
{cnt
=cnt
, key
=key
, value
=value
', left
= left
', right
= right
'}
529 fun map f d
= mapi (fn (_
, x
) => f x
) d
531 fun foldli f init d
= let
533 |
fold (T
{key
,value
,left
,right
,...}, v
) =
534 fold (right
, f(key
, value
, fold(left
, v
)))
538 fun foldl f init d
= foldli (fn (_
, v
, accum
) => f (v
, accum
)) init d
540 fun foldri f init d
= let
542 |
fold (T
{key
,value
,left
,right
,...},v
) =
543 fold (left
, f(key
, value
, fold(right
, v
)))
547 fun foldr f init d
= foldri (fn (_
, v
, accum
) => f (v
, accum
)) init d
549 (** To be implemented
**
550 val filter
: ('a
-> bool) -> 'a map
-> 'a map
551 val filteri
: (Key
.ord_key
* 'a
-> bool) -> 'a map
-> 'a map
556 (* the following are generic implementations
of the unionWith
and intersectWith
557 * operetions
. These should be specialized for the internal representations
560 fun unionWith
f (m1
, m2
) = let
561 fun ins
f (key
, x
, m
) = (case find(m
, key
)
562 of NONE
=> insert(m
, key
, x
)
563 |
(SOME x
') => insert(m
, key
, f(x
, x
'))
566 if (numItems m1
> numItems m2
)
567 then foldli (ins (fn (a
, b
) => f (b
, a
))) m1 m2
568 else foldli (ins f
) m2 m1
570 fun unionWithi
f (m1
, m2
) = let
571 fun ins
f (key
, x
, m
) = (case find(m
, key
)
572 of NONE
=> insert(m
, key
, x
)
573 |
(SOME x
') => insert(m
, key
, f(key
, x
, x
'))
576 if (numItems m1
> numItems m2
)
577 then foldli (ins (fn (k
, a
, b
) => f (k
, b
, a
))) m1 m2
578 else foldli (ins f
) m2 m1
581 fun intersectWith
f (m1
, m2
) = let
582 (* iterate over the elements
of m1
, checking for membership
in m2
*)
583 fun intersect
f (m1
, m2
) = let
584 fun ins (key
, x
, m
) = (case find(m2
, key
)
586 |
(SOME x
') => insert(m
, key
, f(x
, x
'))
592 if (numItems m1
> numItems m2
)
593 then intersect
f (m1
, m2
)
594 else intersect (fn (a
, b
) => f(b
, a
)) (m2
, m1
)
596 fun intersectWithi
f (m1
, m2
) = let
597 (* iterate over the elements
of m1
, checking for membership
in m2
*)
598 fun intersect
f (m1
, m2
) = let
599 fun ins (key
, x
, m
) = (case find(m2
, key
)
601 |
(SOME x
') => insert(m
, key
, f(key
, x
, x
'))
607 if (numItems m1
> numItems m2
)
608 then intersect
f (m1
, m2
)
609 else intersect (fn (k
, a
, b
) => f(k
, b
, a
)) (m2
, m1
)
612 (* this is a generic implementation
of filter
. It should
613 * be specialized to the data
-structure at some point
.
615 fun filter predFn m
= let
616 fun f (key
, item
, m
) = if predFn item
617 then insert(m
, key
, item
)
622 fun filteri predFn m
= let
623 fun f (key
, item
, m
) = if predFn(key
, item
)
624 then insert(m
, key
, item
)
630 (* this is a generic implementation
of mapPartial
. It should
631 * be specialized to the data
-structure at some point
.
633 fun mapPartial f m
= let
634 fun g (key
, item
, m
) = (case f item
636 |
(SOME item
') => insert(m
, key
, item
')
641 fun mapPartiali f m
= let
642 fun g (key
, item
, m
) = (case f(key
, item
)
644 |
(SOME item
') => insert(m
, key
, item
')
650 end (* functor BinaryMapFn
*)
651 (* stop
of smlnj
-lib
/Util
/binary
-map
-fn.sml
*)
652 (* start
of FIN_MAP
.sml
*)
654 * Standard ML finite maps
656 * Definition
, section
4.2
659 * This
signature just extends the one available
in the SML
/NJ lib
.
660 * Actually
, the operation added here would be general purpose
and useful enough
661 * (and more efficient
) to be
in the lib
. Also see FIN_SET
.
669 val fromList
: (Key
.ord_key
* 'a
) list
-> 'a map
671 val all
: ('a
-> bool) -> 'a map
-> bool
672 val exists
: ('a
-> bool) -> 'a map
-> bool
673 val alli
: (Key
.ord_key
* 'a
-> bool) -> 'a map
-> bool
674 val existsi
: (Key
.ord_key
* 'a
-> bool) -> 'a map
-> bool
676 val disjoint
: 'a map
* 'a map
-> bool
679 (* stop
of FIN_MAP
.sml
*)
680 (* start
of FinMapFn
.sml
*)
682 * Standard ML finite maps
684 * Definition
, section
4.2
687 * This
functor just extends the one available
in the SML
/NJ lib
.
688 * Actually
, the operation added here would be general purpose
and useful enough
689 * (and more efficient
) to be
in the lib
. Also see FinSetFn
.
692 functor FinMapFn(Key
: ORD_KEY
) :> FIN_MAP
where type Key
.ord_key
= Key
.ord_key
=
695 structure BinaryMap
= BinaryMapFn(Key
)
699 fun fromList kvs
= List.foldl (fn((k
, v
),m
) => insert(m
, k
, v
)) empty kvs
701 fun all p
= foldl (fn(v
, b
) => b
andalso p v
) true
702 fun exists p
= foldl (fn(v
, b
) => b
orelse p v
) false
703 fun alli p
= foldli (fn(k
, v
, b
) => b
andalso p(k
, v
)) true
704 fun existsi p
= foldli (fn(k
, v
, b
) => b
orelse p(k
, v
)) false
706 fun disjoint(m1
,m2
) = isEmpty(intersectWith #
2 (m1
, m2
))
709 (* stop
of FinMapFn
.sml
*)
710 (* start
of ID
.sml
*)
712 * Standard ML identifiers
714 * Definition
, section
2.4
717 * This is a generic
signature to represent all kinds
of identifiers (except
718 * for labels
and tyvars
).
725 (* Type
[Section
2.4] *)
731 val invent
: unit
-> Id
733 val fromString
: string -> Id
734 val toString
: Id
-> string
736 val compare
: Id
* Id
-> order
740 (* start
of IdFn
.sml
*)
742 * Standard ML identifiers
744 * Definition
, section
2.4
747 * This is a generic
functor to represent all kinds
of identifiers (except
748 * for labels tyvars
).
752 functor IdFn() :> ID
=
755 (* Type
[Section
2.4] *)
757 type Id
= string (* [id
] *)
762 fun invent() = "_id" ^ Stamp
.toString(Stamp
.stamp())
770 val compare
= String.compare
773 (* stop
of IdFn
.sml
*)
774 (* start
of IdsModule
.sml
*)
776 * Standard ML identifiers for modules
778 * Definition
, section
3.2
782 structure SigId
= IdFn()
783 structure FunId
= IdFn()
784 (* stop
of IdsModule
.sml
*)
785 (* start
of AssembliesModule
.sml
*)
787 * Standard ML sets
and maps for the module semantics
789 * Definition
, sections
5.1 and 7.2
792 structure SigIdMap
= FinMapFn(type ord_key
= SigId
.Id
793 val compare
= SigId
.compare
)
795 structure FunIdMap
= FinMapFn(type ord_key
= FunId
.Id
796 val compare
= FunId
.compare
)
797 (* stop
of AssembliesModule
.sml
*)
798 (* start
of LONGID
.sml
*)
800 * Standard ML long identifiers
802 * Definition
, section
2.4
805 * This is a generic
signature to represent all kinds
of long identifiers
.
818 type StrId
= StrId
.Id
821 (* Type
[Section
2.4] *)
823 eqtype longId (* [longid
] *)
828 val invent
: unit
-> longId
829 val fromId
: Id
-> longId
830 val toId
: longId
-> Id
831 val toString
: longId
-> string
833 val strengthen
: StrId
* longId
-> longId
834 val implode
: StrId list
* Id
-> longId
835 val explode
: longId
-> StrId list
* Id
837 val isUnqualified
: longId
-> bool
839 val compare
: longId
* longId
-> order
842 (* stop
of LONGID
.sml
*)
843 (* start
of LongIdFn
.sml
*)
845 * Standard ML long identifiers
847 * Definition
, section
2.4
850 * This is a generic
functor that generates a long identifier
type from a
851 * given identifier
type and the StrId
type.
855 functor LongIdFn(structure Id
: ID
857 ) :> LONGID
where type Id
.Id
= Id
.Id
858 and type StrId
.Id
= StrId
.Id
865 structure StrId
= StrId
868 type StrId
= StrId
.Id
871 (* Type
[Section
2.4] *)
873 type longId
= StrId list
* Id (* [longid
] *)
878 fun toId(strid
, id
) = id
879 fun fromId id
= ([],id
)
880 fun invent() = ([],Id
.invent())
882 fun toString(strids
, id
) =
884 fun prefix
[] = Id
.toString id
885 |
prefix(id
::ids
) = StrId
.toString id ^
"." ^ prefix ids
890 fun strengthen(strid
, (strids
, id
)) = (strid
::strids
, id
)
892 fun implode longid
= longid
893 fun explode longid
= longid
895 fun isUnqualified (strids
,id
) = List.null strids
900 fun compare(longid1
, longid2
) =
901 String.compare(toString longid1
, toString longid2
)
904 (* stop
of LongIdFn
.sml
*)
905 (* start
of IdsCore
.sml
*)
907 * Standard ML identifiers for the core
909 * Definition
, section
2.4
913 structure VId
= IdFn()
914 structure TyCon
= IdFn()
915 structure StrId
= IdFn()
917 structure LongVId
= LongIdFn(structure Id
= VId
918 structure StrId
= StrId
)
919 structure LongTyCon
= LongIdFn(structure Id
= TyCon
920 structure StrId
= StrId
)
921 structure LongStrId
= LongIdFn(structure Id
= StrId
922 structure StrId
= StrId
)
923 (* stop
of IdsCore
.sml
*)
924 (* start
of smlnj
-lib
/Util
/ord
-set
-sig.sml
*)
927 * COPYRIGHT (c
) 1993 by AT
&T Bell Laboratories
. See COPYRIGHT file for details
.
929 * Signature for a set
of values
with an order relation
.
935 structure Key
: ORD_KEY
937 type item
= Key
.ord_key
943 val singleton
: item
-> set
944 (* Create a singleton set
*)
946 val add
: set
* item
-> set
947 val add
' : (item
* set
) -> set
948 (* Insert an item
. *)
950 val addList
: set
* item list
-> set
951 (* Insert items from list
. *)
953 val delete
: set
* item
-> set
954 (* Remove an item
. Raise NotFound
if not found
. *)
956 val member
: set
* item
-> bool
957 (* Return
true if and only
if item is an element
in the set
*)
959 val isEmpty
: set
-> bool
960 (* Return
true if and only
if the set is empty
*)
962 val equal
: (set
* set
) -> bool
963 (* Return
true if and only
if the two sets are equal
*)
965 val compare
: (set
* set
) -> order
966 (* does a lexical comparison
of two sets
*)
968 val isSubset
: (set
* set
) -> bool
969 (* Return
true if and only
if the first set is a subset
of the second
*)
971 val numItems
: set
-> int
972 (* Return the number
of items
in the table
*)
974 val listItems
: set
-> item list
975 (* Return an ordered list
of the items
in the set
*)
977 val union
: set
* set
-> set
980 val intersection
: set
* set
-> set
983 val difference
: set
* set
-> set
986 val map
: (item
-> item
) -> set
-> set
987 (* Create a new set by applying a map function to the elements
991 val app
: (item
-> unit
) -> set
-> unit
992 (* Apply a function to the entries
of the set
993 * in decreasing order
996 val foldl
: (item
* 'b
-> 'b
) -> 'b
-> set
-> 'b
997 (* Apply a folding function to the entries
of the set
998 * in increasing order
1001 val foldr
: (item
* 'b
-> 'b
) -> 'b
-> set
-> 'b
1002 (* Apply a folding function to the entries
of the set
1003 * in decreasing order
1006 val filter
: (item
-> bool) -> set
-> set
1008 val exists
: (item
-> bool) -> set
-> bool
1010 val find
: (item
-> bool) -> set
-> item option
1013 (* stop
of smlnj
-lib
/Util
/ord
-set
-sig.sml
*)
1014 (* start
of smlnj
-lib
/Util
/binary
-set
-fn.sml
*)
1015 (* binary
-set
-fn.sml
1017 * COPYRIGHT (c
) 1993 by AT
&T Bell Laboratories
. See COPYRIGHT file for details
.
1019 * This code was adapted from Stephen Adams
' binary tree implementation
1020 * of applicative integer sets
.
1022 * Copyright
1992 Stephen Adams
.
1024 * This software may be used freely provided that
:
1025 * 1. This copyright notice is attached to any copy
, derived work
,
1026 * or work including all or part
of this software
.
1027 * 2. Any derived work must contain a prominent notice stating that
1028 * it has been altered from the original
.
1030 * Name(s
): Stephen Adams
.
1031 * Department
, Institution
: Electronics
& Computer Science
,
1032 * University
of Southampton
1033 * Address
: Electronics
& Computer Science
1034 * University
of Southampton
1035 * Southampton SO9
5NH
1037 * E
-mail
: sra@ecs
.soton
.ac
.uk
1041 * 1. The implementation is based on Binary search trees
of Bounded
1042 * Balance
, similar to Nievergelt
& Reingold
, SIAM J
. Computing
1043 * 2(1), March
1973. The main advantage
of these trees is that
1044 * they keep the size
of the tree
in the node
, giving a constant
1045 * time size operation
.
1047 * 2. The bounded balance criterion is simpler than N
&R
's alpha
.
1048 * Simply
, one subtree must not have more than `weight
' times
as
1049 * many elements
as the opposite subtree
. Rebalancing is
1050 * guaranteed to reinstate the criterion for weight
>2.23, but
1051 * the occasional incorrect behaviour for weight
=2 is not
1052 * detrimental to performance
.
1054 * 3. There are two implementations
of union
. The default
,
1055 * hedge_union
, is much more complex
and usually
20% faster
. I
1056 * am not sure that the performance increase warrants the
1057 * complexity (and time it took to write
), but I am leaving it
1058 * in for the competition
. It is derived from the original
1059 * union by replacing the
split_lt(gt
) operations
with a lazy
1060 * version
. The `obvious
' version is called old_union
.
1062 * 4. Most time is spent
in T
', the rebalancing constructor
. If my
1063 * understanding
of the output
of *<file
> in the sml batch
1064 * compiler is correct
then the code produced by NJSML
0.75
1065 * (sparc
) for the final
case is very disappointing
. Most
1066 * invocations fall through to this
case and most
of these cases
1067 * fall to the
else part
, i
.e
. the plain contructor
,
1068 * T(v
,ln
+rn
+1,l
,r
). The poor code allocates a
16 word vector
1069 * and saves lots
of registers into it
. In the common
case it
1070 * then retrieves a few
of the registers
and allocates the
5
1071 * word T node
. The values that it retrieves were live
in
1072 * registers
before the massive save
.
1074 * Modified to
functor to support general ordered values
1077 functor BinarySetFn (K
: ORD_KEY
) : ORD_SET
=
1082 type item
= K
.ord_key
1094 |
numItems (T
{cnt
,...}) = cnt
1096 fun isEmpty E
= true
1099 fun mkT(v
,n
,l
,r
) = T
{elt
=v
,cnt
=n
,left
=l
,right
=r
}
1101 (* N(v
,l
,r
) = T(v
,1+numItems(l
)+numItems(r
),l
,r
) *)
1102 fun N(v
,E
,E
) = mkT(v
,1,E
,E
)
1103 |
N(v
,E
,r
as T
{cnt
=n
,...}) = mkT(v
,n
+1,E
,r
)
1104 |
N(v
,l
as T
{cnt
=n
,...}, E
) = mkT(v
,n
+1,l
,E
)
1105 |
N(v
,l
as T
{cnt
=n
,...}, r
as T
{cnt
=m
,...}) = mkT(v
,n
+m
+1,l
,r
)
1107 fun single_L (a
,x
,T
{elt
=b
,left
=y
,right
=z
,...}) = N(b
,N(a
,x
,y
),z
)
1108 | single_L _
= raise Match
1109 fun single_R (b
,T
{elt
=a
,left
=x
,right
=y
,...},z
) = N(a
,x
,N(b
,y
,z
))
1110 | single_R _
= raise Match
1111 fun double_L (a
,w
,T
{elt
=c
,left
=T
{elt
=b
,left
=x
,right
=y
,...},right
=z
,...}) =
1112 N(b
,N(a
,w
,x
),N(c
,y
,z
))
1113 | double_L _
= raise Match
1114 fun double_R (c
,T
{elt
=a
,left
=w
,right
=T
{elt
=b
,left
=x
,right
=y
,...},...},z
) =
1115 N(b
,N(a
,w
,x
),N(c
,y
,z
))
1116 | double_R _
= raise Match
1120 ** fun wt i
= weight
* i
1122 fun wt (i
: int) = i
+ i
+ i
1124 fun T
' (v
,E
,E
) = mkT(v
,1,E
,E
)
1125 | T
' (v
,E
,r
as T
{left
=E
,right
=E
,...}) = mkT(v
,2,E
,r
)
1126 | T
' (v
,l
as T
{left
=E
,right
=E
,...},E
) = mkT(v
,2,l
,E
)
1128 | T
' (p
as (_
,E
,T
{left
=T _
,right
=E
,...})) = double_L p
1129 | T
' (p
as (_
,T
{left
=E
,right
=T _
,...},E
)) = double_R p
1131 (* these cases almost never happen
with small weight
*)
1132 | T
' (p
as (_
,E
,T
{left
=T
{cnt
=ln
,...},right
=T
{cnt
=rn
,...},...})) =
1133 if ln
<rn
then single_L p
else double_L p
1134 | T
' (p
as (_
,T
{left
=T
{cnt
=ln
,...},right
=T
{cnt
=rn
,...},...},E
)) =
1135 if ln
>rn
then single_R p
else double_R p
1137 | T
' (p
as (_
,E
,T
{left
=E
,...})) = single_L p
1138 | T
' (p
as (_
,T
{right
=E
,...},E
)) = single_R p
1140 | T
' (p
as (v
,l
as T
{elt
=lv
,cnt
=ln
,left
=ll
,right
=lr
},
1141 r
as T
{elt
=rv
,cnt
=rn
,left
=rl
,right
=rr
})) =
1142 if rn
>= wt
ln (*right is too big
*)
1144 let val rln
= numItems rl
1145 val rrn
= numItems rr
1147 if rln
< rrn
then single_L p
else double_L p
1149 else if ln
>= wt
rn (*left is too big
*)
1151 let val lln
= numItems ll
1152 val lrn
= numItems lr
1154 if lrn
< lln
then single_R p
else double_R p
1156 else mkT(v
,ln
+rn
+1,l
,r
)
1158 fun add (E
,x
) = mkT(x
,1,E
,E
)
1159 |
add (set
as T
{elt
=v
,left
=l
,right
=r
,cnt
},x
) =
1160 case K
.compare(x
,v
) of
1161 LESS
=> T
'(v
,add(l
,x
),r
)
1162 | GREATER
=> T
'(v
,l
,add(r
,x
))
1163 | EQUAL
=> mkT(x
,cnt
,l
,r
)
1164 fun add
' (s
, x
) = add(x
, s
)
1166 fun concat3 (E
,v
,r
) = add(r
,v
)
1167 |
concat3 (l
,v
,E
) = add(l
,v
)
1168 |
concat3 (l
as T
{elt
=v1
,cnt
=n1
,left
=l1
,right
=r1
}, v
,
1169 r
as T
{elt
=v2
,cnt
=n2
,left
=l2
,right
=r2
}) =
1170 if wt n1
< n2
then T
'(v2
,concat3(l
,v
,l2
),r2
)
1171 else if wt n2
< n1
then T
'(v1
,l1
,concat3(r1
,v
,r
))
1174 fun split_lt (E
,x
) = E
1175 |
split_lt (T
{elt
=v
,left
=l
,right
=r
,...},x
) =
1176 case K
.compare(v
,x
) of
1177 GREATER
=> split_lt(l
,x
)
1178 | LESS
=> concat3(l
,v
,split_lt(r
,x
))
1181 fun split_gt (E
,x
) = E
1182 |
split_gt (T
{elt
=v
,left
=l
,right
=r
,...},x
) =
1183 case K
.compare(v
,x
) of
1184 LESS
=> split_gt(r
,x
)
1185 | GREATER
=> concat3(split_gt(l
,x
),v
,r
)
1188 fun min (T
{elt
=v
,left
=E
,...}) = v
1189 |
min (T
{left
=l
,...}) = min l
1190 | min _
= raise Match
1192 fun delmin (T
{left
=E
,right
=r
,...}) = r
1193 |
delmin (T
{elt
=v
,left
=l
,right
=r
,...}) = T
'(v
,delmin l
,r
)
1194 | delmin _
= raise Match
1196 fun delete
' (E
,r
) = r
1198 | delete
' (l
,r
) = T
'(min r
,l
,delmin r
)
1200 fun concat (E
, s
) = s
1202 |
concat (t1
as T
{elt
=v1
,cnt
=n1
,left
=l1
,right
=r1
},
1203 t2
as T
{elt
=v2
,cnt
=n2
,left
=l2
,right
=r2
}) =
1204 if wt n1
< n2
then T
'(v2
,concat(t1
,l2
),r2
)
1205 else if wt n2
< n1
then T
'(v1
,l1
,concat(r1
,t2
))
1206 else T
'(min t2
,t1
, delmin t2
)
1210 fun trim (lo
,hi
,E
) = E
1211 |
trim (lo
,hi
,s
as T
{elt
=v
,left
=l
,right
=r
,...}) =
1212 if K
.compare(v
,lo
) = GREATER
1213 then if K
.compare(v
,hi
) = LESS
then s
else trim(lo
,hi
,l
)
1216 fun uni_bd (s
,E
,_
,_
) = s
1217 |
uni_bd (E
,T
{elt
=v
,left
=l
,right
=r
,...},lo
,hi
) =
1218 concat3(split_gt(l
,lo
),v
,split_lt(r
,hi
))
1219 |
uni_bd (T
{elt
=v
,left
=l1
,right
=r1
,...},
1220 s2
as T
{elt
=v2
,left
=l2
,right
=r2
,...},lo
,hi
) =
1221 concat3(uni_bd(l1
,trim(lo
,v
,s2
),lo
,v
),
1223 uni_bd(r1
,trim(v
,hi
,s2
),v
,hi
))
1224 (* inv
: lo
< v
< hi
*)
1226 (* all the other versions
of uni
and trim are
1227 * specializations
of the above two functions
with
1228 * lo
=-infinity
and/or hi
=+infinity
1231 fun trim_lo (_
, E
) = E
1232 |
trim_lo (lo
,s
as T
{elt
=v
,right
=r
,...}) =
1233 case K
.compare(v
,lo
) of
1235 | _
=> trim_lo(lo
,r
)
1237 fun trim_hi (_
, E
) = E
1238 |
trim_hi (hi
,s
as T
{elt
=v
,left
=l
,...}) =
1239 case K
.compare(v
,hi
) of
1241 | _
=> trim_hi(hi
,l
)
1243 fun uni_hi (s
,E
,_
) = s
1244 |
uni_hi (E
,T
{elt
=v
,left
=l
,right
=r
,...},hi
) =
1245 concat3(l
,v
,split_lt(r
,hi
))
1246 |
uni_hi (T
{elt
=v
,left
=l1
,right
=r1
,...},
1247 s2
as T
{elt
=v2
,left
=l2
,right
=r2
,...},hi
) =
1248 concat3(uni_hi(l1
,trim_hi(v
,s2
),v
),v
,uni_bd(r1
,trim(v
,hi
,s2
),v
,hi
))
1250 fun uni_lo (s
,E
,_
) = s
1251 |
uni_lo (E
,T
{elt
=v
,left
=l
,right
=r
,...},lo
) =
1252 concat3(split_gt(l
,lo
),v
,r
)
1253 |
uni_lo (T
{elt
=v
,left
=l1
,right
=r1
,...},
1254 s2
as T
{elt
=v2
,left
=l2
,right
=r2
,...},lo
) =
1255 concat3(uni_bd(l1
,trim(lo
,v
,s2
),lo
,v
),v
,uni_lo(r1
,trim_lo(v
,s2
),v
))
1259 |
uni (T
{elt
=v
,left
=l1
,right
=r1
,...},
1260 s2
as T
{elt
=v2
,left
=l2
,right
=r2
,...}) =
1261 concat3(uni_hi(l1
,trim_hi(v
,s2
),v
), v
, uni_lo(r1
,trim_lo(v
,s2
),v
))
1264 val hedge_union
= uni
1267 (* The old_union version is about
20% slower than
1268 * hedge_union
in most cases
1270 fun old_union (E
,s2
) = s2
1271 |
old_union (s1
,E
) = s1
1272 |
old_union (T
{elt
=v
,left
=l
,right
=r
,...},s2
) =
1273 let val l2
= split_lt(s2
,v
)
1274 val r2
= split_gt(s2
,v
)
1276 concat3(old_union(l
,l2
),v
,old_union(r
,r2
))
1280 fun singleton x
= T
{elt
=x
,cnt
=1,left
=E
,right
=E
}
1282 fun addList (s
,l
) = List.foldl (fn (i
,s
) => add(s
,i
)) s l
1286 fun member (set
, x
) = let
1288 |
pk (T
{elt
=v
, left
=l
, right
=r
, ...}) = (
1299 (* true if every item
in t is
in t
' *)
1300 fun treeIn (t
,t
') = let
1302 |
isIn (T
{elt
,left
=E
,right
=E
,...}) = member(t
',elt
)
1303 |
isIn (T
{elt
,left
,right
=E
,...}) =
1304 member(t
',elt
) andalso isIn left
1305 |
isIn (T
{elt
,left
=E
,right
,...}) =
1306 member(t
',elt
) andalso isIn right
1307 |
isIn (T
{elt
,left
,right
,...}) =
1308 member(t
',elt
) andalso isIn left
andalso isIn right
1313 fun isSubset (E
,_
) = true
1314 |
isSubset (_
,E
) = false
1315 |
isSubset (t
as T
{cnt
=n
,...},t
' as T
{cnt
=n
',...}) =
1316 (n
<=n
') andalso treeIn (t
,t
')
1318 fun equal (E
,E
) = true
1319 |
equal (t
as T
{cnt
=n
,...},t
' as T
{cnt
=n
',...}) =
1320 (n
=n
') andalso treeIn (t
,t
')
1325 fun next ((t
as T
{right
, ...})::rest
) = (t
, left(right
, rest
))
1327 and left (E
, rest
) = rest
1328 |
left (t
as T
{left
=l
, ...}, rest
) = left(l
, t
::rest
)
1330 fun compare (s1
, s2
) = let
1331 fun cmp (t1
, t2
) = (case (next t1
, next t2
)
1332 of ((E
, _
), (E
, _
)) => EQUAL
1333 |
((E
, _
), _
) => LESS
1334 |
(_
, (E
, _
)) => GREATER
1335 |
((T
{elt
=e1
, ...}, r1
), (T
{elt
=e2
, ...}, r2
)) => (
1336 case Key
.compare(e1
, e2
)
1337 of EQUAL
=> cmp (r1
, r2
)
1342 cmp (left(s1
, []), left(s2
, []))
1346 fun delete (E
,x
) = raise LibBase
.NotFound
1347 |
delete (set
as T
{elt
=v
,left
=l
,right
=r
,...},x
) =
1348 case K
.compare(x
,v
) of
1349 LESS
=> T
'(v
,delete(l
,x
),r
)
1350 | GREATER
=> T
'(v
,l
,delete(r
,x
))
1353 val union
= hedge_union
1355 fun intersection (E
, _
) = E
1356 |
intersection (_
, E
) = E
1357 |
intersection (s
, T
{elt
=v
,left
=l
,right
=r
,...}) = let
1358 val l2
= split_lt(s
,v
)
1359 val r2
= split_gt(s
,v
)
1362 then concat3(intersection(l2
,l
),v
,intersection(r2
,r
))
1363 else concat(intersection(l2
,l
),intersection(r2
,r
))
1366 fun difference (E
,s
) = E
1367 |
difference (s
,E
) = s
1368 |
difference (s
, T
{elt
=v
,left
=l
,right
=r
,...}) =
1369 let val l2
= split_lt(s
,v
)
1370 val r2
= split_gt(s
,v
)
1372 concat(difference(l2
,l
),difference(r2
,r
))
1376 fun map
'(acc
, E
) = acc
1377 | map
'(acc
, T
{elt
,left
,right
,...}) =
1378 map
' (add (map
' (acc
, left
), f elt
), right
)
1384 let fun apply E
= ()
1385 |
apply (T
{elt
,left
,right
,...}) =
1386 (apply left
;apf elt
; apply right
)
1391 fun foldl f b set
= let
1392 fun foldf (E
, b
) = b
1393 |
foldf (T
{elt
,left
,right
,...}, b
) =
1394 foldf (right
, f(elt
, foldf (left
, b
)))
1399 fun foldr f b set
= let
1400 fun foldf (E
, b
) = b
1401 |
foldf (T
{elt
,left
,right
,...}, b
) =
1402 foldf (left
, f(elt
, foldf (right
, b
)))
1407 fun listItems set
= foldr (op::) [] set
1409 fun filter pred set
=
1410 foldl (fn (item
, s
) => if (pred item
) then add(s
, item
) else s
)
1414 | find
p (T
{elt
,left
,right
,...}) = (case find p left
1415 of NONE
=> if (p elt
)
1421 fun exists p E
= false
1422 | exists
p (T
{elt
, left
, right
,...}) =
1423 (exists p left
) orelse (p elt
) orelse (exists p right
)
1425 end (* BinarySetFn
*)
1426 (* stop
of smlnj
-lib
/Util
/binary
-set
-fn.sml
*)
1427 (* start
of FIN_SET
.sml
*)
1429 * Standard ML finite sets
1431 * Definition
, section
4.2
1434 * This
signature just extends the one available
in the SML
/NJ lib
.
1435 * Actually
, the operation added here would be general purpose
and useful enough
1436 * to be
in the lib
. Also see FIN_MAP
.
1444 val fromList
: item list
-> set
1447 (* stop
of FIN_SET
.sml
*)
1448 (* start
of FinSetFn
.sml
*)
1450 * Standard ML finite sets
1452 * Definition
, section
4.2
1455 * This
functor just extends the one available
in the SML
/NJ lib
.
1456 * Actually
, the operation added here would be general purpose
and useful enough
1457 * to be
in the lib
. Also see FinMapFn
.
1460 functor FinSetFn(Key
: ORD_KEY
) :> FIN_SET
where type Key
.ord_key
= Key
.ord_key
=
1463 structure BinarySet
= BinarySetFn(Key
)
1467 fun fromList xs
= addList(empty
, xs
)
1470 (* stop
of FinSetFn
.sml
*)
1471 (* start
of TYVAR
.sml
*)
1473 * Standard ML
type variables
1475 * Definition
, sections
2.4 and 4.1
1482 (* Type
[Sections
2.4 and 4.1]*)
1484 eqtype TyVar (* [alpha
] or
[tyvar
] *)
1489 val invent
: bool -> TyVar
1490 val fromIndex
: bool -> int -> TyVar
1491 val fromString
: string -> TyVar
1492 val toString
: TyVar
-> string
1494 val admitsEquality
: TyVar
-> bool
1495 val isExplicit
: TyVar
-> bool
1497 val instance
: TyVar
-> TyVar
1498 val normalise
: TyVar
* int -> TyVar
1500 val compare
: TyVar
* TyVar
-> order
1503 (* stop
of TYVAR
.sml
*)
1504 (* start
of TyVar
.sml
*)
1506 * Standard ML
type variables
1508 * Definition
, sections
2.4 and 4.1
1511 * - Internally generated tyvars get names
'#xxx
, where xxx is a stamp number
.
1512 * - Tyvars generated from integers are mapped to
'a
,'b
,..,'z
,'aa
,'bb
,..,'zz
,
1517 structure TyVar
:> TYVAR
=
1520 (* Type
[Sections
2.4 and 4.1]*)
1522 type TyVar
= { name
: string, equality
: bool } (* [alpha
] or
[tyvar
] *)
1527 fun invent equality
=
1528 { name
="'#" ^ Stamp
.toString(Stamp
.stamp()),
1531 fun fromIndex equality n
=
1534 |
rep(n
,c
) = c ^
rep(n
-1,c
)
1536 val c
= String.str(Char.chr(Char.ord #
"a" + n
mod 26))
1537 val name
= (if equality
then "''" else "'") ^
rep(n
div 26, c
)
1539 { name
=name
, equality
=equality
}
1544 equality
= String.size(s
) > 1 andalso String.sub(s
,1) = #
"'" }
1546 fun toString
{name
,equality
} = name
1549 (* Attributes
[Section
4.1] *)
1551 fun admitsEquality
{name
,equality
} = equality
1553 fun isExplicit
{name
,equality
} =
1554 String.size name
= 1 orelse String.sub(name
,1) <> #
"#"
1559 fun normalise({name
,equality
}, n
) = fromIndex equality n
1561 fun instance
{name
,equality
} = invent equality
1566 fun compare(alpha1
: TyVar
, alpha2
: TyVar
) =
1567 String.compare(#name alpha1
, #name alpha2
)
1570 (* stop
of TyVar
.sml
*)
1571 (* start
of TYNAME
.sml
*)
1573 * Standard ML
type names
1575 * Definition
, section
4.1
1578 * - Equality is not a boolean attribute
. We distinguish a
3rd kind
of special
1579 * type names which have equality regardless
of the types applied
. This
1580 * implements ref
, array
, and equivalent types
.
1581 * - For easy checking
of pattern exhaustiveness we add an attribute
1582 * `span
' counting the number
of constructors
of the
type.
1591 type TyCon
= TyCon
.Id
1594 (* Type
[Section
4.1] *)
1596 eqtype TyName (* [t
] *)
1598 datatype Equality
= NOEQ | EQ | SPECIALEQ
1603 val tyname
: TyCon
* int * Equality
* int -> TyName
1604 val invent
: int * Equality
-> TyName
1605 val rename
: TyName
-> TyName
1606 val removeEquality
: TyName
-> TyName
1607 val Abs
: TyName
-> TyName
1609 val arity
: TyName
-> int
1610 val equality
: TyName
-> Equality
1611 val span
: TyName
-> int
1612 val tycon
: TyName
-> TyCon
1613 val toString
: TyName
-> string
1615 val compare
: TyName
* TyName
-> order
1618 (* stop
of TYNAME
.sml
*)
1619 (* start
of TyName
.sml
*)
1621 * Standard ML
type names
1623 * Definition
, section
4.1
1626 * - Equality is not a boolean attribute
. We distinguish a
3rd kind
of special
1627 * type names which have equality regardless
of the types applied
. This
1628 * implements ref
, array
, and equivalent types
.
1629 * - For easy checking
of pattern exhaustiveness we add an attribute
1630 * `span
' counting the number
of constructors
of the
type.
1634 structure TyName
:> TYNAME
=
1639 type TyCon
= TyCon
.Id
1640 type stamp
= Stamp
.stamp
1643 (* Type
[Section
4.1] *)
1645 datatype Equality
= NOEQ | EQ | SPECIALEQ
1647 type TyName
= (* [t
] *)
1651 , equality
: Equality
1658 fun tyname(tycon
, arity
, equality
, span
) =
1660 , stamp
= Stamp
.stamp()
1662 , equality
= equality
1666 fun invent(arity
, equality
) = tyname(TyCon
.invent(), arity
, equality
, 0)
1669 (* Creation from existing
*)
1671 fun rename
{tycon
, stamp
, arity
, equality
, span
} =
1672 tyname(tycon
, arity
, equality
, span
)
1674 fun removeEquality
{tycon
, stamp
, arity
, equality
, span
} =
1675 tyname(tycon
, arity
, NOEQ
, span
)
1677 fun Abs
{tycon
, stamp
, arity
, equality
, span
} =
1678 tyname(tycon
, arity
, NOEQ
, 0)
1681 (* Attributes
[Section
4.1] *)
1683 fun arity
{tycon
, stamp
, arity
, equality
, span
} = arity
1684 fun equality
{tycon
, stamp
, arity
, equality
, span
} = equality
1685 fun span
{tycon
, stamp
, arity
, equality
, span
} = span
1686 fun tycon
{tycon
, stamp
, arity
, equality
, span
} = tycon
1688 fun toString
{tycon
, stamp
, arity
, equality
, span
} = TyCon
.toString tycon
1693 fun compare(t1
: TyName
, t2
: TyName
) = Stamp
.compare(#stamp t1
, #stamp t2
)
1696 (* stop
of TyName
.sml
*)
1697 (* start
of SCON
.sml
*)
1699 * Standard ML special constants
1701 * Definition
, section
2.2
1708 (* Type
[Section
2.2] *)
1710 datatype SCon
= (* [scon
] *)
1719 val fromInt
: int -> SCon
1720 val fromWord
: word -> SCon
1721 val fromString
: string -> SCon
1722 val fromChar
: char
-> SCon
1723 val fromReal
: real -> SCon
1725 val toString
: SCon
-> string
1727 val compare
: SCon
* SCon
-> order
1730 (* stop
of SCON
.sml
*)
1731 (* start
of SCon
.sml
*)
1733 * Standard ML special constants
1735 * Definition
, section
2.2
1739 structure SCon
:> SCON
=
1742 (* Type
[Section
2.2] *)
1744 datatype SCon
= (* [scon
] *)
1756 val fromString
= STRING
1760 fun toString(INT i
) = Int.toString i
1761 |
toString(WORD w
) = "0wx" ^
Word.toString w
1762 |
toString(STRING s
) = "\"" ^
String.toCString s ^
"\""
1763 |
toString(CHAR c
) = "\"#" ^
Char.toCString c ^
"\""
1764 |
toString(REAL r
) = Real.toString r
1769 fun compare(INT n1
, INT n2
) = Int.compare(n1
, n2
)
1770 |
compare(WORD w1
, WORD w2
) = Word.compare(w1
, w2
)
1771 |
compare(STRING s1
, STRING s2
) = String.compare(s1
, s2
)
1772 |
compare(CHAR c1
, CHAR c2
) = Char.compare(c1
, c2
)
1773 |
compare(REAL x1
, REAL x2
) = Real.compare(x1
, x2
)
1774 | compare _
= raise Domain
1777 (* stop
of SCon
.sml
*)
1778 (* start
of LAB
.sml
*)
1780 * Standard ML label identifiers
1782 * Definition
, section
2.4
1789 (* Type
[Section
2.4] *)
1791 eqtype Lab (* [lab
] *)
1796 val fromString
: string -> Lab
1797 val fromInt
: int -> Lab
1798 val toString
: Lab
-> string
1800 val compare
: Lab
* Lab
-> order
1803 (* stop
of LAB
.sml
*)
1804 (* start
of Lab
.sml
*)
1806 * Standard ML label identifiers
1808 * Definition
, section
2.4
1812 structure Lab
:> LAB
=
1815 (* Type
[Section
2.4] *)
1817 type Lab
= string (* [lab
] *)
1822 fun fromString s
= s
1823 val fromInt
= Int.toString
1829 fun compare(lab1
,lab2
) =
1830 case (Int.fromString lab1
, Int.fromString lab2
)
1831 of (SOME i1
, SOME i2
) => Int.compare(i1
,i2
)
1832 | _
=> String.compare(lab1
,lab2
)
1835 (* stop
of Lab
.sml
*)
1836 (* start
of AssembliesCoreStatic
.sml
*)
1838 * Standard ML sets
and maps for the static semantics
of the core
1840 * Definition
, section
4.2
1843 structure TyVarSet
= FinSetFn(type ord_key
= TyVar
.TyVar
1844 val compare
= TyVar
.compare
)
1846 structure TyNameSet
= FinSetFn(type ord_key
= TyName
.TyName
1847 val compare
= TyName
.compare
)
1849 structure SConSet
= FinSetFn(type ord_key
= SCon
.SCon
1850 val compare
= SCon
.compare
)
1852 structure VIdSet
= FinSetFn(type ord_key
= VId
.Id
1853 val compare
= VId
.compare
)
1855 structure LongVIdSet
= FinSetFn(type ord_key
= LongVId
.longId
1856 val compare
= LongVId
.compare
)
1859 structure LabMap
= FinMapFn(type ord_key
= Lab
.Lab
1860 val compare
= Lab
.compare
)
1862 structure VIdMap
= FinMapFn(type ord_key
= VId
.Id
1863 val compare
= VId
.compare
)
1865 structure TyConMap
= FinMapFn(type ord_key
= TyCon
.Id
1866 val compare
= TyCon
.compare
)
1868 structure TyVarMap
= FinMapFn(type ord_key
= TyVar
.TyVar
1869 val compare
= TyVar
.compare
)
1871 structure TyNameMap
= FinMapFn(type ord_key
= TyName
.TyName
1872 val compare
= TyName
.compare
)
1874 structure StrIdMap
= FinMapFn(type ord_key
= StrId
.Id
1875 val compare
= StrId
.compare
)
1876 (* stop
of AssembliesCoreStatic
.sml
*)
1877 (* start
of OVERLOADINGCLASS
.sml
*)
1879 * Standard ML overloading classes
1881 * Definition
, appendix E
1884 * Overloading
-- and defaulting
in particular
-- is not well formalised
in
1885 * the Definition
. We describe an overloading class
as a
pair (T
,t
) of a set
1886 * of type names (like the definition does
), plus the default
type name t
.
1887 * For overloading to be sound some well
-formedness properties have to be
1888 * enforced for all existing overloading
classes (T
,t
):
1890 * (2) Eq T
= 0 \
/ t admits equality
1891 * (3) forall (T
',t
') . ( TT
' = 0 \
/ t
= t
' )
1892 * where Eq T
= { t elem T | t admits equality
} and we write TT
' for the
1893 * T intersect T
' and 0 for the empty set
.
1894 * The reason
for (1) is obvious
. (2) guarantees that we
do not loose the
1895 * default
if we enforce equality
. (3) ensures the same
if we have to unify
1896 * two overloading classes
. (2) and (3) also allow the resulting set to become
1897 * empty which will cause a
type error
.
1900 signature OVERLOADINGCLASS
=
1905 type TyName
= TyName
.TyName
1906 type TyNameSet
= TyNameSet
.set
1911 type OverloadingClass (* [O
] *)
1916 val make
: TyNameSet
* TyName
-> OverloadingClass
1918 val isEmpty
: OverloadingClass
-> bool
1919 val isSingular
: OverloadingClass
-> bool
1920 val default
: OverloadingClass
-> TyName
1921 val set
: OverloadingClass
-> TyNameSet
1922 val member
: OverloadingClass
* TyName
-> bool
1923 val getItem
: OverloadingClass
-> TyName
1925 val makeEquality
: OverloadingClass
-> OverloadingClass option
1926 val intersection
: OverloadingClass
* OverloadingClass
->
1927 OverloadingClass option
1928 val union
: OverloadingClass
* OverloadingClass
->
1932 (* stop
of OVERLOADINGCLASS
.sml
*)
1933 (* start
of OverloadingClass
.sml
*)
1935 * Standard ML overloading classes
1937 * Definition
, appendix E
1940 * Overloading
-- and defaulting
in particular
-- is not well formalised
in
1941 * the Definition
. We describe an overloading class
as a
pair (T
,t
) of a set
1942 * of type names (like the definition does
), plus the default
type name t
.
1943 * For overloading to be sound some well
-formedness properties have to be
1944 * enforced for all existing overloading
classes (T
,t
):
1946 * (2) Eq T
= 0 \
/ t admits equality
1947 * (3) forall (T
',t
') . ( TT
' = 0 \
/ t
= t
' )
1948 * where Eq T
= { t elem T | t admits equality
} and we write TT
' for the
1949 * T intersect T
' and 0 for the empty set
.
1950 * The reason
for (1) is obvious
. (2) guarantees that we
do not loose the
1951 * default
if we enforce equality
. (3) ensures the same
if we have to unify
1952 * two overloading classes
. (2) and (3) also allow the resulting set to become
1953 * empty which will cause a
type error
.
1956 structure OverloadingClass
:> OVERLOADINGCLASS
=
1961 type TyName
= TyName
.TyName
1962 type TyNameSet
= TyNameSet
.set
1967 type OverloadingClass
= TyNameSet
* TyName (* [O
] *)
1970 (* Simple operations
*)
1974 fun isEmpty (T
,t
) = TyNameSet
.isEmpty T
1975 fun isSingular (T
,t
) = TyNameSet
.numItems T
= 1
1976 fun default (T
,t
) = t
1978 fun member((T
,t
), t
') = TyNameSet
.member(T
, t
')
1979 fun getItem (T
,t
) = valOf(TyNameSet
.find (fn _
=> true) T
)
1982 (* Filter equality types
*)
1984 fun makeEquality (T
,t
) =
1986 val T
' = TyNameSet
.filter (fn t
=> TyName
.equality t
= TyName
.EQ
) T
1988 if TyNameSet
.isEmpty T
' then
1990 else if TyName
.equality t
<> TyName
.NOEQ
then
1993 raise Fail
"OverloadingClass.makeEquality: \
1994 \inconsistent overloading classes"
1998 (* Intersection
and union
*)
2000 fun intersection((T1
,t1
), (T2
,t2
)) =
2002 val T
' = TyNameSet
.intersection(T1
,T2
)
2004 if TyNameSet
.isEmpty T
' then
2006 else if t1
= t2
then
2009 raise Fail
"OverloadingClass.intersect: \
2010 \inconsistent overloading classes"
2014 fun union((T1
,t1
), (T2
,t2
)) = ( TyNameSet
.union(T1
,T2
), t2
)
2017 (* stop
of OverloadingClass
.sml
*)
2018 (* start
of TYPE
.sml
*)
2022 * Definition
, section
4.2 and 4.4
2025 * - Types are references so that unification can work via side effects
.
2026 * We need
links (forwards
) to unify two
type variables
.
2027 * - Types built bottom
-up have to be `normalised
' to induce the required
2028 * sharing on
type variables
.
2029 * - Care has to be taken to clone types at the proper places
.
2030 * - Substitution creates a clone
, but shares free
type variables
.
2031 * - To represent overloaded
type (variables
), we add a special
type.
2032 * - Record types may contain a row variable to represent
open record types
2033 * (which appear during
type inference
). Flexible rows have to carry an
2034 * equality flag to properly propagate equality enforced by unification
2035 * when extending a row
.
2044 type TyVar
= TyVar
.TyVar
2045 type TyVarSet
= TyVarSet
.set
2046 type TyName
= TyName
.TyName
2047 type TyNameSet
= TyNameSet
.set
2048 type OverloadingClass
= OverloadingClass
.OverloadingClass
2049 type 'a LabMap
= 'a LabMap
.map
2050 type 'a TyVarMap
= 'a TyVarMap
.map
2051 type 'a TyNameMap
= 'a TyNameMap
.map
2054 (* Types
[Section
4.2] *)
2056 datatype RowVar
= CLOSEDRow | FLEXRow
of bool (* [r
] *)
2058 datatype Type
' = (* [tau
] *)
2060 | RowType
of (*RowType
*) (Type
' ref LabMap
* RowVar
)
2061 | FunType
of (*FunType
*) (Type
' ref
* Type
' ref
)
2062 | ConsType
of (*ConsType
*)(Type
' ref list
* TyName
)
2063 | Overloaded
of OverloadingClass
2064 | Link
of (*Type
*) Type
' ref
2066 type Type
= Type
' ref
2068 type RowType
= Type LabMap
* RowVar (* [rho
] *)
2069 type FunType
= Type
* Type
2070 type ConsType
= Type list
* TyName
2072 type TypeFcn
= TyVar list
* Type (* [theta
] *)
2074 type Substitution
= Type
TyVarMap (* [mu
] *)
2075 type Realisation
= TypeFcn
TyNameMap (* [phi
] *)
2080 val invent
: unit
-> Type
2081 val fromTyVar
: TyVar
-> Type
2082 val fromRowType
: RowType
-> Type
2083 val fromFunType
: FunType
-> Type
2084 val fromConsType
: ConsType
-> Type
2085 val fromOverloadingClass
: OverloadingClass
-> Type
2087 val range
: Type
-> Type
2088 val tyname
: Type
-> TyName
2090 val normalise
: Type
-> Type
2091 val substitute
: Substitution
-> Type
-> Type
2092 val realise
: Realisation
-> Type
-> Type
2094 val tyvars
: Type
-> TyVarSet
2095 val tynames
: Type
-> TyNameSet
2096 val admitsEquality
: Type
-> bool
2097 val isFlexible
: Type
-> bool
2100 val unify
: Type
* Type
-> unit (* Unify
*)
2101 val unifyRestricted
: TyVarSet
-> Type
* Type
-> unit (* Unify
*)
2102 val makeEquality
: Type
-> unit (* Unify
*)
2104 val defaultOverloaded
: Type
-> unit
2107 (* Operations on rows
*)
2109 val emptyRho
: RowType
2110 val singletonRho
: Lab
* Type
-> RowType
2111 val insertRho
: RowType
* Lab
* Type
-> RowType
2112 val inventRho
: unit
-> RowType
2113 val findLab
: RowType
* Lab
-> Type option
2116 (* stop
of TYPE
.sml
*)
2117 (* start
of Type
.sml
*)
2121 * Definition
, section
4.2 and 4.4
2124 * - Types are references so that unification can work via side effects
.
2125 * We need
links (forwards
) to unify two
type variables
.
2126 * - Types built bottom
-up have to be `normalised
' to induce the required
2127 * sharing on
type variables
.
2128 * - Care has to be taken to clone types at the proper places
.
2129 * - Substitution creates a clone
, but shares free
type variables
.
2130 * - To represent overloaded
type (variables
), we add a special
type.
2131 * - Record types may contain a row variable to represent
open record types
2132 * (which appear during
type inference
). Flexible rows have to carry an
2133 * equality flag to properly propagate equality enforced by unification
2134 * when extending a row
.
2137 structure Type
:> TYPE
=
2143 type TyVar
= TyVar
.TyVar
2144 type TyVarSet
= TyVarSet
.set
2145 type TyName
= TyName
.TyName
2146 type TyNameSet
= TyNameSet
.set
2147 type OverloadingClass
= OverloadingClass
.OverloadingClass
2148 type 'a LabMap
= 'a LabMap
.map
2149 type 'a TyVarMap
= 'a TyVarMap
.map
2150 type 'a TyNameMap
= 'a TyNameMap
.map
2153 (* Types
[Section
4.2] *)
2155 datatype RowVar
= CLOSEDRow | FLEXRow
of bool (* [r
] *)
2157 datatype Type
' = (* [tau
] *)
2159 | RowType
of RowType
2160 | FunType
of FunType
2161 | ConsType
of ConsType
2162 | Overloaded
of OverloadingClass
2165 withtype Type
= Type
' ref
2167 and RowType
= Type
' ref LabMap
* RowVar (* [rho
] *)
2168 and FunType
= Type
' ref
* Type
' ref
2169 and ConsType
= Type
' ref list
* TyName
2171 type TypeFcn
= TyVar list
* Type (* [theta
] *)
2173 type Substitution
= Type
TyVarMap (* [mu
] *)
2174 type Realisation
= TypeFcn
TyNameMap (* [phi
] *)
2179 fun invent() = ref(TyVar(TyVar
.invent
false))
2181 fun fromTyVar alpha
= ref(TyVar alpha
)
2182 fun fromRowType rho
= ref(RowType rho
)
2183 fun fromFunType x
= ref(FunType x
)
2184 fun fromConsType x
= ref(ConsType x
)
2185 fun fromOverloadingClass O
= ref(Overloaded O
)
2190 fun range(ref(FunType(tau1
,tau2
))) = tau2
2193 fun tyname(ref(ConsType(taus
,t
))) = t
2195 raise Fail
"Type.tyname: non-constructed type"
2198 (* Induce
sharing on equal
type variables
in a
type *)
2202 (* Note that Overloaded nodes also have to be shared
.
2203 * But since such types are always pre
-built rather than
2204 * infered
, we just take care that we construct them
with
2205 * proper
sharing and ignore Overloaded nodes here
.
2210 fun normalise(tau
as ref(TyVar(alpha
))) =
2211 (case List.find (fn(alpha1
,_
) => alpha1
= alpha
) (!alphas
)
2212 of SOME(_
,tau1
) => tau1
2213 | NONE
=> ( alphas
:= (alpha
,tau
) :: !alphas
2217 |
normalise(ref(Link(tau
))) = normalise tau
2218 |
normalise(tau
as ref tau
') = ( tau
:= normalise
' tau
' ; tau
)
2220 and normalise
'(RowType(Rho
,r
)) =
2221 RowType(LabMap
.map normalise Rho
, r
)
2223 | normalise
'(FunType(tau1
,tau2
)) =
2224 FunType(normalise tau1
, normalise tau2
)
2226 | normalise
'(ConsType(taus
,t
)) =
2227 ConsType(List.map normalise taus
, t
)
2229 | normalise
'(Overloaded(O
)) =
2233 raise Fail
"Type.normalise: bypassed type variable or link"
2240 (* Cloning under a substitution
and a
type realisation
*)
2242 fun clone (mu
,phi
) tau
=
2244 (* Cloning must respect
sharing, so an association list is used
2245 * to remember nodes already visited together
with their copy
.
2252 case List.find (fn(tau1
,_
) => tau1
= tau
) (!cloned
)
2253 of SOME(_
,tau2
) => tau2
2254 | NONE
=> let val tau2
= clone
' tau
in
2255 cloned
:= (tau
,tau2
) :: !cloned
2259 and clone
'(tau
as ref(TyVar(alpha
))) =
2260 (case TyVarMap
.find(!mu
', alpha
)
2264 | clone
'(ref(RowType(Rho
,r
))) =
2265 ref(RowType(LabMap
.map clone Rho
, r
))
2267 | clone
'(ref(FunType(tau1
,tau2
))) =
2268 ref(FunType(clone tau1
, clone tau2
))
2270 | clone
'(tau
as ref(ConsType(taus
,t
))) =
2272 val taus2
= List.map clone taus
2274 case TyNameMap
.find(phi
, t
)
2275 of NONE
=> ref(ConsType(taus2
,t
))
2276 |
SOME(alphas
,tau1
) =>
2278 val cloned
' = !cloned
2280 mu
' := ListPair.foldl
2281 (fn(alpha
,tau2
,mu
) =>
2282 TyVarMap
.insert(mu
,alpha
,tau2
))
2283 (!mu
') (alphas
,taus2
)
2285 before cloned
:= cloned
'
2289 | clone
'(ref(Overloaded(O
))) =
2292 | clone
'(ref(Link(tau
))) =
2299 (* Substitution
, and realisation
[Section
5.2] *)
2301 fun substitute mu
= clone(mu
,TyNameMap
.empty
)
2302 fun realise phi
= clone(TyVarMap
.empty
,phi
)
2305 (* Type variable
and type name extraction
[Section
4.2] *)
2307 fun tyvars(ref tau
') = tyvars
' tau
'
2309 and tyvars
'(TyVar(alpha
)) = TyVarSet
.singleton alpha
2311 | tyvars
'(RowType(Rho
,r
)) =
2312 LabMap
.foldl (fn(tau
,U
) => TyVarSet
.union(U
, tyvars tau
))
2315 | tyvars
'(FunType(tau1
,tau2
)) =
2316 TyVarSet
.union(tyvars tau1
, tyvars tau2
)
2318 | tyvars
'(ConsType(taus
,t
)) =
2319 List.foldl (fn(tau
,U
) => TyVarSet
.union(U
, tyvars tau
))
2322 | tyvars
'(Overloaded(O
)) =
2325 | tyvars
'(Link(tau
)) =
2329 fun tynames(ref tau
') = tynames
' tau
'
2331 and tynames
'(TyVar(alpha
)) = TyNameSet
.empty
2333 | tynames
'(RowType(Rho
,r
)) =
2334 LabMap
.foldl (fn(tau
,T
) =>
2335 TyNameSet
.union(T
, tynames tau
)) TyNameSet
.empty Rho
2337 | tynames
'(FunType(tau1
,tau2
)) =
2338 TyNameSet
.union(tynames tau1
, tynames tau2
)
2340 | tynames
'(ConsType(taus
,t
)) =
2342 val T
= List.foldl (fn(tau
,T
) => TyNameSet
.union(T
, tynames tau
))
2343 TyNameSet
.empty taus
2348 | tynames
'(Overloaded(O
)) =
2349 (* Conservative approximation
*)
2350 OverloadingClass
.set O
2352 | tynames
'(Link(tau
)) =
2357 (* Check for equality
type [Section
4.4] *)
2359 fun admitsEquality(ref tau
') = admitsEquality
' tau
'
2361 and admitsEquality
'(TyVar alpha
) =
2362 TyVar
.admitsEquality alpha
orelse
2363 not(TyVar
.isExplicit alpha
)
2365 | admitsEquality
'(RowType(Rho
,CLOSEDRow
)) =
2366 LabMap
.all admitsEquality Rho
2368 | admitsEquality
'(RowType(Rho
,FLEXRow _
)) =
2369 raise Fail
"Type.admitsEquality: flexible row"
2371 | admitsEquality
'(FunType _
) = false
2373 | admitsEquality
'(ConsType(taus
,t
)) =
2374 (case TyName
.equality t
2375 of TyName
.SPECIALEQ
=> true
2376 | TyName
.EQ
=> List.all admitsEquality taus
2377 | TyName
.NOEQ
=> false
2380 | admitsEquality
'(Overloaded(O
)) =
2381 raise Fail
"Type.admitsEquality: overloaded type"
2383 | admitsEquality
'(Link(tau
)) =
2388 (* Look for flexible records
*)
2390 fun isFlexible(ref tau
') = isFlexible
' tau
'
2392 and isFlexible
'(TyVar(alpha
')) = false
2394 | isFlexible
'(RowType(Rho
,r
)) =
2395 r
<> CLOSEDRow
orelse LabMap
.exists isFlexible Rho
2397 | isFlexible
'(FunType(tau1
,tau2
)) =
2398 isFlexible tau1
orelse isFlexible tau2
2400 | isFlexible
'(ConsType(taus
,t
)) =
2401 List.exists isFlexible taus
2403 | isFlexible
'(Overloaded(O
)) = false
2405 | isFlexible
'(Link(tau
)) = isFlexible tau
2414 fun occurs(alpha
, ref tau
') = occurs
'(alpha
, tau
')
2416 and occurs
'(alpha
, TyVar(alpha
')) =
2419 | occurs
'(alpha
, RowType(Rho
,r
)) =
2420 LabMap
.exists (fn tau
=> occurs(alpha
, tau
)) Rho
2422 | occurs
'(alpha
, FunType(tau1
,tau2
)) =
2423 occurs(alpha
, tau1
) orelse occurs(alpha
, tau2
)
2425 | occurs
'(alpha
, ConsType(taus
,t
)) =
2426 List.exists (fn tau
=> occurs(alpha
, tau
)) taus
2428 | occurs
'(alpha
, Overloaded(O
)) =
2431 | occurs
'(alpha
, Link(tau
)) =
2435 fun unify(ref(Link(tau1
)), tau2
) = unify(tau1
, tau2
)
2436 |
unify(tau1
, ref(Link(tau2
))) = unify(tau1
, tau2
)
2438 |
unify(tau1
as ref tau1
', tau2
as ref tau2
') =
2439 if tau1
= tau2
then () else
2441 val tau
' = Link(ref(unify
'(tau1
',tau2
')))
2443 tau1
:= tau
' ; tau2
:= tau
'
2446 and unify
'(TyVar(alpha
), tau
') = unifyTyVar(alpha
, tau
')
2447 | unify
'(tau
', TyVar(alpha
)) = unifyTyVar(alpha
, tau
')
2448 | unify
'(Overloaded(O
), tau
') = unifyOverloaded(O
, tau
')
2449 | unify
'(tau
', Overloaded(O
)) = unifyOverloaded(O
, tau
')
2451 | unify
'(tau
' as FunType(tau11
,tau12
), FunType(tau21
,tau22
)) =
2452 ( unify(tau11
,tau21
)
2453 ; unify(tau12
,tau22
)
2457 | unify
'(RowType(Rho1
,r1
), RowType(Rho2
,r2
)) =
2459 fun unifyField
r (lab
, tau1
, Rho
) =
2460 case LabMap
.find(Rho
, lab
)
2461 of SOME tau2
=> ( unify(tau1
,tau2
)
2462 ; #
1(LabMap
.remove(Rho
,lab
))
2466 of CLOSEDRow
=> raise Unify
2467 | FLEXRow eq
=> ( if eq
then makeEquality tau1
else ()
2471 val Rho1
' = LabMap
.foldli (unifyField r1
) Rho1 Rho2
2472 val _
= LabMap
.foldli (unifyField r2
) Rho2 Rho1
'
2473 val r
= case (r1
,r2
)
2474 of (CLOSEDRow
, _
) => CLOSEDRow
2475 |
(_
, CLOSEDRow
) => CLOSEDRow
2476 |
(FLEXRow eq1
, FLEXRow eq2
) =>
2477 FLEXRow(eq1
orelse eq2
)
2479 RowType(LabMap
.unionWith #
2 (Rho2
,Rho1
'), r
)
2483 | unify
'(tau
' as ConsType(taus1
,t1
), ConsType(taus2
,t2
)) =
2485 ( ListPair.app
unify (taus1
,taus2
)
2491 | unify
' _
= raise Unify
2494 and unifyTyVar(alpha1
, TyVar(alpha2
)) =
2495 if alpha1
= alpha2
then
2497 else if not(TyVar
.isExplicit alpha1
) then
2498 bindTyVar(alpha1
, TyVar(alpha2
))
2499 else if not(TyVar
.isExplicit alpha2
) then
2500 bindTyVar(alpha2
, TyVar(alpha1
))
2504 |
unifyTyVar(alpha
, tau
') =
2505 if TyVar
.isExplicit alpha
orelse occurs
'(alpha
, tau
') then
2508 bindTyVar(alpha
, tau
')
2510 and bindTyVar(alpha
, tau
') =
2511 if TyVar
.admitsEquality alpha
then
2517 and unifyOverloaded(O
, TyVar(alpha2
)) =
2518 unifyTyVar(alpha2
, Overloaded(O
))
2520 |
unifyOverloaded(O
, tau
' as ConsType([],t
)) =
2521 if OverloadingClass
.member(O
, t
) then
2526 |
unifyOverloaded(O1
, Overloaded(O2
)) =
2527 (case OverloadingClass
.intersection(O1
,O2
)
2528 of NONE
=> raise Unify
2529 | SOME O
=> Overloaded(O
)
2532 |
unifyOverloaded(O
, _
) =
2536 and makeEquality(tau
as ref tau
') = tau
:= makeEquality
' tau
'
2538 and makeEquality
'(TyVar(alpha
)) =
2539 if TyVar
.admitsEquality alpha
then
2541 else if TyVar
.isExplicit alpha
then
2544 TyVar(TyVar
.invent
true)
2546 | makeEquality
'(RowType(Rho
,r
)) =
2547 ( LabMap
.app makeEquality Rho
2548 ; RowType(Rho
, case r
of CLOSEDRow
=> CLOSEDRow
2549 | FLEXRow _
=> FLEXRow
true)
2552 | makeEquality
'(FunType _
) =
2555 | makeEquality
'(tau
' as ConsType(taus
,t
)) =
2556 (case TyName
.equality t
2557 of TyName
.SPECIALEQ
=> tau
'
2558 | TyName
.EQ
=> ( List.app makeEquality taus
; tau
' )
2559 | TyName
.NOEQ
=> raise Unify
2562 | makeEquality
'(Overloaded(O
)) =
2563 (case OverloadingClass
.makeEquality O
2564 of NONE
=> raise Unify
2565 | SOME O
' => Overloaded(O
')
2567 | makeEquality
'(Link(tau
)) =
2568 ( makeEquality tau
; Link(tau
) )
2572 fun unifyRestricted
U (tau1
,tau2
) =
2574 fun skolemise(alpha
, mu
) =
2576 val equality
= if TyVar
.admitsEquality alpha
then TyName
.EQ
2578 val tau
' = ConsType([], TyName
.invent(0,equality
))
2580 TyVarMap
.insert(mu
, alpha
, ref tau
')
2583 val mu
= TyVarSet
.foldl skolemise TyVarMap
.empty U
2585 unify(substitute mu tau1
, substitute mu tau2
)
2590 (* Assign default
type to overloaded
type components
[Appendix E
] *)
2592 fun defaultOverloaded(tau
as ref(Overloaded(O
))) =
2593 tau
:= ConsType([], OverloadingClass
.default O
)
2595 |
defaultOverloaded(ref tau
') = defaultOverloaded
' tau
'
2597 and defaultOverloaded
'(TyVar(alpha
')) = ()
2599 | defaultOverloaded
'(RowType(Rho
,r
)) =
2600 LabMap
.app defaultOverloaded Rho
2602 | defaultOverloaded
'(FunType(tau1
,tau2
)) =
2603 ( defaultOverloaded tau1
; defaultOverloaded tau2
)
2605 | defaultOverloaded
'(ConsType(taus
,t
)) =
2606 List.app defaultOverloaded taus
2608 | defaultOverloaded
'(Overloaded(O
)) =
2609 raise Fail
"Type.defaultOverloaded: bypassed overloaded type"
2611 | defaultOverloaded
'(Link(tau
)) =
2612 defaultOverloaded tau
2616 (* Operations on rows
*)
2618 val emptyRho
= ( LabMap
.empty
, CLOSEDRow
)
2619 fun singletonRho(lab
,tau
) = ( LabMap
.singleton(lab
,tau
), CLOSEDRow
)
2620 fun inventRho() = ( LabMap
.empty
, FLEXRow
false )
2621 fun insertRho((Rho
,r
), lab
, tau
) = ( LabMap
.insert(Rho
, lab
, tau
), r
)
2622 fun findLab((Rho
,r
), lab
) = LabMap
.find(Rho
, lab
)
2625 (* stop
of Type
.sml
*)
2626 (* start
of TYPESCHEME
.sml
*)
2628 * Standard ML
type schemes
2630 * Definition
, section
4.2, 4.5, and 4.8
2633 * Instantiation copies a
type (except free
type variables
).
2637 signature TYPESCHEME
=
2642 type Type
= Type
.Type
2643 type TyVar
= TyVar
.TyVar
2644 type TyVarSet
= TyVarSet
.set
2645 type TyName
= TyName
.TyName
2646 type TyNameSet
= TyNameSet
.set
2647 type Substitution
= Type
.Substitution
2648 type Realisation
= Type
.Realisation
2649 type 'a TyNameMap
= 'a TyNameMap
.map
2652 (* Type
[Section
4.2] *)
2654 type TypeScheme
= TyVar list
* Type (* [sigma
] *)
2659 val instance
: TypeScheme
-> Type
2660 val instance
': TypeScheme
-> TyVar list
* Type
2661 val Clos
: Type
-> TypeScheme
2662 val ClosRestricted
: TyVarSet
-> Type
-> TypeScheme
2663 val isClosed
: TypeScheme
-> bool
2665 val tyvars
: TypeScheme
-> TyVarSet
2666 val tynames
: TypeScheme
-> TyNameSet
2667 val normalise
: TypeScheme
-> TypeScheme
2669 val generalises
: TypeScheme
* TypeScheme
-> bool
2670 val equals
: TypeScheme
* TypeScheme
-> bool
2672 val substitute
: Substitution
-> TypeScheme
-> TypeScheme
2673 val realise
: Realisation
-> TypeScheme
-> TypeScheme
2676 (* stop
of TYPESCHEME
.sml
*)
2677 (* start
of TypeScheme
.sml
*)
2679 * Standard ML
type schemes
2681 * Definition
, section
4.2, 4.5, and 4.8
2684 * Instantiation copies a
type (except free
type variables
).
2688 structure TypeScheme
:> TYPESCHEME
=
2693 type Type
= Type
.Type
2694 type TyVar
= TyVar
.TyVar
2695 type TyVarSet
= TyVarSet
.set
2696 type TyName
= TyName
.TyName
2697 type TyNameSet
= TyNameSet
.set
2698 type Substitution
= Type
.Substitution
2699 type Realisation
= Type
.Realisation
2700 type 'a TyNameMap
= 'a TyNameMap
.map
2703 (* Type
[Section
4.2] *)
2705 type TypeScheme
= TyVar list
* Type (* [sigma
] *)
2708 (* Some
helper (this should be
in the library
...) *)
2710 fun List_foldri f y0 xs
=
2712 fun fold(n
, []) = y0
2713 |
fold(n
, x
::xs
) = f(n
, x
, fold(n
+1,xs
))
2720 (* Type variable
and type name extraction
[Section
4.2] *)
2722 fun tyvars (alphas
,tau
) =
2724 val U
= Type
.tyvars tau
2727 (fn(alpha
,U
) => TyVarSet
.delete(U
,alpha
)
2728 handle LibBase
.NotFound
=> U
)
2732 fun tynames (alphas
,tau
) = Type
.tynames tau
2738 fun instance
' (alphas
,tau
) =
2740 val alphas
' = List.map TyVar
.instance alphas
2741 val mu
= ListPair.foldl
2742 (fn(alpha
, alpha
', mu
) =>
2743 TyVarMap
.insert(mu
, alpha
, Type
.fromTyVar alpha
'))
2744 TyVarMap
.empty (alphas
, alphas
')
2746 ( alphas
', Type
.substitute mu tau
)
2749 fun instance sigma
= #
2(instance
' sigma
)
2753 (* Generalisation
[Section
4.5] *)
2755 fun generalisesType(sigma
, tau
) =
2757 val U
= Type
.tyvars tau
2759 ( Type
.unifyRestricted
U (instance sigma
, tau
) ; true )
2760 handle Type
.Unify
=> false
2763 fun generalises(sigma1
, sigma2
) =
2764 generalisesType(sigma1
, instance sigma2
)
2768 (* Closure
[Section
4.8] *)
2771 (* Does not copy
! *)
2772 ( TyVarSet
.listItems(Type
.tyvars tau
), tau
)
2774 fun ClosRestricted U tau
=
2775 ( TyVarSet
.listItems(TyVarSet
.difference(Type
.tyvars tau
, U
)), tau
)
2777 fun isClosed (alphas
,tau
) =
2778 TyVarSet
.isSubset(Type
.tyvars tau
, TyVarSet
.fromList alphas
)
2781 (* Comparison
[Section
4.5] *)
2783 fun equals((alphas1
,tau1
), (alphas2
,tau2
)) =
2784 List.length alphas1
= List.length alphas2
andalso
2786 fun insert(alpha1
, alpha2
, mu
) =
2787 TyVarMap
.insert(mu
, alpha1
, Type
.fromTyVar alpha2
)
2789 val (alphas2
',tau2
') = instance
' (alphas2
,tau2
)
2790 val mu
= ListPair.foldl insert TyVarMap
.empty (alphas1
,alphas2
')
2791 val tau1
' = Type
.substitute mu tau1
2792 val U
= TyVarSet
.fromList alphas2
'
2794 ( Type
.unifyRestricted
U (tau1
',tau2
') ; true )
2795 handle Type
.Unify
=> false
2799 (* Normalisation (for output
) *)
2801 fun normalise (alphas
,tau
) =
2803 fun insert(n
, alpha
, (alphas
',mu
)) =
2805 val alpha
' = TyVar
.normalise(alpha
, n
)
2806 val tau
= Type
.fromTyVar alpha
'
2808 ( alpha
'::alphas
', TyVarMap
.insert(mu
, alpha
,tau
) )
2811 val (alphas
',mu
) = List_foldri
insert (nil
,TyVarMap
.empty
) alphas
2813 ( alphas
', Type
.substitute mu tau
)
2819 fun substitute
mu (alphas
,tau
) =
2821 val mu
' = List.foldl (fn(alpha
,mu
) =>
2822 #
1(TyVarMap
.remove(mu
,alpha
))
2823 handle LibBase
.NotFound
=> mu
) mu alphas
2825 ( alphas
, Type
.substitute mu
' tau
)
2829 (* Realisation
[Section
5.2] *)
2831 fun realise
phi (alphas
,tau
) = (alphas
, Type
.realise phi tau
)
2834 (* stop
of TypeScheme
.sml
*)
2835 (* start
of TYPEFCN
.sml
*)
2837 * Standard ML
type functions
2839 * Definition
, section
4.2, 4.4, and 4.8
2842 * Application copies the
type (except free
type variables
).
2850 type Type
= Type
.Type
2851 type TyVar
= TyVar
.TyVar
2852 type TyVarSet
= TyVarSet
.set
2853 type TyName
= TyName
.TyName
2854 type TyNameSet
= TyNameSet
.set
2855 type Realisation
= Type
.TypeFcn TyNameMap
.map
2858 (* Type
[Section
4.2] *)
2860 type TypeFcn
= Type
.TypeFcn (* [theta
] *)
2865 val fromTyName
: TyName
-> TypeFcn
2866 val toTyName
: TypeFcn
-> TyName option
2867 val isClosed
: TypeFcn
-> bool
2869 val arity
: TypeFcn
-> int
2870 val admitsEquality
: TypeFcn
-> bool
2872 val tyvars
: TypeFcn
-> TyVarSet
2873 val tynames
: TypeFcn
-> TyNameSet
2874 val normalise
: TypeFcn
-> TypeFcn
2875 val rename
: TypeFcn
-> TypeFcn
2877 val equals
: TypeFcn
* TypeFcn
-> bool
2880 val apply
: Type list
* TypeFcn
-> Type (* may
raise Apply
*)
2882 val realise
: Realisation
-> TypeFcn
-> TypeFcn
2884 val makeEquality
: TypeFcn
-> unit
2887 (* stop
of TYPEFCN
.sml
*)
2888 (* start
of TypeFcn
.sml
*)
2890 * Standard ML
type functions
2892 * Definition
, section
4.2, 4.4, and 4.8
2895 * Application copies the
type (except free
type variables
).
2898 structure TypeFcn
:> TYPEFCN
=
2903 type Type
= Type
.Type
2904 type TyVar
= TyVar
.TyVar
2905 type TyVarSet
= TyVarSet
.set
2906 type TyName
= TyName
.TyName
2907 type TyNameSet
= TyNameSet
.set
2908 type Realisation
= Type
.TypeFcn TyNameMap
.map
2911 (* Type
[Section
4.2] *)
2913 type TypeFcn
= Type
.TypeFcn (* [theta
] *)
2918 val tyvars
= TypeScheme
.tyvars (* same
type ;-) *)
2919 val tynames
= TypeScheme
.tynames
2920 val equals
= TypeScheme
.equals
2921 val isClosed
= TypeScheme
.isClosed
2922 val realise
= TypeScheme
.realise
2923 val rename
= TypeScheme
.instance
'
2924 val normalise
= TypeScheme
.normalise
2927 (* Arity
[Section
4.4] *)
2929 fun arity (alphas
,tau
) = List.length alphas
2932 (* Equality
[Section
4.4] *)
2934 fun admitsEquality (alphas
,tau
) =
2936 fun insert(alpha
, mu
) =
2937 TyVarMap
.insert(mu
, alpha
, Type
.fromTyVar(TyVar
.invent
true))
2939 val mu
= List.foldl insert TyVarMap
.empty alphas
2941 Type
.admitsEquality(Type
.substitute mu tau
)
2945 (* Eta
-conversion
[Section
4.4] *)
2949 val alphas
= List.tabulate(TyName
.arity t
, TyVar
.fromIndex
false)
2951 ( alphas
, Type
.fromConsType(List.map Type
.fromTyVar alphas
, t
) )
2954 fun toTyName(alphas
, ref(Type
.ConsType(taus
,t
))) = t
2955 | toTyName _
= raise Fail
"TypeFcn.toTyName: invalid type function"
2957 fun toTyName(alphas
, ref(Type
.ConsType(taus
,t
))) =
2959 fun isSame(alpha
, ref(Type
.TyVar alpha
')) = alpha
= alpha
'
2960 |
isSame(alpha
, _
) = false
2962 if List.length alphas
= List.length taus
2963 andalso ListPair.all
isSame (alphas
, taus
) then
2972 (* Application
[Section
4.4] *)
2976 fun apply(taus
, (alphas
,tau
)) =
2977 if List.length taus
<> List.length alphas
then raise Apply
else
2979 fun insert(alpha
, tau
, mu
) = TyVarMap
.insert(mu
, alpha
, tau
)
2980 val mu
= ListPair.foldl insert TyVarMap
.empty (alphas
, taus
)
2982 Type
.substitute mu tau
2986 (* Make it an equality
type *)
2988 fun makeEquality (alphas
,tau
) = Type
.makeEquality tau
2991 (* stop
of TypeFcn
.sml
*)
2992 (* start
of IDSTATUS
.sml
*)
2994 * Standard ML identifier status
2996 * Definition
, sections
4.1 and 5.5
3000 signature IDSTATUS
=
3003 (* Type
[Section
4.1] *)
3005 datatype IdStatus
= c | e |
v (* [is
] *)
3010 val generalises
: IdStatus
* IdStatus
-> bool
3013 (* stop
of IDSTATUS
.sml
*)
3014 (* start
of IdStatus
.sml
*)
3016 * Standard ML identifier status
3018 * Definition
, sections
4.1 and 5.5
3022 structure IdStatus
:> IDSTATUS
=
3025 (* Type
[Section
4.1] *)
3027 datatype IdStatus
= c | e |
v (* [is
] *)
3030 (* Generalisation
[Section
5.5] *)
3032 fun generalises(is1
,is2
) = is1
= is2
orelse is2
= v
3035 (* stop
of IdStatus
.sml
*)
3036 (* start
of GENERIC_ENV
.sml
*)
3038 * Standard ML generic core environment
3040 * Definition
, sections
4.2, 4.3, 6.3 and 7.2
3043 * - A
datatype Str is necessary to break the recursion
3044 * between Env
and StrEnv
.
3045 * - Also
, all types are parameterised over the range
of value
and type
3046 * environments
. This is because
of the recursion between values
and
3047 * the dynamic
environment (via function closures
) -- we cannot make them
3048 * into
functor parameters
as this would require recursive structures
.
3051 signature GENERIC_ENV
=
3057 type TyCon
= TyCon
.Id
3058 type StrId
= StrId
.Id
3059 type longVId
= LongVId
.longId
3060 type longTyCon
= LongTyCon
.longId
3061 type longStrId
= LongStrId
.longId
3062 type IdStatus
= IdStatus
.IdStatus
3064 type 'a VIdMap
= 'a VIdMap
.map
3065 type 'a TyConMap
= 'a TyConMap
.map
3066 type 'a StrIdMap
= 'a StrIdMap
.map
3069 (* Export types
[Section
4.2 and 6.3] *)
3071 datatype ('a
,'b
) Str
' = Str
of (*Env
*)
3072 ('a
,'b
) Str
' StrIdMap
* 'b TyConMap
* 'a VIdMap
3074 type 'a ValEnv
' = 'a VIdMap
3075 type 'b TyEnv
' = 'b TyConMap
3076 type ('a
,'b
) StrEnv
' = ('a
,'b
) Str
' StrIdMap
3078 type ('a
,'b
) Env
' = ('a
,'b
) StrEnv
' * 'b TyEnv
' * 'a ValEnv
'
3083 val empty
: ('a
,'b
) Env
'
3085 val fromSE
: ('a
,'b
) StrEnv
' -> ('a
,'b
) Env
'
3086 val fromTE
: 'b TyEnv
' -> ('a
,'b
) Env
'
3087 val fromVE
: 'a ValEnv
' -> ('a
,'b
) Env
'
3088 val fromVEandTE
: 'a ValEnv
' * 'b TyEnv
' -> ('a
,'b
) Env
'
3090 val plus
: ('a
,'b
) Env
' * ('a
,'b
) Env
' -> ('a
,'b
) Env
'
3091 val plusVE
: ('a
,'b
) Env
' * 'a ValEnv
' -> ('a
,'b
) Env
'
3092 val plusTE
: ('a
,'b
) Env
' * 'b TyEnv
' -> ('a
,'b
) Env
'
3093 val plusSE
: ('a
,'b
) Env
' * ('a
,'b
) StrEnv
' -> ('a
,'b
) Env
'
3094 val plusVEandTE
: ('a
,'b
) Env
' * ('a ValEnv
' * 'b TyEnv
') -> ('a
,'b
) Env
'
3096 val findVId
: ('a
,'b
) Env
' * VId
-> 'a option
3097 val findTyCon
: ('a
,'b
) Env
' * TyCon
-> 'b option
3098 val findStrId
: ('a
,'b
) Env
' * StrId
-> ('a
,'b
) Str
' option
3099 val findLongVId
: ('a
,'b
) Env
' * longVId
-> 'a option
3100 val findLongTyCon
: ('a
,'b
) Env
' * longTyCon
-> 'b option
3101 val findLongStrId
: ('a
,'b
) Env
' * longStrId
-> ('a
,'b
) Str
' option
3103 val disjoint
: ('a
,'b
) Env
' * ('a
,'b
) Env
' -> bool
3106 (* stop
of GENERIC_ENV
.sml
*)
3107 (* start
of GenericEnvFn
.sml
*)
3109 * Standard ML generic core environment
3111 * Definition
, sections
4.2, 4.3, 6.3 and 7.2
3114 * - A
datatype Str is necessary to break the recursion
3115 * between Env
and StrEnv
.
3116 * - Also
, all types are parameterised over the range
of value
and type
3117 * environments
. This is because
of the recursion between values
and
3118 * the dynamic
environment (via function closures
) -- we cannot make them
3119 * into
functor parameters
as this would require recursive structures
.
3122 functor GenericEnvFn() :> GENERIC_ENV
=
3128 type TyCon
= TyCon
.Id
3129 type StrId
= StrId
.Id
3130 type longVId
= LongVId
.longId
3131 type longTyCon
= LongTyCon
.longId
3132 type longStrId
= LongStrId
.longId
3133 type IdStatus
= IdStatus
.IdStatus
3135 type 'a VIdMap
= 'a VIdMap
.map
3136 type 'a TyConMap
= 'a TyConMap
.map
3137 type 'a StrIdMap
= 'a StrIdMap
.map
3140 (* Export types
[Section
4.2 and 6.3] *)
3142 datatype ('a
,'b
) Str
' = Str
of (*Env
*)
3143 ('a
,'b
) Str
' StrIdMap
* 'b TyConMap
* 'a VIdMap
3145 type 'a ValEnv
' = 'a
VIdMap (* [VE
] *)
3146 type 'b TyEnv
' = 'b
TyConMap (* [TE
] *)
3147 type ('a
,'b
) StrEnv
' = ('a
,'b
) Str
' StrIdMap (* [SE
] *)
3149 type ('a
,'b
) Env
' = ('a
,'b
) StrEnv
' * 'b TyEnv
' * 'a ValEnv
' (* [E
] *)
3152 (* Injections
[Section
4.3] *)
3154 val empty
= ( StrIdMap
.empty
, TyConMap
.empty
, VIdMap
.empty
)
3156 fun fromSE SE
= ( SE
, TyConMap
.empty
, VIdMap
.empty
)
3157 fun fromTE TE
= ( StrIdMap
.empty
, TE
, VIdMap
.empty
)
3158 fun fromVE VE
= ( StrIdMap
.empty
, TyConMap
.empty
, VE
)
3159 fun fromVEandTE(VE
,TE
) = ( StrIdMap
.empty
, TE
, VE
)
3162 (* Modifications
[Section
4.3] *)
3164 infix plus plusVE plusTE plusSE plusVEandTE
3166 fun (SE
,TE
,VE
) plus (SE
',TE
',VE
') =
3167 ( StrIdMap
.unionWith #
2 (SE
,SE
')
3168 , TyConMap
.unionWith #
2 (TE
,TE
')
3169 , VIdMap
.unionWith #
2 (VE
,VE
')
3172 fun (SE
,TE
,VE
) plusVE VE
' = ( SE
, TE
, VIdMap
.unionWith #
2 (VE
,VE
') )
3173 fun (SE
,TE
,VE
) plusTE TE
' = ( SE
, TyConMap
.unionWith #
2 (TE
,TE
'), VE
)
3174 fun (SE
,TE
,VE
) plusSE SE
' = ( StrIdMap
.unionWith #
2 (SE
,SE
'), TE
, VE
)
3175 fun (SE
,TE
,VE
) plusVEandTE (VE
',TE
') =
3177 , TyConMap
.unionWith #
2 (TE
,TE
')
3178 , VIdMap
.unionWith #
2 (VE
,VE
')
3182 (* Application (lookup
) [Section
4.3] *)
3184 fun findVId ((SE
,TE
,VE
), vid
) = VIdMap
.find(VE
, vid
)
3185 fun findTyCon((SE
,TE
,VE
), tycon
) = TyConMap
.find(TE
, tycon
)
3186 fun findStrId((SE
,TE
,VE
), strid
) = StrIdMap
.find(SE
, strid
)
3188 fun findLongX
'(E
, findX
, [], x
) = findX(E
, x
)
3189 | findLongX
'(E
, findX
, strid
::strids
, x
) =
3190 Option
.mapPartial (fn E
=> findLongX
'(E
, findX
, strids
, x
))
3191 (Option
.map (fn Str E
=> E
) (findStrId(E
, strid
)))
3193 fun findLongX (explodeLongX
, findX
) (E
, longX
) =
3195 val (strids
,x
) = explodeLongX longX
3197 findLongX
'(E
, findX
, strids
, x
)
3200 fun findLongVId x
= findLongX (LongVId
.explode
, findVId
) x
3201 fun findLongTyCon x
= findLongX (LongTyCon
.explode
, findTyCon
) x
3202 fun findLongStrId x
= findLongX (LongStrId
.explode
, findStrId
) x
3207 fun disjoint((SE1
,TE1
,VE1
), (SE2
,TE2
,VE2
)) =
3208 StrIdMap
.disjoint(SE1
,SE2
) andalso
3209 TyConMap
.disjoint(TE1
,TE2
) andalso
3210 VIdMap
.disjoint(VE1
,VE2
)
3213 (* stop
of GenericEnvFn
.sml
*)
3214 (* start
of STATIC_ENV
.sml
*)
3216 * Standard ML environments
of the static semantics
of the core
3218 * Definition
, sections
4.2, 4.3, 4.8, 4.9, and 5.5
3221 * We call the domain
type of value environments ValStr
.
3224 signature STATIC_ENV
=
3234 type TypeScheme
= TypeScheme
.TypeScheme
3235 type TypeFcn
= TypeFcn
.TypeFcn
3236 type TyVar
= TyVar
.TyVar
3237 type TyVarSet
= TyVarSet
.set
3238 type TyName
= TyName
.TyName
3239 type TyNameSet
= TyNameSet
.set
3240 type Realisation
= Type
.Realisation
3243 (* Export types
[Section
4.2] *)
3245 type ValStr
= TypeScheme
* IdStatus
3246 type ValEnv
= ValStr
VIdMap (* [VE
] *)
3248 type TyStr
= TypeFcn
* ValEnv
3249 type TyEnv
= TyStr
TyConMap (* [TE
] *)
3251 type Str
= (ValStr
, TyStr
) Str
'
3252 type StrEnv
= Str
StrIdMap (* [SE
] *)
3254 type Env
= StrEnv
* TyEnv
* ValEnv (* [E
] *)
3259 val tyvarsVE
: ValEnv
-> TyVarSet
3260 val tyvars
: Env
-> TyVarSet
3261 val tynamesTE
: TyEnv
-> TyNameSet
3262 val tynamesSE
: StrEnv
-> TyNameSet
3263 val tynames
: Env
-> TyNameSet
3265 val isWellFormed
: Env
-> bool
3267 val Clos
: ValEnv
-> ValEnv
3268 val containsFlexibleType
: ValEnv
-> bool
3269 val defaultOverloaded
: ValEnv
-> unit
3270 val makeEquality
: TyEnv
-> unit
3271 val maximiseEquality
: TyEnv
* ValEnv
-> TyEnv
* ValEnv
3272 val Abs
: TyEnv
* Env
-> Env
3273 val realise
: Realisation
-> Env
-> Env
3275 val enriches
: Env
* Env
-> bool
3278 (* stop
of STATIC_ENV
.sml
*)
3279 (* start
of StaticEnv
.sml
*)
3281 * Standard ML environments
of the static semantics
of the core
3283 * Definition
, sections
4.2, 4.3, 4.8, 4.9, and 5.5
3286 * We call the domain
type of value environments ValStr
.
3289 structure StaticEnv
:> STATIC_ENV
=
3294 structure GenericEnv
= GenericEnvFn()
3301 type TypeScheme
= TypeScheme
.TypeScheme
3302 type TypeFcn
= TypeFcn
.TypeFcn
3303 type TyVar
= TyVar
.TyVar
3304 type TyVarSet
= TyVarSet
.set
3305 type TyName
= TyName
.TyName
3306 type TyNameSet
= TyNameSet
.set
3307 type Realisation
= Type
.Realisation
3310 (* Export types
[Section
4.2] *)
3312 type ValStr
= TypeScheme
* IdStatus
3313 type ValEnv
= ValStr
VIdMap (* [VE
] *)
3315 type TyStr
= TypeFcn
* ValEnv
3316 type TyEnv
= TyStr
TyConMap (* [TE
] *)
3318 type Str
= (ValStr
, TyStr
) Str
'
3319 type StrEnv
= Str
StrIdMap (* [SE
] *)
3321 type Env
= StrEnv
* TyEnv
* ValEnv (* [E
] *)
3324 (* Further modifications
[Section
4.3] *)
3328 fun TE
' TEplus (SE
,TE
,VE
) = ( SE
, TyConMap
.unionWith #
2 (TE
',TE
), VE
)
3331 (* Type variable
and type name set
[Section
4.2] *)
3335 (fn((sigma
,is
), U
) => TyVarSet
.union(U
, TypeScheme
.tyvars sigma
))
3340 (fn((theta
,VE
), U
) => TyVarSet
.union(TyVarSet
.union
3341 (U
, TypeFcn
.tyvars theta
), tyvarsVE VE
))
3346 (fn(Str E
, U
) => TyVarSet
.union(U
, tyvars E
))
3349 and tyvars (SE
,TE
,VE
) =
3350 TyVarSet
.union(TyVarSet
.union(tyvarsSE SE
, tyvarsTE TE
), tyvarsVE VE
)
3355 (fn((sigma
,is
), T
) => TyNameSet
.union(T
, TypeScheme
.tynames sigma
))
3360 (fn((theta
,VE
), T
) => TyNameSet
.union(TyNameSet
.union
3361 (T
, TypeFcn
.tynames theta
), tynamesVE VE
))
3366 (fn(Str E
, T
) => TyNameSet
.union(T
, tynames E
))
3369 and tynames (SE
,TE
,VE
) =
3370 TyNameSet
.union(TyNameSet
.union(tynamesSE SE
, tynamesTE TE
),
3374 (* Well
-formedness
[Section
4.9] *)
3376 fun isWellFormedTyStr (theta
,VE
) =
3377 VIdMap
.isEmpty VE
orelse isSome(TypeFcn
.toTyName theta
)
3379 fun isWellFormedTE TE
=
3380 TyConMap
.all isWellFormedTyStr TE
3382 fun isWellFormedSE SE
=
3383 StrIdMap
.all (fn Str E
=> isWellFormed E
) SE
3385 and isWellFormed (SE
,TE
,VE
) =
3386 isWellFormedTE TE
andalso isWellFormedSE SE
3390 (* Closure
[Section
4.8] *)
3393 VIdMap
.map (fn((_
,tau
), is
) => (TypeScheme
.Clos tau
, is
)) VE
3396 (* Check for unresolved flexible record types
[Section
4.11, item
1] *)
3398 fun containsFlexibleType VE
=
3399 VIdMap
.exists (fn((_
,tau
), is
) => Type
.isFlexible tau
) VE
3402 (* Assign default types to overloaded types
[Appendix E
] *)
3404 fun defaultOverloaded VE
=
3405 VIdMap
.app (fn((_
,tau
), is
) => Type
.defaultOverloaded tau
) VE
3408 (* Realisation
[Section
5.2] *)
3410 fun realiseVE phi VE
=
3411 VIdMap
.map (fn(sigma
,is
) => ( TypeScheme
.realise phi sigma
, is
)) VE
3413 and realiseTE phi TE
=
3414 TyConMap
.map (fn(theta
,VE
) => ( TypeFcn
.realise phi theta
3417 and realiseSE phi SE
=
3418 StrIdMap
.map (fn(Str E
) => Str(realise phi E
)) SE
3420 and realise
phi (SE
,TE
,VE
) =
3427 (* Make all
type names bound
in a
type environment equality types
*)
3429 (* Assumes abstract types
, i
.e
. no constructors
. *)
3431 fun makeEquality TE
=
3432 TyConMap
.app (fn(theta
,VE
) => TypeFcn
.makeEquality theta
) TE
3436 (* Maximise equality
of a
type environment
[Section
4.9],
3437 * together
with its appendant value envrionment
3440 fun admitsEqualityValStr ((_
,tau
),_
) = Type
.admitsEquality tau
3442 fun maximiseEquality(TE
,VE
) =
3444 fun checkTyStr((theta
,VE
), (phi
,changed
)) =
3446 val t
= valOf(TypeFcn
.toTyName theta
)
3448 if TyName
.equality t
= TyName
.EQ
3449 andalso not(VIdMap
.all admitsEqualityValStr VE
) then
3450 ( TyNameMap
.insert(phi
,
3453 (TyName
.removeEquality t
)
3461 fun checkTE(TE
, phi
) =
3463 val (phi
',change
) = TyConMap
.foldl
checkTyStr (phi
,false) TE
3464 val TE
' = realiseTE phi
' TE
3466 if change
then checkTE(TE
', phi
')
3470 val (TE
',phi
) = checkTE(TE
, TyNameMap
.empty
)
3472 ( TE
', realiseVE phi VE
)
3477 (* Abstraction
of a
type environment
[Section
4.9] *)
3479 fun AbsTE(TE
) = TyConMap
.map (fn(theta
,_
) => (theta
,VIdMap
.empty
)) TE
3483 val ts
= tynamesTE TE
3484 val phi
= TyNameSet
.foldl
3485 (fn(t
,phi
) => TyNameMap
.insert(phi
, t
,
3486 TypeFcn
.fromTyName(TyName
.Abs t
)))
3489 realise
phi (AbsTE(TE
) TEplus E
)
3495 fun disjoint((SE1
,TE1
,VE1
), (SE2
,TE2
,VE2
)) =
3496 StrIdMap
.disjoint(SE1
,SE2
) andalso
3497 TyConMap
.disjoint(TE1
,TE2
) andalso
3498 VIdMap
.disjoint(VE1
,VE2
)
3501 (* Enrichment
[Section
5.5] *)
3503 fun equalsVE(VE1
,VE2
) =
3504 VIdMap
.numItems VE1
= VIdMap
.numItems VE2
andalso
3506 (fn(vid
, (sigma1
,is1
)) =>
3507 case VIdMap
.find(VE2
, vid
)
3509 |
SOME(sigma2
,is2
) =>
3510 TypeScheme
.equals(sigma1
,sigma2
) andalso is1
= is2
3515 fun enriches((SE1
,TE1
,VE1
), (SE2
,TE2
,VE2
)) =
3516 enrichesSE(SE1
,SE2
) andalso
3517 enrichesTE(TE1
,TE2
) andalso
3520 and enrichesSE(SE1
,SE2
) =
3522 (fn(strid
, Str E2
) =>
3523 case StrIdMap
.find(SE1
, strid
)
3525 |
SOME(Str E1
) => enriches(E1
,E2
)
3529 and enrichesTE(TE1
,TE2
) =
3531 (fn(tycon
, tystr2
) =>
3532 case TyConMap
.find(TE1
, tycon
)
3534 | SOME tystr1
=> enrichesTyStr(tystr1
,tystr2
)
3538 and enrichesVE(VE1
,VE2
) =
3540 (fn(vid
, valstr2
) =>
3541 case VIdMap
.find(VE1
, vid
)
3543 | SOME valstr1
=> enrichesValStr(valstr1
,valstr2
)
3547 and enrichesTyStr((theta1
,VE1
), (theta2
,VE2
)) =
3548 TypeFcn
.equals(theta1
,theta2
) andalso
3549 ( VIdMap
.isEmpty VE2
orelse equalsVE(VE1
,VE2
) )
3551 and enrichesValStr((sigma1
,is1
), (sigma2
,is2
)) =
3552 TypeScheme
.generalises(sigma1
,sigma2
) andalso
3553 IdStatus
.generalises(is1
,is2
)
3556 (* stop
of StaticEnv
.sml
*)
3557 (* start
of SIG
.sml
*)
3559 * Standard ML signatures
3561 * Definition
, sections
5.1, 5.3, and 5.6
3570 type Env
= StaticEnv
.Env
3571 type TyVarSet
= TyVarSet
.set
3572 type TyNameSet
= TyNameSet
.set
3573 type Realisation
= Type
.Realisation
3576 (* Type
[Section
5.1] *)
3578 type Sig
= TyNameSet
* Env (* [Sigma
] *)
3583 val tyvars
: Sig
-> TyVarSet
3584 val tynames
: Sig
-> TyNameSet
3586 val rename
: Sig
-> Sig
3589 val match
: Env
* Sig
-> Env
* Realisation (* Matching
*)
3592 (* stop
of SIG
.sml
*)
3593 (* start
of Sig
.sml
*)
3595 * Standard ML signatures
3597 * Definition
, sections
5.1, 5.3, and 5.6
3601 structure Sig
:> SIG
=
3606 type Env
= StaticEnv
.Env
3607 type TyVarSet
= TyVarSet
.set
3608 type TyNameSet
= TyNameSet
.set
3609 type Realisation
= Type
.Realisation
3612 (* Type
[Section
5.1] *)
3614 type Sig
= TyNameSet
* Env (* [Sigma
] *)
3617 (* Type variable
and type name extraction
[Section
4.2] *)
3619 fun tyvars (T
,E
) = StaticEnv
.tyvars E
3620 fun tynames (T
,E
) = TyNameSet
.difference(StaticEnv
.tynames E
, T
)
3623 (* Alpha Renaming
*)
3627 val phi
' = TyNameSet
.foldl
3628 (fn(t
,phi
')=> TyNameMap
.insert(phi
',t
,TyName
.rename t
))
3630 val phi
= TyNameMap
.map TypeFcn
.fromTyName phi
'
3631 val T
' = TyNameSet
.map (fn t
=> valOf(TyNameMap
.find(phi
',t
))) T
3632 val E
' = StaticEnv
.realise phi E
3638 (* Matching
[Section
5.6] *)
3642 fun matchTypeFcn(theta
', theta
, phi
, T
) =
3643 if TypeFcn
.arity theta
<> TypeFcn
.arity theta
' then
3646 case TypeFcn
.toTyName theta
3649 if isSome(TyNameMap
.find(phi
, t
))
3650 orelse not(TyNameSet
.member(T
, t
)) then
3654 val phi
' = TyNameMap
.insert(phi
, t
, TypeFcn
.rename theta
')
3656 TyNameMap
.map (TypeFcn
.realise phi
') phi
'
3659 fun matchTE(TE
', TE
, phi
, T
) =
3661 fun matchTyStr(tycon
, (theta
,VE
), phi
) =
3662 case TyConMap
.find(TE
', tycon
)
3663 of NONE
=> raise Match
3664 |
SOME(theta
',VE
') => matchTypeFcn(theta
', theta
, phi
, T
)
3666 TyConMap
.foldli matchTyStr phi TE
3669 fun matchSE(SE
', SE
, phi
, T
) =
3671 fun matchStr(strid
, StaticEnv
.Str E
, phi
) =
3672 case StrIdMap
.find(SE
', strid
)
3673 of NONE
=> raise Match
3674 |
SOME(StaticEnv
.Str E
') => matchE(E
', E
, phi
, T
)
3676 StrIdMap
.foldli matchStr phi SE
3679 and matchE((SE
',TE
',VE
'), (SE
,TE
,VE
), phi
, T
) =
3681 val phi1
= matchTE(TE
', TE
, phi
, T
)
3682 val phi2
= matchSE(SE
', SE
, phi1
, T
)
3687 fun match(E
', (T
,E
)) =
3689 val phi
= matchE(E
', E
, TyNameMap
.empty
, T
)
3690 val E
'' = StaticEnv
.realise phi E
3692 if StaticEnv
.enriches(E
',E
'') then
3699 (* stop
of Sig
.sml
*)
3700 (* start
of FUNSIG
.sml
*)
3702 * Standard ML
functor signatures
3704 * Definition
, sections
5.1 and 5.4
3713 type Env
= StaticEnv
.Env
3715 type TyVarSet
= TyVarSet
.set
3716 type TyNameSet
= TyNameSet
.set
3719 (* Type
[Section
5.1] *)
3721 type FunSig
= TyNameSet
* (Env
* Sig
) (* [Phi
] *)
3726 val tyvars
: FunSig
-> TyVarSet
3727 val tynames
: FunSig
-> TyNameSet
3730 (* stop
of FUNSIG
.sml
*)
3731 (* start
of FunSig
.sml
*)
3733 * Standard ML
functor signatures
3735 * Definition
, sections
5.1 and 5.4
3739 structure FunSig
:> FUNSIG
=
3744 type Env
= StaticEnv
.Env
3746 type TyVarSet
= TyVarSet
.set
3747 type TyNameSet
= TyNameSet
.set
3750 (* Type
[Section
5.1] *)
3752 type FunSig
= TyNameSet
* (Env
* Sig
) (* [Phi
] *)
3755 (* Type variable
and type name extraction
[Section
4.2] *)
3757 fun tyvars (T
,(E
,Sigma
)) =
3758 TyVarSet
.union(StaticEnv
.tyvars E
, Sig
.tyvars Sigma
)
3760 fun tynames (T
,(E
,Sigma
)) =
3761 TyNameSet
.difference(TyNameSet
.union(StaticEnv
.tynames E
,
3762 Sig
.tynames Sigma
), T
)
3765 (* stop
of FunSig
.sml
*)
3766 (* start
of CONTEXT
.sml
*)
3768 * Standard ML contexts
3770 * Definition
, sections
4.2, 4.3, 4.7, and 4.9
3779 type TyCon
= TyCon
.Id
3780 type StrId
= StrId
.Id
3781 type longVId
= LongVId
.longId
3782 type longTyCon
= LongTyCon
.longId
3783 type longStrId
= LongStrId
.longId
3784 type TyName
= TyName
.TyName
3785 type TyNameSet
= TyNameSet
.set
3786 type TyVar
= TyVar
.TyVar
3787 type TyVarSet
= TyVarSet
.set
3788 type IdStatus
= IdStatus
.IdStatus
3789 type TypeScheme
= TypeScheme
.TypeScheme
3790 type StrEnv
= StaticEnv
.StrEnv
3791 type Str
= StaticEnv
.Str
3792 type TyStr
= StaticEnv
.TyStr
3793 type TyEnv
= StaticEnv
.TyEnv
3794 type ValStr
= StaticEnv
.ValStr
3795 type ValEnv
= StaticEnv
.ValEnv
3796 type Env
= StaticEnv
.Env
3799 (* Type
[Section
4.2] *)
3801 type Context
= TyNameSet
* TyVarSet
* Env (* [C
] *)
3806 val Tof
: Context
-> TyNameSet
3807 val Uof
: Context
-> TyVarSet
3808 val Eof
: Context
-> Env
3810 val plusVE
: Context
* ValEnv
-> Context
3811 val plusU
: Context
* TyVarSet
-> Context
3812 val oplusE
: Context
* Env
-> Context
3813 val oplusTE
: Context
* TyEnv
-> Context
3814 val oplusVEandTE
: Context
* (ValEnv
* TyEnv
) -> Context
3816 val findVId
: Context
* VId
-> ValStr option
3817 val findTyCon
: Context
* TyCon
-> TyStr option
3818 val findStrId
: Context
* StrId
-> Str option
3819 val findLongVId
: Context
* longVId
-> ValStr option
3820 val findLongTyCon
: Context
* longTyCon
-> TyStr option
3821 val findLongStrId
: Context
* longStrId
-> Str option
3823 val tyvars
: Context
-> TyVarSet
3826 (* stop
of CONTEXT
.sml
*)
3827 (* start
of Context
.sml
*)
3829 * Standard ML contexts
3831 * Definition
, sections
4.2, 4.3, 4.7, and 4.9
3834 structure Context
:> CONTEXT
=
3840 type TyCon
= TyCon
.Id
3841 type StrId
= StrId
.Id
3842 type longVId
= LongVId
.longId
3843 type longTyCon
= LongTyCon
.longId
3844 type longStrId
= LongStrId
.longId
3845 type TyName
= TyName
.TyName
3846 type TyNameSet
= TyNameSet
.set
3847 type TyVar
= TyVar
.TyVar
3848 type TyVarSet
= TyVarSet
.set
3849 type IdStatus
= IdStatus
.IdStatus
3850 type TypeScheme
= TypeScheme
.TypeScheme
3851 type StrEnv
= StaticEnv
.StrEnv
3852 type Str
= StaticEnv
.Str
3853 type TyStr
= StaticEnv
.TyStr
3854 type TyEnv
= StaticEnv
.TyEnv
3855 type ValStr
= StaticEnv
.ValStr
3856 type ValEnv
= StaticEnv
.ValEnv
3857 type Env
= StaticEnv
.Env
3860 (* Type
[Section
4.2] *)
3862 type Context
= TyNameSet
* TyVarSet
* Env (* [C
] *)
3865 (* Projections
[Section
4.3] *)
3872 (* Modification
[Section
4.3] *)
3874 infix plusVE plusU oplusE oplusTE oplusVEandTE
3876 fun (T
,U
,E
) plusVE VE
= ( T
, U
, StaticEnv
.plusVE(E
,VE
) )
3877 fun (T
,U
,E
) plusU U
' = ( T
, TyVarSet
.union(U
,U
'), E
)
3879 fun (T
,U
,E
) oplusE E
' =
3880 ( TyNameSet
.union(T
, StaticEnv
.tynames E
)
3882 , StaticEnv
.plus(E
,E
')
3885 fun (T
,U
,E
) oplusTE TE
=
3886 ( TyNameSet
.union(T
, StaticEnv
.tynamesTE TE
)
3888 , StaticEnv
.plusTE(E
,TE
)
3891 fun (T
,U
,E
) oplusVEandTE (VE
,TE
) =
3892 ( TyNameSet
.union(T
, StaticEnv
.tynamesTE TE
)
3894 , StaticEnv
.plusVEandTE(E
, (VE
,TE
))
3898 (* Application (lookup
) [Section
4.3] *)
3900 fun findVId ((T
,U
,E
), vid
) = StaticEnv
.findVId(E
, vid
)
3901 fun findTyCon((T
,U
,E
), tycon
) = StaticEnv
.findTyCon(E
, tycon
)
3902 fun findStrId((T
,U
,E
), strid
) = StaticEnv
.findStrId(E
, strid
)
3904 fun findLongVId ((T
,U
,E
), longvid
) = StaticEnv
.findLongVId(E
,longvid
)
3905 fun findLongTyCon((T
,U
,E
), longtycon
) = StaticEnv
.findLongTyCon(E
,longtycon
)
3906 fun findLongStrId((T
,U
,E
), longstrid
) = StaticEnv
.findLongStrId(E
,longstrid
)
3909 (* Calculation
of tyvars
[Section
4.2] *)
3911 fun tyvars (T
,U
,E
) = TyVarSet
.union(U
, StaticEnv
.tyvars E
)
3914 (* stop
of Context
.sml
*)
3915 (* start
of STATIC_BASIS
.sml
*)
3917 * Standard ML static basis
and environments
of modules
3919 * Definition
, section
5.1
3922 signature STATIC_BASIS
=
3927 type StrId
= StrId
.Id
3928 type SigId
= SigId
.Id
3929 type FunId
= FunId
.Id
3930 type longStrId
= LongStrId
.longId
3931 type longTyCon
= LongTyCon
.longId
3932 type Env
= StaticEnv
.Env
3933 type StrEnv
= StaticEnv
.StrEnv
3934 type Str
= StaticEnv
.Str
3935 type TyStr
= StaticEnv
.TyStr
3936 type Context
= Context
.Context
3938 type FunSig
= FunSig
.FunSig
3939 type TyVarSet
= TyVarSet
.set
3940 type TyNameSet
= TyNameSet
.set
3941 type 'a SigIdMap
= 'a SigIdMap
.map
3942 type 'a FunIdMap
= 'a FunIdMap
.map
3945 (* Types
[Section
5.1] *)
3947 type SigEnv
= Sig
SigIdMap (* [G
] *)
3948 type FunEnv
= FunSig
FunIdMap (* [F
] *)
3950 type Basis
= TyNameSet
* FunEnv
* SigEnv
* Env (* [B
] *)
3956 val fromTandE
: TyNameSet
* Env
-> Basis
3957 val fromTandF
: TyNameSet
* FunEnv
-> Basis
3958 val fromTandG
: TyNameSet
* SigEnv
-> Basis
3960 val Tof
: Basis
-> TyNameSet
3961 val Cof
: Basis
-> Context
3963 val plus
: Basis
* Basis
-> Basis
3964 val plusT
: Basis
* TyNameSet
-> Basis
3965 val oplusSE
: Basis
* StrEnv
-> Basis
3966 val oplusG
: Basis
* SigEnv
-> Basis
3967 val oplusF
: Basis
* FunEnv
-> Basis
3968 val oplusE
: Basis
* Env
-> Basis
3970 val findStrId
: Basis
* StrId
-> Str option
3971 val findSigId
: Basis
* SigId
-> Sig option
3972 val findFunId
: Basis
* FunId
-> FunSig option
3973 val findLongStrId
: Basis
* longStrId
-> Str option
3974 val findLongTyCon
: Basis
* longTyCon
-> TyStr option
3976 val tyvars
: Basis
-> TyVarSet
3977 val tynamesF
: FunEnv
-> TyNameSet
3978 val tynamesG
: SigEnv
-> TyNameSet
3981 (* stop
of STATIC_BASIS
.sml
*)
3982 (* start
of StaticBasis
.sml
*)
3984 * Standard ML static basis
and environments
of modules
3986 * Definition
, section
5.1
3989 structure StaticBasis
:> STATIC_BASIS
=
3994 type StrId
= StrId
.Id
3995 type SigId
= SigId
.Id
3996 type FunId
= FunId
.Id
3997 type longStrId
= LongStrId
.longId
3998 type longTyCon
= LongTyCon
.longId
3999 type Env
= StaticEnv
.Env
4000 type StrEnv
= StaticEnv
.StrEnv
4001 type Str
= StaticEnv
.Str
4002 type TyStr
= StaticEnv
.TyStr
4003 type Context
= Context
.Context
4005 type FunSig
= FunSig
.FunSig
4006 type TyVarSet
= TyVarSet
.set
4007 type TyNameSet
= TyNameSet
.set
4008 type 'a SigIdMap
= 'a SigIdMap
.map
4009 type 'a FunIdMap
= 'a FunIdMap
.map
4012 (* Types
[Section
5.1] *)
4014 type SigEnv
= Sig
SigIdMap (* [G
] *)
4015 type FunEnv
= FunSig
FunIdMap (* [F
] *)
4017 type Basis
= TyNameSet
* FunEnv
* SigEnv
* Env (* [B
] *)
4021 (* Calculation
of type variable
and type name sets
[Section
4.2] *)
4025 (fn(Sigma
, U
) => TyVarSet
.union(U
, Sig
.tyvars Sigma
))
4030 (fn(Phi
, U
) => TyVarSet
.union(U
, FunSig
.tyvars Phi
))
4033 fun tyvars (T
,F
,G
,E
) = TyVarSet
.union(TyVarSet
.union(
4034 tyvarsF F
, tyvarsG G
), StaticEnv
.tyvars E
)
4040 (fn(Sigma
, T
) => TyNameSet
.union(T
, Sig
.tynames Sigma
))
4045 (fn(Phi
, T
) => TyNameSet
.union(T
, FunSig
.tynames Phi
))
4050 (* Injection
[Sections
4.3 and 5.1] *)
4053 ( TyNameSet
.empty
, FunIdMap
.empty
, SigIdMap
.empty
, StaticEnv
.empty
)
4055 fun fromTandE(T
,E
) = ( T
, FunIdMap
.empty
, SigIdMap
.empty
, E
)
4056 fun fromTandF(T
,F
) = ( T
, F
, SigIdMap
.empty
, StaticEnv
.empty
)
4057 fun fromTandG(T
,G
) = ( T
, FunIdMap
.empty
, G
, StaticEnv
.empty
)
4060 (* Projections
[Sections
4.3 and 5.1] *)
4062 fun Tof (T
,F
,G
,E
) = T
4063 fun Cof (T
,F
,G
,E
) = (T
, TyVarSet
.empty
, E
)
4066 (* Modifications
[Sections
4.3 and 5.1] *)
4068 infix plus plusT oplusG oplusF oplusE oplusSE
4070 fun (T
,F
,G
,E
) plus (T
',F
',G
',E
') =
4071 ( TyNameSet
.union(T
,T
')
4072 , FunIdMap
.unionWith #
2 (F
,F
')
4073 , SigIdMap
.unionWith #
2 (G
,G
')
4074 , StaticEnv
.plus(E
,E
')
4077 fun (T
,F
,G
,E
) plusT T
' = ( TyNameSet
.union(T
,T
'), F
, G
, E
)
4079 fun (T
,F
,G
,E
) oplusG G
' =
4080 ( TyNameSet
.union(T
, tynamesG G
')
4082 , SigIdMap
.unionWith #
2 (G
,G
')
4086 fun (T
,F
,G
,E
) oplusF F
' =
4087 ( TyNameSet
.union(T
, tynamesF F
')
4088 , FunIdMap
.unionWith #
2 (F
,F
')
4093 fun (T
,F
,G
,E
) oplusE E
' =
4094 ( TyNameSet
.union(T
, StaticEnv
.tynames E
')
4097 , StaticEnv
.plus(E
,E
')
4100 fun (T
,F
,G
,E
) oplusSE SE
=
4101 ( TyNameSet
.union(T
, StaticEnv
.tynamesSE SE
)
4104 , StaticEnv
.plusSE(E
,SE
)
4107 (* Application (lookup
) [Sections
5.1 and 4.3] *)
4109 fun findStrId((T
,F
,G
,E
), strid
) = StaticEnv
.findStrId(E
, strid
)
4110 fun findSigId((T
,F
,G
,E
), sigid
) = SigIdMap
.find(G
, sigid
)
4111 fun findFunId((T
,F
,G
,E
), funid
) = FunIdMap
.find(F
, funid
)
4112 fun findLongStrId((T
,F
,G
,E
), longstrid
) =
4113 StaticEnv
.findLongStrId(E
, longstrid
)
4114 fun findLongTyCon((T
,F
,G
,E
), longtycon
) =
4115 StaticEnv
.findLongTyCon(E
, longtycon
)
4118 (* stop
of StaticBasis
.sml
*)
4119 (* start
of INITIAL_STATIC_ENV
.sml
*)
4121 * Standard ML core view
of the initial static basis
4123 * Definition
, appendices C
and E
4126 signature INITIAL_STATIC_ENV
=
4131 type Type
= Type
.Type
4132 type TyNameSet
= TyNameSet
.set
4133 type OverloadingClass
= OverloadingClass
.OverloadingClass
4134 type Env
= StaticEnv
.Env
4137 (* Predefined monomorphic types
[Figure
24] *)
4147 (* Overloading classes
[Appendix E
.1] *)
4149 val Int: OverloadingClass
4150 val Real: OverloadingClass
4151 val Word: OverloadingClass
4152 val String: OverloadingClass
4153 val Char: OverloadingClass
4154 val WordInt
: OverloadingClass
4155 val RealInt
: OverloadingClass
4156 val Num
: OverloadingClass
4157 val NumTxt
: OverloadingClass
4159 (* Initial environment
[Appendix C
] *)
4165 (* stop
of INITIAL_STATIC_ENV
.sml
*)
4166 (* start
of InitialStaticEnv
.sml
*)
4168 * Standard ML core view
of the initial static basis
4170 * Definition
, appendices C
and E
4173 structure InitialStaticEnv
:> INITIAL_STATIC_ENV
=
4178 type Type
= Type
.Type
4179 type TyNameSet
= TyNameSet
.set
4180 type Overloadingclass
= OverloadingClass
.OverloadingClass
4181 type VIdSet
= VIdSet
.set
4182 type Env
= StaticEnv
.Env
4183 type ValEnv
= StaticEnv
.ValEnv
4192 fun pairType(tau1
,tau2
) =
4194 val Rho
= LabMap
.insert(LabMap
.insert(LabMap
.empty
,
4195 Lab
.fromInt
1, tau1
),
4196 Lab
.fromInt
2, tau2
)
4198 fromRowType (Rho
,CLOSEDRow
)
4202 (* VIds
[Figure
25] *)
4204 val vidEq
= VId
.fromString
"="
4205 val vidAssign
= VId
.fromString
":="
4207 val vidFalse
= VId
.fromString
"false"
4208 val vidTrue
= VId
.fromString
"true"
4209 val vidNil
= VId
.fromString
"nil"
4210 val vidCons
= VId
.fromString
"::"
4211 val vidRef
= VId
.fromString
"ref"
4213 val vidMatch
= VId
.fromString
"Match"
4214 val vidBind
= VId
.fromString
"Bind"
4217 (* TyCons
[Figure
24] *)
4219 val tyconUnit
= TyCon
.fromString
"unit"
4220 val tyconBool
= TyCon
.fromString
"bool"
4221 val tyconInt
= TyCon
.fromString
"int"
4222 val tyconWord
= TyCon
.fromString
"word"
4223 val tyconReal
= TyCon
.fromString
"real"
4224 val tyconString
= TyCon
.fromString
"string"
4225 val tyconChar
= TyCon
.fromString
"char"
4226 val tyconList
= TyCon
.fromString
"list"
4227 val tyconRef
= TyCon
.fromString
"ref"
4228 val tyconExn
= TyCon
.fromString
"exn"
4231 (* TyNames
[Appendix C
] *)
4233 val tBool
= TyName
.tyname(tyconBool
, 0, TyName
.EQ
, 2)
4234 val tInt
= TyName
.tyname(tyconInt
, 0, TyName
.EQ
, 0)
4235 val tWord
= TyName
.tyname(tyconWord
, 0, TyName
.EQ
, 0)
4236 val tReal
= TyName
.tyname(tyconReal
, 0, TyName
.NOEQ
, 0)
4237 val tString
= TyName
.tyname(tyconString
, 0, TyName
.EQ
, 0)
4238 val tChar
= TyName
.tyname(tyconChar
, 0, TyName
.EQ
, 0)
4239 val tList
= TyName
.tyname(tyconList
, 1, TyName
.EQ
, 2)
4240 val tRef
= TyName
.tyname(tyconRef
, 1, TyName
.SPECIALEQ
, 1)
4241 val tExn
= TyName
.tyname(tyconExn
, 0, TyName
.NOEQ
, 0)
4243 val T0
= TyNameSet
.fromList
[tBool
, tInt
, tWord
, tReal
, tString
, tChar
,
4249 val alpha
= TyVar
.fromString
"'a"
4250 val alphaEq
= TyVar
.fromString
"''a"
4251 val tauAlpha
= fromTyVar alpha
4252 val tauAlphaEq
= fromTyVar alphaEq
4254 val tauUnit
= fromRowType emptyRho
4255 val tauBool
= fromConsType([], tBool
)
4256 val tauInt
= fromConsType([], tInt
)
4257 val tauWord
= fromConsType([], tWord
)
4258 val tauReal
= fromConsType([], tReal
)
4259 val tauString
= fromConsType([], tString
)
4260 val tauChar
= fromConsType([], tChar
)
4261 val tauExn
= fromConsType([], tExn
)
4262 val tauAlphaList
= fromConsType([tauAlpha
], tList
)
4263 val tauAlphaRef
= fromConsType([tauAlpha
], tRef
)
4266 (* TypeSchemes
[Figure
25] *)
4268 val sigmaEq
= ([alphaEq
], fromFunType(pairType(tauAlphaEq
,tauAlphaEq
),
4270 val sigmaAssign
= ([alpha
], fromFunType(pairType(tauAlphaRef
,tauAlpha
),
4272 val sigmaFalse
= ([], tauBool
)
4273 val sigmaTrue
= ([], tauBool
)
4274 val sigmaNil
= ([alpha
], tauAlphaList
)
4275 val sigmaCons
= ([alpha
], fromFunType(pairType(tauAlpha
, tauAlphaList
),
4277 val sigmaRef
= ([alpha
], fromFunType(tauAlpha
, tauAlphaRef
))
4279 val sigmaMatch
= ([], tauExn
)
4280 val sigmaBind
= ([], tauExn
)
4283 (* Value entries
[Figure
25] *)
4285 val valstrEq
= (sigmaEq
, v
)
4286 val valstrAssign
= (sigmaAssign
, v
)
4288 val valstrFalse
= (sigmaFalse
, c
)
4289 val valstrTrue
= (sigmaTrue
, c
)
4290 val valstrNil
= (sigmaNil
, c
)
4291 val valstrCons
= (sigmaCons
, c
)
4292 val valstrRef
= (sigmaRef
, c
)
4294 val valstrMatch
= (sigmaMatch
, e
)
4295 val valstrBind
= (sigmaBind
, e
)
4298 (* TypeFcns
[Figure
24] *)
4300 val thetaUnit
= ([], tauUnit
)
4301 val thetaBool
= ([], tauBool
)
4302 val thetaInt
= ([], tauInt
)
4303 val thetaWord
= ([], tauWord
)
4304 val thetaReal
= ([], tauReal
)
4305 val thetaString
= ([], tauString
)
4306 val thetaChar
= ([], tauChar
)
4307 val thetaExn
= ([], tauExn
)
4308 val thetaList
= ([alpha
], tauAlphaList
)
4309 val thetaRef
= ([alpha
], tauAlphaRef
)
4312 (* TyStrs
[Figure
25] *)
4314 val VEEmpty
= VIdMap
.empty
4315 val VEBool
= VIdMap
.fromList
[(vidFalse
, valstrFalse
),
4316 (vidTrue
, valstrTrue
)] : ValEnv
4317 val VEList
= VIdMap
.fromList
[(vidNil
, valstrNil
),
4318 (vidCons
, valstrCons
)]
4319 val VERef
= VIdMap
.fromList
[(vidRef
, valstrRef
)]
4321 val tystrUnit
= (thetaUnit
, VEEmpty
)
4322 val tystrBool
= (thetaBool
, VEBool
)
4323 val tystrInt
= (thetaInt
, VEEmpty
)
4324 val tystrWord
= (thetaWord
, VEEmpty
)
4325 val tystrReal
= (thetaReal
, VEEmpty
)
4326 val tystrString
= (thetaString
, VEEmpty
)
4327 val tystrChar
= (thetaChar
, VEEmpty
)
4328 val tystrList
= (thetaList
, VEList
)
4329 val tystrRef
= (thetaRef
, VERef
)
4330 val tystrExn
= (thetaExn
, VEEmpty
)
4333 (* Environments
[Appendix C
] *)
4335 val SE0
= StrIdMap
.empty
4337 val TE0
= TyConMap
.fromList
[(tyconUnit
, tystrUnit
),
4338 (tyconBool
, tystrBool
),
4339 (tyconInt
, tystrInt
),
4340 (tyconWord
, tystrWord
),
4341 (tyconReal
, tystrReal
),
4342 (tyconString
, tystrString
),
4343 (tyconChar
, tystrChar
),
4344 (tyconList
, tystrList
),
4345 (tyconRef
, tystrRef
),
4346 (tyconExn
, tystrExn
)]
4348 val VE0
= VIdMap
.fromList
[(vidEq
, valstrEq
),
4349 (vidAssign
, valstrAssign
),
4350 (vidRef
, valstrRef
),
4351 (vidNil
, valstrNil
),
4352 (vidCons
, valstrCons
),
4353 (vidFalse
, valstrFalse
),
4354 (vidTrue
, valstrTrue
),
4355 (vidMatch
, valstrMatch
),
4356 (vidBind
, valstrBind
)]
4358 val E0
= (SE0
,TE0
,VE0
)
4361 (* Overloading classes
[Section E
.1] *)
4363 val Int = OverloadingClass
.make(TyNameSet
.singleton tInt
, tInt
)
4364 val Real = OverloadingClass
.make(TyNameSet
.singleton tReal
, tReal
)
4365 val Word = OverloadingClass
.make(TyNameSet
.singleton tWord
, tWord
)
4366 val String = OverloadingClass
.make(TyNameSet
.singleton tString
, tString
)
4367 val Char = OverloadingClass
.make(TyNameSet
.singleton tChar
, tChar
)
4368 val WordInt
= OverloadingClass
.union(Word, Int) (* default is
2nd
*)
4369 val RealInt
= OverloadingClass
.union(Real, Int)
4370 val Num
= OverloadingClass
.union(Word, RealInt
)
4371 val Txt
= OverloadingClass
.union(String, Char)
4372 val NumTxt
= OverloadingClass
.union(Txt
, Num
)
4375 (* stop
of InitialStaticEnv
.sml
*)
4376 (* start
of INITIAL_STATIC_BASIS
.sml
*)
4378 * Standard ML initial static basis
4380 * Definition
, appendices C
and E
4383 signature INITIAL_STATIC_BASIS
=
4388 type Basis
= StaticBasis
.Basis
4396 (* stop
of INITIAL_STATIC_BASIS
.sml
*)
4397 (* start
of InitialStaticBasis
.sml
*)
4399 * Standard ML initial static basis
4401 * Definition
, appendices C
and E
4404 structure InitialStaticBasis
:> INITIAL_STATIC_BASIS
=
4409 type Basis
= StaticBasis
.Basis
4414 val T0
= InitialStaticEnv
.T0
4415 val F0
= FunIdMap
.empty
4416 val G0
= SigIdMap
.empty
4417 val E0
= InitialStaticEnv
.E0
4419 val B0
= (T0
,F0
,G0
,E0
)
4422 (* stop
of InitialStaticBasis
.sml
*)
4423 (* start
of EXNAME
.sml
*)
4425 * Standard ML
exception names
4427 * Definition
, section
6.2
4438 (* Type
[Section
6.2] *)
4440 eqtype ExName (* [en
] *)
4445 val exname
: VId
-> ExName
4446 val toString
: ExName
-> string
4448 val compare
: ExName
* ExName
-> order
4451 (* stop
of EXNAME
.sml
*)
4452 (* start
of ExName
.sml
*)
4454 * Standard ML
exception names
4456 * Definition
, section
6.2
4460 structure ExName
:> EXNAME
=
4466 type stamp
= Stamp
.stamp
4469 (* Type
[Section
6.2] *)
4471 type ExName
= (* [en
] *)
4479 fun exname vid
= { vid
= vid
, stamp
= Stamp
.stamp() }
4484 fun toString
{vid
, stamp
} = VId
.toString vid
4489 fun compare(en1
: ExName
, en2
: ExName
) =
4490 Stamp
.compare(#stamp en1
, #stamp en2
)
4493 (* stop
of ExName
.sml
*)
4494 (* start
of ADDR
.sml
*)
4496 * Standard ML addresses
4498 * Definition
, section
6.2
4504 (* Type
[Section
6.2] *)
4506 eqtype Addr (* [a
] *)
4511 val addr
: unit
-> Addr
4512 val compare
: Addr
* Addr
-> order
4515 (* stop
of ADDR
.sml
*)
4516 (* start
of Addr
.sml
*)
4518 * Standard ML addresses
4520 * Definition
, section
6.2
4524 structure Addr
:> ADDR
=
4527 (* Type
[Section
6.2] *)
4529 type Addr
= Stamp
.stamp (* [a
] *)
4534 val addr
= Stamp
.stamp
4535 val compare
= Stamp
.compare
4538 (* stop
of Addr
.sml
*)
4539 (* start
of AssembliesCoreDynamic
.sml
*)
4541 * Standard ML additional sets
and maps for the dynamic semantics
of the core
4543 * Definition
, section
6.3
4546 structure ExNameSet
= FinSetFn(type ord_key
= ExName
.ExName
4547 val compare
= ExName
.compare
)
4549 structure AddrMap
= FinMapFn(type ord_key
= Addr
.Addr
4550 val compare
= Addr
.compare
)
4551 (* stop
of AssembliesCoreDynamic
.sml
*)
4552 (* start
of SVAL
.sml
*)
4554 * Standard ML special values
4556 * Definition
, section
6.2
4563 (* Type
[Section
6.2] *)
4565 datatype SVal
= (* [sv
] *)
4574 val toString
: SVal
-> string
4575 val equal
: SVal
* SVal
-> bool
4578 (* stop
of SVAL
.sml
*)
4579 (* start
of SVal
.sml
*)
4581 * Standard ML special values
4583 * Definition
, section
6.2
4587 structure SVal
:> SVAL
=
4590 (* Type
[Section
6.2] *)
4592 datatype SVal
= (* [sv
] *)
4602 fun toString(INT i
) = Int.toString i
4603 |
toString(WORD w
) = "0wx" ^
Word.toString w
4604 |
toString(STRING s
) = "\"" ^
String.toString s ^
"\""
4605 |
toString(CHAR c
) = "\"#" ^
Char.toString c ^
"\""
4606 |
toString(REAL r
) = Real.toString r
4610 fun equal(INT n1
, INT n2
) = n1
= n2
4611 |
equal(WORD w1
, WORD w2
) = w1
= w2
4612 |
equal(STRING s1
, STRING s2
) = s1
= s2
4613 |
equal(CHAR c1
, CHAR c2
) = c1
= c2
4614 | equal _
= raise Fail
"type error: equality type expected"
4617 (* stop
of SVal
.sml
*)
4618 (* start
of VAL
.sml
*)
4620 * Standard ML values
4622 * Definition
, sections
6.2, 6.3, and 6.4
4625 * - All value types are parameterised over the representation
of function
4626 * closures to break up the recursion between values
and environments
.
4627 * - The basic values are just strings
.
4636 type Addr
= Addr
.Addr
4637 type ExName
= ExName
.ExName
4638 type SVal
= SVal
.SVal
4640 type 'a LabMap
= 'a LabMap
.map
4643 (* Types
[Sections
6.2 and 6.3] *)
4645 type BasVal
= string (* [b
] *)
4647 datatype 'a Val
= (* [v
] *)
4652 | VIdVal
of VId
* 'a Val
4654 | Record
of (*Record
*) 'a Val LabMap
4658 and 'a ExVal
= (* [e
] *)
4660 | ExNameVal
of ExName
* 'a Val
4662 type 'a Record
= 'a Val
LabMap (* [r
] *)
4667 val equal
: 'a Val
* 'a Val
-> bool
4669 val toBoolVal
: bool -> 'a Val
4670 val unpair
: 'a Val
-> ('a Val
* 'a Val
) option
4673 (* stop
of VAL
.sml
*)
4674 (* start
of Val
.sml
*)
4676 * Standard ML values
4678 * Definition
, sections
6.2, 6.3, and 6.4
4681 * - All value types are parameterised over the representation
of function
4682 * closures to break up the recursion between values
and environments
.
4683 * - The basic values are just strings
.
4687 structure Val
:> VAL
=
4692 type Addr
= Addr
.Addr
4693 type ExName
= ExName
.ExName
4694 type SVal
= SVal
.SVal
4696 type 'a LabMap
= 'a LabMap
.map
4699 (* Types
[Sections
6.2 and 6.3] *)
4701 type BasVal
= string (* [b
] *)
4704 datatype 'a Val
= (* [v
] *)
4709 | VIdVal
of VId
* 'a Val
4711 | Record
of 'a Record
4715 and 'a ExVal
= (* [e
] *)
4717 | ExNameVal
of ExName
* 'a Val
4719 withtype 'a Record
= 'a Val
LabMap (* [r
] *)
4724 fun toBoolVal b
= VId(VId
.fromString(if b
then "true" else "false"))
4727 fun unpair(Record r
) =
4728 (case (LabMap
.find(r
, Lab
.fromInt
1), LabMap
.find(r
, Lab
.fromInt
2))
4729 of (SOME v1
, SOME v2
) => SOME(v1
, v2
)
4736 (* Implementation
of polymorphic equality
*)
4738 fun equal(SVal sv1
, SVal sv2
) = SVal
.equal(sv1
, sv2
)
4739 |
equal(VId vid1
, VId vid2
) = vid1
= vid2
4740 |
equal(ExVal(ExName en1
), ExVal(ExName en2
)) = en1
= en2
4741 |
equal(Addr a1
, Addr a2
) = a1
= a2
4743 |
equal(VIdVal(vid1
, v1
), VIdVal(vid2
, v2
)) =
4744 vid1
= vid2
andalso equal(v1
, v2
)
4746 |
equal(ExVal(ExNameVal(en1
,v1
)), ExVal(ExNameVal(en2
,v2
))) =
4747 en1
= en2
andalso equal(v1
, v2
)
4749 |
equal(Record r1
, Record r2
) =
4750 LabMap
.numItems r1
= LabMap
.numItems r2
andalso
4751 LabMap
.alli (fn(lab
, v1
) =>
4752 case LabMap
.find(r2
, lab
)
4753 of SOME v2
=> equal(v1
, v2
)
4760 (* stop
of Val
.sml
*)
4761 (* start
of STATE
.sml
*)
4765 * Definition
, section
6.3
4768 * - Memory gets represented by references
. This avoids expanding out all
4769 * occurances
of the state convention
in the inference rules
.
4770 * - Since
exception names are generated by stamps we
do not really need the
4771 * exception name set
. We maintain it anyway
.
4779 type Addr
= Addr
.Addr
4780 type ExName
= ExName
.ExName
4781 type ExNameSet
= ExNameSet
.set
4782 type 'a Val
= 'a Val
.Val
4783 type 'a AddrMap
= 'a AddrMap
.map
4786 (* Types
[Section
6.3] *)
4788 type 'a Mem
= 'a Val
AddrMap (* [mem
] *)
4790 type 'a State
= 'a Mem
* ExNameSet (* [s
] *)
4795 val insertAddr
: 'a State
* Addr
* 'a Val
-> 'a State
4796 val insertExName
: 'a State
* ExName
-> 'a State
4798 val findAddr
: 'a State
* Addr
-> 'a Val option
4801 (* stop
of STATE
.sml
*)
4802 (* start
of State
.sml
*)
4806 * Definition
, section
6.3
4809 * - Memory gets represented by references
. This avoids expanding out all
4810 * occurances
of the state convention
in the inference rules
.
4811 * - Since
exception names are generated by stamps we
do not really need the
4812 * exception name set
. We maintain it anyway
.
4815 structure State
:> STATE
=
4820 type Addr
= Addr
.Addr
4821 type ExName
= ExName
.ExName
4822 type ExNameSet
= ExNameSet
.set
4823 type 'a Val
= 'a Val
.Val
4824 type 'a AddrMap
= 'a AddrMap
.map
4827 (* Types
[Section
6.3] *)
4829 type 'a Mem
= 'a Val
AddrMap (* [mem
] *)
4831 type 'a State
= 'a Mem
* ExNameSet (* [s
] *)
4836 fun insertAddr ((mem
,ens
), a
, v
) = ( AddrMap
.insert(mem
, a
, v
), ens
)
4837 fun insertExName((mem
,ens
), en
) = ( mem
, ExNameSet
.add(ens
, en
) )
4839 fun findAddr((mem
,ens
), a
) = AddrMap
.find(mem
, a
)
4842 (* stop
of State
.sml
*)
4843 (* start
of GRAMMAR_CORE
.sml
*)
4845 * Standard ML abstract core grammar
4847 * Definition
, section
2.8
4850 * This is the syntax used
in the inference rules for the core
[Definition
,
4851 * sections
4.10 and 6.7]. It omits almost anything having to
do with infixed
4853 * - fixity directives
4854 * - infixed application
4855 * - infixed value construction
4856 * However
, op prefixes are kept
, since they are required for rebuilding the
4857 * syntax tree during fixity resolution
.
4858 * Optional semicolons are also omitted
.
4861 signature GRAMMAR_CORE
=
4868 type SCon
= SCon
.SCon
4871 type TyCon
= TyCon
.Id
4872 type TyVar
= TyVar
.TyVar
4873 type StrId
= StrId
.Id
4874 type longVId
= LongVId
.longId
4875 type longTyCon
= LongTyCon
.longId
4876 type longStrId
= LongStrId
.longId
4879 (* Optional keyword `
op' *)
4881 datatype Op
= SANSOp | WITHOp
4884 (* Expressions
[Figures
2 and 4] *)
4887 SCONAtExp
of Info
* SCon
4888 | LONGVIDAtExp
of Info
* Op
* longVId
4889 | RECORDAtExp
of Info
* ExpRow option
4890 | LETAtExp
of Info
* Dec
* Exp
4891 | PARAtExp
of Info
* Exp
4894 ExpRow
of Info
* Lab
* Exp
* ExpRow option
4897 ATEXPExp
of Info
* AtExp
4898 | APPExp
of Info
* Exp
* AtExp
4899 | TYPEDExp
of Info
* Exp
* Ty
4900 | HANDLEExp
of Info
* Exp
* Match
4901 | RAISEExp
of Info
* Exp
4902 | FNExp
of Info
* Match
4904 (* Matches
[Figures
2 and 4] *)
4907 Match
of Info
* Mrule
* Match option
4910 Mrule
of Info
* Pat
* Exp
4912 (* Declarations
[Figures
2 and 4] *)
4915 VALDec
of Info
* TyVarseq
* ValBind
4916 | TYPEDec
of Info
* TypBind
4917 | DATATYPEDec
of Info
* DatBind
4918 | REPLICATIONDec
of Info
* TyCon
* longTyCon
4919 | ABSTYPEDec
of Info
* DatBind
* Dec
4920 | EXCEPTIONDec
of Info
* ExBind
4921 | LOCALDec
of Info
* Dec
* Dec
4922 | OPENDec
of Info
* longStrId list
4924 | SEQDec
of Info
* Dec
* Dec
4926 (* Bindings
[Figures
2 and 4] *)
4929 PLAINValBind
of Info
* Pat
* Exp
* ValBind option
4930 | RECValBind
of Info
* ValBind
4933 TypBind
of Info
* TyVarseq
* TyCon
* Ty
* TypBind option
4936 DatBind
of Info
* TyVarseq
* TyCon
* ConBind
* DatBind option
4939 ConBind
of Info
* Op
* VId
* Ty option
* ConBind option
4942 NEWExBind
of Info
* Op
* VId
* Ty option
* ExBind option
4943 | EQUALExBind
of Info
* Op
* VId
* Op
* longVId
* ExBind option
4945 (* Patterns
[Figures
2 and 3] *)
4948 WILDCARDAtPat
of Info
4949 | SCONAtPat
of Info
* SCon
4950 | LONGVIDAtPat
of Info
* Op
* longVId
4951 | RECORDAtPat
of Info
* PatRow option
4952 | PARAtPat
of Info
* Pat
4955 WILDCARDPatRow
of Info
4956 | ROWPatRow
of Info
* Lab
* Pat
* PatRow option
4959 ATPATPat
of Info
* AtPat
4960 | CONPat
of Info
* Op
* longVId
* AtPat
4961 | TYPEDPat
of Info
* Pat
* Ty
4962 | ASPat
of Info
* Op
* VId
* Ty option
* Pat
4964 (* Type expressions
[Figures
2 and 3] *)
4967 TYVARTy
of Info
* TyVar
4968 | RECORDTy
of Info
* TyRow option
4969 | TYCONTy
of Info
* Tyseq
* longTyCon
4970 | ARROWTy
of Info
* Ty
* Ty
4971 | PARTy
of Info
* Ty
4974 TyRow
of Info
* Lab
* Ty
* TyRow option
4976 (* Sequences
[Section
2.8] *)
4979 Tyseq
of Info
* Ty list
4982 TyVarseq
of Info
* TyVar list
4987 val infoAtExp
: AtExp
-> Info
4988 val infoExpRow
: ExpRow
-> Info
4989 val infoExp
: Exp
-> Info
4990 val infoMatch
: Match
-> Info
4991 val infoMrule
: Mrule
-> Info
4992 val infoDec
: Dec
-> Info
4993 val infoValBind
: ValBind
-> Info
4994 val infoTypBind
: TypBind
-> Info
4995 val infoDatBind
: DatBind
-> Info
4996 val infoConBind
: ConBind
-> Info
4997 val infoExBind
: ExBind
-> Info
4998 val infoAtPat
: AtPat
-> Info
4999 val infoPatRow
: PatRow
-> Info
5000 val infoPat
: Pat
-> Info
5001 val infoTy
: Ty
-> Info
5002 val infoTyRow
: TyRow
-> Info
5003 val infoTyseq
: Tyseq
-> Info
5004 val infoTyVarseq
: TyVarseq
-> Info
5007 (* stop
of GRAMMAR_CORE
.sml
*)
5008 (* start
of GrammarCoreFn
.sml
*)
5010 * Standard ML abstract core grammar
5012 * Definition
, section
2.8
5015 * This is the syntax used
in the inference rules for the core
[Definition
,
5016 * sections
4.10 and 6.7]. It omits almost anything having to
do with infixed
5018 * - fixity directives
5019 * - infixed application
5020 * - infixed value construction
5021 * However
, op prefixes are kept
, since they are required for rebuilding the
5022 * syntax tree during fixity resolution
.
5023 * Optional semicolons are also omitted
.
5026 functor GrammarCoreFn(type Info
) : GRAMMAR_CORE
=
5033 type SCon
= SCon
.SCon
5036 type TyCon
= TyCon
.Id
5037 type TyVar
= TyVar
.TyVar
5038 type StrId
= StrId
.Id
5039 type longVId
= LongVId
.longId
5040 type longTyCon
= LongTyCon
.longId
5041 type longStrId
= LongStrId
.longId
5044 (* Optional keyword `
op' *)
5046 datatype Op
= SANSOp | WITHOp
5049 (* Expressions
[Figures
2 and 4] *)
5052 SCONAtExp
of Info
* SCon
5053 | LONGVIDAtExp
of Info
* Op
* longVId
5054 | RECORDAtExp
of Info
* ExpRow option
5055 | LETAtExp
of Info
* Dec
* Exp
5056 | PARAtExp
of Info
* Exp
5059 ExpRow
of Info
* Lab
* Exp
* ExpRow option
5062 ATEXPExp
of Info
* AtExp
5063 | APPExp
of Info
* Exp
* AtExp
5064 | TYPEDExp
of Info
* Exp
* Ty
5065 | HANDLEExp
of Info
* Exp
* Match
5066 | RAISEExp
of Info
* Exp
5067 | FNExp
of Info
* Match
5069 (* Matches
[Figures
2 and 4] *)
5072 Match
of Info
* Mrule
* Match option
5075 Mrule
of Info
* Pat
* Exp
5077 (* Declarations
[Figures
2 and 4] *)
5080 VALDec
of Info
* TyVarseq
* ValBind
5081 | TYPEDec
of Info
* TypBind
5082 | DATATYPEDec
of Info
* DatBind
5083 | REPLICATIONDec
of Info
* TyCon
* longTyCon
5084 | ABSTYPEDec
of Info
* DatBind
* Dec
5085 | EXCEPTIONDec
of Info
* ExBind
5086 | LOCALDec
of Info
* Dec
* Dec
5087 | OPENDec
of Info
* longStrId list
5089 | SEQDec
of Info
* Dec
* Dec
5091 (* Bindings
[Figures
2 and 4] *)
5094 PLAINValBind
of Info
* Pat
* Exp
* ValBind option
5095 | RECValBind
of Info
* ValBind
5098 TypBind
of Info
* TyVarseq
* TyCon
* Ty
* TypBind option
5101 DatBind
of Info
* TyVarseq
* TyCon
* ConBind
* DatBind option
5104 ConBind
of Info
* Op
* VId
* Ty option
* ConBind option
5107 NEWExBind
of Info
* Op
* VId
* Ty option
* ExBind option
5108 | EQUALExBind
of Info
* Op
* VId
* Op
* longVId
* ExBind option
5110 (* Patterns
[Figures
2 and 3] *)
5113 WILDCARDAtPat
of Info
5114 | SCONAtPat
of Info
* SCon
5115 | LONGVIDAtPat
of Info
* Op
* longVId
5116 | RECORDAtPat
of Info
* PatRow option
5117 | PARAtPat
of Info
* Pat
5120 WILDCARDPatRow
of Info
5121 | ROWPatRow
of Info
* Lab
* Pat
* PatRow option
5124 ATPATPat
of Info
* AtPat
5125 | CONPat
of Info
* Op
* longVId
* AtPat
5126 | TYPEDPat
of Info
* Pat
* Ty
5127 | ASPat
of Info
* Op
* VId
* Ty option
* Pat
5129 (* Type expressions
[Figures
2 and 3] *)
5132 TYVARTy
of Info
* TyVar
5133 | RECORDTy
of Info
* TyRow option
5134 | TYCONTy
of Info
* Tyseq
* longTyCon
5135 | ARROWTy
of Info
* Ty
* Ty
5136 | PARTy
of Info
* Ty
5139 TyRow
of Info
* Lab
* Ty
* TyRow option
5141 (* Sequences
[Section
2.8] *)
5144 Tyseq
of Info
* Ty list
5147 TyVarseq
of Info
* TyVar list
5151 (* Extracting info fields
*)
5153 fun infoAtExp(SCONAtExp(I
,_
)) = I
5154 |
infoAtExp(LONGVIDAtExp(I
,_
,_
)) = I
5155 |
infoAtExp(RECORDAtExp(I
,_
)) = I
5156 |
infoAtExp(LETAtExp(I
,_
,_
)) = I
5157 |
infoAtExp(PARAtExp(I
,_
)) = I
5159 fun infoExpRow(ExpRow(I
,_
,_
,_
)) = I
5161 fun infoExp(ATEXPExp(I
,_
)) = I
5162 |
infoExp(APPExp(I
,_
,_
)) = I
5163 |
infoExp(TYPEDExp(I
,_
,_
)) = I
5164 |
infoExp(HANDLEExp(I
,_
,_
)) = I
5165 |
infoExp(RAISEExp(I
,_
)) = I
5166 |
infoExp(FNExp(I
,_
)) = I
5168 fun infoMatch(Match(I
,_
,_
)) = I
5170 fun infoMrule(Mrule(I
,_
,_
)) = I
5172 fun infoDec(VALDec(I
,_
,_
)) = I
5173 |
infoDec(TYPEDec(I
,_
)) = I
5174 |
infoDec(DATATYPEDec(I
,_
)) = I
5175 |
infoDec(REPLICATIONDec(I
,_
,_
)) = I
5176 |
infoDec(ABSTYPEDec(I
,_
,_
)) = I
5177 |
infoDec(EXCEPTIONDec(I
,_
)) = I
5178 |
infoDec(LOCALDec(I
,_
,_
)) = I
5179 |
infoDec(OPENDec(I
,_
)) = I
5180 |
infoDec(EMPTYDec(I
)) = I
5181 |
infoDec(SEQDec(I
,_
,_
)) = I
5183 fun infoValBind(PLAINValBind(I
,_
,_
,_
)) = I
5184 |
infoValBind(RECValBind(I
,_
)) = I
5186 fun infoTypBind(TypBind(I
,_
,_
,_
,_
)) = I
5188 fun infoDatBind(DatBind(I
,_
,_
,_
,_
)) = I
5190 fun infoConBind(ConBind(I
,_
,_
,_
,_
)) = I
5192 fun infoExBind(NEWExBind(I
,_
,_
,_
,_
)) = I
5193 |
infoExBind(EQUALExBind(I
,_
,_
,_
,_
,_
)) = I
5195 fun infoAtPat(WILDCARDAtPat(I
)) = I
5196 |
infoAtPat(SCONAtPat(I
,_
)) = I
5197 |
infoAtPat(LONGVIDAtPat(I
,_
,_
)) = I
5198 |
infoAtPat(RECORDAtPat(I
,_
)) = I
5199 |
infoAtPat(PARAtPat(I
,_
)) = I
5201 fun infoPatRow(WILDCARDPatRow(I
)) = I
5202 |
infoPatRow(ROWPatRow(I
,_
,_
,_
)) = I
5204 fun infoPat(ATPATPat(I
,_
)) = I
5205 |
infoPat(CONPat(I
,_
,_
,_
)) = I
5206 |
infoPat(TYPEDPat(I
,_
,_
)) = I
5207 |
infoPat(ASPat(I
,_
,_
,_
,_
)) = I
5209 fun infoTy(TYVARTy(I
,_
)) = I
5210 |
infoTy(RECORDTy(I
,_
)) = I
5211 |
infoTy(TYCONTy(I
,_
,_
)) = I
5212 |
infoTy(ARROWTy(I
,_
,_
)) = I
5213 |
infoTy(PARTy(I
,_
)) = I
5215 fun infoTyRow(TyRow(I
,_
,_
,_
)) = I
5217 fun infoTyseq(Tyseq(I
,_
)) = I
5218 fun infoTyVarseq(TyVarseq(I
,_
)) = I
5221 (* stop
of GrammarCoreFn
.sml
*)
5222 (* start
of SOURCE
.sml
*)
5224 * Helpers for handling source strings
5230 type source
= string
5231 type region
= int * int
5233 val over
: region
* region
-> region
5234 val between
: region
* region
-> region
5236 val compare
: region
* region
-> order
5239 (* stop
of SOURCE
.sml
*)
5240 (* start
of Source
.sml
*)
5242 * Helpers for handling source strings
5245 structure Source
:> SOURCE
=
5248 type source
= string
5249 type region
= int * int
5251 fun over(r1
: region
, r2
: region
) = (#
1 r1
, #
2 r2
)
5252 fun between(r1
: region
, r2
: region
) = (#
2 r1
, #
1 r2
)
5254 fun compare((m1
,n1
), (m2
,n2
)) =
5255 case Int.compare(m1
, m2
)
5256 of EQUAL
=> Int.compare(n1
, n2
)
5260 (* stop
of Source
.sml
*)
5261 (* start
of GRAMMAR_MODULE
.sml
*)
5263 * Standard ML abstract module grammar
5265 * Definition
, section
3.4
5268 * This is the syntax used
in the inference rules for modules
[Definition
,
5269 * sections
5.7 and 7.3]. Optional semicolons are omitted
.
5270 * The
structure sharing derived form
[Definition
, Appendix A
] has been added
,
5271 * because it cannot be derived purely syntactically
.
5275 signature GRAMMAR_MODULE
=
5280 structure Core
: GRAMMAR_CORE
5285 type TyCon
= Core
.TyCon
5286 type TyVar
= Core
.TyVar
5287 type StrId
= Core
.StrId
5288 type longVId
= Core
.longVId
5289 type longTyCon
= Core
.longTyCon
5290 type longStrId
= Core
.longStrId
5293 type TyVarseq
= Core
.TyVarseq
5295 type SigId
= SigId
.Id
5296 type FunId
= FunId
.Id
5299 (* Structures
[Figures
5 and 6] *)
5302 STRUCTStrExp
of Info
* StrDec
5303 | LONGSTRIDStrExp
of Info
* longStrId
5304 | TRANSStrExp
of Info
* StrExp
* SigExp
5305 | OPAQStrExp
of Info
* StrExp
* SigExp
5306 | APPStrExp
of Info
* FunId
* StrExp
5307 | LETStrExp
of Info
* StrDec
* StrExp
5310 DECStrDec
of Info
* Dec
5311 | STRUCTUREStrDec
of Info
* StrBind
5312 | LOCALStrDec
of Info
* StrDec
* StrDec
5313 | EMPTYStrDec
of Info
5314 | SEQStrDec
of Info
* StrDec
* StrDec
5317 StrBind
of Info
* StrId
* StrExp
* StrBind option
5319 (* Signatures
[Figures
5 and 6] *)
5322 SIGSigExp
of Info
* Spec
5323 | SIGIDSigExp
of Info
* SigId
5324 | WHERETYPESigExp
of Info
* SigExp
* TyVarseq
* longTyCon
* Ty
5327 SigDec
of Info
* SigBind
5330 SigBind
of Info
* SigId
* SigExp
* SigBind option
5332 (* Specifications
[Figures
5 and 7] *)
5335 VALSpec
of Info
* ValDesc
5336 | TYPESpec
of Info
* TypDesc
5337 | EQTYPESpec
of Info
* TypDesc
5338 | DATATYPESpec
of Info
* DatDesc
5339 | REPLICATIONSpec
of Info
* TyCon
* longTyCon
5340 | EXCEPTIONSpec
of Info
* ExDesc
5341 | STRUCTURESpec
of Info
* StrDesc
5342 | INCLUDESpec
of Info
* SigExp
5344 | SEQSpec
of Info
* Spec
* Spec
5345 | SHARINGTYPESpec
of Info
* Spec
* longTyCon list
5346 | SHARINGSpec
of Info
* Spec
* longStrId list
5349 ValDesc
of Info
* VId
* Ty
* ValDesc option
5352 TypDesc
of Info
* TyVarseq
* TyCon
* TypDesc option
5355 DatDesc
of Info
* TyVarseq
* TyCon
* ConDesc
* DatDesc option
5358 ConDesc
of Info
* VId
* Ty option
* ConDesc option
5361 ExDesc
of Info
* VId
* Ty option
* ExDesc option
5364 StrDesc
of Info
* StrId
* SigExp
* StrDesc option
5366 (* Functors
[Figures
5 and 8] *)
5369 FunDec
of Info
* FunBind
5372 FunBind
of Info
* FunId
* StrId
* SigExp
* StrExp
5375 (* Top
-level declarations
[Figures
5 and 8] *)
5378 STRDECTopDec
of Info
* StrDec
* TopDec option
5379 | SIGDECTopDec
of Info
* SigDec
* TopDec option
5380 | FUNDECTopDec
of Info
* FunDec
* TopDec option
5385 val infoStrExp
: StrExp
-> Info
5386 val infoStrDec
: StrDec
-> Info
5387 val infoStrBind
: StrBind
-> Info
5388 val infoSigExp
: SigExp
-> Info
5389 val infoSigBind
: SigBind
-> Info
5390 val infoSpec
: Spec
-> Info
5391 val infoValDesc
: ValDesc
-> Info
5392 val infoTypDesc
: TypDesc
-> Info
5393 val infoDatDesc
: DatDesc
-> Info
5394 val infoConDesc
: ConDesc
-> Info
5395 val infoExDesc
: ExDesc
-> Info
5396 val infoStrDesc
: StrDesc
-> Info
5397 val infoFunDec
: FunDec
-> Info
5398 val infoFunBind
: FunBind
-> Info
5399 val infoTopDec
: TopDec
-> Info
5402 (* stop
of GRAMMAR_MODULE
.sml
*)
5403 (* start
of GrammarModuleFn
.sml
*)
5405 * Standard ML abstract module grammar
5407 * Definition
, section
3.4
5410 * This is the syntax used
in the inference rules for modules
[Definition
,
5411 * sections
5.7 and 7.3]. Optional semicolons are omitted
.
5412 * The
structure sharing derived form
[Definition
, Appendix A
] has been added
,
5413 * because it cannot be derived purely syntactically
.
5417 functor GrammarModuleFn(type Info
5418 structure Core
: GRAMMAR_CORE
5419 ) : GRAMMAR_MODULE
=
5424 structure Core
= Core
5429 type SigId
= SigId
.Id
5430 type FunId
= FunId
.Id
5433 (* Structures
[Figures
5 and 6] *)
5436 STRUCTStrExp
of Info
* StrDec
5437 | LONGSTRIDStrExp
of Info
* longStrId
5438 | TRANSStrExp
of Info
* StrExp
* SigExp
5439 | OPAQStrExp
of Info
* StrExp
* SigExp
5440 | APPStrExp
of Info
* FunId
* StrExp
5441 | LETStrExp
of Info
* StrDec
* StrExp
5444 DECStrDec
of Info
* Dec
5445 | STRUCTUREStrDec
of Info
* StrBind
5446 | LOCALStrDec
of Info
* StrDec
* StrDec
5447 | EMPTYStrDec
of Info
5448 | SEQStrDec
of Info
* StrDec
* StrDec
5451 StrBind
of Info
* StrId
* StrExp
* StrBind option
5453 (* Signatures
[Figures
5 and 6] *)
5456 SIGSigExp
of Info
* Spec
5457 | SIGIDSigExp
of Info
* SigId
5458 | WHERETYPESigExp
of Info
* SigExp
* TyVarseq
* longTyCon
* Ty
5461 SigDec
of Info
* SigBind
5464 SigBind
of Info
* SigId
* SigExp
* SigBind option
5466 (* Specifications
[Figures
5 and 7] *)
5469 VALSpec
of Info
* ValDesc
5470 | TYPESpec
of Info
* TypDesc
5471 | EQTYPESpec
of Info
* TypDesc
5472 | DATATYPESpec
of Info
* DatDesc
5473 | REPLICATIONSpec
of Info
* TyCon
* longTyCon
5474 | EXCEPTIONSpec
of Info
* ExDesc
5475 | STRUCTURESpec
of Info
* StrDesc
5476 | INCLUDESpec
of Info
* SigExp
5478 | SEQSpec
of Info
* Spec
* Spec
5479 | SHARINGTYPESpec
of Info
* Spec
* longTyCon list
5480 | SHARINGSpec
of Info
* Spec
* longStrId list
5483 ValDesc
of Info
* VId
* Ty
* ValDesc option
5486 TypDesc
of Info
* TyVarseq
* TyCon
* TypDesc option
5489 DatDesc
of Info
* TyVarseq
* TyCon
* ConDesc
* DatDesc option
5492 ConDesc
of Info
* VId
* Ty option
* ConDesc option
5495 ExDesc
of Info
* VId
* Ty option
* ExDesc option
5498 StrDesc
of Info
* StrId
* SigExp
* StrDesc option
5500 (* Functors
[Figures
5 and 8] *)
5503 FunDec
of Info
* FunBind
5506 FunBind
of Info
* FunId
* StrId
* SigExp
* StrExp
5509 (* Top
-level declarations
[Figures
5 and 8] *)
5512 STRDECTopDec
of Info
* StrDec
* TopDec option
5513 | SIGDECTopDec
of Info
* SigDec
* TopDec option
5514 | FUNDECTopDec
of Info
* FunDec
* TopDec option
5517 (* Extracting info fields
*)
5519 fun infoStrExp(STRUCTStrExp(I
,_
)) = I
5520 |
infoStrExp(LONGSTRIDStrExp(I
,_
)) = I
5521 |
infoStrExp(TRANSStrExp(I
,_
,_
)) = I
5522 |
infoStrExp(OPAQStrExp(I
,_
,_
)) = I
5523 |
infoStrExp(APPStrExp(I
,_
,_
)) = I
5524 |
infoStrExp(LETStrExp(I
,_
,_
)) = I
5526 fun infoStrDec(DECStrDec(I
,_
)) = I
5527 |
infoStrDec(STRUCTUREStrDec(I
,_
)) = I
5528 |
infoStrDec(LOCALStrDec(I
,_
,_
)) = I
5529 |
infoStrDec(EMPTYStrDec(I
)) = I
5530 |
infoStrDec(SEQStrDec(I
,_
,_
)) = I
5532 fun infoStrBind(StrBind(I
,_
,_
,_
)) = I
5534 fun infoSigExp(SIGSigExp(I
,_
)) = I
5535 |
infoSigExp(SIGIDSigExp(I
,_
)) = I
5536 |
infoSigExp(WHERETYPESigExp(I
,_
,_
,_
,_
)) = I
5538 fun infoSigDec(SigDec(I
,_
)) = I
5540 fun infoSigBind(SigBind(I
,_
,_
,_
)) = I
5542 fun infoSpec(VALSpec(I
,_
)) = I
5543 |
infoSpec(TYPESpec(I
,_
)) = I
5544 |
infoSpec(EQTYPESpec(I
,_
)) = I
5545 |
infoSpec(DATATYPESpec(I
,_
)) = I
5546 |
infoSpec(REPLICATIONSpec(I
,_
,_
)) = I
5547 |
infoSpec(EXCEPTIONSpec(I
,_
)) = I
5548 |
infoSpec(STRUCTURESpec(I
,_
)) = I
5549 |
infoSpec(INCLUDESpec(I
,_
)) = I
5550 |
infoSpec(EMPTYSpec(I
)) = I
5551 |
infoSpec(SEQSpec(I
,_
,_
)) = I
5552 |
infoSpec(SHARINGTYPESpec(I
,_
,_
)) = I
5553 |
infoSpec(SHARINGSpec(I
,_
,_
)) = I
5555 fun infoValDesc(ValDesc(I
,_
,_
,_
)) = I
5556 fun infoTypDesc(TypDesc(I
,_
,_
,_
)) = I
5557 fun infoDatDesc(DatDesc(I
,_
,_
,_
,_
)) = I
5558 fun infoConDesc(ConDesc(I
,_
,_
,_
)) = I
5559 fun infoExDesc(ExDesc(I
,_
,_
,_
)) = I
5560 fun infoStrDesc(StrDesc(I
,_
,_
,_
)) = I
5562 fun infoFunDec(FunDec(I
,_
)) = I
5564 fun infoFunBind(FunBind(I
,_
,_
,_
,_
,_
)) = I
5566 fun infoTopDec(STRDECTopDec(I
,_
,_
)) = I
5567 |
infoTopDec(SIGDECTopDec(I
,_
,_
)) = I
5568 |
infoTopDec(FUNDECTopDec(I
,_
,_
)) = I
5571 (* stop
of GrammarModuleFn
.sml
*)
5572 (* start
of GRAMMAR_PROGRAM
.sml
*)
5574 * Standard ML abstract program grammar
5576 * Definition
, section
8
5580 signature GRAMMAR_PROGRAM
=
5585 structure Module
: GRAMMAR_MODULE
5587 type Info
= Module
.Info
5589 type TopDec
= Module
.TopDec
5594 datatype Program
= Program
of Info
* TopDec
* Program option
5597 (* Extracting the info field
*)
5599 val infoProgram
: Program
-> Info
5602 (* stop
of GRAMMAR_PROGRAM
.sml
*)
5603 (* start
of GrammarProgramFn
.sml
*)
5605 * Standard ML abstract program grammar
5607 * Definition
, section
8
5611 functor GrammarProgramFn(type Info
5612 structure Module
: GRAMMAR_MODULE
5613 ) : GRAMMAR_PROGRAM
=
5618 structure Module
= Module
5626 datatype Program
= Program
of Info
* TopDec
* Program option
5629 (* Extracting the info field
*)
5631 fun infoProgram(Program(I
,_
,_
)) = I
5634 (* stop
of GrammarProgramFn
.sml
*)
5635 (* start
of Grammars
.sml
*)
5636 structure GrammarCore
= GrammarCoreFn(type Info
= Source
.region
)
5638 structure GrammarModule
= GrammarModuleFn(type Info
= Source
.region
5639 structure Core
= GrammarCore
)
5641 structure GrammarProgram
= GrammarProgramFn(type Info
= Source
.region
5642 structure Module
= GrammarModule
)
5643 (* stop
of Grammars
.sml
*)
5644 (* start
of DYNAMIC_ENV
.sml
*)
5646 * Standard ML environments
of the dynamic semantics
of the core
5648 * Definition
, sections
6.3 and 6.6
5651 * - We call the domain
type of value environments ValStr
.
5652 * - The
type definitions here are heavily recursive
and it is really stupid
5653 * that SML allows no
withtype in signatures
...
5656 signature DYNAMIC_ENV
=
5666 type 'a Val
= 'a Val
.Val
5667 type Match
= GrammarCore
.Match
5670 (* Export types
[Section
6.6] *)
5672 datatype FcnClosure
=
5675 ( FcnClosure Val
* IdStatus
5676 , (FcnClosure Val
* IdStatus
) VIdMap
5678 * (FcnClosure Val
* IdStatus
) VIdMap TyConMap
5679 * (FcnClosure Val
* IdStatus
) VIdMap
5681 * (*ValEnv
*) (FcnClosure Val
* IdStatus
) VIdMap
5683 type ValStr
= FcnClosure Val
* IdStatus
5684 type ValEnv
= ValStr
VIdMap (* [VE
] *)
5687 type TyEnv
= TyStr
TyConMap (* [TE
] *)
5689 type Str
= (ValStr
, TyStr
) Str
'
5690 type StrEnv
= Str
StrIdMap (* [SE
] *)
5692 type Env
= StrEnv
* TyEnv
* ValEnv (* [E
] *)
5697 val Rec
: ValEnv
-> ValEnv
5700 (* stop
of DYNAMIC_ENV
.sml
*)
5701 (* start
of DynamicEnv
.sml
*)
5703 * Standard ML environments
of the dynamic semantics
of the core
5705 * Definition
, sections
6.3 and 6.6
5708 * - We call the domain
type of value environments ValStr
.
5709 * - The
type definitions here are heavily recursive
. It would be easier
if
5710 * SML would define
withtype sequentially (as SML
/NJ implements it
).
5711 * However
, it is still better than inside the
signature...
5714 structure DynamicEnv
:> DYNAMIC_ENV
=
5719 structure GenericEnv
= GenericEnvFn()
5726 type 'a Val
= 'a Val
.Val
5727 type Match
= GrammarCore
.Match
5730 (* Export types
[Section
6.6] *)
5732 datatype FcnClosure
=
5733 FcnClosure
of Match
* ((*Env
*) StrEnv
* TyEnv
* ValEnv
) * ValEnv
5735 withtype ValEnv
= (FcnClosure Val
* IdStatus
) VIdMap (* [VE
] *)
5736 and TyEnv
= (FcnClosure Val
* IdStatus
) VIdMap
TyConMap (* [TE
] *)
5737 and StrEnv
= (FcnClosure Val
* IdStatus
,
5738 (FcnClosure Val
* IdStatus
) VIdMap
) Str
' StrIdMap
5740 type ValStr
= FcnClosure Val
* IdStatus
5742 type Str
= (ValStr
, TyStr
) Str
'
5744 type Env
= StrEnv
* TyEnv
* ValEnv (* [E
] *)
5747 (* Unrolling
[Section
6.6] *)
5751 (fn (Val
.FcnClosure(FcnClosure(match
',E
',VE
')), IdStatus
.v
) =>
5752 (Val
.FcnClosure(FcnClosure(match
',E
',VE
)), IdStatus
.v
)
5757 (* stop
of DynamicEnv
.sml
*)
5758 (* start
of INITIAL_DYNAMIC_ENV
.sml
*)
5760 * Standard ML core view
of the initial dynamic basis
5762 * Definition
, appendix D
and section
6.5
5765 * The Definition does not specify what the initial state has to contain
.
5766 * This is a bug
as it must at least contain the
exception names Match
5767 * and Bind
. We put the state associated
with the initial environment
in
5771 signature INITIAL_DYNAMIC_ENV
=
5776 type Env
= DynamicEnv
.Env
5777 type ExName
= ExName
.ExName
5778 type State
= DynamicEnv
.FcnClosure State
.State
5781 (* Basic
exception names
[Section
6.5] *)
5786 (* Initial environment
[Appendix D
] *)
5790 (* Associated state
*)
5795 (* stop
of INITIAL_DYNAMIC_ENV
.sml
*)
5796 (* start
of InitialDynamicEnv
.sml
*)
5798 * Standard ML core view
of the initial dynamic basis
5800 * Definition
, appendix D
and section
6.5
5803 * The Definition does not specify what the initial state has to contain
.
5804 * This is a bug
as it must at least contain the
exception names Match
5805 * and Bind
. We put the state associated
with the initial environment
in
5809 structure InitialDynamicEnv
:> INITIAL_DYNAMIC_ENV
=
5814 type Env
= DynamicEnv
.Env
5815 type ValEnv
= DynamicEnv
.ValEnv
5816 type ExName
= ExName
.ExName
5817 type State
= DynamicEnv
.FcnClosure State
.State
5824 (* VIds
[Appendix D
] *)
5826 val vidEq
= VId
.fromString
"="
5827 val vidAssign
= VId
.fromString
":="
5829 val vidFalse
= VId
.fromString
"false"
5830 val vidTrue
= VId
.fromString
"true"
5831 val vidNil
= VId
.fromString
"nil"
5832 val vidCons
= VId
.fromString
"::"
5833 val vidRef
= VId
.fromString
"ref"
5835 val vidMatch
= VId
.fromString
"Match"
5836 val vidBind
= VId
.fromString
"Bind"
5839 (* Basic
exception names
[Section
6.5] *)
5841 val enMatch
= ExName
.exname vidMatch
5842 val enBind
= ExName
.exname vidBind
5845 (* Value entries
[Appendix D
] *)
5847 val valstrEq
= (BasVal
"=", v
)
5848 val valstrAssign
= (op:=, v
)
5850 val valstrFalse
= (VId vidFalse
, c
)
5851 val valstrTrue
= (VId vidTrue
, c
)
5852 val valstrNil
= (VId vidNil
, c
)
5853 val valstrCons
= (VId vidCons
, c
)
5854 val valstrRef
= (VId vidRef
, c
)
5856 val valstrMatch
= (ExVal(ExName enMatch
), e
)
5857 val valstrBind
= (ExVal(ExName enBind
), e
)
5860 (* TyCons
[Figure
26] *)
5862 val tyconUnit
= TyCon
.fromString
"unit"
5863 val tyconBool
= TyCon
.fromString
"bool"
5864 val tyconInt
= TyCon
.fromString
"int"
5865 val tyconWord
= TyCon
.fromString
"word"
5866 val tyconReal
= TyCon
.fromString
"real"
5867 val tyconString
= TyCon
.fromString
"string"
5868 val tyconChar
= TyCon
.fromString
"char"
5869 val tyconList
= TyCon
.fromString
"list"
5870 val tyconRef
= TyCon
.fromString
"ref"
5871 val tyconExn
= TyCon
.fromString
"exn"
5874 (* Type ValEnvs
[Figure
26] *)
5876 val VEUnit
= VIdMap
.empty
5877 val VEBool
= VIdMap
.fromList
[(vidFalse
, valstrFalse
),
5878 (vidTrue
, valstrTrue
)] : ValEnv
5879 val VEInt
= VIdMap
.empty
5880 val VEWord
= VIdMap
.empty
5881 val VEReal
= VIdMap
.empty
5882 val VEString
= VIdMap
.empty
5883 val VEChar
= VIdMap
.empty
5884 val VEList
= VIdMap
.fromList
[(vidNil
, valstrNil
),
5885 (vidCons
, valstrCons
)] : ValEnv
5886 val VERef
= VIdMap
.fromList
[(vidRef
, valstrRef
)] : ValEnv
5887 val VEExn
= VIdMap
.empty
5890 (* Environments
[Appendix D
] *)
5892 val SE0
= StrIdMap
.empty
5894 val TE0
= TyConMap
.fromList
[(tyconUnit
, VEUnit
),
5895 (tyconBool
, VEBool
),
5897 (tyconWord
, VEWord
),
5898 (tyconReal
, VEReal
),
5899 (tyconString
, VEString
),
5900 (tyconChar
, VEChar
),
5901 (tyconList
, VEList
),
5905 val VE0
= VIdMap
.fromList
[(vidEq
, valstrEq
),
5906 (vidAssign
, valstrAssign
),
5907 (vidRef
, valstrRef
),
5908 (vidNil
, valstrNil
),
5909 (vidCons
, valstrCons
),
5910 (vidFalse
, valstrFalse
),
5911 (vidTrue
, valstrTrue
),
5912 (vidMatch
, valstrMatch
),
5913 (vidBind
, valstrBind
)] : ValEnv
5915 val E0
= (SE0
,TE0
,VE0
)
5918 (* Associated state
*)
5920 val mem
= AddrMap
.empty
5921 val ens
= ExNameSet
.fromList
[enMatch
, enBind
]
5926 (* stop
of InitialDynamicEnv
.sml
*)
5927 (* start
of INTERFACE
.sml
*)
5929 * Standard ML interfaces
5931 * Definition
, section
7.2
5934 signature INTERFACE
=
5944 type Env
= DynamicEnv
.Env
5947 (* Export types
[Section
7.2] *)
5949 type ValInt
= IdStatus
VIdMap (* [VI
] *)
5950 type TyInt
= ValInt
TyConMap (* [TI
] *)
5952 type Str
= (IdStatus
, ValInt
) Str
'
5953 type StrInt
= Str
StrIdMap (* [SI
] *)
5955 type Int = StrInt
* TyInt
* ValInt (* [I
] *)
5960 val fromSI
: StrInt
-> Int
5961 val fromTI
: TyInt
-> Int
5962 val fromVI
: ValInt
-> Int
5963 val fromVIandTI
: ValInt
* TyInt
-> Int
5965 val Inter
: Env
-> Int
5966 val cutdown
: Env
* Int -> Env
5969 (* stop
of INTERFACE
.sml
*)
5970 (* start
of Interface
.sml
*)
5972 * Standard ML interfaces
5974 * Definition
, section
7.2
5978 structure Interface
:> INTERFACE
=
5983 structure GenericEnv
= GenericEnvFn()
5990 type Env
= DynamicEnv
.Env
5993 (* Export types
[Section
7.2] *)
5995 type ValInt
= IdStatus
VIdMap (* [VI
] *)
5996 type TyInt
= ValInt
TyConMap (* [TI
] *)
5998 type Str
= (IdStatus
, ValInt
) Str
'
5999 type StrInt
= Str
StrIdMap (* [SI
] *)
6001 type Int = StrInt
* TyInt
* ValInt (* [I
] *)
6004 (* Injections
[Section
4.3] *)
6009 val fromVIandTI
= fromVEandTE
6012 (* Extracting interfaces from environments
[Section
7.2] *)
6014 fun InterVE VE
= VIdMap
.map (fn(v
,is
) => is
) VE
6015 fun InterTE TE
= TyConMap
.map (fn VE
=> InterVE VE
) TE
6016 fun InterSE SE
= StrIdMap
.map (fn DynamicEnv
.Str E
=> Str(Inter E
)) SE
6018 and Inter (SE
,TE
,VE
) = (InterSE SE
, InterTE TE
, InterVE VE
)
6021 (* Cutting down environments
[Section
7.2] *)
6023 fun cutdownVE(VE
, VI
) =
6025 (fn(vid
, is
, VE
') =>
6026 case VIdMap
.find(VE
, vid
)
6027 of SOME(v
,is
') => VIdMap
.insert(VE
', vid
, (v
,is
))
6031 fun cutdownTE(TE
, TI
) =
6033 (fn(tycon
, VI
', TE
') =>
6034 case TyConMap
.find(TE
, tycon
)
6035 of SOME VE
' => TyConMap
.insert(TE
', tycon
, cutdownVE(VE
',VI
'))
6039 fun cutdownSE(SE
, SI
) =
6041 (fn(strid
, Str I
, SE
') =>
6042 case StrIdMap
.find(SE
, strid
)
6043 of SOME(DynamicEnv
.Str E
) =>
6044 StrIdMap
.insert(SE
', strid
, DynamicEnv
.Str(cutdown(E
,I
)))
6048 and cutdown((SE
,TE
,VE
), (SI
,TI
,VI
)) =
6049 ( cutdownSE(SE
, SI
), cutdownTE(TE
, TI
), cutdownVE(VE
, VI
) )
6052 (* stop
of Interface
.sml
*)
6053 (* start
of DYNAMIC_BASIS
.sml
*)
6055 * Standard ML dynamic basis
and environments
of modules
6057 * Definition
, section
7.2
6060 signature DYNAMIC_BASIS
=
6065 type StrId
= StrId
.Id
6066 type SigId
= SigId
.Id
6067 type FunId
= FunId
.Id
6068 type longStrId
= LongStrId
.longId
6069 type longTyCon
= LongTyCon
.longId
6070 type Env
= DynamicEnv
.Env
6071 type ValEnv
= DynamicEnv
.ValEnv
6072 type StrEnv
= DynamicEnv
.StrEnv
6073 type Str
= DynamicEnv
.Str
6074 type Int = Interface
.Int
6075 type StrExp
= GrammarModule
.StrExp
6077 type 'a SigIdMap
= 'a SigIdMap
.map
6078 type 'a FunIdMap
= 'a FunIdMap
.map
6081 (* Types
[Section
7.2] *)
6083 datatype FunctorClosure
=
6084 FunctorClosure
of (StrId
* Int) * StrExp
*
6085 (*Basis
*) (FunctorClosure FunIdMap
* Int SigIdMap
* Env
)
6087 type SigEnv
= Int SigIdMap (* [G
] *)
6088 type FunEnv
= FunctorClosure
FunIdMap (* [F
] *)
6090 type Basis
= FunEnv
* SigEnv
* Env (* [B
] *)
6096 val fromE
: Env
-> Basis
6097 val fromF
: FunEnv
-> Basis
6098 val fromG
: SigEnv
-> Basis
6100 val Eof
: Basis
-> Env
6102 val plus
: Basis
* Basis
-> Basis
6103 val plusSE
: Basis
* StrEnv
-> Basis
6104 val plusG
: Basis
* SigEnv
-> Basis
6105 val plusF
: Basis
* FunEnv
-> Basis
6106 val plusE
: Basis
* Env
-> Basis
6108 val findStrId
: Basis
* StrId
-> Str option
6109 val findSigId
: Basis
* SigId
-> Int option
6110 val findFunId
: Basis
* FunId
-> FunctorClosure option
6111 val findLongStrId
: Basis
* longStrId
-> Str option
6112 val findLongTyCon
: Basis
* longTyCon
-> ValEnv option
6115 (* stop
of DYNAMIC_BASIS
.sml
*)
6116 (* start
of DynamicBasis
.sml
*)
6118 * Standard ML dynamic basis
and environments
of modules
6120 * Definition
, section
7.2
6124 structure DynamicBasis
:> DYNAMIC_BASIS
=
6129 type StrId
= StrId
.Id
6130 type SigId
= SigId
.Id
6131 type FunId
= FunId
.Id
6132 type longStrId
= LongStrId
.longId
6133 type longTyCon
= LongTyCon
.longId
6134 type Env
= DynamicEnv
.Env
6135 type ValEnv
= DynamicEnv
.ValEnv
6136 type StrEnv
= DynamicEnv
.StrEnv
6137 type Str
= DynamicEnv
.Str
6138 type Int = Interface
.Int
6139 type StrExp
= GrammarModule
.StrExp
6141 type 'a SigIdMap
= 'a SigIdMap
.map
6142 type 'a FunIdMap
= 'a FunIdMap
.map
6145 (* Types
[Section
7.2] *)
6147 datatype FunctorClosure
=
6148 FunctorClosure
of (StrId
* Int) * StrExp
*
6149 (*Basis
*) (FunEnv
* SigEnv
* Env
)
6151 withtype SigEnv
= Int SigIdMap (* [G
] *)
6152 and FunEnv
= FunctorClosure
FunIdMap (* [F
] *)
6154 type Basis
= FunEnv
* SigEnv
* Env (* [B
] *)
6158 (* Injections
[Sections
4.3 and 7.2] *)
6160 val empty
= ( FunIdMap
.empty
, SigIdMap
.empty
, DynamicEnv
.empty
)
6162 fun fromE E
= ( FunIdMap
.empty
, SigIdMap
.empty
, E
)
6163 fun fromF F
= ( F
, SigIdMap
.empty
, DynamicEnv
.empty
)
6164 fun fromG G
= ( FunIdMap
.empty
, G
, DynamicEnv
.empty
)
6167 (* Injections
[Sections
4.3 and 7.2] *)
6172 (* Modifications
[Sections
4.3 and 7.2] *)
6174 infix plus plusG plusF plusE plusSE IBplusI
6176 fun (F
,G
,E
) plus (F
',G
',E
') =
6177 ( FunIdMap
.unionWith #
2 (F
,F
')
6178 , SigIdMap
.unionWith #
2 (G
,G
')
6179 , DynamicEnv
.plus(E
,E
')
6182 fun (F
,G
,E
) plusG G
' = ( F
, SigIdMap
.unionWith #
2 (G
,G
'), E
)
6183 fun (F
,G
,E
) plusF F
' = ( FunIdMap
.unionWith #
2 (F
,F
'), G
, E
)
6184 fun (F
,G
,E
) plusE E
' = ( F
, G
, DynamicEnv
.plus(E
,E
') )
6185 fun (F
,G
,E
) plusSE SE
= ( F
, G
, DynamicEnv
.plusSE(E
,SE
) )
6188 (* Application (lookup
) [Sections
7.2 and 4.3] *)
6190 fun findStrId((F
,G
,E
), strid
) = DynamicEnv
.findStrId(E
, strid
)
6191 fun findSigId((F
,G
,E
), sigid
) = SigIdMap
.find(G
, sigid
)
6192 fun findFunId((F
,G
,E
), funid
) = FunIdMap
.find(F
, funid
)
6193 fun findLongStrId((F
,G
,E
), longstrid
) =
6194 DynamicEnv
.findLongStrId(E
, longstrid
)
6195 fun findLongTyCon((F
,G
,E
), longtycon
) =
6196 DynamicEnv
.findLongTyCon(E
, longtycon
)
6199 (* stop
of DynamicBasis
.sml
*)
6200 (* start
of INITIAL_DYNAMIC_BASIS
.sml
*)
6202 * Standard ML initial dynamic basis
6204 * Definition
, appendix D
6207 * The Definition does not specify what the initial state has to contain
.
6208 * This is a bug
as it must at least contain the
exception names Match
6209 * and Bind
. We put the state associated
with the initial basis
in
6213 signature INITIAL_DYNAMIC_BASIS
=
6218 type Basis
= DynamicBasis
.Basis
6219 type State
= InitialDynamicEnv
.State
6228 (* stop
of INITIAL_DYNAMIC_BASIS
.sml
*)
6229 (* start
of InitialDynamicBasis
.sml
*)
6231 * Standard ML initial dynamic basis
6233 * Definition
, appendix D
6236 * The Definition does not specify what the initial state has to contain
.
6237 * This is a bug
as it must at least contain the
exception names Match
6238 * and Bind
. We put the state associated
with the initial basis
in
6242 structure InitialDynamicBasis
:> INITIAL_DYNAMIC_BASIS
=
6247 type Basis
= DynamicBasis
.Basis
6248 type State
= InitialDynamicEnv
.State
6253 val F0
= FunIdMap
.empty
6254 val G0
= SigIdMap
.empty
6255 val E0
= InitialDynamicEnv
.E0
6260 (* Associated state
*)
6262 val s
= InitialDynamicEnv
.s
6265 (* stop
of InitialDynamicBasis
.sml
*)
6266 (* start
of ERROR
.sml
*)
6277 type position
= Source
.region
6282 exception Error
of position
* string
6284 val error
: position
* string -> 'a
6285 val warning
: position
* string -> unit
6288 (* stop
of ERROR
.sml
*)
6289 (* start
of Error
.sml
*)
6295 structure Error
:> ERROR
=
6300 type position
= Source
.region
6305 fun print((pos1
,pos2
), message
) =
6307 val a
= Int.toString pos1
6308 val b
= Int.toString pos2
6310 TextIO.output(TextIO.stdErr
, a ^
"-" ^ b ^
": " ^ message ^
"\n")
6311 ; TextIO.flushOut
TextIO.stdErr
6317 exception Error
of position
* string
6319 fun error(pos
, message
) =
6320 ( print(pos
, message
)
6321 ; raise Error(pos
, message
)
6324 fun warning(pos
, message
) =
6325 print(pos
, "warning: " ^ message
)
6328 (* stop
of Error
.sml
*)
6329 (* start
of INFIX
.sml
*)
6331 * Standard ML
infix resolution
6333 * Definition
, section
2.6
6342 type Info
= GrammarCore
.Info
6344 type Op
= GrammarCore
.Op
6345 type VId
= GrammarCore
.VId
6346 type longVId
= GrammarCore
.longVId
6347 type Exp
= GrammarCore
.Exp
6348 type Pat
= GrammarCore
.Pat
6349 type AtExp
= GrammarCore
.AtExp
6350 type AtPat
= GrammarCore
.AtPat
6353 (* Modifying fixity status
*)
6355 datatype Assoc
= LEFT | RIGHT
6357 type InfStatus
= Assoc
* int
6358 type InfEnv
= InfStatus VIdMap
.map (* [J
] *)
6361 val assign
: InfEnv
* VId list
* InfStatus
-> InfEnv
6362 val cancel
: InfEnv
* VId list
-> InfEnv
6365 (* Resolving phrases containing infixed identifiers
*)
6367 val parseExp
: InfEnv
* AtExp list
-> Exp
6368 val parsePat
: InfEnv
* AtPat list
-> Pat
6369 val parseFmrule
: InfEnv
* AtPat list
-> Op
* VId
* AtPat list
6372 (* stop
of INFIX
.sml
*)
6373 (* start
of Infix
.sml
*)
6375 * Standard ML
infix resolution
6377 * Definition
, section
2.6
6381 structure Infix
:> INFIX
=
6389 (* Type definitions
*)
6391 datatype Assoc
= LEFT | RIGHT
6393 type InfStatus
= Assoc
* int
6395 type InfEnv
= InfStatus VIdMap
.map (* [J
] *)
6399 (* Modifying
infix environments
*)
6401 val empty
= VIdMap
.empty
6403 fun assign(J
, vids
, infstatus
) =
6405 fun insert(vid
, J
) = VIdMap
.insert(J
, vid
, infstatus
)
6407 List.foldl insert J vids
6410 fun cancel(J
, vids
) =
6412 fun remove(vid
, J
) = #
1(VIdMap
.remove(J
, vid
))
6414 List.foldl remove J vids
6419 (* Helpers for error messages
*)
6421 val error
= Error
.error
6422 fun errorVId(I
, s
, vid
) = error(I
, s ^ VId
.toString vid
)
6423 fun errorLongVId(I
, s
, longvid
) = error(I
, s ^ LongVId
.toString longvid
)
6427 (* Categorisation
of atomic expressions
and patterns
*)
6429 datatype 'a FixityCategory
= NONFIX
of 'a
6430 | INFIX
of InfStatus
* VId
* Info
6432 fun isInfix
J (longvid
) =
6433 LongVId
.isUnqualified longvid
andalso
6434 VIdMap
.find(J
, LongVId
.toId longvid
) <> NONE
6436 fun categoriseLongVId
J (atomic
, I
, longvid
) =
6437 if LongVId
.isUnqualified longvid
then
6439 val vid
= LongVId
.toId longvid
6441 case VIdMap
.find(J
, vid
)
6442 of NONE
=> NONFIX(atomic
)
6443 | SOME infstatus
=> INFIX(infstatus
, vid
, I
)
6448 fun categoriseAtExp
J (atexp
as LONGVIDAtExp(I
, SANSOp
, longvid
)) =
6449 categoriseLongVId
J (atexp
, I
, longvid
)
6450 | categoriseAtExp
J (atexp
) = NONFIX(atexp
)
6452 fun categoriseAtPat
J (atpat
as LONGVIDAtPat(I
, SANSOp
, longvid
)) =
6453 categoriseLongVId
J (atpat
, I
, longvid
)
6454 | categoriseAtPat
J (atpat
) = NONFIX(atpat
)
6458 (* Resolving infixing
[Section
2.6] *)
6460 fun parse(app
, infapp
, es
) =
6462 fun loop(NONFIX(e
)::[], []) = e
6464 |
loop(NONFIX(e2
)::NONFIX(e1
)::s
', i
) =
6465 (* reduce
nonfix application
*)
6466 loop(NONFIX(app(e1
, e2
))::s
', i
)
6468 |
loop(s
, NONFIX(e
)::i
') =
6470 loop(NONFIX(e
)::s
, i
')
6472 |
loop(s
as NONFIX(e
)::[], INFIX(x
)::i
') =
6474 loop(INFIX(x
)::s
, i
')
6476 |
loop(NONFIX(e2
)::INFIX(_
,vid
,_
)::NONFIX(e1
)::s
', []) =
6477 (* reduce
infix application
*)
6478 loop(NONFIX(infapp(e1
, vid
, e2
))::s
', [])
6480 |
loop(s
as NONFIX(e2
)::INFIX((a1
,p1
),vid1
,I1
)::NONFIX(e1
)::s
',
6481 i
as INFIX(x2
as ((a2
,p2
),vid2
,I2
))::i
') =
6483 (* reduce
infix application
*)
6484 loop(NONFIX(infapp(e1
, vid1
, e2
))::s
', i
)
6485 else if p1
< p2
then
6487 loop(INFIX(x2
)::s
, i
')
6488 else if a1
<> a2
then
6489 error(Source
.over(I1
,I2
), "conflicting infix associativity")
6490 else if a1
= LEFT
then
6491 (* reduce
infix application
*)
6492 loop(NONFIX(infapp(e1
, vid1
, e2
))::s
', i
)
6493 else (* a1
= RIGHT
*)
6495 loop(INFIX(x2
)::s
, i
')
6497 |
loop(INFIX(_
, vid
, I
)::s
, []) =
6498 errorVId(I
, "misplaced infix identifier ", vid
)
6500 |
loop(INFIX(x
)::s
, INFIX(_
, vid
, I
)::i
) =
6501 errorVId(I
, "misplaced infix identifier ", vid
)
6503 |
loop([], INFIX(_
, vid
, I
)::i
) =
6504 errorVId(I
, "misplaced infix identifier ", vid
)
6506 | loop _
= raise Fail
"Infix.parse: inconsistency"
6512 (* Resolving infixed expressions
[Section
2.6] *)
6514 fun atexpExp(PARAtExp(_
, exp
)) = exp
6515 | atexpExp atexp
= ATEXPExp(infoAtExp atexp
, atexp
)
6517 fun appExp(atexp1
, atexp2
) =
6519 val I1
= infoAtExp atexp1
6520 val I2
= infoAtExp atexp2
6521 val I
= Source
.over(I1
, I2
)
6523 PARAtExp(I
, APPExp(I
, atexpExp atexp1
, atexp2
))
6526 fun pairExp(atexp1
, atexp2
) =
6528 val I1
= infoAtExp atexp1
6529 val I2
= infoAtExp atexp2
6530 val lab1
= Lab
.fromInt
1
6531 val lab2
= Lab
.fromInt
2
6532 val exprow2
= ExpRow(I2
, lab2
, atexpExp atexp2
, NONE
)
6533 val exprow1
= ExpRow(I1
, lab1
, atexpExp atexp1
, SOME exprow2
)
6535 RECORDAtExp(Source
.over(I1
,I2
), SOME exprow1
)
6538 fun infappExp(atexp1
, vid
, atexp2
) =
6540 val Ivid
= Source
.between(infoAtExp atexp1
, infoAtExp atexp2
)
6541 val longvid
= LongVId
.fromId vid
6542 val atexp1
' = LONGVIDAtExp(Ivid
, SANSOp
, longvid
)
6543 val atexp2
' = pairExp(atexp1
, atexp2
)
6545 appExp(atexp1
', atexp2
')
6549 fun parseExp(J
, atexps
) =
6551 val atexp
= parse(appExp
, infappExp
,
6552 List.map (categoriseAtExp J
) atexps
)
6558 (* Resolving infixed patterns
[Section
2.6] *)
6560 fun atpatPat(PARAtPat(_
, pat
)) = pat
6561 | atpatPat atpat
= ATPATPat(infoAtPat atpat
, atpat
)
6563 fun conPat(LONGVIDAtPat(I1
, op_opt
, longvid
), atpat
) =
6565 val I2
= infoAtPat atpat
6566 val I
= Source
.over(I1
, I2
)
6568 PARAtPat(I
, CONPat(I
, op_opt
, longvid
, atpat
))
6571 |
conPat(_
, atpat
) =
6572 error(infoAtPat atpat
, "misplaced atomic pattern")
6574 fun pairPat(atpat1
, atpat2
) =
6576 val I1
= infoAtPat atpat1
6577 val I2
= infoAtPat atpat2
6578 val lab1
= Lab
.fromInt
1
6579 val lab2
= Lab
.fromInt
2
6580 val patrow2
= ROWPatRow(I2
, lab2
, atpatPat atpat2
, NONE
)
6581 val patrow1
= ROWPatRow(I1
, lab1
, atpatPat atpat1
, SOME patrow2
)
6583 RECORDAtPat(Source
.over(I1
,I2
), SOME patrow1
)
6586 fun infconPat(atpat1
, vid
, atpat2
) =
6588 val Ivid
= Source
.between(infoAtPat atpat1
, infoAtPat atpat2
)
6589 val longvid
= LongVId
.fromId vid
6590 val atpat1
' = LONGVIDAtPat(Ivid
, SANSOp
, longvid
)
6591 val atpat2
' = pairPat(atpat1
, atpat2
)
6593 conPat(atpat1
', atpat2
')
6597 fun parsePat(J
, atpats
) =
6599 val atpat
= parse(conPat
, infconPat
,
6600 List.map (categoriseAtPat J
) atpats
)
6606 (* Resolving
fun match rules
[Figure
21, note
] *)
6608 fun parseFmrule(J
, atpats
) =
6610 * Allowed is the following
:
6611 * (1) <op> vid atpat
+
6612 * (2) (atpat infix_vid atpat
) atpat
*
6613 * (3) atpat infix_vid atpat
6616 fun checkNonfixity
[] = true
6617 |
checkNonfixity(NONFIX _
::t
) = checkNonfixity t
6618 |
checkNonfixity(INFIX(_
, vid
, I
)::t
) =
6619 errorVId(I
, "misplaced infix identifier ", vid
)
6621 fun maybeNonfixClause(ps
) =
6623 of LONGVIDAtPat(I
, op_opt
, longvid
) =>
6624 if not(LongVId
.isUnqualified longvid
) then
6625 errorLongVId(I
, "misplaced long identifier ",
6627 else if List.length atpats
< 2 then
6628 error(I
, "missing function arguments")
6630 ( checkNonfixity
ps (* including
1st
*)
6631 ; ( op_opt
, LongVId
.toId longvid
, List.tl atpats
)
6633 |
WILDCARDAtPat(I
) =>
6634 error(I
, "misplaced wildcard pattern")
6635 |
SCONAtPat(I
, _
) =>
6636 error(I
, "misplaced constant pattern")
6637 |
RECORDAtPat(I
, _
) =>
6638 error(I
, "misplaced record or tuple pattern")
6640 error(I
, "misplaced parenthesised pattern")
6642 fun maybeParenthesisedInfixClause(ps
) =
6644 of NONFIX(PARAtPat(_
, CONPat(I
, SANSOp
, longvid
, atpat
))) =>
6645 if not(LongVId
.isUnqualified longvid
) then
6646 errorLongVId(I
, "misplaced long identifier ",
6648 else if not(isInfix J longvid
) then
6649 error(I
, "misplaced non-infix pattern")
6651 (* Now
, longvid has
infix status but is sans `
op',
6652 so it can only result from resolving an
6653 appropriate
infix construction
. *)
6654 ( checkNonfixity(List.tl ps
)
6655 ; ( SANSOp
, LongVId
.toId longvid
,
6656 atpat
::List.tl atpats
)
6659 |
NONFIX(PARAtPat(_
, pat
)) =>
6660 error(infoPat pat
, "misplaced non-infix pattern")
6662 | _
=> maybeNonfixClause(ps
)
6664 fun maybePlainInfixClause(ps
) =
6666 of [NONFIX atpat1
, INFIX(_
, vid
, I
), NONFIX atpat2
] =>
6667 ( SANSOp
, vid
, pairPat(atpat1
, atpat2
)::[] )
6669 | _
=> maybeParenthesisedInfixClause(ps
)
6671 maybePlainInfixClause(List.map (categoriseAtPat J
) atpats
)
6675 (* stop
of Infix
.sml
*)
6676 (* start
of INITIAL_INFIX_ENV
.sml
*)
6678 * Standard ML initial
infix environment
6680 * Definition
, Appendix C
6683 signature INITIAL_INFIX_ENV
=
6688 type InfEnv
= Infix
.InfEnv
6695 (* stop
of INITIAL_INFIX_ENV
.sml
*)
6696 (* start
of InitialInfixEnv
.sml
*)
6698 * Standard ML initial
infix environment
6700 * Definition
, Appendix C
6703 structure InitialInfixEnv
:> INITIAL_INFIX_ENV
=
6708 type InfEnv
= Infix
.InfEnv
6710 (* Value identifiers
*)
6712 val vidCons
= VId
.fromString
"::"
6713 val vidEqual
= VId
.fromString
"="
6714 val vidAssign
= VId
.fromString
":="
6718 val J0
= VIdMap
.fromList
[(vidCons
, (Infix
.RIGHT
, 5)),
6719 (vidEqual
, (Infix
.LEFT
, 4)),
6720 (vidAssign
, (Infix
.LEFT
, 3))]
6722 (* stop
of InitialInfixEnv
.sml
*)
6723 (* start
of BASIS
.sml
*)
6725 * Standard ML combined basis
6727 * Definition
, section
8
6735 type StaticBasis
= StaticBasis
.Basis (* [B_STAT
] *)
6736 type DynamicBasis
= DynamicBasis
.Basis (* [B_DYN
] *)
6738 (* Type
[Section
8] *)
6740 type Basis
= StaticBasis
* DynamicBasis (* [B
] *)
6745 val B_STATof
: Basis
-> StaticBasis
6746 val B_DYNof
: Basis
-> DynamicBasis
6748 val oplus
: Basis
* Basis
-> Basis
6751 (* stop
of BASIS
.sml
*)
6752 (* start
of Basis
.sml
*)
6754 * Standard ML combined basis
6756 * Definition
, section
8
6759 structure Basis
:> BASIS
=
6764 type StaticBasis
= StaticBasis
.Basis (* [B_STAT
] *)
6765 type DynamicBasis
= DynamicBasis
.Basis (* [B_DYN
] *)
6767 (* Type
[Section
8] *)
6769 type Basis
= StaticBasis
* DynamicBasis (* [B
] *)
6774 fun B_STATof (B_STAT
,B_DYN
) = B_STAT
6775 fun B_DYNof (B_STAT
,B_DYN
) = B_DYN
6778 (* Modification
[Section
4.3] *)
6782 fun (B_STAT
,B_DYN
) oplus (B_STAT
',B_DYN
') =
6783 ( StaticBasis
.plus(B_STAT
, B_STAT
')
6784 , DynamicBasis
.plus(B_DYN
, B_DYN
')
6788 (* stop
of Basis
.sml
*)
6789 (* start
of PACK
.sml
*)
6791 * Standard ML
exception packets
6793 * Definition
, section
6.2
6802 type 'a ExVal
= 'a Val
.ExVal
6803 type FcnClosure
= DynamicEnv
.FcnClosure
6806 (* Definitions
[Section
6.2] *)
6808 type Pack
= FcnClosure
ExVal (* [p
] *)
6810 exception Pack
of Pack
6813 (* stop
of PACK
.sml
*)
6814 (* start
of Pack
.sml
*)
6816 * Standard ML
exception packets
6818 * Definition
, section
6.2
6822 structure Pack
:> PACK
=
6827 type 'a ExVal
= 'a Val
.ExVal
6828 type FcnClosure
= DynamicEnv
.FcnClosure
6831 (* Definitions
[Section
6.2] *)
6833 type Pack
= FcnClosure
ExVal (* [p
] *)
6835 exception Pack
of Pack
6838 (* stop
of Pack
.sml
*)
6839 (* start
of BASVAL
.sml
*)
6841 * Standard ML basic values
6843 * Definition
, section
6.4
6852 type BasVal
= Val
.BasVal
6853 type 'a Val
= 'a Val
.Val
6855 exception Pack
of Pack
.Pack (* = Pack
.Pack
*)
6862 val APPLY
: BasVal
* 'a Val
-> 'a
Val (* / Pack
*)
6864 val toString
: BasVal
-> string
6867 (* stop
of BASVAL
.sml
*)
6868 (* start
of BasVal
.sml
*)
6870 * Standard ML basic values
6872 * Definition
, section
6.4
6876 structure BasVal
:> BASVAL
=
6881 type BasVal
= Val
.BasVal
6882 type 'a Val
= 'a Val
.Val
6884 exception Pack
= Pack
.Pack
6892 (* Application
of basic values
*)
6898 of SOME vv
=> Val
.toBoolVal(Val
.equal vv
)
6899 | NONE
=> raise TypeError
6901 | APPLY _
= raise Fail
"BasVal.APPLY: unknown basic value"
6904 (* stop
of BasVal
.sml
*)
6905 (* start
of EVAL_CORE
.sml
*)
6907 * Standard ML core evaluation
6909 * Definition
, section
6.7
6912 * - State is passed
as reference
and modified via side effects
. This way
6913 * expanding out
of the state
and exception convention
in the inference
6914 * rules can be
avoided (would really be a pain
). Note that the state
6915 * therefore never is returned
.
6916 * - Doing so
, we can model the
exception convention using exceptions
.
6920 signature EVAL_CORE
=
6925 type Dec
= GrammarCore
.Dec
6926 type Env
= DynamicEnv
.Env
6927 type State
= DynamicEnv
.FcnClosure State
.State
6931 val evalDec
: State ref
* Env
* Dec
-> Env
6934 (* stop
of EVAL_CORE
.sml
*)
6935 (* start
of EvalCore
.sml
*)
6937 * Standard ML core evaluation
6939 * Definition
, sections
6.7 and 6.2
6942 * - State is passed
as reference
and modified via side effects
. This way
6943 * expanding out the state
and exception convention
in the inference rules
6944 * can be
avoided (would really be a pain
). Note that the state therefore
6945 * never is returned
.
6946 * - Doing so
, we can model the
exception convention using exceptions
.
6947 * Rules
of the form A |
- phrase
=> A
'/p therefore turn into
6948 * A |
- phrase
=> A
'.
6949 * - We only pass the state
where necessary
.
6950 * - Special constants have already been evaluated inside the Lexer
.
6953 structure EvalCore
:> EVAL_CORE
=
6958 type Dec
= GrammarCore
.Dec
6959 type Env
= DynamicEnv
.Env
6960 type State
= DynamicEnv
.FcnClosure State
.State
6962 exception Pack
= Pack
.Pack
6967 (* Some helpers for error messages
*)
6969 val error
= Error
.error
6971 fun errorLab(I
, s
, lab
) = error(I
, s ^ Lab
.toString lab
)
6972 fun errorLongVId(I
, s
, longvid
) = error(I
, s ^ LongVId
.toString longvid
)
6973 fun errorLongTyCon(I
, s
, longtycon
) =
6974 error(I
, s ^ LongTyCon
.toString longtycon
)
6975 fun errorLongStrId(I
, s
, longstrid
) =
6976 error(I
, s ^ LongStrId
.toString longstrid
)
6979 (* Helpers for environment modification
*)
6981 val plus
= DynamicEnv
.plus
6982 val plusVE
= DynamicEnv
.plusVE
6983 val plusTE
= DynamicEnv
.plusTE
6984 val plusVEandTE
= DynamicEnv
.plusVEandTE
6986 infix plus plusVE plusTE plusVEandTE
6990 (* Evaluating special constants
[Section
6.2] *)
6992 fun valSCon(SCon
.INT n
) = Val
.SVal(SVal
.INT n
)
6993 |
valSCon(SCon
.WORD w
) = Val
.SVal(SVal
.WORD w
)
6994 |
valSCon(SCon
.CHAR c
) = Val
.SVal(SVal
.CHAR c
)
6995 |
valSCon(SCon
.REAL x
) = Val
.SVal(SVal
.REAL x
)
6996 |
valSCon(SCon
.STRING s
) = Val
.SVal(SVal
.STRING s
)
6999 (* Inference rules
[Section
6.7] *)
7004 (* Atomic Expressions
*)
7006 fun evalAtExp(s
,E
, SCONAtExp(I
, scon
)) =
7010 |
evalAtExp(s
,E
, LONGVIDAtExp(I
, _
, longvid
)) =
7013 val (v
,is
) = case DynamicEnv
.findLongVId(E
, longvid
)
7014 of SOME valstr
=> valstr
7016 errorLongVId(I
, "runtime error: \
7017 \unknown identifier ", longvid
)
7022 |
evalAtExp(s
,E
, RECORDAtExp(I
, exprow_opt
)) =
7025 val r
= case exprow_opt
7026 of NONE
=> LabMap
.empty
7027 | SOME exprow
=> evalExpRow(s
,E
, exprow
)
7032 |
evalAtExp(s
,E
, LETAtExp(I
, dec
, exp
)) =
7035 val E
' = evalDec(s
,E
, dec
)
7036 val v
= evalExp(s
,E plus E
', exp
)
7041 |
evalAtExp(s
,E
, PARAtExp(I
, exp
)) =
7044 val v
= evalExp(s
,E
, exp
)
7050 (* Expression Rows
*)
7052 and evalExpRow(s
,E
, ExpRow(I
, lab
, exp
, exprow_opt
)) =
7055 val v
= evalExp(s
,E
, exp
)
7056 val r
= case exprow_opt
7057 of NONE
=> LabMap
.empty
7058 | SOME exprow
=> evalExpRow(s
,E
, exprow
)
7060 LabMap
.insert(r
, lab
, v
)
7066 and evalExp(s
,E
, ATEXPExp(I
, atexp
)) =
7069 val v
= evalAtExp(s
,E
, atexp
)
7074 |
evalExp(s
,E
, APPExp(I
, exp
, atexp
)) =
7075 (* [Rules
97 to
103] *)
7077 val v1
= evalExp(s
,E
, exp
)
7078 val v
= evalAtExp(s
,E
, atexp
)
7082 if vid
= VId
.fromString
"ref" then
7087 s
:= State
.insertAddr(!s
, a
, v
)
7094 | Val
.ExVal(Val
.ExName en
) =>
7096 Val
.ExVal(Val
.ExNameVal(en
,v
))
7101 of SOME(Val
.Addr a
, v
) =>
7102 ( s
:= State
.insertAddr(!s
, a
, v
)
7103 ; Val
.Record LabMap
.empty
7105 | _
=> error(I
, "runtime type error: address expected")
7112 | Val
.FcnClosure(DynamicEnv
.FcnClosure(match
,E
',VE
)) =>
7115 val v
' = evalMatch(s
,E
' plusVE DynamicEnv
.Rec VE
, v
, match
)
7121 raise Pack(Val
.ExName InitialDynamicEnv
.enMatch
)
7124 error(I
, "runtime type error: applicative value expected")
7127 |
evalExp(s
,E
, TYPEDExp(I
, exp
, _
)) =
7128 (* Omitted
[Section
6.1] *)
7131 |
evalExp(s
,E
, HANDLEExp(I
, exp
, match
)) =
7132 (* [Rule
104 to
106] *)
7134 val v
= evalExp(s
,E
, exp
)
7139 handle Pack
.Pack e
=>
7141 val v
= evalMatch(s
,E
,Val
.ExVal e
, match
)
7151 |
evalExp(s
,E
, RAISEExp(I
, exp
)) =
7154 val e
= case evalExp(s
,E
, exp
)
7156 | _
=> error(I
, "runtime type error: \
7157 \exception value expected")
7162 |
evalExp(s
,E
, FNExp(I
, match
)) =
7164 Val
.FcnClosure(DynamicEnv
.FcnClosure(match
,E
,VIdMap
.empty
))
7169 and evalMatch(s
,E
,v
, Match(I
, mrule
, match_opt
)) =
7170 (* [Rules
109 to
111] *)
7172 val v
' = evalMrule(s
,E
,v
, mrule
)
7186 val v
' = evalMatch(s
,E
,v
, match
)
7194 and evalMrule(s
,E
,v
, Mrule(I
, pat
, exp
)) =
7195 (* [Rules
112 and 113] *)
7197 val VE
= evalPat(s
,E
,v
, pat
)
7199 val v
' = evalExp(s
,E plusVE VE
, exp
)
7203 (* FAIL on evalPat propagates through
[Rule
113] *)
7208 and evalDec(s
,E
, VALDec(I
, tyvarseq
, valbind
)) =
7211 val VE
= evalValBind(s
,E
, valbind
)
7213 DynamicEnv
.fromVE VE
7216 |
evalDec(s
,E
, TYPEDec(I
, typbind
)) =
7219 val TE
= evalTypBind(typbind
)
7221 DynamicEnv
.fromTE TE
7224 |
evalDec(s
,E
, DATATYPEDec(I
, datbind
)) =
7227 val (VE
,TE
) = evalDatBind(datbind
)
7229 DynamicEnv
.fromVEandTE(VE
,TE
)
7232 |
evalDec(s
,E
, REPLICATIONDec(I
, tycon
, longtycon
)) =
7235 val VE
= case DynamicEnv
.findLongTyCon(E
, longtycon
)
7238 errorLongTyCon(I
, "runtime error: unknown type ",
7241 DynamicEnv
.fromVEandTE(VE
, TyConMap
.singleton(tycon
, VE
))
7244 |
evalDec(s
,E
, ABSTYPEDec(I
, datbind
, dec
)) =
7247 val (VE
,TE
) = evalDatBind(datbind
)
7248 val E
' = evalDec(s
,E
plusVEandTE (VE
,TE
), dec
)
7253 |
evalDec(s
,E
, EXCEPTIONDec(I
, exbind
)) =
7256 val VE
= evalExBind(s
,E
, exbind
)
7258 DynamicEnv
.fromVE VE
7261 |
evalDec(s
,E
, LOCALDec(I
, dec1
, dec2
)) =
7264 val E1
= evalDec(s
,E
, dec1
)
7265 val E2
= evalDec(s
,E plus E1
, dec2
)
7270 |
evalDec(s
,E
, OPENDec(I
, longstrids
)) =
7276 case DynamicEnv
.findLongStrId(E
, longstrid
)
7277 of SOME(DynamicEnv
.Str E
) => E
7279 errorLongStrId(I
, "runtime error: unknown \
7280 \structure ", longstrid
) )
7283 List.foldl DynamicEnv
.plus DynamicEnv
.empty Es
7286 |
evalDec(s
,E
, EMPTYDec(I
)) =
7290 |
evalDec(s
,E
, SEQDec(I
, dec1
, dec2
)) =
7293 val E1
= evalDec(s
,E
, dec1
)
7294 val E2
= evalDec(s
,E plus E1
, dec2
)
7300 (* Value Bindings
*)
7302 and evalValBind(s
,E
, PLAINValBind(I
, pat
, exp
, valbind_opt
)) =
7303 (* [Rule
124 and 125] *)
7305 val v
= evalExp(s
,E
, exp
)
7306 val VE
= evalPat(s
,E
,v
, pat
)
7308 val VE
' = case valbind_opt
7309 of NONE
=> VIdMap
.empty
7310 | SOME valbind
=> evalValBind(s
,E
, valbind
)
7312 VIdMap
.unionWith #
2 (VE
, VE
')
7316 raise Pack
.Pack(Val
.ExName InitialDynamicEnv
.enBind
)
7319 |
evalValBind(s
,E
, RECValBind(I
, valbind
)) =
7322 val VE
= evalValBind(s
,E
, valbind
)
7330 and evalTypBind(TypBind(I
, tyvarseq
, tycon
, ty
, typbind_opt
)) =
7333 val TE
= case typbind_opt
7334 of NONE
=> TyConMap
.empty
7335 | SOME typbind
=> evalTypBind(typbind
)
7337 TyConMap
.insert(TE
, tycon
, VIdMap
.empty
)
7341 (* Datatype Bindings
*)
7343 and evalDatBind(DatBind(I
, tyvarseq
, tycon
, conbind
, datbind_opt
)) =
7346 val VE
= evalConBind(conbind
)
7347 val (VE
',TE
') = case datbind_opt
7348 of NONE
=> ( VIdMap
.empty
, TyConMap
.empty
)
7349 | SOME datbind
' => evalDatBind(datbind
')
7351 ( VIdMap
.unionWith #
2 (VE
, VE
')
7352 , TyConMap
.insert(TE
', tycon
, VE
)
7357 (* Constructor Bindings
*)
7359 and evalConBind(ConBind(I
, _
, vid
, _
, conbind_opt
)) =
7362 val VE
= case conbind_opt
7363 of NONE
=> VIdMap
.empty
7364 | SOME conbind
=> evalConBind(conbind
)
7366 VIdMap
.insert(VE
, vid
, (Val
.VId vid
,IdStatus
.c
))
7370 (* Exception Bindings
*)
7372 and evalExBind(s
,E
, NEWExBind(I
, _
, vid
, _
, exbind_opt
)) =
7375 val en
= ExName
.exname vid
7376 val VE
= case exbind_opt
7377 of NONE
=> VIdMap
.empty
7378 | SOME exbind
=> evalExBind(s
,E
, exbind
)
7380 s
:= State
.insertExName(!s
, en
)
7381 ; VIdMap
.insert(VE
, vid
, (Val
.ExVal(Val
.ExName en
),IdStatus
.e
))
7384 |
evalExBind(s
,E
, EQUALExBind(I
, _
, vid
, _
, longvid
, exbind_opt
)) =
7387 val en
= case DynamicEnv
.findLongVId(E
, longvid
)
7388 of SOME(en
,IdStatus
.e
) => en
7390 errorLongVId(I
, "runtime error: non-exception \
7391 \identifier ", longvid
)
7393 errorLongVId(I
, "runtime error: unknown identifier ",
7395 val VE
= case exbind_opt
7396 of NONE
=> VIdMap
.empty
7397 | SOME exbind
=> evalExBind(s
,E
, exbind
)
7399 VIdMap
.insert(VE
, vid
, (en
,IdStatus
.e
))
7403 (* Atomic Patterns
*)
7405 and evalAtPat(s
,E
,v
, WILDCARDAtPat(I
)) =
7409 |
evalAtPat(s
,E
,v
, SCONAtPat(I
, scon
)) =
7410 (* [Rule
133 and 134] *)
7413 if Val
.equal(v
, valSCon(scon
)) then
7420 | _
=> error(I
, "runtime type error: special constant expected")
7423 |
evalAtPat(s
,E
,v
, LONGVIDAtPat(I
, _
, longvid
)) =
7424 (* [Rule
135 to
137] *)
7426 val (strids
,vid
) = LongVId
.explode longvid
7428 if List.null strids
andalso
7429 ( case DynamicEnv
.findVId(E
, vid
)
7431 |
SOME(_
,is
) => is
= IdStatus
.v
) then
7433 VIdMap
.singleton(vid
, (v
,IdStatus
.v
))
7436 val (v
',is
) = case DynamicEnv
.findLongVId(E
, longvid
)
7437 of SOME valstr
=> valstr
7439 errorLongVId(I
,"runtime error: \
7440 \unknown constructor ",
7443 if Val
.equal(v
, v
') then
7452 |
evalAtPat(s
,E
,v
, RECORDAtPat(I
, patrow_opt
)) =
7456 of Val
.Record r
=> r
7458 error(I
, "runtime type error: record expected")
7460 val VE
= case patrow_opt
7462 if LabMap
.isEmpty r
then
7465 error(I
, "runtime type error: \
7466 \empty record expected")
7469 evalPatRow(s
,E
,r
, patrow
)
7474 |
evalAtPat(s
,E
,v
, PARAtPat(I
, pat
)) =
7477 val VE
= evalPat(s
,E
,v
, pat
)
7485 and evalPatRow(s
,E
,r
, WILDCARDPatRow(I
)) =
7489 |
evalPatRow(s
,E
,r
, ROWPatRow(I
, lab
, pat
, patrow_opt
)) =
7490 (* [Rule
141 and 142] *)
7492 val v
= case LabMap
.find(r
, lab
)
7494 | _
=> errorLab(I
, "runtime type error: \
7495 \unmatched label ", lab
)
7496 val VE
= evalPat(s
,E
,v
, pat
)
7498 val VE
' = case patrow_opt
7499 of NONE
=> VIdMap
.empty
7500 | SOME patrow
=> evalPatRow(s
,E
,r
, patrow
)
7502 VIdMap
.unionWithi #
2 (VE
, VE
')
7504 (* FAIL on evalPat propagates through
[Rule
142] *)
7509 and evalPat(s
,E
,v
, ATPATPat(I
, atpat
)) =
7512 val VE
= evalAtPat(s
,E
,v
, atpat
)
7517 |
evalPat(s
,E
,v
, CONPat(I
, _
, longvid
, atpat
)) =
7518 (* [Rules
144 to
148] *)
7519 (case (DynamicEnv
.findLongVId(E
, longvid
), v
)
7520 of ( SOME(Val
.VId vid
, IdStatus
.c
),
7521 Val
.VIdVal(vid
',v
') ) =>
7522 if vid
= VId
.fromString
"ref" then
7523 error(I
, "runtime type error: address expected")
7524 else if vid
= vid
' then
7527 val VE
= evalAtPat(s
,E
,v
', atpat
)
7535 |
( SOME(Val
.ExVal(Val
.ExName en
),IdStatus
.e
),
7536 Val
.ExVal(Val
.ExNameVal(en
',v
')) ) =>
7540 val VE
= evalAtPat(s
,E
,v
', atpat
)
7548 |
( SOME(Val
.VId vid
, IdStatus
.c
),
7550 if vid
= VId
.fromString
"ref" then
7553 val v
= case State
.findAddr(!s
, a
)
7556 raise Fail
"EvalCore.evalPat: \
7558 val VE
= evalAtPat(s
,E
,v
, atpat
)
7563 error(I
, "runtime type error: reference expected")
7566 error(I
, "runtime type error: constructor expected")
7569 |
evalPat(s
,E
,v
, TYPEDPat(I
, pat
, _
)) =
7570 (* Omitted
[Section
6.1] *)
7573 |
evalPat(s
,E
,v
, ASPat(I
, _
, vid
, _
, pat
)) =
7576 val VE
= evalPat(s
,E
,v
, pat
)
7578 VIdMap
.insert(VE
, vid
, (v
,IdStatus
.v
))
7582 (* stop
of EvalCore
.sml
*)
7583 (* start
of INTBASIS
.sml
*)
7585 * Standard ML interface basis
7587 * Definition
, section
7.2
7590 signature INTBASIS
=
7595 type SigId
= SigId
.Id
7596 type longTyCon
= LongTyCon
.longId
7597 type Basis
= DynamicBasis
.Basis
7598 type SigEnv
= DynamicBasis
.SigEnv
7599 type Env
= DynamicEnv
.Env
7600 type Int = Interface
.Int
7601 type ValInt
= Interface
.ValInt
7603 type 'a SigIdMap
= 'a SigIdMap
.map
7606 (* Types
[Section
7.2] *)
7608 type IntBasis
= SigEnv
* Int (* [IB
] *)
7613 val Inter
: Basis
-> IntBasis
7615 val plusI
: IntBasis
* Int -> IntBasis
7617 val findSigId
: IntBasis
* SigId
-> Int option
7618 val findLongTyCon
: IntBasis
* longTyCon
-> ValInt option
7621 (* stop
of INTBASIS
.sml
*)
7622 (* start
of IntBasis
.sml
*)
7624 * Standard ML interface basis
7626 * Definition
, section
7.2
7630 structure IntBasis
:> INTBASIS
=
7635 type SigId
= SigId
.Id
7636 type longTyCon
= LongTyCon
.longId
7637 type Basis
= DynamicBasis
.Basis
7638 type SigEnv
= DynamicBasis
.SigEnv
7639 type Env
= DynamicEnv
.Env
7640 type Int = Interface
.Int
7641 type ValInt
= Interface
.ValInt
7643 type 'a SigIdMap
= 'a SigIdMap
.map
7646 (* Types
[Section
7.2] *)
7648 type IntBasis
= SigEnv
* Int (* [IB
] *)
7651 (* Injections
[Section
7.2] *)
7653 fun Inter (F
,G
,E
) = (G
, Interface
.Inter E
)
7656 (* Modifications
[Sections
4.3 and 7.2] *)
7660 fun (G
,I
) plusI I
' = ( G
, Interface
.plus(I
,I
') )
7663 (* Application (lookup
) [Sections
7.2 and 4.3] *)
7665 fun findSigId((G
,I
), sigid
) = SigIdMap
.find(G
, sigid
)
7667 fun findLongTyCon((G
,I
), longtycon
) = Interface
.findLongTyCon(I
, longtycon
)
7670 (* stop
of IntBasis
.sml
*)
7671 (* start
of EVAL_MODULE
.sml
*)
7673 * Standard ML modules evaluation
7675 * Definition
, section
7.3
7678 * - State is passed
as reference
and modified via side effects
. This way
7679 * expanding out the state
and exception convention
in the inference rules
7680 * can be
avoided (would really be a pain
). Note that the state therefore
7681 * never is returned
.
7682 * - Doing so
, we can model the
exception convention using exceptions
.
7685 signature EVAL_MODULE
=
7690 type TopDec
= GrammarModule
.TopDec
7691 type Basis
= DynamicBasis
.Basis
7692 type State
= EvalCore
.State
7697 val evalTopDec
: State ref
* Basis
* TopDec
-> Basis
7700 (* stop
of EVAL_MODULE
.sml
*)
7701 (* start
of EvalModule
.sml
*)
7703 * Standard ML modules evaluation
7705 * Definition
, section
7.3
7708 * - State is passed
as reference
and modified via side effects
. This way
7709 * expanding out the state
and exception convention
in the inference rules
7710 * can be
avoided (would really be a pain
). Note that the state therefore
7711 * never is returned
.
7712 * - Doing so
, we can model the
exception convention using exceptions
.
7713 * Rules
of the form A |
- phrase
=> A
'/p therefore turn into
7714 * A |
- phrase
=> A
'.
7715 * - We only pass the state
where necessary
, ie
. strexp
, strdec
, strbind
, and
7716 * topdec (compare note
in [Section
7.3]).
7717 * - There is a typo
in the Definition
in rule
182: both occurances
of IB
7718 * should be replaced by B
.
7719 * - The rules for toplevel declarations are all wrong
: in the conclusions
,
7720 * the result right
of the arrow must be B
' <+ B
''> instead
of B
'<'> in
7724 structure EvalModule
:> EVAL_MODULE
=
7729 type TopDec
= GrammarModule
.TopDec
7730 type Basis
= DynamicBasis
.Basis
7731 type State
= EvalCore
.State
7737 (* Helpers for error messages
*)
7739 val error
= Error
.error
7741 fun errorSigId(I
, s
, sigid
) = error(I
, s ^ SigId
.toString sigid
)
7742 fun errorFunId(I
, s
, funid
) = error(I
, s ^ FunId
.toString funid
)
7744 fun errorLongTyCon(I
, s
, longtycon
) =
7745 error(I
, s ^ LongTyCon
.toString longtycon
)
7746 fun errorLongStrId(I
, s
, longstrid
) =
7747 error(I
, s ^ LongStrId
.toString longstrid
)
7750 (* Helpers for basis modification
*)
7752 val plus
= DynamicBasis
.plus
7753 val plusSE
= DynamicBasis
.plusSE
7754 val plusG
= DynamicBasis
.plusG
7755 val plusF
= DynamicBasis
.plusF
7756 val plusE
= DynamicBasis
.plusE
7758 infix plus plusG plusF plusE plusSE
7762 (* Inference rules
[Section
7.3] *)
7765 (* Structure Expressions
*)
7767 fun evalStrExp(s
,B
, STRUCTStrExp(I
, strdec
)) =
7770 val E
= evalStrDec(s
,B
, strdec
)
7775 |
evalStrExp(s
,B
, LONGSTRIDStrExp(I
, longstrid
)) =
7778 val E
= case DynamicBasis
.findLongStrId(B
, longstrid
)
7779 of SOME(DynamicEnv
.Str E
) => E
7781 errorLongStrId(I
, "runtime error: unknown structure ",
7787 |
evalStrExp(s
,B
, TRANSStrExp(I
, strexp
, sigexp
)) =
7790 val E
= evalStrExp(s
,B
, strexp
)
7791 val I
= evalSigExp(IntBasis
.Inter B
, sigexp
)
7793 Interface
.cutdown(E
, I
)
7796 |
evalStrExp(s
,B
, OPAQStrExp(I
, strexp
, sigexp
)) =
7799 val E
= evalStrExp(s
,B
, strexp
)
7800 val I
= evalSigExp(IntBasis
.Inter B
, sigexp
)
7802 Interface
.cutdown(E
, I
)
7805 |
evalStrExp(s
,B
, APPStrExp(I
, funid
, strexp
)) =
7808 val DynamicBasis
.FunctorClosure((strid
, I
), strexp
', B
') =
7809 case DynamicBasis
.findFunId(B
, funid
)
7810 of SOME funcclos
=> funcclos
7811 | NONE
=> errorFunId(I
, "runtime error: \
7812 \unknown functor ", funid
)
7813 val E
= evalStrExp(s
,B
, strexp
)
7814 val E
' = evalStrExp(
7817 StrIdMap
.singleton(strid
,
7818 DynamicEnv
.Str(Interface
.cutdown(E
, I
))),
7824 |
evalStrExp(s
,B
, LETStrExp(I
, strdec
, strexp
)) =
7827 val E
= evalStrDec(s
,B
, strdec
)
7828 val E
' = evalStrExp(s
,B plusE E
, strexp
)
7834 (* Structure
-level Declarations
*)
7836 and evalStrDec(s
,B
, DECStrDec(I
, dec
)) =
7839 val E
' = EvalCore
.evalDec(s
,DynamicBasis
.Eof B
, dec
)
7844 |
evalStrDec(s
,B
, STRUCTUREStrDec(I
, strbind
)) =
7847 val SE
= evalStrBind(s
,B
, strbind
)
7849 DynamicEnv
.fromSE SE
7852 |
evalStrDec(s
,B
, LOCALStrDec(I
, strdec1
, strdec2
)) =
7855 val E1
= evalStrDec(s
,B
, strdec1
)
7856 val E2
= evalStrDec(s
,B plusE E1
, strdec2
)
7861 |
evalStrDec(s
,B
, EMPTYStrDec(I
)) =
7865 |
evalStrDec(s
,B
, SEQStrDec(I
, strdec1
, strdec2
)) =
7868 val E1
= evalStrDec(s
,B
, strdec1
)
7869 val E2
= evalStrDec(s
,B plusE E1
, strdec2
)
7871 DynamicEnv
.plus(E1
, E2
)
7875 (* Structure Bindings
*)
7877 and evalStrBind(s
,B
, StrBind(I
, strid
, strexp
, strbind_opt
)) =
7880 val E
= evalStrExp(s
,B
, strexp
)
7881 val SE
= case strbind_opt
7882 of NONE
=> StrIdMap
.empty
7883 | SOME strbind
=> evalStrBind(s
,B
, strbind
)
7885 StrIdMap
.insert(SE
, strid
, DynamicEnv
.Str E
)
7889 (* Signature Expressions
*)
7891 and evalSigExp(IB
, SIGSigExp(I
, spec
)) =
7894 val I
= evalSpec(IB
, spec
)
7899 |
evalSigExp(IB
, SIGIDSigExp(I
, sigid
)) =
7902 val I
= case IntBasis
.findSigId(IB
, sigid
)
7904 | NONE
=> errorSigId(I
, "runtime error: unknown \
7910 |
evalSigExp(IB
, WHERETYPESigExp(I
, sigexp
, _
, _
, _
)) =
7911 (* Omitted
[Section
7.1] *)
7912 evalSigExp(IB
, sigexp
)
7915 (* Signature Declarations
*)
7917 and evalSigDec(IB
, SigDec(I
, sigbind
)) =
7920 val G
= evalSigBind(IB
, sigbind
)
7926 (* Signature Bindings
*)
7928 and evalSigBind(IB
, SigBind(I
, sigid
, sigexp
, sigbind_opt
)) =
7931 val I
= evalSigExp(IB
, sigexp
)
7932 val G
= case sigbind_opt
7933 of NONE
=> SigIdMap
.empty
7934 | SOME sigbind
=> evalSigBind(IB
, sigbind
)
7936 SigIdMap
.insert(G
, sigid
, I
)
7940 (* Specifications
*)
7942 and evalSpec(IB
, VALSpec(I
, valdesc
)) =
7945 val VI
= evalValDesc(valdesc
)
7950 |
evalSpec(IB
, TYPESpec(I
, typdesc
)) =
7953 val TI
= evalTypDesc(typdesc
)
7958 |
evalSpec(IB
, EQTYPESpec(I
, typdesc
)) =
7961 val TI
= evalTypDesc(typdesc
)
7966 |
evalSpec(IB
, DATATYPESpec(I
, datdesc
)) =
7969 val (VI
,TI
) = evalDatDesc(datdesc
)
7971 Interface
.fromVIandTI(VI
,TI
)
7974 |
evalSpec(IB
, REPLICATIONSpec(I
, tycon
, longtycon
)) =
7977 val VI
= case IntBasis
.findLongTyCon(IB
, longtycon
)
7979 | NONE
=> errorLongTyCon(I
, "runtime error: \
7980 \unknown type ", longtycon
)
7981 val TI
= TyConMap
.singleton(tycon
, VI
)
7983 Interface
.fromVIandTI(VI
,TI
)
7986 |
evalSpec(IB
, EXCEPTIONSpec(I
, exdesc
)) =
7989 val VI
= evalExDesc(exdesc
)
7994 |
evalSpec(IB
, STRUCTURESpec(I
, strdesc
)) =
7997 val SI
= evalStrDesc(IB
, strdesc
)
8002 |
evalSpec(IB
, INCLUDESpec(I
, sigexp
)) =
8005 val I
= evalSigExp(IB
, sigexp
)
8010 |
evalSpec(IB
, EMPTYSpec(I
)) =
8014 |
evalSpec(IB
, SEQSpec(I
, spec1
, spec2
)) =
8017 val I1
= evalSpec(IB
, spec1
)
8018 val I2
= evalSpec(IntBasis
.plusI(IB
, I1
), spec2
)
8020 Interface
.plus(I1
,I2
)
8023 |
evalSpec(IB
, SHARINGTYPESpec(I
, spec
, longtycons
)) =
8024 (* Omitted
[Section
7.1] *)
8027 |
evalSpec(IB
, SHARINGSpec(I
, spec
, longstrids
)) =
8028 (* Omitted
[Section
7.1] *)
8032 (* Value Descriptions
*)
8034 and evalValDesc(ValDesc(I
, vid
, _
, valdesc_opt
)) =
8037 val VI
= case valdesc_opt
8038 of NONE
=> VIdMap
.empty
8039 | SOME valdesc
=> evalValDesc(valdesc
)
8041 VIdMap
.insert(VI
, vid
, IdStatus
.v
)
8045 (* Type Descriptions
*)
8047 and evalTypDesc(TypDesc(I
, tyvarseq
, tycon
, typdesc_opt
)) =
8050 val TI
= case typdesc_opt
8051 of NONE
=> TyConMap
.empty
8052 | SOME typdesc
=> evalTypDesc(typdesc
)
8054 TyConMap
.insert(TI
, tycon
, VIdMap
.empty
)
8058 (* Datatype Descriptions
*)
8060 and evalDatDesc(DatDesc(I
, tyvarseq
, tycon
, condesc
, datdesc_opt
)) =
8063 val VI
= evalConDesc(condesc
)
8064 val (VI
',TI
') = case datdesc_opt
8065 of NONE
=> ( VIdMap
.empty
, TyConMap
.empty
)
8066 | SOME datdesc
' => evalDatDesc(datdesc
')
8068 ( VIdMap
.unionWith #
2 (VI
, VI
')
8069 , TyConMap
.insert(TI
', tycon
, VI
)
8074 (* Constructor Descriptions
*)
8076 and evalConDesc(ConDesc(I
, vid
, _
, condesc_opt
)) =
8079 val VI
= case condesc_opt
8080 of NONE
=> VIdMap
.empty
8081 | SOME condesc
=> evalConDesc(condesc
)
8083 VIdMap
.insert(VI
, vid
, IdStatus
.c
)
8087 (* Exception Description
*)
8089 and evalExDesc(ExDesc(I
, vid
, _
, exdesc_opt
)) =
8092 val VI
= case exdesc_opt
8093 of NONE
=> VIdMap
.empty
8094 | SOME exdesc
=> evalExDesc(exdesc
)
8096 VIdMap
.insert(VI
, vid
, IdStatus
.e
)
8100 (* Structure Descriptions
*)
8102 and evalStrDesc(IB
, StrDesc(I
, strid
, sigexp
, strdesc_opt
)) =
8105 val I
= evalSigExp(IB
, sigexp
)
8106 val SI
= case strdesc_opt
8107 of NONE
=> StrIdMap
.empty
8108 | SOME strdesc
=> evalStrDesc(IB
, strdesc
)
8110 StrIdMap
.insert(SI
, strid
, Interface
.Str I
)
8114 (* Functor Bindings
*)
8116 and evalFunBind(B
, FunBind(I
, funid
, strid
, sigexp
, strexp
, funbind_opt
)) =
8118 (* Note that there is a typo
in this rule
. *)
8120 val I
= evalSigExp(IntBasis
.Inter B
, sigexp
)
8121 val F
= case funbind_opt
8122 of NONE
=> FunIdMap
.empty
8123 | SOME funbind
=> evalFunBind(B
, funbind
)
8125 FunIdMap
.insert(F
, funid
,
8126 DynamicBasis
.FunctorClosure((strid
,I
),strexp
,B
))
8130 (* Functor Declarations
*)
8132 and evalFunDec(B
, FunDec(I
, funbind
)) =
8135 val F
= evalFunBind(B
, funbind
)
8141 (* Top
-level Declarations
*)
8143 and evalTopDec(s
,B
, STRDECTopDec(I
, strdec
, topdec_opt
)) =
8145 (* Note the mistake
in the conclusion
of this rule
. *)
8147 val E
= evalStrDec(s
,B
, strdec
)
8148 val B
' = DynamicBasis
.fromE E
8149 val B
'' = case topdec_opt
8150 of NONE
=> DynamicBasis
.empty
8151 | SOME topdec
=> evalTopDec(s
,B plus B
', topdec
)
8156 |
evalTopDec(s
,B
, SIGDECTopDec(I
, sigdec
, topdec_opt
)) =
8158 (* Note the mistake
in the conclusion
of this rule
. *)
8160 val G
= evalSigDec(IntBasis
.Inter B
, sigdec
)
8161 val B
' = DynamicBasis
.fromG G
8162 val B
'' = case topdec_opt
8163 of NONE
=> DynamicBasis
.empty
8164 | SOME topdec
=> evalTopDec(s
,B plus B
', topdec
)
8169 |
evalTopDec(s
,B
, FUNDECTopDec(I
, fundec
, topdec_opt
)) =
8171 (* Note the mistake
in the conclusion
of this rule
. *)
8173 val F
= evalFunDec(B
, fundec
)
8174 val B
' = DynamicBasis
.fromF F
8175 val B
'' = case topdec_opt
8176 of NONE
=> DynamicBasis
.empty
8177 | SOME topdec
=> evalTopDec(s
,B plus B
', topdec
)
8183 (* stop
of EvalModule
.sml
*)
8184 (* start
of PRETTY_PRINT
.sml
*)
8186 * A generic pretty printer
.
8189 * Philip Wadler
. "A prettier printer"
8190 * http
://cm
.bell
-labs
.com
/cm
/cs
/who
/wadler
/
8191 * and Christian Lindig
's port to OCaml
.
8193 * The semantics has been extended to allow
4 different kinds
of
8194 * groups (`boxes
'), 2 modes
of nesting
, and varying break representations
.
8195 * This is no more easily described by an algebra though
, and the `below
'
8196 * combinator looses optimality
.
8199 signature PRETTY_PRINT
=
8204 val empty
: doc (* empty document
*)
8205 val break
: doc (* space or line break
*)
8206 val ebreak
: doc (* empty or line break
*)
8207 val text
: string -> doc (* raw text
*)
8209 val ^^
: doc
* doc
-> doc (* concatenation
*)
8210 val ^
/^
: doc
* doc
-> doc (* concatenation
with break
*)
8212 val hbox
: doc
-> doc (* horizontal box
*)
8213 val vbox
: doc
-> doc (* vertical box
*)
8214 val fbox
: doc
-> doc (* fill
box (h
and v
) *)
8215 val abox
: doc
-> doc (* auto
box (h or v
) *)
8217 val nest
: int -> doc
-> doc (* indentation by k char
's
*)
8218 val below
: doc
-> doc (* keep current indentation
*)
8220 val isEmpty
: doc
-> bool
8222 val toString
: doc
* int -> string
8223 val output
: TextIO.outstream
* doc
* int -> unit
8226 (* stop
of PRETTY_PRINT
.sml
*)
8227 (* start
of PrettyPrint
.sml
*)
8229 * A generic pretty printer
.
8232 * Philip Wadler
. "A prettier printer"
8233 * http
://cm
.bell
-labs
.com
/cm
/cs
/who
/wadler
/
8234 * and Christian Lindig
's port to OCaml
.
8236 * The semantics has been extended to allow
4 different kinds
of
8237 * groups (`boxes
'), 2 modes
of nesting
, and varying break representations
.
8238 * This is no more easily described by an algebra though
, and the `below
'
8239 * combinator looses optimality
.
8242 structure PrettyPrint
:> PRETTY_PRINT
=
8247 datatype mode
= H | V | F | A
8263 (* Interface operators
*)
8268 val break
= BREAK
" "
8269 val ebreak
= BREAK
""
8274 | x ^^ y
= CONS(x
, y
)
8278 | x ^
/^ y
= CONS(x
, CONS(break
, y
))
8280 fun below EMPTY
= EMPTY
8283 fun hbox EMPTY
= EMPTY
8284 | hbox x
= BOX(H
, x
)
8286 fun vbox EMPTY
= EMPTY
8287 | vbox x
= BOX(V
, x
)
8289 fun fbox EMPTY
= EMPTY
8290 | fbox x
= BOX(F
, x
)
8292 fun abox EMPTY
= EMPTY
8293 | abox x
= BOX(A
, x
)
8295 fun nest k EMPTY
= EMPTY
8296 | nest k x
= NEST(k
, x
)
8299 fun isEmpty EMPTY
= true
8303 (* Check whether the first line
of a document fits into remaining characters
*)
8305 (* We abuse the mode
A (which can never occur
in the lists passed to
8306 * fits
) to flag breaks which occur inside swallowed vboxes
.
8313 |
(i
,m
,EMPTY
)::z
=> fits(w
, z
)
8314 |
(i
,m
,CONS(x
,y
))::z
=> fits(w
, (i
,m
,x
)::(i
,m
,y
)::z
)
8315 |
(i
,m
,TEXT s
)::z
=> fits(w
- String.size s
, z
)
8316 |
(i
,H
,BREAK s
)::z
=> fits(w
- String.size s
, z
)
8317 |
(i
,A
,BREAK s
)::z
=> false
8318 |
(i
,m
,BREAK s
)::z
=> true
8319 |
(i
,m
,BOX(V
,x
))::z
=> fits(w
, (i
,A
,x
)::z
)
8320 |
(i
,m
,BOX(n
,x
))::z
=> fits(w
, (i
,H
,x
)::z
)
8321 |
(i
,m
,NEST(j
,x
))::z
=> fits(w
, (i
,m
,x
)::z
)
8322 |
(i
,m
,BELOW x
)::z
=> fits(w
, (i
,m
,x
)::z
)
8327 fun best(w
, k
, z
, a
) =
8330 |
(i
,m
,EMPTY
)::z
=> best(w
, k
, z
, a
)
8331 |
(i
,m
,CONS(x
,y
))::z
=> best(w
, k
, (i
,m
,x
)::(i
,m
,y
)::z
, a
)
8332 |
(i
,m
,TEXT s
)::z
=> best(w
, k
+ String.size s
, z
, PTEXT(s
)::a
)
8333 |
(i
,H
,BREAK s
)::z
=> horizontal(w
, k
, s
, z
, a
)
8334 |
(i
,V
,BREAK s
)::z
=> vertical(w
, i
, z
, a
)
8335 |
(i
,F
,BREAK s
)::z
=> if fits(w
- k
- String.size s
, z
)
8336 then horizontal(w
, k
, s
, z
, a
)
8337 else vertical(w
, i
, z
, a
)
8338 |
(i
,A
,BREAK s
)::z
=> raise Fail
"PrettyPrint.best"
8339 |
(i
,m
,BOX(A
,x
))::z
=> if fits(w
- k
, (i
,H
,x
)::z
)
8340 then best(w
, k
, (i
,H
,x
)::z
, a
)
8341 else best(w
, k
, (i
,V
,x
)::z
, a
)
8342 |
(i
,m
,BOX(n
,x
))::z
=> best(w
, k
, (i
,n
,x
)::z
, a
)
8343 |
(i
,m
,NEST(j
,x
))::z
=> best(w
, k
, (i
+j
,m
,x
)::z
, a
)
8344 |
(i
,m
,BELOW x
)::z
=> best(w
, k
, (k
,m
,x
)::z
, a
)
8346 and horizontal(w
, k
, s
, z
, a
) =
8347 best(w
, k
+ String.size s
, z
, PTEXT(s
)::a
)
8349 and vertical(w
, i
, z
, a
) =
8350 best(w
, i
, z
, PLINE(i
)::a
)
8353 fun layout(doc
, w
) = best(w
, 0, [(0,V
,doc
)], [])
8357 (* Convert a document
*)
8359 fun primToString(PTEXT s
) = s
8360 |
primToString(PLINE i
) =
8361 String.implode(#
"\n" :: List.tabulate(i
, fn _
=> #
" "))
8363 val toString
= String.concat
o List.map primToString
o layout
8367 (* Output a document
directly (is MUCH faster
!) *)
8370 | loop n f
= ( f() ; loop (n
-1) f
)
8372 fun outputPrim
os (PTEXT s
) = TextIO.output(os
, s
)
8373 | outputPrim
os (PLINE i
) =
8374 ( TextIO.output1(os
, #
"\n")
8375 ; loop
i (fn() => TextIO.output1(os
, #
" "))
8378 fun output(os
, doc
, w
) = List.app (outputPrim os
) (layout(doc
, w
))
8381 (* stop
of PrettyPrint
.sml
*)
8382 (* start
of PP_MISC
.sml
*)
8384 * Standard ML miscellaneous pretty printing helpers
8390 type doc
= PrettyPrint
.doc
8392 val nest
: doc
-> doc
8394 val paren
: doc
-> doc
8395 val brace
: doc
-> doc
8396 val brack
: doc
-> doc
8398 val ppCommaList
: ('a
-> doc
) -> 'a list
-> doc
8399 val ppStarList
: ('a
-> doc
) -> 'a list
-> doc
8400 val ppSeq
: ('a
-> doc
) -> 'a list
-> doc
8401 val ppSeqPrec
: (int -> 'a
-> doc
) -> int -> 'a list
-> doc
8404 (* stop
of PP_MISC
.sml
*)
8405 (* start
of PPMisc
.sml
*)
8407 * Standard ML miscellaneous pretty printing helpers
8410 structure PPMisc
:> PP_MISC
=
8420 (* Some PP combinators
*)
8424 fun paren doc
= text
"(" ^^
fbox(below doc
) ^^ text
")"
8425 fun brace doc
= text
"{" ^^
fbox(below doc
) ^^ text
"}"
8426 fun brack doc
= text
"[" ^^
fbox(below doc
) ^^ text
"]"
8428 fun ppCommaList ppX
[] = empty
8429 | ppCommaList ppX
[x
] = ppX x
8430 | ppCommaList
ppX (x
::xs
) = ppX x ^^ text
"," ^^ break ^^
8433 fun ppStarList ppX
[] = empty
8434 | ppStarList ppX
[x
] = ppX x
8435 | ppStarList
ppX (x
::xs
) = hbox(ppX x ^^ break ^^ text
"*") ^^ break ^^
8438 fun ppSeqPrec ppXPrec n
[] = empty
8439 | ppSeqPrec ppXPrec n
[x
] = ppXPrec n x
8440 | ppSeqPrec ppXPrec n xs
= paren(ppCommaList (ppXPrec
0) xs
)
8442 fun ppSeq ppX
= ppSeqPrec (fn _
=> ppX
) 0
8445 (* stop
of PPMisc
.sml
*)
8446 (* start
of PP_VAL
.sml
*)
8448 * Standard ML pretty printing
of values
8454 type doc
= PrettyPrint
.doc
8455 type 'a State
= 'a State
.State
8456 type 'a Val
= 'a Val
.Val
8457 type 'a ExVal
= 'a Val
.ExVal
8459 val ppVal
: 'a State
* 'a Val
-> doc
8460 val ppExVal
: 'a State
* 'a ExVal
-> doc
8463 (* stop
of PP_VAL
.sml
*)
8464 (* start
of PPVal
.sml
*)
8466 * Standard ML pretty printing
of values
8469 structure PPVal
:> PP_VAL
=
8474 type 'a State
= 'a State
.State
8483 (* Simple objects
*)
8485 val ppFn
= text
"<fn>"
8487 fun ppLab lab
= text(Lab
.toString lab
)
8488 fun ppVId vid
= text(VId
.toString vid
)
8489 fun ppExName en
= text(ExName
.toString en
)
8490 fun ppSVal sv
= text(SVal
.toString sv
)
8496 * 0 : plain expressions
8497 * 1 : constructor arguments
8500 fun ppVal (s
, v
) = fbox(below(nest(ppValPrec (0, s
) v
)))
8501 and ppExVal(s
, e
) = fbox(below(nest(ppExValPrec (0, s
) e
)))
8503 and ppValPrec (p
, s
) (op:=) =
8506 |
ppValPrec (p
, s
) (SVal sv
) =
8509 |
ppValPrec (p
, s
) (BasVal b
) =
8512 |
ppValPrec (p
, s
) (VId vid
) =
8515 |
ppValPrec (p
, s
) (v
as VIdVal(vid
, v
')) =
8519 fun items(VId vid
, vs
) =
8520 if vid
<> VId
.fromString
"nil" then
8525 |
items(VIdVal(vid
, v
), vs
) =
8526 if vid
<> VId
.fromString
"::" then
8530 of NONE
=> raise NotAList
8531 |
SOME(v1
, v2
) => items(v2
, v1
::vs
)
8534 |
items(_
, vs
) = raise NotAList
8537 val vs
= items(v
, [])
8539 brack(ppCommaList (ppValPrec (0, s
)) vs
)
8543 val doc
= ppVId vid ^
/^
ppValPrec (1, s
) v
'
8552 |
ppValPrec (p
, s
) (ExVal e
) =
8553 ppExValPrec (p
, s
) e
8555 |
ppValPrec (p
, s
) (Record r
) =
8557 fun isTuple( [], n
) = n
> 2
8558 |
isTuple(lab
::labs
, n
) =
8559 lab
= Lab
.fromInt n
andalso isTuple(labs
, n
+1)
8561 val labvs
= LabMap
.listItemsi r
8562 val (labs
,vs
) = ListPair.unzip labvs
8564 if List.null labs
then
8566 else if isTuple(labs
, 1) then
8567 paren(ppCommaList (ppValPrec (0, s
)) vs
)
8569 brace(ppCommaList (ppLabVal s
) labvs
)
8572 |
ppValPrec (p
, s
) (Addr a
) =
8574 val v
= case State
.findAddr(s
, a
)
8576 | NONE
=> raise Fail
"PPVal.ppVal: invalid address"
8578 val doc
= text
"ref" ^
/^
ppValPrec (1, s
) v
8586 |
ppValPrec (p
, s
) (FcnClosure _
) =
8590 and ppLabVal
s (lab
, v
) =
8602 and ppExValPrec (p
, s
) (ExName en
) =
8605 |
ppExValPrec (p
, s
) (ExNameVal(en
, v
)) =
8607 val doc
= ppExName en ^
/^
ppValPrec (1, s
) v
8616 (* stop
of PPVal
.sml
*)
8617 (* start
of PP_DYNAMIC_ENV
.sml
*)
8619 * Standard ML pretty printing
of the dynamic environment
8622 signature PP_DYNAMIC_ENV
=
8625 type doc
= PrettyPrint
.doc
8626 type Env
= DynamicEnv
.Env
8627 type Str
= DynamicEnv
.Str
8628 type State
= DynamicEnv
.FcnClosure State
.State
8630 val ppEnv
: State
* Env
-> doc
8631 val ppStr
: State
* Str
-> doc
8634 (* stop
of PP_DYNAMIC_ENV
.sml
*)
8635 (* start
of PPDynamicEnv
.sml
*)
8637 * Standard ML pretty printing
of the dynamic environment
8640 structure PPDynamicEnv
:> PP_DYNAMIC_ENV
=
8645 type Env
= DynamicEnv
.Env
8646 type Str
= DynamicEnv
.Str
8647 type State
= DynamicEnv
.FcnClosure State
.State
8655 (* Simple objects
*)
8657 fun ppVId vid
= text(VId
.toString vid
)
8658 fun ppStrId strid
= text(StrId
.toString strid
)
8663 fun ppValEnv(s
, VE
) =
8665 (fn(vid
, (v
,IdStatus
.v
), doc
) =>
8673 abox(PPVal
.ppVal(s
, v
))
8678 |
(vid
, (v
,_
), doc
) => doc
8684 (fn(vid
, (v
,IdStatus
.e
), doc
) =>
8686 text
"exception" ^
/^
8691 |
(vid
, (v
,_
), doc
) => doc
8697 (fn(vid
, (v
,IdStatus
.c
), doc
) =>
8704 |
(vid
, (v
,_
), doc
) => doc
8708 fun ppStrEnv(s
, SE
) =
8710 (fn(strid
, S
, doc
) =>
8713 text
"structure" ^
/^
8725 and ppEnv(s
, (SE
,TE
,VE
)) =
8736 and ppStr(s
, DynamicEnv
.Str E
) =
8738 val doc
= ppEnv(s
, E
)
8742 (if isEmpty doc
then
8745 nest(vbox(break ^^ doc
))
8752 (* stop
of PPDynamicEnv
.sml
*)
8753 (* start
of PP_DYNAMIC_BASIS
.sml
*)
8755 * Standard ML pretty printing
of the dynamic basis
8758 signature PP_DYNAMIC_BASIS
=
8761 type doc
= PrettyPrint
.doc
8762 type Basis
= DynamicBasis
.Basis
8763 type State
= DynamicEnv
.FcnClosure State
.State
8765 val ppBasis
: State
* Basis
-> doc
8768 (* stop
of PP_DYNAMIC_BASIS
.sml
*)
8769 (* start
of PPDynamicBasis
.sml
*)
8771 * Standard ML pretty printing
of the dynamic basis
8774 structure PPDynamicBasis
:> PP_DYNAMIC_BASIS
=
8779 type Basis
= DynamicBasis
.Basis
8780 type State
= DynamicEnv
.FcnClosure State
.State
8787 (* Simple objects
*)
8789 fun ppFunId funid
= text(FunId
.toString funid
)
8796 (fn(funid
, _
, doc
) =>
8808 fun ppBasis(s
, (F
,G
,E
)) =
8811 PPDynamicEnv
.ppEnv(s
, E
) ^
/^
8816 (* stop
of PPDynamicBasis
.sml
*)
8817 (* start
of CHECK_PATTERN
.sml
*)
8819 * Standard ML consistency
of patterns
and matches
8821 * Definition
, section
4.11
8824 * The requirement to check for irredundancy
of matches is a `bug
' in the
8825 * definition since this cannot be checked
in general for two reasons
:
8827 * (1) There may
be (hidden
) aliasing
of exception constructors
.
8828 * Consequently
, we only detect redundant
exception constructors
8829 * if they are denoted by the same longvid
.
8831 * (2) There is no requirement
of consistency for constructors
in
8832 * sharing specifications or
type realisations (actually
, we
8833 * consider this a serious bug
). For example
,
8834 * datatype t1
= A | B
8836 * sharing type t1
= t2
8837 * is a legal specification
. This allows a mix
of the constructors
8838 * to appear
in matches
, rendering the terms
of irredundancy
and
8839 * exhaustiveness meaningless
. We make no attempt to detect this
,
8840 * so generated warnings may or may not make sense
in that situation
.
8844 signature CHECK_PATTERN
=
8849 type Pat
= GrammarCore
.Pat
8850 type Match
= GrammarCore
.Match
8851 type Env
= StaticEnv
.Env
8856 val checkPat
: Env
* Pat
-> unit
8857 val checkMatch
: Env
* Match
-> unit
8860 (* stop
of CHECK_PATTERN
.sml
*)
8861 (* start
of CheckPattern
.sml
*)
8863 * Standard ML consistency
of patterns
and matches
8865 * Definition
, section
4.11
8868 * The requirement to check for irredundancy
of matches is a `bug
' in the
8869 * definition since this cannot be checked
in general for two reasons
:
8871 * (1) There may
be (hidden
) aliasing
of exception constructors
.
8872 * Consequently
, we only detect redundant
exception constructors
8873 * if they are denoted by the same longvid
.
8875 * (2) There is no requirement
of consistency for constructors
in
8876 * sharing specifications or
type realisations (actually
, we
8877 * consider this a serious bug
). For example
,
8878 * datatype t1
= A | B
8880 * sharing type t1
= t2
8881 * is a legal specification
. This allows a mix
of the constructors
8882 * to appear
in matches
, rendering the terms
of irredundancy
and
8883 * exhaustiveness meaningless
. We make no attempt to detect this
,
8884 * so generated warnings may or may not make sense
in that situation
.
8887 * All types
of special constants are assumed to be infinite
, so that
8888 * a match only gets exhaustive by placing a variable
. This is a bit
8889 * inaccurate for char
in particular
where the programmer actually would
8890 * be able to write down the complete set
of values
.
8891 * The reason is that for special constants to be treated properly
in
8892 * the presence
of overloading we would require
the (resolved
) type
8896 structure CheckPattern
:> CHECK_PATTERN
=
8901 type SCon
= SCon
.SCon
8904 type longVId
= LongVId
.longId
8905 type Pat
= GrammarCore
.Pat
8906 type Match
= GrammarCore
.Match
8907 type Env
= StaticEnv
.Env
8909 type SConSet
= SConSet
.set
8910 type VIdSet
= VIdSet
.set
8911 type LongVIdSet
= LongVIdSet
.set
8912 type 'a LabMap
= 'a LabMap
.map
8920 * Algorithm has been derived from
:
8922 * "ML pattern matching compilation and partial evaluation",
8923 * in: Dagstuhl Seminar on Partial Evaluation
,
8924 * Lecture Notes
in Computer Science
, Springer
-Verlag
1996
8928 (* Value description
*)
8930 datatype description
=
8933 | NOT_SCON
of SConSet
8934 | EXCON
of longVId
* description option
8935 | NOT_EXCON
of LongVIdSet
8936 | CON
of VId
* description option
8938 | RECORD
of description LabMap
8944 | RECORD
' of description LabMap
8946 type knowledge
= description
* context list
8948 type continuations
= PatRow option list
* Match option
8952 (* Extending the context on partial success
*)
8954 fun augment(EXCON
'(longvid
)::context
, desc
) =
8955 augment(context
, EXCON(longvid
, SOME desc
))
8957 |
augment(CON
'(vid
)::context
, desc
) =
8958 augment(context
, CON(vid
, SOME desc
))
8960 |
augment(LAB
'(lab
)::RECORD
'(descs
)::context
, desc
) =
8961 RECORD
'(LabMap
.insert(descs
, lab
, desc
)) :: context
8963 | augment _
= raise Fail
"CheckPattern.augment: invalid context"
8966 (* Building the description on failure
*)
8968 fun build([], desc
) =
8971 |
build(EXCON
'(longvid
)::context
, desc
) =
8972 build(context
, EXCON(longvid
, SOME desc
))
8974 |
build(CON
'(vid
)::context
, desc
) =
8975 build(context
, CON(vid
, SOME desc
))
8977 |
build(LAB
'(lab
)::RECORD
'(descs
)::context
, desc
) =
8978 build(context
, RECORD(LabMap
.insert(descs
, lab
, desc
)))
8980 | build _
= raise Fail
"CheckPattern.build: invalid context"
8983 (* Result
type for static matching
*)
8985 structure RegionSet
= FinSetFn(type ord_key
= Source
.region
8986 val compare
= Source
.compare
)
8988 type result
= RegionSet
.set
* bool
8990 val success
= ( RegionSet
.empty
, true )
8991 val failure
= ( RegionSet
.empty
, false )
8993 fun branch((P1
, exhaustive1
), (P2
, exhaustive2
)) =
8994 ( RegionSet
.union(P1
, P2
), exhaustive1
andalso exhaustive2
)
8996 fun reached(I
, (P
, exhaustive
)) =
8997 ( RegionSet
.add(P
, I
), exhaustive
)
9001 (* Static pattern matching
*)
9003 fun matchMatch(E
, desc
, Match(_
, mrule
, match_opt
)) =
9004 matchMrule(E
, desc
, mrule
, match_opt
)
9007 and matchMrule(E
, desc
, Mrule(I
, pat
, exp
), match_opt
) =
9008 reached(I
, matchPat(E
, (desc
, []), pat
, ([], match_opt
)))
9011 and matchAtPat(E
, know
, atpat
, cont
) =
9013 of WILDCARDAtPat(_
) =>
9014 succeed(E
, know
, cont
)
9016 |
SCONAtPat(_
, scon
) =>
9017 matchSCon(E
, know
, scon
, cont
)
9019 |
LONGVIDAtPat(_
, _
, longvid
) =>
9020 (case StaticEnv
.findLongVId(E
, longvid
)
9022 succeed(E
, know
, cont
)
9024 |
SOME(sigma
, IdStatus
.v
) =>
9025 succeed(E
, know
, cont
)
9027 |
SOME(sigma
, IdStatus
.e
) =>
9028 matchExCon(E
, know
, longvid
, NONE
, cont
)
9030 |
SOME((_
,tau
), IdStatus
.c
) =>
9032 val vid
= LongVId
.toId longvid
9033 val span
= TyName
.span(Type
.tyname(Type
.range tau
))
9035 matchCon(E
, know
, vid
, span
, NONE
, cont
)
9039 |
RECORDAtPat(_
, patrow_opt
) =>
9040 matchRecord(E
, know
, patrow_opt
, cont
)
9042 |
PARAtPat(_
, pat
) =>
9043 matchPat(E
, know
, pat
, cont
)
9046 and matchPat(E
, know
, pat
, cont
) =
9048 of ATPATPat(_
, atpat
) =>
9049 matchAtPat(E
, know
, atpat
, cont
)
9051 |
CONPat(_
, _
, longvid
, atpat
) =>
9052 (case StaticEnv
.findLongVId(E
, longvid
)
9053 of SOME(sigma
, IdStatus
.e
) =>
9054 matchExCon(E
, know
, longvid
, SOME atpat
, cont
)
9056 |
SOME((_
,tau
), IdStatus
.c
) =>
9058 val vid
= LongVId
.toId longvid
9059 val span
= TyName
.span(Type
.tyname(Type
.range tau
))
9061 matchCon(E
, know
, vid
, span
, SOME atpat
, cont
)
9064 | _
=> raise Fail
"CheckMatching.matchPat: \
9065 \invalid constructed pattern"
9068 |
TYPEDPat(_
, pat
, ty
) =>
9069 matchPat(E
, know
, pat
, cont
)
9071 |
ASPat(_
, _
, vid
, ty_opt
, pat
) =>
9072 matchPat(E
, know
, pat
, cont
)
9075 and matchRecord(E
, (desc
, context
), patrow_opt
, cont
) =
9077 val descs
= case desc
9078 of ANY
=> LabMap
.empty
9079 | RECORD descs
=> descs
9081 raise Fail
"CheckPattern.matchRecord: type error"
9083 matchPatRowOpt(E
, RECORD
'(descs
)::context
, patrow_opt
, cont
)
9087 and matchPatRowOpt(E
, RECORD
'(descs
)::context
, patrow_opt
,
9088 cont
as (patrow_opts
, match_opt
)) =
9090 of SOME(ROWPatRow(_
, lab
, pat
, patrow_opt
')) =>
9092 val desc
' = case LabMap
.find(descs
, lab
)
9094 | SOME desc
' => desc
'
9096 matchPat(E
, (desc
', LAB
'(lab
)::RECORD
'(descs
)::context
), pat
,
9097 (patrow_opt
'::patrow_opts
, match_opt
))
9101 succeed(E
, (RECORD descs
, context
), cont
)
9103 | matchPatRowOpt _
=
9104 raise Fail
"CheckPattern.matchPatRowOpt: inconsistent context"
9107 and matchSCon(E
, know
as (desc
, context
), scon
, cont
) =
9109 val knowSucc
= (SCON scon
, context
)
9110 fun knowFail scons
= (NOT_SCON(SConSet
.add(scons
, scon
)), context
)
9114 branch(succeed(E
, knowSucc
, cont
),
9115 fail(E
, knowFail SConSet
.empty
, cont
)
9119 if SCon
.compare(scon
, scon
') = EQUAL
then
9120 succeed(E
, know
, cont
)
9125 if SConSet
.member(scons
, scon
) then
9128 branch(succeed(E
, knowSucc
, cont
),
9129 fail(E
, knowFail scons
, cont
)
9132 | _
=> raise Fail
"CheckPattern.matchSCon: type error"
9136 and matchExCon(E
, know
as (desc
, context
), longvid
, atpat_opt
, cont
) =
9138 val knowSucc
= (EXCON(longvid
, NONE
), EXCON
'(longvid
)::context
)
9139 fun knowFail longvids
=
9140 (NOT_EXCON(LongVIdSet
.add(longvids
, longvid
)), context
)
9144 branch(matchArgOpt(E
, knowSucc
, SOME ANY
, atpat_opt
, cont
),
9145 fail(E
, knowFail LongVIdSet
.empty
, cont
)
9148 |
EXCON(longvid
', desc_opt
) =>
9149 if longvid
= longvid
' then
9150 matchArgOpt(E
, knowSucc
, desc_opt
, atpat_opt
, cont
)
9154 | NOT_EXCON longvids
=>
9155 if LongVIdSet
.member(longvids
, longvid
) then
9158 branch(matchArgOpt(E
, knowSucc
, SOME ANY
, atpat_opt
, cont
),
9159 fail(E
, knowFail longvids
, cont
)
9162 | _
=> raise Fail
"CheckPattern.matchSCon: type error"
9166 and matchCon(E
, know
as (desc
, context
), vid
, span
, atpat_opt
, cont
) =
9168 val knowSucc
= (CON(vid
, NONE
), CON
'(vid
)::context
)
9169 fun knowFail vids
= (NOT_CON(VIdSet
.add(vids
, vid
)), context
)
9174 matchArgOpt(E
, knowSucc
, SOME ANY
, atpat_opt
, cont
)
9176 branch(matchArgOpt(E
, knowSucc
, SOME ANY
, atpat_opt
, cont
),
9177 fail(E
, knowFail VIdSet
.empty
, cont
)
9180 |
CON(vid
', desc_opt
) =>
9182 matchArgOpt(E
, knowSucc
, desc_opt
, atpat_opt
, cont
)
9187 if VIdSet
.member(vids
, vid
) then
9189 else if VIdSet
.numItems vids
= span
- 1 then
9190 matchArgOpt(E
, knowSucc
, SOME ANY
, atpat_opt
, cont
)
9192 branch(matchArgOpt(E
, knowSucc
, SOME ANY
, atpat_opt
, cont
),
9193 fail(E
, knowFail vids
, cont
)
9196 | _
=> raise Fail
"CheckPattern.matchSCon: type error"
9200 and matchArgOpt(E
, (desc
, context
), desc_opt
, atpat_opt
, cont
) =
9203 succeed(E
, (desc
, List.tl context
), cont
)
9206 matchAtPat(E
, (valOf desc_opt
, context
), atpat
, cont
)
9210 and succeed(E
, know
, ([], match_opt
)) =
9213 |
succeed(E
, (desc
, context
), (patrow_opt
::patrow_opts
, match_opt
)) =
9215 val context
' = augment(context
, desc
)
9217 matchPatRowOpt(E
, context
', patrow_opt
, (patrow_opts
, match_opt
))
9221 and fail(E
, know
, (_
, NONE
)) =
9224 |
fail(E
, (desc
, context
), (_
, SOME match
)) =
9225 matchMatch(E
, build(context
, desc
), match
)
9229 (* Checking matches
[Section
4.11, item
2] *)
9231 fun checkReachableMrule(reachables
, Mrule(I
, _
, _
)) =
9232 if RegionSet
.member(reachables
, I
) then
9235 Error
.warning(I
, "redundant match rule")
9237 fun checkReachableMatchOpt(reachables
, NONE
) = ()
9238 |
checkReachableMatchOpt(reachables
, SOME(Match(_
, mrule
, match_opt
))) =
9239 ( checkReachableMrule(reachables
, mrule
)
9240 ; checkReachableMatchOpt(reachables
, match_opt
)
9243 fun checkMatch(E
, match
) =
9245 val (reachables
, exhaustive
) = matchMatch(E
, ANY
, match
)
9247 checkReachableMatchOpt(reachables
, SOME match
)
9248 ; if exhaustive
then
9251 Error
.warning(infoMatch match
, "match not exhaustive")
9256 (* Checking single patterns
[Section
4.11, item
3] *)
9258 fun checkPat(E
, pat
) =
9260 val (_
, exhaustive
) = matchPat(E
, (ANY
, []), pat
, ([], NONE
))
9265 Error
.warning(infoPat pat
, "pattern not exhaustive")
9269 (* stop
of CheckPattern
.sml
*)
9270 (* start
of ELAB_CORE
.sml
*)
9272 * Standard ML core elaboration
9274 * Definition
, sections
4.10, 4.11, 4.6, 4.7, 2.9
9277 * - Elaboration also checks the syntactic restrictions
[Section
2.9]
9278 * and the further restrictions
[Section
4.11].
9279 * - To implement the
3rd restriction
in 4.11 elabDec is passed an
9280 * additional boolean argument to recognise being on the toplevel
.
9284 signature ELAB_CORE
=
9289 type Dec
= GrammarCore
.Dec
9290 type Ty
= GrammarCore
.Ty
9291 type TyVarseq
= GrammarCore
.TyVarseq
9294 type TyVar
= TyVar
.TyVar
9295 type TyVarSet
= TyVarSet
.set
9296 type Type
= Type
.Type
9297 type Env
= StaticEnv
.Env
9298 type Context
= Context
.Context
9303 val elabDec
: bool * Context
* Dec
-> Env
9304 val elabTy
: Context
* Ty
-> Type
9306 val tyvars
: TyVarseq
-> TyVarSet
* TyVar list
9308 val validBindVId
: VId
-> bool
9309 val validConBindVId
: VId
-> bool
9312 (* stop
of ELAB_CORE
.sml
*)
9313 (* start
of ElabCore
.sml
*)
9315 * Standard ML core elaboration
9317 * Definition
, sections
4.10, 4.11, 4.6, 4.7, 2.9
9320 * - Elaboration also checks the syntactic restrictions
[Section
2.9]
9321 * and the further restrictions
[Section
4.11].
9322 * - To implement the
3rd restriction
in 4.11 some elab functions are
9323 * passed an additional boolean argument to recognise being on the toplevel
.
9324 * - There is a bug
in the Definition
-- an important syntactic restriction
9326 * "Any tyvar occuring on the right side of a typbind or datbind of the
9327 * form tyvarseq tycon = ... must occur in tyvarseq."
9328 * - The definition says that overloaded types get defaulted
if the
9329 * "surrounding text" does not resolve it
. It leaves some freedom to
9330 * how large this context may be
. We choose the innermost value binding
.
9331 * - The definition states that
"the program context" must determine the
9332 * exact
type of flexible records
, but it does not say how large this
9333 * context may be either
. Again we choose the innermost surrounding value
9335 * - Most conditions on
type names can be ignored since they are
9336 * always ensured by the Stamp mechanism
.
9339 * - Unresolved overloading is left unnoticed
if it never propagates to a
9340 * value binding
's result environment
. To resolve all cases we either had
9341 * to annotate all expressions
with their types
and walk the whole tree
9342 * for each value binding
's RHS
, or extend the inference results
with
9343 * complicated information on overloaded
type variables
, or use some dirty
9345 * - The same goes for unresolved flexible record types
, for essentially the
9349 structure ElabCore
:> ELAB_CORE
=
9354 type Dec
= GrammarCore
.Dec
9355 type Ty
= GrammarCore
.Ty
9356 type TyVarseq
= GrammarCore
.TyVarseq
9359 type TyVar
= TyVar
.TyVar
9360 type TyVarSet
= TyVarSet
.set
9361 type Type
= Type
.Type
9362 type Env
= StaticEnv
.Env
9363 type Context
= Context
.Context
9369 (* Some helpers for error messages
*)
9371 val error
= Error
.error
9373 fun errorLab(I
, s
, lab
) = error(I
, s ^ Lab
.toString lab
)
9374 fun errorVId(I
, s
, vid
) = error(I
, s ^ VId
.toString vid
)
9375 fun errorTyCon(I
, s
, tycon
) = error(I
, s ^ TyCon
.toString tycon
)
9376 fun errorTyVar(I
, s
, tyvar
) = error(I
, s ^ TyVar
.toString tyvar
)
9378 fun errorLongVId(I
, s
, longvid
) = error(I
, s ^ LongVId
.toString longvid
)
9379 fun errorLongTyCon(I
, s
, longtycon
) =
9380 error(I
, s ^ LongTyCon
.toString longtycon
)
9381 fun errorLongStrId(I
, s
, longstrid
) =
9382 error(I
, s ^ LongStrId
.toString longstrid
)
9386 (* Helpers for context modification
*)
9388 val plus
= StaticEnv
.plus
9389 val plusU
= Context
.plusU
9390 val plusVE
= Context
.plusVE
9391 val oplusE
= Context
.oplusE
9392 val oplusTE
= Context
.oplusTE
9393 val oplusVEandTE
= Context
.oplusVEandTE
9395 infix plusU plusVE oplusE oplusTE oplusVEandTE
9399 (* Checking restriction for vids
in binding
[Section
2.9, 5th bullet
] *)
9401 fun validBindVId vid
=
9402 vid
<> VId
.fromString
"true" andalso
9403 vid
<> VId
.fromString
"false" andalso
9404 vid
<> VId
.fromString
"nil" andalso
9405 vid
<> VId
.fromString
"::" andalso
9406 vid
<> VId
.fromString
"ref"
9408 fun validConBindVId vid
=
9409 validBindVId vid
andalso
9410 vid
<> VId
.fromString
"it"
9413 (* Treating tyvarseqs
*)
9415 fun tyvars(TyVarseq(I
, tyvars
)) =
9417 fun collect( [], U
) = U
9418 |
collect(tyvar
::tyvars
, U
) =
9419 if TyVarSet
.member(U
, tyvar
) then
9420 (* Syntactic restriction
[Section
2.9, 3rd bullet
] *)
9421 errorTyVar(I
, "duplicate type variable ", tyvar
)
9423 collect(tyvars
, TyVarSet
.add(U
, tyvar
))
9425 ( collect(tyvars
, TyVarSet
.empty
), tyvars
)
9430 (* Typing special constants
[Section
4.1, Appendix E
.1] *)
9432 fun typeSCon(SCon
.INT _
) = Type
.fromOverloadingClass InitialStaticEnv
.Int
9433 |
typeSCon(SCon
.WORD _
) = Type
.fromOverloadingClass InitialStaticEnv
.Word
9434 |
typeSCon(SCon
.CHAR _
) = Type
.fromOverloadingClass InitialStaticEnv
.Char
9435 |
typeSCon(SCon
.REAL _
) = Type
.fromOverloadingClass InitialStaticEnv
.Real
9436 |
typeSCon(SCon
.STRING _
) =
9437 Type
.fromOverloadingClass InitialStaticEnv
.String
9440 (* Calculate sets
of unguarded explicit
type variables
[Section
4.6] *)
9443 val op+ = TyVarSet
.union
9445 fun ? tyvarsX NONE
= TyVarSet
.empty
9446 | ?
tyvarsX (SOME x
) = tyvarsX x
9449 fun unguardedTyVarsAtExp(RECORDAtExp(_
, exprow_opt
)) =
9450 ?unguardedTyVarsExpRow exprow_opt
9451 |
unguardedTyVarsAtExp(LETAtExp(_
, dec
, exp
)) =
9452 unguardedTyVarsDec dec
+ unguardedTyVarsExp exp
9453 |
unguardedTyVarsAtExp(PARAtExp(_
, exp
)) =
9454 unguardedTyVarsExp exp
9455 | unguardedTyVarsAtExp _
= TyVarSet
.empty
9457 and unguardedTyVarsExpRow(ExpRow(_
, lab
, exp
, exprow_opt
)) =
9458 unguardedTyVarsExp exp
+ ?unguardedTyVarsExpRow exprow_opt
9460 and unguardedTyVarsExp(ATEXPExp(_
, atexp
)) =
9461 unguardedTyVarsAtExp atexp
9462 |
unguardedTyVarsExp(APPExp(_
, exp
, atexp
)) =
9463 unguardedTyVarsExp exp
+ unguardedTyVarsAtExp atexp
9464 |
unguardedTyVarsExp(TYPEDExp(_
, exp
, ty
)) =
9465 unguardedTyVarsExp exp
+ unguardedTyVarsTy ty
9466 |
unguardedTyVarsExp(HANDLEExp(_
, exp
, match
)) =
9467 unguardedTyVarsExp exp
+ unguardedTyVarsMatch match
9468 |
unguardedTyVarsExp(RAISEExp(_
, exp
)) =
9469 unguardedTyVarsExp exp
9470 |
unguardedTyVarsExp(FNExp(_
, match
)) =
9471 unguardedTyVarsMatch match
9473 and unguardedTyVarsMatch(Match(_
, mrule
, match_opt
)) =
9474 unguardedTyVarsMrule mrule
+ ?unguardedTyVarsMatch match_opt
9476 and unguardedTyVarsMrule(Mrule(_
, pat
, exp
)) =
9477 unguardedTyVarsPat pat
+ unguardedTyVarsExp exp
9479 and unguardedTyVarsDec(ABSTYPEDec(_
, datbind
, dec
)) =
9480 unguardedTyVarsDec dec
9481 |
unguardedTyVarsDec(EXCEPTIONDec(_
, exbind
)) =
9482 unguardedTyVarsExBind exbind
9483 |
unguardedTyVarsDec(LOCALDec(_
, dec1
, dec2
)) =
9484 unguardedTyVarsDec dec1
+ unguardedTyVarsDec dec2
9485 |
unguardedTyVarsDec(SEQDec(_
, dec1
, dec2
)) =
9486 unguardedTyVarsDec dec1
+ unguardedTyVarsDec dec2
9487 | unguardedTyVarsDec _
= TyVarSet
.empty
9489 and unguardedTyVarsValBind(PLAINValBind(_
, pat
, exp
, valbind_opt
)) =
9490 unguardedTyVarsPat pat
+ unguardedTyVarsExp exp
+
9491 ?unguardedTyVarsValBind valbind_opt
9492 |
unguardedTyVarsValBind(RECValBind(_
, valbind
)) =
9493 unguardedTyVarsValBind valbind
9495 and unguardedTyVarsExBind(NEWExBind(_
, _
, vid
, ty_opt
, exbind_opt
)) =
9496 ?unguardedTyVarsTy ty_opt
+ ?unguardedTyVarsExBind exbind_opt
9497 |
unguardedTyVarsExBind(EQUALExBind(_
, _
, vid
, _
, longvid
, exbind_opt
)) =
9498 ?unguardedTyVarsExBind exbind_opt
9500 and unguardedTyVarsAtPat(RECORDAtPat(_
, patrow_opt
)) =
9501 ?unguardedTyVarsPatRow patrow_opt
9502 |
unguardedTyVarsAtPat(PARAtPat(_
, pat
)) =
9503 unguardedTyVarsPat pat
9504 | unguardedTyVarsAtPat _
= TyVarSet
.empty
9506 and unguardedTyVarsPatRow(WILDCARDPatRow(_
)) = TyVarSet
.empty
9507 |
unguardedTyVarsPatRow(ROWPatRow(_
, lab
, pat
, patrow_opt
)) =
9508 unguardedTyVarsPat pat
+ ?unguardedTyVarsPatRow patrow_opt
9510 and unguardedTyVarsPat(ATPATPat(_
, atpat
)) =
9511 unguardedTyVarsAtPat atpat
9512 |
unguardedTyVarsPat(CONPat(_
, _
, longvid
, atpat
)) =
9513 unguardedTyVarsAtPat atpat
9514 |
unguardedTyVarsPat(TYPEDPat(_
, pat
, ty
)) =
9515 unguardedTyVarsPat pat
+ unguardedTyVarsTy ty
9516 |
unguardedTyVarsPat(ASPat(_
, _
, vid
, ty_opt
, pat
)) =
9517 ?unguardedTyVarsTy ty_opt
+ unguardedTyVarsPat pat
9519 and unguardedTyVarsTy(TYVARTy(_
, tyvar
)) = TyVarSet
.singleton tyvar
9520 |
unguardedTyVarsTy(RECORDTy(_
, tyrow_opt
)) =
9521 ?unguardedTyVarsTyRow tyrow_opt
9522 |
unguardedTyVarsTy(TYCONTy(_
, tyseq
, longtycon
)) =
9523 unguardedTyVarsTyseq tyseq
9524 |
unguardedTyVarsTy(ARROWTy(_
, ty
, ty
')) =
9525 unguardedTyVarsTy ty
+ unguardedTyVarsTy ty
'
9526 |
unguardedTyVarsTy(PARTy(_
, ty
)) =
9527 unguardedTyVarsTy ty
9529 and unguardedTyVarsTyRow(TyRow(_
, lab
, ty
, tyrow_opt
)) =
9530 unguardedTyVarsTy ty
+ ?unguardedTyVarsTyRow tyrow_opt
9532 and unguardedTyVarsTyseq(Tyseq(_
, tys
)) =
9533 List.foldl (fn(ty
,U
) => unguardedTyVarsTy ty
+ U
) TyVarSet
.empty tys
9539 (* Check whether a pattern binds an identifier
*)
9542 fun ?
boundByX(NONE
, vid
) = false
9543 | ?
boundByX(SOME x
, vid
) = boundByX(x
, vid
)
9546 fun boundByAtPat(WILDCARDAtPat(_
), vid
) = false
9547 |
boundByAtPat(SCONAtPat(_
, scon
), vid
) = false
9548 |
boundByAtPat(LONGVIDAtPat(_
, _
, longvid
), vid
) =
9550 val (strids
,vid
') = LongVId
.explode longvid
9552 List.null strids
andalso vid
= vid
'
9554 |
boundByAtPat(RECORDAtPat(_
, patrow_opt
), vid
) =
9555 ?
boundByPatRow(patrow_opt
, vid
)
9556 |
boundByAtPat(PARAtPat(_
, pat
), vid
) = boundByPat(pat
, vid
)
9558 and boundByPatRow(WILDCARDPatRow(_
), vid
) = false
9559 |
boundByPatRow(ROWPatRow(_
, lab
, pat
, patrow_opt
), vid
) =
9560 boundByPat(pat
, vid
) orelse ?
boundByPatRow(patrow_opt
, vid
)
9562 and boundByPat(ATPATPat(_
, atpat
), vid
) = boundByAtPat(atpat
, vid
)
9563 |
boundByPat(CONPat(_
, _
, longvid
, atpat
), vid
) = boundByAtPat(atpat
, vid
)
9564 |
boundByPat(TYPEDPat(_
, pat
, ty
), vid
) = boundByPat(pat
, vid
)
9565 |
boundByPat(ASPat(_
, _
, vid
', ty_opt
, pat
), vid
) =
9566 vid
= vid
' orelse boundByPat(pat
, vid
)
9572 (* Non
-expansive expressions
[Section
4.7] *)
9575 fun ? isNonExpansiveX C NONE
= true
9576 | ? isNonExpansiveX
C (SOME x
) = isNonExpansiveX C x
9579 fun isNonExpansiveAtExp
C (SCONAtExp(_
, scon
)) = true
9580 | isNonExpansiveAtExp
C (LONGVIDAtExp(_
, _
, longvid
)) = true
9581 | isNonExpansiveAtExp
C (RECORDAtExp(_
, exprow_opt
)) =
9582 ?isNonExpansiveExpRow C exprow_opt
9583 | isNonExpansiveAtExp
C (PARAtExp(_
, exp
)) = isNonExpansiveExp C exp
9584 | isNonExpansiveAtExp C _
= false
9586 and isNonExpansiveExpRow
C (ExpRow(_
, lab
, exp
, exprow_opt
)) =
9587 isNonExpansiveExp C exp
andalso ?isNonExpansiveExpRow C exprow_opt
9589 and isNonExpansiveExp
C (ATEXPExp(_
, atexp
)) = isNonExpansiveAtExp C atexp
9590 | isNonExpansiveExp
C (APPExp(_
, exp
, atexp
)) =
9591 isConExp C exp
andalso isNonExpansiveAtExp C atexp
9592 | isNonExpansiveExp
C (TYPEDExp(_
, exp
, ty
)) = isNonExpansiveExp C exp
9593 | isNonExpansiveExp
C (FNExp(_
, match
)) = true
9594 | isNonExpansiveExp C _
= false
9596 and isConAtExp
C (PARAtExp(_
, exp
)) = isConExp C exp
9597 | isConAtExp
C (LONGVIDAtExp(_
, _
, longvid
)) =
9598 LongVId
.explode longvid
<> ([],VId
.fromString
"ref") andalso
9599 (case Context
.findLongVId(C
, longvid
)
9600 of SOME(_
,is
) => is
=IdStatus
.c
orelse is
=IdStatus
.e
9603 | isConAtExp C _
= false
9605 and isConExp
C (ATEXPExp(_
, atexp
)) = isConAtExp C atexp
9606 | isConExp
C (TYPEDExp(_
, ATEXPExp(_
, atexp
), ty
)) = isConAtExp C atexp
9607 | isConExp C _
= false
9613 (* Closure
of value environments
[Section
4.8] *)
9615 fun hasNonExpansiveRHS
C (vid
, PLAINValBind(I
, pat
, exp
, valbind_opt
)) =
9616 if boundByPat(pat
, vid
) then
9617 isNonExpansiveExp C exp
9619 hasNonExpansiveRHS
C (vid
, valOf valbind_opt
)
9621 | hasNonExpansiveRHS
C (vid
, RECValBind _
) =
9622 (* A
rec valbind can only contain functions
. *)
9625 fun Clos (C
,valbind
) VE
=
9627 val tyvarsC
= Context
.tyvars C
9629 fun alphas(vid
, tau
) =
9630 if hasNonExpansiveRHS
C (vid
, valbind
) then
9632 (TyVarSet
.difference(Type
.tyvars tau
, tyvarsC
))
9637 (fn(vid
, ((_
,tau
),is
)) => ((alphas(vid
,tau
),tau
),is
))
9642 (* Inference rules
[Section
4.10] *)
9645 (* Atomic Expressions
*)
9647 fun elabAtExp(C
, SCONAtExp(I
, scon
)) =
9651 |
elabAtExp(C
, LONGVIDAtExp(I
, _
, longvid
)) =
9654 val (sigma
,is
) = case Context
.findLongVId(C
, longvid
)
9655 of SOME valstr
=> valstr
9657 errorLongVId(I
, "unknown identifier ",longvid
)
9658 val tau
= TypeScheme
.instance sigma
9663 |
elabAtExp(C
, RECORDAtExp(I
, exprow_opt
)) =
9666 val rho
= case exprow_opt
9667 of NONE
=> Type
.emptyRho
9668 | SOME exprow
=> elabExpRow(C
, exprow
)
9670 Type
.fromRowType rho
9673 |
elabAtExp(C
, LETAtExp(I
, dec
, exp
)) =
9676 val E
= elabDec(false, C
, dec
)
9677 val tau
= elabExp(C oplusE E
, exp
)
9679 if TyNameSet
.isSubset(Type
.tynames tau
, Context
.Tof C
) then
9682 error(I
, "escaping local type name in let expression")
9685 |
elabAtExp(C
, PARAtExp(I
, exp
)) =
9688 val tau
= elabExp(C
, exp
)
9694 (* Expression Rows
*)
9696 and elabExpRow(C
, ExpRow(I
, lab
, exp
, exprow_opt
)) =
9699 val tau
= elabExp(C
, exp
)
9700 val rho
= case exprow_opt
9701 of NONE
=> Type
.emptyRho
9702 | SOME exprow
=> elabExpRow(C
, exprow
)
9704 if isSome(Type
.findLab(rho
, lab
)) then
9705 (* Syntactic restriction
[Section
2.9, 1st bullet
] *)
9706 errorLab(I
, "duplicate label ", lab
)
9708 Type
.insertRho(rho
, lab
, tau
)
9714 and elabExp(C
, ATEXPExp(I
, atexp
)) =
9717 val tau
= elabAtExp(C
, atexp
)
9722 |
elabExp(C
, APPExp(I
, exp
, atexp
)) =
9725 val tau1
= elabExp(C
, exp
)
9726 val tau
' = elabAtExp(C
, atexp
)
9727 val tau
= Type
.invent()
9729 Type
.unify(tau1
, Type
.fromFunType(tau
',tau
))
9730 handle Type
.Unify
=> error(I
, "type mismatch on application")
9734 |
elabExp(C
, TYPEDExp(I
, exp
, ty
)) =
9737 val tau1
= elabExp(C
, exp
)
9738 val tau
= elabTy(C
, ty
)
9740 Type
.unify(tau1
,tau
)
9741 handle Type
.Unify
=>
9742 error(I
, "expression does not match annotation")
9746 |
elabExp(C
, HANDLEExp(I
, exp
, match
)) =
9749 val tau1
= elabExp(C
, exp
)
9750 val tau2
= elabMatch(C
, match
)
9752 Type
.unify(tau1
,tau2
)
9753 handle Type
.Unify
=>
9754 error(I
, "type mismatch between expression and handler")
9758 |
elabExp(C
, RAISEExp(I
, exp
)) =
9761 val tau1
= elabExp(C
, exp
)
9763 Type
.unify(tau1
, InitialStaticEnv
.tauExn
)
9764 handle Type
.Unify
=>
9765 error(I
, "raised expression is not an exception")
9769 |
elabExp(C
, FNExp(I
, match
)) =
9772 val tau
= elabMatch(C
, match
)
9774 (* Further restriction
[Section
4.11, item
2] *)
9775 CheckPattern
.checkMatch(Context
.Eof C
, match
)
9782 and elabMatch(C
, Match(I
, mrule
, match_opt
)) =
9785 val tau
= elabMrule(C
, mrule
)
9791 val tau2
= elabMatch(C
, match
)
9793 Type
.unify(tau
, tau2
)
9794 handle Type
.Unify
=>
9795 error(I
, "type mismatch between different matches")
9803 and elabMrule(C
, Mrule(I
, pat
, exp
)) =
9806 val (VE
,tau
) = elabPat(C
, pat
)
9807 val tau
' = elabExp(C plusVE VE
, exp
)
9808 (* Side condition on
type names is always ensured
. *)
9810 Type
.fromFunType(tau
,tau
')
9816 and elabDec(toplevel
, C
, VALDec(I
, tyvarseq
, valbind
)) =
9819 val U
' = #
1(tyvars(tyvarseq
))
9820 (* Collect implicitly bound tyvars
[Section
4.6] *)
9821 val U
= TyVarSet
.union(U
',
9822 TyVarSet
.difference(unguardedTyVarsValBind valbind
,
9824 val VE
= elabValBind(toplevel
, C plusU U
, valbind
)
9825 val VE
' = Clos(C
,valbind
) VE
9826 val _
= StaticEnv
.defaultOverloaded VE
'
9828 if not(TyVarSet
.isEmpty(
9829 TyVarSet
.intersection(Context
.Uof C
, U
))) then
9830 (* Syntactic restriction
[Section
2.9, last bullet
] *)
9831 error(I
, "some type variables shadow previous ones")
9832 else if StaticEnv
.containsFlexibleType VE
' then
9833 (* Further restriction
[Section
4.11, item
1] *)
9834 error(I
, "unresolved flexible record type")
9835 else if TyVarSet
.isEmpty(
9836 TyVarSet
.intersection(U
, StaticEnv
.tyvarsVE VE
')) then
9837 StaticEnv
.fromVE VE
'
9839 error(I
, "some explicit type variables cannot be generalised")
9842 |
elabDec(toplevel
, C
, TYPEDec(I
, typbind
)) =
9845 val TE
= elabTypBind(C
, typbind
)
9850 |
elabDec(toplevel
, C
, DATATYPEDec(I
, datbind
)) =
9853 val TE1
= lhsDatBind datbind
9854 val (VE2
,TE2
) = elabDatBind(C oplusTE TE1
, datbind
)
9855 val (TE
, VE
) = StaticEnv
.maximiseEquality(TE2
,VE2
)
9856 (* Side condition on
type names is always ensured
. *)
9858 StaticEnv
.fromVEandTE(VE
,TE
)
9861 |
elabDec(toplevel
, C
, REPLICATIONDec(I
, tycon
, longtycon
)) =
9864 val (theta
,VE
) = case Context
.findLongTyCon(C
, longtycon
)
9865 of SOME tystr
=> tystr
9867 errorLongTyCon(I
, "unknown type ", longtycon
)
9868 val TE
= TyConMap
.singleton(tycon
, (theta
,VE
))
9870 StaticEnv
.fromVEandTE(VE
,TE
)
9873 |
elabDec(toplevel
, C
, ABSTYPEDec(I
, datbind
, dec
)) =
9876 val TE1
= lhsDatBind datbind
9877 val (VE2
,TE2
) = elabDatBind(C oplusTE TE1
, datbind
)
9878 val (TE
, VE
) = StaticEnv
.maximiseEquality(TE2
,VE2
)
9879 val E
= elabDec(false, C
oplusVEandTE (VE
,TE
), dec
)
9880 (* Side condition on
type names is always ensured
. *)
9885 |
elabDec(toplevel
, C
, EXCEPTIONDec(I
, exbind
)) =
9888 val VE
= elabExBind(C
, exbind
)
9893 |
elabDec(toplevel
, C
, LOCALDec(I
, dec1
, dec2
)) =
9896 val E1
= elabDec(false, C
, dec1
)
9897 val E2
= elabDec(false, C oplusE E1
, dec2
)
9902 |
elabDec(toplevel
, C
, OPENDec(I
, longstrids
)) =
9908 case Context
.findLongStrId(C
, longstrid
)
9909 of SOME(StaticEnv
.Str E
) => E
9911 errorLongStrId(I
, "unknown structure ", longstrid
))
9914 List.foldl StaticEnv
.plus StaticEnv
.empty Es
9917 |
elabDec(toplevel
, C
, EMPTYDec(I
)) =
9921 |
elabDec(toplevel
, C
, SEQDec(I
, dec1
, dec2
)) =
9924 val E1
= elabDec(toplevel
, C
, dec1
)
9925 val E2
= elabDec(toplevel
, C oplusE E1
, dec2
)
9927 StaticEnv
.plus(E1
, E2
)
9931 (* Value Bindings
*)
9933 and elabValBind(toplevel
, C
, PLAINValBind(I
, pat
, exp
, valbind_opt
)) =
9936 val (VE
,tau1
) = elabPat(C
, pat
)
9937 val tau2
= elabExp(C
, exp
)
9938 val VE
' = case valbind_opt
9939 of NONE
=> VIdMap
.empty
9940 | SOME valbind
=> elabValBind(toplevel
, C
, valbind
)
9942 Type
.unify(tau1
,tau2
)
9943 handle Type
.Unify
=>
9944 error(I
, "type mismatch between pattern and expression")
9945 ; if toplevel
then () else
9946 (* Further restriction
[Section
4.11, item
3] *)
9947 CheckPattern
.checkPat(Context
.Eof C
, pat
)
9950 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
9951 errorVId(I
, "duplicate variable ", vid
))
9955 |
elabValBind(toplevel
, C
, RECValBind(I
, valbind
)) =
9958 val VE1
= lhsRecValBind valbind
9959 val VE
= elabValBind(toplevel
, C plusVE VE1
, valbind
)
9960 (* Side condition on
type names is always ensured
. *)
9968 and elabTypBind(C
, TypBind(I
, tyvarseq
, tycon
, ty
, typbind_opt
)) =
9971 val (U
,alphas
) = tyvars tyvarseq
9972 val tau
= elabTy(C
, ty
)
9973 val TE
= case typbind_opt
9974 of NONE
=> TyConMap
.empty
9975 | SOME typbind
=> elabTypBind(C
, typbind
)
9977 if not(TyVarSet
.isSubset(Type
.tyvars tau
, U
)) then
9978 (* Syntactic
restriction (missing
in the Definition
!) *)
9979 error(I
, "free type variables in type binding")
9980 else if isSome(TyConMap
.find(TE
, tycon
)) then
9981 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
9982 errorTyCon(I
, "duplicate type constructor ", tycon
)
9984 TyConMap
.insert(TE
, tycon
, ((alphas
,tau
),VIdMap
.empty
))
9988 (* Datatype Bindings
*)
9990 and elabDatBind(C
, DatBind(I
, tyvarseq
, tycon
, conbind
, datbind_opt
)) =
9991 (* [Rule
28, part
2] *)
9993 val (U
,alphas
) = tyvars tyvarseq
9994 val (alphas
,tau
) = case Context
.findTyCon(C
, tycon
)
9995 of SOME(theta
,VE
) => theta
9996 | NONE
=> (* lhsDatBind inserted it
! *)
9997 raise Fail
"ElabCore.elabDatBind: \
9998 \tycon not pre-bound"
9999 val VE
= elabConBind(C
,tau
, conbind
)
10000 val(VE
',TE
') = case datbind_opt
10001 of NONE
=> ( VIdMap
.empty
, TyConMap
.empty
)
10002 | SOME datbind
=> elabDatBind(C
, datbind
)
10003 (* Side condition on t is always
true. *)
10004 val ClosVE
= if TyVarSet
.isSubset(StaticEnv
.tyvarsVE VE
, U
) then
10007 (* Syntactic
restriction (missing
in Definition
!)*)
10008 error(I
, "free type variables in datatype binding")
10010 if isSome(TyConMap
.find(TE
', tycon
)) then
10011 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
10012 errorTyCon(I
, "duplicate type constructor ", tycon
)
10014 ( VIdMap
.unionWithi (fn(vid
,_
,_
) =>
10015 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
10016 errorVId(I
, "duplicate data cnstructor ", vid
)) (ClosVE
,VE
')
10017 , TyConMap
.insert(TE
', tycon
, ((alphas
,tau
),ClosVE
))
10022 (* Constructor Bindings
*)
10024 and elabConBind(C
,tau
, ConBind(I
, _
, vid
, ty_opt
, conbind_opt
)) =
10027 val tau1
= case ty_opt
10031 val tau
' = elabTy(C
, ty
)
10033 Type
.fromFunType(tau
',tau
)
10035 val VE
= case conbind_opt
10036 of NONE
=> VIdMap
.empty
10037 | SOME conbind
=> elabConBind(C
,tau
, conbind
)
10039 if isSome(VIdMap
.find(VE
, vid
)) then
10040 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
10041 errorVId(I
, "duplicate data constructor ", vid
)
10042 else if not(validConBindVId vid
) then
10043 (* Syntactic restriction
[Section
2.9, 5th bullet
] *)
10044 errorVId(I
, "illegal rebinding of identifier ", vid
)
10046 VIdMap
.insert(VE
, vid
, (([],tau1
),IdStatus
.c
))
10050 (* Exception Bindings
*)
10052 and elabExBind(C
, NEWExBind(I
, _
, vid
, ty_opt
, exbind_opt
)) =
10055 val tau1
= case ty_opt
10056 of NONE
=> InitialStaticEnv
.tauExn
10059 val tau
= elabTy(C
, ty
)
10061 Type
.fromFunType(tau
, InitialStaticEnv
.tauExn
)
10063 val VE
= case exbind_opt
10064 of NONE
=> VIdMap
.empty
10065 | SOME exbind
=> elabExBind(C
, exbind
)
10067 if isSome(VIdMap
.find(VE
, vid
)) then
10068 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
10069 errorVId(I
, "duplicate exception constructor ", vid
)
10070 else if not(validConBindVId vid
) then
10071 (* Syntactic restriction
[Section
2.9, 5th bullet
] *)
10072 errorVId(I
, "illegal rebinding of identifier ", vid
)
10074 VIdMap
.insert(VE
, vid
, (([],tau1
),IdStatus
.e
))
10077 |
elabExBind(C
, EQUALExBind(I
, _
, vid
, _
, longvid
, exbind_opt
)) =
10080 val tau
= case Context
.findLongVId(C
, longvid
)
10081 of SOME(([],tau
),IdStatus
.e
) => tau
10083 errorLongVId(I
, "non-exception identifier ", longvid
)
10085 errorLongVId(I
, "unknown identifier ", longvid
)
10086 val VE
= case exbind_opt
10087 of NONE
=> VIdMap
.empty
10088 | SOME exbind
=> elabExBind(C
, exbind
)
10090 if isSome(VIdMap
.find(VE
, vid
)) then
10091 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
10092 errorVId(I
, "duplicate exception constructor ", vid
)
10094 VIdMap
.insert(VE
, vid
, (([],tau
),IdStatus
.e
))
10098 (* Atomic Patterns
*)
10100 and elabAtPat(C
, WILDCARDAtPat(I
)) =
10102 ( VIdMap
.empty
, Type
.invent() )
10104 |
elabAtPat(C
, SCONAtPat(I
, scon
)) =
10108 (* Syntactic restriction
[Section
2.9, 6th bullet
] *)
10109 error(I
, "real constant in pattern")
10111 ( VIdMap
.empty
, typeSCon scon
)
10114 |
elabAtPat(C
, LONGVIDAtPat(I
, _
, longvid
)) =
10115 (* [Rule
34 and 35] *)
10117 val (strids
,vid
) = LongVId
.explode longvid
10119 if List.null strids
andalso
10120 ( case Context
.findVId(C
, vid
)
10122 |
SOME(sigma
,is
) => is
= IdStatus
.v
) then
10125 val tau
= Type
.invent()
10127 ( VIdMap
.singleton(vid
, (([],tau
),IdStatus
.v
))
10133 val (sigma
,is
) = case Context
.findLongVId(C
, longvid
)
10134 of SOME valstr
=> valstr
10136 errorLongVId(I
,"unknown constructor ",
10138 val tau
= TypeScheme
.instance sigma
10139 (* Note that tau will always be a ConsType
. *)
10141 if is
<> IdStatus
.v
then
10142 ( VIdMap
.empty
, tau
)
10144 error(I
, "non-constructor long identifier in pattern")
10148 |
elabAtPat(C
, RECORDAtPat(I
, patrow_opt
)) =
10151 val (VE
,rho
) = case patrow_opt
10152 of NONE
=> ( VIdMap
.empty
, Type
.emptyRho
)
10153 | SOME patrow
=> elabPatRow(C
, patrow
)
10155 (VE
, Type
.fromRowType rho
)
10158 |
elabAtPat(C
, PARAtPat(I
, pat
)) =
10161 val (VE
,tau
) = elabPat(C
, pat
)
10169 and elabPatRow(C
, WILDCARDPatRow(I
)) =
10171 ( VIdMap
.empty
, Type
.inventRho() )
10173 |
elabPatRow(C
, ROWPatRow(I
, lab
, pat
, patrow_opt
)) =
10176 val (VE
,tau
) = elabPat(C
, pat
)
10177 val (VE
',rho
) = case patrow_opt
10178 of NONE
=> ( VIdMap
.empty
, Type
.emptyRho
)
10179 | SOME patrow
=> elabPatRow(C
, patrow
)
10181 if isSome(Type
.findLab(rho
, lab
)) then
10182 (* Syntactic restriction
[Section
2.9, 1st bullet
] *)
10183 errorLab(I
, "duplicate label ", lab
)
10185 ( VIdMap
.unionWithi (fn(vid
,_
,_
) =>
10186 errorVId(I
, "duplicate variable ", vid
)) (VE
,VE
')
10187 , Type
.insertRho(rho
, lab
, tau
)
10194 and elabPat(C
, ATPATPat(I
, atpat
)) =
10197 val (VE
,tau
) = elabAtPat(C
, atpat
)
10202 |
elabPat(C
, CONPat(I
, _
, longvid
, atpat
)) =
10205 val (sigma
,is
) = case Context
.findLongVId(C
, longvid
)
10206 of SOME valstr
=> valstr
10208 errorLongVId(I
, "unknown constructor ", longvid
)
10209 val _
= if is
<> IdStatus
.v
then () else
10210 errorLongVId(I
, "non-constructor ", longvid
)
10211 val (tau
',tau
) = case !(TypeScheme
.instance sigma
)
10212 of Type
.FunType(tau
',tau
) => (tau
', tau
)
10214 errorLongVId(I
,"misplaced nullary constructor ",
10216 val (VE
,tau
'2) = elabAtPat(C
, atpat
)
10218 Type
.unify(tau
',tau
'2)
10219 handle Type
.Unify
=>
10220 error(I
, "type mismatch in constructor pattern")
10224 |
elabPat(C
, TYPEDPat(I
, pat
, ty
)) =
10227 val (VE
,tau1
) = elabPat(C
, pat
)
10228 val tau
= elabTy(C
, ty
)
10230 Type
.unify(tau1
,tau
)
10231 handle Type
.Unify
=> error(I
, "pattern does not match annotation")
10235 |
elabPat(C
, ASPat(I
, _
, vid
, ty_opt
, pat
)) =
10238 val (VE1
,tau1
) = elabPat(C
, pat
)
10241 of NONE
=> (VE1
,tau1
)
10244 val tau
= elabTy(C
, ty
)
10246 Type
.unify(tau1
,tau
)
10247 handle Type
.Unify
=>
10248 error(I
, "pattern does not match annotation")
10252 if not( case Context
.findVId(C
, vid
)
10254 |
SOME(sigma
,is
) => is
= IdStatus
.v
) then
10255 errorVId(I
, "misplaced constructor ", vid
)
10256 else if isSome(VIdMap
.find(VE
, vid
)) then
10257 errorVId(I
, "duplicate variable ", vid
)
10259 ( VIdMap
.insert(VE
, vid
, (([],tau
),IdStatus
.v
)), tau
)
10263 (* Type Expressions
*)
10265 and elabTy(C
, ty
) = Type
.normalise(elabTy
'(C
, ty
))
10267 and elabTy
'(C
, TYVARTy(I
, tyvar
)) =
10272 Type
.fromTyVar alpha
10275 | elabTy
'(C
, RECORDTy(I
, tyrow_opt
)) =
10278 val rho
= case tyrow_opt
10279 of NONE
=> Type
.emptyRho
10280 | SOME tyrow
=> elabTyRow
'(C
, tyrow
)
10282 Type
.fromRowType rho
10285 | elabTy
'(C
, TYCONTy(I
, tyseq
, longtycon
)) =
10288 val Tyseq(I
',tys
) = tyseq
10289 val k
= List.length tys
10290 val taus
= List.map (fn ty
=> elabTy
'(C
, ty
)) tys
10292 case Context
.findLongTyCon(C
, longtycon
)
10293 of SOME tystr
=> tystr
10295 errorLongTyCon(I
, "unknown type constructor ", longtycon
)
10297 TypeFcn
.apply(taus
, theta
)
10298 handle TypeFcn
.Apply
=>
10299 errorLongTyCon(I
, "arity mismatch at type application ",
10303 | elabTy
'(C
, ARROWTy(I
, ty
, ty
')) =
10306 val tau
= elabTy
'(C
, ty
)
10307 val tau
' = elabTy
'(C
, ty
')
10309 Type
.fromFunType(tau
,tau
')
10312 | elabTy
'(C
, PARTy(I
, ty
)) =
10315 val tau
= elabTy
'(C
, ty
)
10321 (* Type
-expression Rows
*)
10323 and elabTyRow
'(C
, TyRow(I
, lab
, ty
, tyrow_opt
)) =
10326 val tau
= elabTy
'(C
, ty
)
10327 val rho
= case tyrow_opt
10328 of NONE
=> Type
.emptyRho
10329 | SOME tyrow
=> elabTyRow
'(C
, tyrow
)
10331 if isSome(Type
.findLab(rho
, lab
)) then
10332 (* Syntactic restriction
[Section
2.9, 1st bullet
] *)
10333 errorLab(I
, "duplicate label ", lab
)
10335 Type
.insertRho(rho
, lab
, tau
)
10340 (* Build tentative VE from LHSs
of recursive valbind
*)
10342 and lhsRecValBind(PLAINValBind(I
, pat
, exp
, valbind_opt
)) =
10344 val VE
= lhsRecValBindPat pat
10345 val VE
' = case valbind_opt
10346 of NONE
=> VIdMap
.empty
10347 | SOME valbind
=> lhsRecValBind valbind
10351 (* Syntactic restriction
[Section
2.9, 4th bullet
] *)
10352 error(I
, "illegal expression within recursive \
10357 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
10358 errorVId(I
, "duplicate variable ", vid
)) (VE
,VE
')
10361 |
lhsRecValBind(RECValBind(I
, valbind
)) =
10362 lhsRecValBind valbind
10364 and lhsRecValBindPat(ATPATPat(I
, atpat
)) =
10365 lhsRecValBindAtPat atpat
10367 |
lhsRecValBindPat(CONPat(I
, _
, longvid
, atpat
)) =
10368 lhsRecValBindAtPat atpat
10370 |
lhsRecValBindPat(TYPEDPat(I
, pat
, ty
)) =
10371 lhsRecValBindPat pat
10373 |
lhsRecValBindPat(ASPat(I
, _
, vid
, ty_opt
, pat
)) =
10375 val VE
= lhsRecValBindPat pat
10377 if isSome(VIdMap
.find(VE
, vid
)) then
10378 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
10379 errorVId(I
, "duplicate variable ", vid
)
10380 else if not(validBindVId vid
) then
10381 (* Syntactic restriction
[Section
2.9, 5th bullet
] *)
10382 errorVId(I
, "illegal rebinding of identifier ", vid
)
10384 VIdMap
.insert(VE
, vid
, (([],Type
.invent()), IdStatus
.v
))
10387 and lhsRecValBindAtPat(WILDCARDAtPat(I
)) =
10390 |
lhsRecValBindAtPat(SCONAtPat(I
, scon
)) =
10393 |
lhsRecValBindAtPat(LONGVIDAtPat(I
, _
, longvid
)) =
10394 (case LongVId
.explode longvid
10396 if not(validBindVId vid
) then
10397 (* Syntactic restriction
[Section
2.9, 5th bullet
] *)
10398 errorVId(I
, "illegal rebinding of identifier ", vid
)
10400 VIdMap
.singleton(vid
, (([],Type
.invent()),IdStatus
.v
))
10402 | _
=> VIdMap
.empty
10405 |
lhsRecValBindAtPat(RECORDAtPat(I
, patrow_opt
)) =
10407 of NONE
=> VIdMap
.empty
10408 | SOME patrow
=> lhsRecValBindPatRow patrow
10411 |
lhsRecValBindAtPat(PARAtPat(I
, pat
)) =
10412 lhsRecValBindPat pat
10414 and lhsRecValBindPatRow(WILDCARDPatRow(I
)) =
10417 |
lhsRecValBindPatRow(ROWPatRow(I
, lab
, pat
, patrow_opt
)) =
10419 val VE
= lhsRecValBindPat pat
10425 val VE
' = lhsRecValBindPatRow patrow
10427 VIdMap
.unionWithi (fn(vid
,_
,_
) =>
10428 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
10429 errorVId(I
, "duplicate variable ", vid
)) (VE
,VE
')
10435 (* Build tentative TE from LHSs
of datbind
*)
10437 and lhsDatBind(DatBind(I
, tyvarseq
, tycon
, conbind
, datbind_opt
)) =
10438 (* [Rule
28, part
1] *)
10440 val (U
,alphas
) = tyvars tyvarseq
10441 val k
= List.length alphas
10442 val span
= lhsConBind conbind
10443 val t
= TyName
.tyname(tycon
, k
, TyName
.EQ
, span
)
10444 val tau
= Type
.fromConsType(List.map Type
.fromTyVar alphas
,t
)
10445 val TE
' = case datbind_opt
10446 of NONE
=> TyConMap
.empty
10447 | SOME datbind
=> lhsDatBind datbind
10449 if isSome(TyConMap
.find(TE
', tycon
)) then
10450 (* Syntactic restriction
[Section
2.9, 2nd bullet
] *)
10451 errorTyCon(I
, "duplicate type constructor ", tycon
)
10453 TyConMap
.insert(TE
', tycon
, ((alphas
,tau
), VIdMap
.empty
))
10456 and lhsConBind(ConBind(I
, _
, vid
, ty_opt
, conbind_opt
)) =
10459 | SOME conbind
=> 1 + lhsConBind conbind
10462 (* stop
of ElabCore
.sml
*)
10463 (* start
of ELAB_MODULE
.sml
*)
10465 * Standard ML modules elaboration
10467 * Definition
, sections
5.7 and 3.5
10470 * Elaboration also checks the syntactic restrictions
[Section
3.5].
10473 signature ELAB_MODULE
=
10478 type TopDec
= GrammarModule
.TopDec
10479 type Basis
= StaticBasis
.Basis
10484 val elabTopDec
: Basis
* TopDec
-> Basis
10487 (* stop
of ELAB_MODULE
.sml
*)
10488 (* start
of ElabModule
.sml
*)
10490 * Standard ML modules elaboration
10492 * Definition
, sections
5.7 and 3.5
10495 * - Elaboration also checks the syntactic restrictions
[Section
3.5].
10496 * - To implement the
3rd restriction
in 4.11 some elab functions are
10497 * passed an additional boolean argument to recognise being on the toplevel
.
10500 structure ElabModule
:> ELAB_MODULE
=
10505 type TopDec
= GrammarModule
.TopDec
10506 type Basis
= StaticBasis
.Basis
10512 (* Helpers for error messages
*)
10514 val error
= Error
.error
10516 fun errorVId (I
, s
, vid
) = error(I
, s ^ VId
.toString vid
)
10517 fun errorTyCon(I
, s
, tycon
) = error(I
, s ^ TyCon
.toString tycon
)
10518 fun errorStrId(I
, s
, strid
) = error(I
, s ^ StrId
.toString strid
)
10519 fun errorSigId(I
, s
, sigid
) = error(I
, s ^ SigId
.toString sigid
)
10520 fun errorFunId(I
, s
, funid
) = error(I
, s ^ FunId
.toString funid
)
10522 fun errorLongTyCon(I
, s
, longtycon
) =
10523 error(I
, s ^ LongTyCon
.toString longtycon
)
10524 fun errorLongStrId(I
, s
, longstrid
) =
10525 error(I
, s ^ LongStrId
.toString longstrid
)
10528 (* Helpers for basis modification
*)
10530 val plus
= StaticBasis
.plus
10531 val plusT
= StaticBasis
.plusT
10532 val oplusSE
= StaticBasis
.oplusSE
10533 val oplusG
= StaticBasis
.oplusG
10534 val oplusF
= StaticBasis
.oplusF
10535 val oplusE
= StaticBasis
.oplusE
10537 infix plus plusT oplusG oplusF oplusE oplusSE
10541 (* Inference rules
[Section
5.7] *)
10544 (* Structure Expressions
*)
10546 fun elabStrExp(B
, STRUCTStrExp(I
, strdec
)) =
10549 val E
= elabStrDec(false, B
, strdec
)
10554 |
elabStrExp(B
, LONGSTRIDStrExp(I
, longstrid
)) =
10557 val E
= case StaticBasis
.findLongStrId(B
, longstrid
)
10558 of SOME(StaticEnv
.Str E
) => E
10560 errorLongStrId(I
, "unknown structure ", longstrid
)
10565 |
elabStrExp(B
, TRANSStrExp(I
, strexp
, sigexp
)) =
10568 val E
= elabStrExp(B
, strexp
)
10569 val Sigma
= elabSigExp(B
, sigexp
)
10570 val (E
',_
) = Sig
.match(E
, Sigma
)
10571 handle Sig
.Match
=>
10572 error(I
, "structure does not match constraint")
10577 |
elabStrExp(B
, OPAQStrExp(I
, strexp
, sigexp
)) =
10580 val E
= elabStrExp(B
, strexp
)
10581 val (T
',E
') = Sig
.rename(elabSigExp(B
, sigexp
))
10582 val (E
'',_
) = Sig
.match(E
, (T
',E
'))
10583 handle Sig
.Match
=>
10584 error(I
, "structure does not match constraint")
10585 (* Renaming ensures side condition on T
' *)
10590 |
elabStrExp(B
, APPStrExp(I
, funid
, strexp
)) =
10593 val E
= elabStrExp(B
, strexp
)
10594 val (T1
'',(E1
'',(T1
',E1
'))) =
10595 case StaticBasis
.findFunId(B
, funid
)
10597 | NONE
=> errorFunId(I
, "unknown functor ", funid
)
10598 val (E
'',phi
) = Sig
.match(E
, (T1
'',E1
''))
10599 handle Sig
.Match
=>
10600 error(I
, "structure does not match constraint")
10601 val (T
',E
') = Sig
.rename (T1
', StaticEnv
.realise phi E1
')
10602 (* Renaming ensures side condition on T
' *)
10607 |
elabStrExp(B
, LETStrExp(I
, strdec
, strexp
)) =
10610 val E1
= elabStrDec(false, B
, strdec
)
10611 val E2
= elabStrExp(B oplusE E1
, strexp
)
10617 (* Structure
-level Declarations
*)
10619 and elabStrDec(toplevel
, B
, DECStrDec(I
, dec
)) =
10622 val E
= ElabCore
.elabDec(toplevel
, StaticBasis
.Cof B
, dec
)
10627 |
elabStrDec(toplevel
, B
, STRUCTUREStrDec(I
, strbind
)) =
10630 val SE
= elabStrBind(B
, strbind
)
10632 StaticEnv
.fromSE SE
10635 |
elabStrDec(toplevel
, B
, LOCALStrDec(I
, strdec1
, strdec2
)) =
10638 val E1
= elabStrDec(false, B
, strdec1
)
10639 val E2
= elabStrDec(false, B oplusE E1
, strdec2
)
10644 |
elabStrDec(toplevel
, B
, EMPTYStrDec(I
)) =
10648 |
elabStrDec(toplevel
, B
, SEQStrDec(I
, strdec1
, strdec2
)) =
10651 val E1
= elabStrDec(toplevel
, B
, strdec1
)
10652 val E2
= elabStrDec(toplevel
, B oplusE E1
, strdec2
)
10654 StaticEnv
.plus(E1
,E2
)
10658 (* Structure Bindings
*)
10660 and elabStrBind(B
, StrBind(I
, strid
, strexp
, strbind_opt
)) =
10663 val E
= elabStrExp(B
, strexp
)
10664 val SE
= case strbind_opt
10665 of NONE
=> StrIdMap
.empty
10667 elabStrBind(B plusT StaticEnv
.tynames E
, strbind
)
10669 if isSome(StrIdMap
.find(SE
, strid
)) then
10670 (* Syntactic restriction
[Section
3.5, 1st bullet
] *)
10671 errorStrId(I
, "duplicate structure identifier ", strid
)
10673 StrIdMap
.insert(SE
, strid
, StaticEnv
.Str E
)
10677 (* Signature Expressions
*)
10679 and elabSigExpE(B
, SIGSigExp(I
, spec
)) =
10682 val E
= elabSpec(B
, spec
)
10687 |
elabSigExpE(B
, SIGIDSigExp(I
, sigid
)) =
10690 val (T
,E
) = case StaticBasis
.findSigId(B
, sigid
)
10691 of SOME Sigma
=> Sig
.rename Sigma
10692 | NONE
=> errorSigId(I
, "unknown signature ",sigid
)
10697 |
elabSigExpE(B
, WHERETYPESigExp(I
, sigexp
, tyvarseq
, longtycon
, ty
)) =
10700 val E
= elabSigExpE(B
, sigexp
)
10701 val alphas
= #
2(ElabCore
.tyvars tyvarseq
)
10702 val tau
= ElabCore
.elabTy(StaticBasis
.Cof B
, ty
)
10703 val t
= case StaticEnv
.findLongTyCon(E
,longtycon
)
10705 errorLongTyCon(I
, "unknown type ", longtycon
)
10706 |
SOME(theta
,VE
) =>
10707 case TypeFcn
.toTyName theta
10709 errorLongTyCon(I
, "non-flexible type ", longtycon
)
10711 val _
= if not(TyNameSet
.member(StaticBasis
.Tof B
, t
)) then ()
10712 else errorLongTyCon(I
, "rigid type ", longtycon
)
10713 val phi
= TyNameMap
.singleton(t
, (alphas
,tau
))
10714 val _
= if TyName
.equality t
= TyName
.NOEQ
10715 orelse TypeFcn
.admitsEquality (alphas
,tau
) then () else
10716 error(I
, "type realisation does not respect equality")
10717 val E
' = StaticEnv
.realise phi E
10718 val _
= if StaticEnv
.isWellFormed E
' then () else
10719 error(I
, "type realisation does not respect datatype")
10724 and elabSigExp(B
, sigexp
) =
10727 val E
= elabSigExpE(B
, sigexp
)
10728 val T
= TyNameSet
.difference(StaticEnv
.tynames E
, StaticBasis
.Tof B
)
10734 (* Signature Declarations
*)
10736 and elabSigDec(B
, SigDec(I
, sigbind
)) =
10739 val G
= elabSigBind(B
, sigbind
)
10745 (* Signature Bindings
*)
10747 and elabSigBind(B
, SigBind(I
, sigid
, sigexp
, sigbind_opt
)) =
10750 val Sigma
= elabSigExp(B
, sigexp
)
10751 val G
= case sigbind_opt
10752 of NONE
=> SigIdMap
.empty
10753 | SOME sigbind
=> elabSigBind(B
, sigbind
)
10755 if isSome(SigIdMap
.find(G
, sigid
)) then
10756 (* Syntactic restriction
[Section
3.5, 1st bullet
] *)
10757 errorSigId(I
, "duplicate signature identifier ", sigid
)
10759 SigIdMap
.insert(G
, sigid
, Sigma
)
10763 (* Specifications
*)
10765 and elabSpec(B
, VALSpec(I
, valdesc
)) =
10768 val VE
= elabValDesc(StaticBasis
.Cof B
, valdesc
)
10770 StaticEnv
.fromVE(StaticEnv
.Clos VE
)
10773 |
elabSpec(B
, TYPESpec(I
, typdesc
)) =
10776 val TE
= elabTypDesc(StaticBasis
.Cof B
, typdesc
)
10777 (* Side condition on
type names is always ensured
. *)
10779 StaticEnv
.fromTE TE
10782 |
elabSpec(B
, EQTYPESpec(I
, typdesc
)) =
10785 val TE
= elabTypDesc(StaticBasis
.Cof B
, typdesc
)
10786 val _
= StaticEnv
.makeEquality TE
10788 StaticEnv
.fromTE TE
10791 |
elabSpec(B
, DATATYPESpec(I
, datdesc
)) =
10794 val TE1
= lhsDatDesc datdesc
10795 val (VE2
,TE2
) = elabDatDesc(Context
.oplusTE(StaticBasis
.Cof B
,TE1
),
10797 val (TE
, VE
) = StaticEnv
.maximiseEquality(TE2
,VE2
)
10798 (* Side condition on
type names is always ensured
. *)
10800 StaticEnv
.fromVEandTE(VE
,TE
)
10803 |
elabSpec(B
, REPLICATIONSpec(I
, tycon
, longtycon
)) =
10806 val (theta
,VE
) = case StaticBasis
.findLongTyCon(B
, longtycon
)
10807 of SOME tystr
=> tystr
10809 errorLongTyCon(I
, "unknown type ", longtycon
)
10810 val TE
= TyConMap
.singleton(tycon
, (theta
,VE
))
10812 StaticEnv
.fromVEandTE(VE
,TE
)
10815 |
elabSpec(B
, EXCEPTIONSpec(I
, exdesc
)) =
10818 val VE
= elabExDesc(StaticBasis
.Cof B
, exdesc
)
10820 StaticEnv
.fromVE VE
10823 |
elabSpec(B
, STRUCTURESpec(I
, strdesc
)) =
10826 val SE
= elabStrDesc(B
, strdesc
)
10828 StaticEnv
.fromSE SE
10831 |
elabSpec(B
, INCLUDESpec(I
, sigexp
)) =
10834 val E
= elabSigExpE(B
, sigexp
)
10839 |
elabSpec(B
, EMPTYSpec(I
)) =
10843 |
elabSpec(B
, SEQSpec(I
, spec1
, spec2
)) =
10846 val E1
= elabSpec(B
, spec1
)
10847 val E2
= elabSpec(B oplusE E1
, spec2
)
10848 val _
= if StaticEnv
.disjoint(E1
,E2
) then () else
10849 error(I
, "duplicate specifications in signature")
10851 StaticEnv
.plus(E1
,E2
)
10854 |
elabSpec(B
, SHARINGTYPESpec(I
, spec
, longtycons
)) =
10857 val E
= elabSpec(B
, spec
)
10861 case StaticEnv
.findLongTyCon(E
, longtycon
)
10863 errorLongTyCon(I
, "unknown type ", longtycon
)
10864 |
SOME(theta
,VE
) =>
10865 case TypeFcn
.toTyName theta
10867 errorLongTyCon(I
, "non-flexible type ", longtycon
)
10869 if TyNameSet
.member(StaticBasis
.Tof B
, t
) then
10870 errorLongTyCon(I
, "rigid type ", longtycon
)
10875 val equality
= if List.exists
10876 (fn t
=> TyName
.equality t
<> TyName
.NOEQ
) ts
10879 val span
= List.foldl
10880 (fn(t
, span
) => Int.max(TyName
.span t
, span
))
10882 val t1
= List.hd ts
10883 val t
= TyName
.tyname(TyName
.tycon t1
, TyName
.arity t1
,
10885 val theta
= TypeFcn
.fromTyName t
10886 val phi
= List.foldl
10887 (fn(ti
, phi
) => TyNameMap
.insert(phi
, ti
, theta
))
10890 StaticEnv
.realise phi E
10893 |
elabSpec(B
, SHARINGSpec(I
, spec
, longstrids
)) =
10896 fun shareFlexibleTyName(t1
, t2
, phi
) =
10898 val equality
= if TyName
.equality t1
<> TyName
.NOEQ
10899 orelse TyName
.equality t2
<> TyName
.NOEQ
10902 val t
= TyName
.tyname(TyName
.tycon t1
,
10905 Int.max(TyName
.span t1
,
10907 val theta
= TypeFcn
.fromTyName t
10909 TyNameMap
.insert(TyNameMap
.insert(phi
,
10914 fun shareTE(TE1
, TE2
, phi
) =
10916 (fn(tycon
, (theta1
,VE1
), phi
) =>
10917 case TyConMap
.find(TE2
, tycon
)
10919 |
SOME(theta2
,VE2
) =>
10920 case (TypeFcn
.toTyName(TypeFcn
.realise phi theta1
),
10921 TypeFcn
.toTyName(TypeFcn
.realise phi theta2
))
10922 of (SOME t1
, SOME t2
) =>
10923 if TyNameSet
.member(StaticBasis
.Tof B
, t1
)
10924 orelse TyNameSet
.member(StaticBasis
.Tof B
,t2
) then
10925 errorTyCon(I
, "structure contains rigid type ",
10928 shareFlexibleTyName(t1
, t2
, phi
)
10930 errorTyCon(I
, "structure contains non-flexible \
10935 fun shareSE(SE1
, SE2
, phi
) =
10937 (fn(strid
, StaticEnv
.Str E1
, phi
) =>
10938 case StrIdMap
.find(SE2
, strid
)
10940 |
SOME(StaticEnv
.Str E2
) => shareE(E1
, E2
, phi
)
10944 and shareE((SE1
,TE1
,VE1
), (SE2
,TE2
,VE2
), phi
) =
10946 val phi
' = shareTE(TE1
, TE2
, phi
)
10947 val phi
'' = shareSE(SE1
, SE2
, phi
')
10952 fun share1(E1
, [], phi
) = phi
10953 |
share1(E1
, E2
::Es
, phi
) =
10955 val phi
' = shareE(E1
, E2
, phi
)
10957 share1(E1
, Es
, phi
')
10960 fun shareAll( [], phi
) = phi
10961 |
shareAll(E
::Es
, phi
) =
10963 val phi
' = share1(E
, Es
, phi
)
10968 val E
= elabSpec(B
, spec
)
10971 case StaticEnv
.findLongStrId(E
, longstrid
)
10972 of SOME(StaticEnv
.Str E
') => E
'
10974 errorLongStrId(I
, "unknown structure ", longstrid
)
10976 val phi
= shareAll(Es
, TyNameMap
.empty
)
10978 StaticEnv
.realise phi E
10982 (* Value Descriptions
*)
10984 and elabValDesc(C
, ValDesc(I
, vid
, ty
, valdesc_opt
)) =
10987 val tau
= ElabCore
.elabTy(C
, ty
)
10988 val VE
= case valdesc_opt
10989 of NONE
=> VIdMap
.empty
10990 | SOME valdesc
=> elabValDesc(C
, valdesc
)
10992 if isSome(VIdMap
.find(VE
, vid
)) then
10993 (* Syntactic restriction
[Section
3.5, 2nd bullet
] *)
10994 errorVId(I
, "duplicate variable ", vid
)
10995 else if not(ElabCore
.validBindVId vid
) then
10996 (* Syntactic restriction
[Section
3.5, 5th bullet
] *)
10997 errorVId(I
, "illegal specification of identifier ", vid
)
10999 VIdMap
.insert(VE
, vid
, (([],tau
),IdStatus
.v
))
11003 (* Type Descriptions
*)
11005 and elabTypDesc(C
, TypDesc(I
, tyvarseq
, tycon
, typdesc_opt
)) =
11008 val alphas
= #
2(ElabCore
.tyvars tyvarseq
)
11009 val k
= List.length alphas
11010 val t
= TyName
.tyname(tycon
, k
, TyName
.NOEQ
, 0)
11011 val TE
= case typdesc_opt
11012 of NONE
=> TyConMap
.empty
11013 | SOME typdesc
=> elabTypDesc(C
, typdesc
)
11014 (* Side condition on t is always
true. *)
11015 val tau
= Type
.fromConsType (List.map Type
.fromTyVar alphas
, t
)
11017 if isSome(TyConMap
.find(TE
, tycon
)) then
11018 (* Syntactic restriction
[Section
3.5, 2nd bullet
] *)
11019 errorTyCon(I
, "duplicate type constructor ", tycon
)
11021 TyConMap
.insert(TE
, tycon
, ((alphas
,tau
),VIdMap
.empty
))
11025 (* Datatype Descriptions
*)
11027 and elabDatDesc(C
, DatDesc(I
, tyvarseq
, tycon
, condesc
, datdesc_opt
)) =
11028 (* [Rule
81, part
2] *)
11030 val (U
,alphas
) = ElabCore
.tyvars tyvarseq
11031 val (alphas
,tau
) = case Context
.findTyCon(C
, tycon
)
11032 of SOME(theta
,VE
) => theta
11033 | NONE
=> (* lhsDatDesc inserted it
! *)
11034 raise Fail
"ElabCore.elabDatDesc: \
11035 \tycon not pre-bound"
11036 val VE
= elabConDesc(C
,tau
, condesc
)
11037 val(VE
',TE
') = case datdesc_opt
11038 of NONE
=> ( VIdMap
.empty
, TyConMap
.empty
)
11039 | SOME datdesc
=> elabDatDesc(C
, datdesc
)
11040 (* Side condition on t is always
true. *)
11041 val ClosVE
= if TyVarSet
.isSubset(StaticEnv
.tyvarsVE VE
, U
) then
11044 (* Syntactic restriction
[Section
3.5,4th bullet
]*)
11045 error(I
, "free type variables \
11046 \in datatype description")
11048 if isSome(TyConMap
.find(TE
', tycon
)) then
11049 (* Syntactic restriction
[Section
3.5, 2nd bullet
] *)
11050 errorTyCon(I
, "duplicate type constructor ", tycon
)
11052 ( VIdMap
.unionWithi (fn(vid
,_
,_
) =>
11053 (* Syntactic restriction
[Section
3.5, 2nd bullet
] *)
11054 errorVId(I
, "duplicate data cnstructor ", vid
)) (ClosVE
,VE
')
11055 , TyConMap
.insert(TE
', tycon
, ((alphas
,tau
),ClosVE
))
11060 (* Constructor Descriptions
*)
11062 and elabConDesc(C
,tau
, ConDesc(I
, vid
, ty_opt
, condesc_opt
)) =
11065 val tau1
= case ty_opt
11069 val tau
' = ElabCore
.elabTy(C
, ty
)
11071 Type
.fromFunType(tau
',tau
)
11073 val VE
= case condesc_opt
11074 of NONE
=> VIdMap
.empty
11075 | SOME condesc
=> elabConDesc(C
,tau
, condesc
)
11077 if isSome(VIdMap
.find(VE
, vid
)) then
11078 (* Syntactic restriction
[Section
3.5, 2nd bullet
] *)
11079 errorVId(I
, "duplicate data constructor ", vid
)
11080 else if not(ElabCore
.validConBindVId vid
) then
11081 (* Syntactic restriction
[Section
3.5, 5th bullet
] *)
11082 errorVId(I
, "illegal specifiation of identifier ", vid
)
11084 VIdMap
.insert(VE
, vid
, (([],tau1
),IdStatus
.c
))
11088 (* Exception Description
*)
11090 and elabExDesc(C
, ExDesc(I
, vid
, ty_opt
, exdesc_opt
)) =
11093 val tau1
= case ty_opt
11094 of NONE
=> InitialStaticEnv
.tauExn
11097 val tau
= ElabCore
.elabTy(C
, ty
)
11098 val _
= if TyVarSet
.isEmpty(Type
.tyvars tau
)
11100 error(I
, "free type variables \
11101 \in exception description")
11103 Type
.fromFunType(tau
, InitialStaticEnv
.tauExn
)
11105 val VE
= case exdesc_opt
11106 of NONE
=> VIdMap
.empty
11107 | SOME exdesc
=> elabExDesc(C
, exdesc
)
11109 if isSome(VIdMap
.find(VE
, vid
)) then
11110 (* Syntactic restriction
[Section
3.5, 2nd bullet
] *)
11111 errorVId(I
, "duplicate exception constructor ", vid
)
11112 else if not(ElabCore
.validConBindVId vid
) then
11113 (* Syntactic restriction
[Section
3.5, 5th bullet
] *)
11114 errorVId(I
, "illegal specification of identifier ", vid
)
11116 VIdMap
.insert(VE
, vid
, (([],tau1
),IdStatus
.e
))
11120 (* Structure Descriptions
*)
11122 and elabStrDesc(B
, StrDesc(I
, strid
, sigexp
, strdesc_opt
)) =
11125 val E
= elabSigExpE(B
, sigexp
)
11126 val SE
= case strdesc_opt
11127 of NONE
=> StrIdMap
.empty
11129 elabStrDesc(B plusT StaticEnv
.tynames E
, strdesc
)
11131 if isSome(StrIdMap
.find(SE
, strid
)) then
11132 (* Syntactic restriction
[Section
3.5, 2nd bullet
] *)
11133 errorStrId(I
, "duplicate structure identifier ", strid
)
11135 StrIdMap
.insert(SE
, strid
, StaticEnv
.Str E
)
11139 (* Functor Declarations
*)
11141 and elabFunDec(B
, FunDec(I
, funbind
)) =
11144 val F
= elabFunBind(B
, funbind
)
11150 (* Functor Bindings
*)
11152 and elabFunBind(B
, FunBind(I
, funid
, strid
, sigexp
, strexp
, funbind_opt
)) =
11155 val (T
,E
) = elabSigExp(B
, sigexp
)
11156 val E
' = elabStrExp(
11157 B oplusSE StrIdMap
.singleton(strid
,StaticEnv
.Str E
),
11159 (* Side condition on T is always ensured
. *)
11160 val T
' = TyNameSet
.difference(StaticEnv
.tynames E
',
11161 TyNameSet
.union(StaticBasis
.Tof B
, T
))
11162 val F
= case funbind_opt
11163 of NONE
=> FunIdMap
.empty
11164 | SOME funbind
=> elabFunBind(B
, funbind
)
11166 if isSome(FunIdMap
.find(F
, funid
)) then
11167 (* Syntactic restriction
[Section
3.5, 1st bullet
] *)
11168 errorFunId(I
, "duplicate functor identifier ", funid
)
11170 FunIdMap
.insert(F
, funid
, (T
,(E
,(T
',E
'))))
11174 (* Top
-level Declarations
*)
11176 and elabTopDec(B
, STRDECTopDec(I
, strdec
, topdec_opt
)) =
11179 val E
= elabStrDec(true, B
, strdec
)
11180 val B
' = case topdec_opt
11181 of NONE
=> StaticBasis
.empty
11182 | SOME topdec
=> elabTopDec(B oplusE E
, topdec
)
11183 val B
'' = StaticBasis
.plus
11184 (StaticBasis
.fromTandE(StaticEnv
.tynames E
, E
), B
')
11186 if TyVarSet
.isEmpty(StaticBasis
.tyvars B
'') then
11189 error(I
, "free type variables on top-level")
11192 |
elabTopDec(B
, SIGDECTopDec(I
, sigdec
, topdec_opt
)) =
11195 val G
= elabSigDec(B
, sigdec
)
11196 val B
' = case topdec_opt
11197 of NONE
=> StaticBasis
.empty
11198 | SOME topdec
=> elabTopDec(B oplusG G
, topdec
)
11199 val B
'' = StaticBasis
.plus
11200 (StaticBasis
.fromTandG(StaticBasis
.tynamesG G
, G
), B
')
11205 |
elabTopDec(B
, FUNDECTopDec(I
, fundec
, topdec_opt
)) =
11208 val F
= elabFunDec(B
, fundec
)
11209 val B
' = case topdec_opt
11210 of NONE
=> StaticBasis
.empty
11211 | SOME topdec
=> elabTopDec(B oplusF F
, topdec
)
11212 val B
'' = StaticBasis
.plus
11213 (StaticBasis
.fromTandF(StaticBasis
.tynamesF F
, F
), B
')
11215 if TyVarSet
.isEmpty(StaticBasis
.tyvars B
'') then
11218 error(I
, "free type variables on top-level")
11223 (* Build tentative TE from LHSs
of datdesc
*)
11225 and lhsDatDesc(DatDesc(I
, tyvarseq
, tycon
, condesc
, datdesc_opt
)) =
11226 (* [Rule
81, part
1] *)
11228 val (U
,alphas
) = ElabCore
.tyvars tyvarseq
11229 val k
= List.length alphas
11230 val span
= lhsConDesc condesc
11231 val t
= TyName
.tyname(tycon
, k
, TyName
.EQ
, span
)
11232 val tau
= Type
.fromConsType(List.map Type
.fromTyVar alphas
,t
)
11233 val TE
' = case datdesc_opt
11234 of NONE
=> TyConMap
.empty
11235 | SOME datdesc
=> lhsDatDesc datdesc
11237 if isSome(TyConMap
.find(TE
', tycon
)) then
11238 (* Syntactic restriction
[Section
3.5, 2nd bullet
] *)
11239 errorTyCon(I
, "duplicate type constructor ", tycon
)
11241 TyConMap
.insert(TE
', tycon
, ((alphas
,tau
), VIdMap
.empty
))
11244 and lhsConDesc(ConDesc(I
, vid
, ty_opt
, condesc_opt
)) =
11247 | SOME condesc
=> 1 + lhsConDesc condesc
11250 (* stop
of ElabModule
.sml
*)
11251 (* start
of PP_TYPE
.sml
*)
11253 * Standard ML pretty printing
of types
and type schemes
11256 signature PP_TYPE
=
11259 type doc
= PrettyPrint
.doc
11260 type Type
= Type
.Type
11261 type TypeScheme
= TypeScheme
.TypeScheme
11263 val ppType
: Type
-> doc
11264 val ppTypeScheme
: TypeScheme
-> doc
11267 (* stop
of PP_TYPE
.sml
*)
11268 (* start
of PPType
.sml
*)
11270 * Standard ML pretty printing
of types
and type schemes
11273 structure PPType
:> PP_TYPE
=
11278 type TypeScheme
= TypeScheme
.TypeScheme
11287 (* Simple objects
*)
11289 fun ppLab lab
= text(Lab
.toString lab
)
11290 fun ppTyVar alpha
= text(TyVar
.toString alpha
)
11291 fun ppTyName t
= text(TyName
.toString t
)
11293 fun ppOverloadingClass O
=
11295 val T
= OverloadingClass
.set O
11296 val t
= OverloadingClass
.default O
11297 val ts
= t
:: TyNameSet
.listItems(TyNameSet
.delete(T
,t
))
11299 brack(ppCommaList ppTyName ts
)
11303 fun ppRowVar CLOSEDRow
= empty
11304 |
ppRowVar(FLEXRow _
) = text
"," ^^ break ^^ text
"..."
11310 * 0 : function
arrow (ty1
-> ty2
)
11311 * 1 : tuple (ty1
* ... * tyn
)
11312 * 2 : constructed
type (tyseq tycon
)
11315 fun ppType tau
= fbox(below(nest(ppTypePrec
0 tau
)))
11317 and ppTypePrec
p (ref tau
') = ppType
'Prec p tau
'
11319 and ppType
'Prec
p (TyVar(alpha
)) = ppTyVar alpha
11321 | ppType
'Prec
p (RowType(Rho
,r
)) =
11323 fun isTuple( [], n
) = n
> 2
11324 |
isTuple(lab
::labs
, n
) =
11325 lab
= Lab
.fromInt n
andalso isTuple(labs
, n
+1)
11327 val labtaus
= LabMap
.listItemsi Rho
11328 val (labs
,taus
) = ListPair.unzip labtaus
11330 if r
= CLOSEDRow
andalso List.null labs
then
11332 else if r
= CLOSEDRow
andalso isTuple(labs
, 1) then
11334 val doc
= ppStarList (ppTypePrec
2) taus
11339 fbox(below(nest doc
))
11342 brace(ppCommaList ppLabType labtaus ^^ ppRowVar r
)
11345 | ppType
'Prec
p (FunType(tau1
,tau2
)) =
11347 val doc
= ppTypePrec
1 tau1 ^
/^
11357 | ppType
'Prec
p (ConsType(taus
,t
)) =
11358 fbox(nest(ppSeqPrec ppTypePrec
2 taus ^
/^ ppTyName t
))
11360 | ppType
'Prec
p (Overloaded(O
)) =
11361 text
"'" ^^ ppOverloadingClass O
11363 | ppType
'Prec
p (Link tau
) =
11366 and ppLabType(lab
, tau
) =
11372 below(nest(break ^^
11380 fun ppTypeScheme sigma
=
11382 val (alphas
,tau
) = TypeScheme
.normalise sigma
11388 (* stop
of PPType
.sml
*)
11389 (* start
of PP_STATIC_ENV
.sml
*)
11391 * Standard ML pretty printing
of the static environment
11394 signature PP_STATIC_ENV
=
11397 type doc
= PrettyPrint
.doc
11398 type ValEnv
= StaticEnv
.ValEnv
11399 type TyEnv
= StaticEnv
.TyEnv
11400 type Env
= StaticEnv
.Env
11401 type TyNameSet
= TyNameSet
.set
11403 val ppEnv
: Env
-> doc
11404 val ppSig
: TyNameSet
* Env
-> doc
11406 val ppTyEnv
: TyNameSet
* TyEnv
-> doc
11407 val ppExEnv
: ValEnv
-> doc
11410 (* stop
of PP_STATIC_ENV
.sml
*)
11411 (* start
of PPStaticEnv
.sml
*)
11413 * Standard ML pretty printing
of the static environment
11416 structure PPStaticEnv
:> PP_STATIC_ENV
=
11421 type ValEnv
= StaticEnv
.ValEnv
11422 type TyEnv
= StaticEnv
.TyEnv
11423 type Env
= StaticEnv
.Env
11424 type TyNameSet
= TyNameSet
.set
11432 (* Simple objects
*)
11434 fun ppVId vid
= text(VId
.toString vid
)
11435 fun ppTyCon tycon
= text(TyCon
.toString tycon
)
11436 fun ppTyVar alpha
= text(TyVar
.toString alpha
)
11437 fun ppStrId strid
= text(StrId
.toString strid
)
11439 fun ppTyName t
= text(TyName
.toString t
)
11444 fun ppConTypeScheme (_
, ref(Type
.FunType(tau
,_
))) =
11445 text
"of" ^^ break ^^ PPType
.ppType tau
11447 | ppConTypeScheme _
= empty
11452 (fn(vid
, (sigma
,IdStatus
.v
), doc
) =>
11460 abox(PPType
.ppTypeScheme sigma
)
11465 |
(vid
, (sigma
,_
), doc
) => doc
11471 (fn(vid
, (sigma
,IdStatus
.e
), doc
) =>
11474 text
"exception" ^
/^
11478 abox(ppConTypeScheme sigma
)
11483 |
(vid
, (sigma
,_
), doc
) => doc
11489 (fn(vid
, (sigma
,_
), doc
) =>
11493 (if isEmpty doc
then empty
else text
"|") ^
/^
11497 abox(ppConTypeScheme sigma
)
11504 fun absTy(T
, tycon
, theta
) =
11505 case TypeFcn
.toTyName theta
11507 | SOME t
=> if TyName
.tycon t
= tycon
11508 andalso TyNameSet
.member(T
, t
) then
11509 SOME(TyName
.equality t
<> TyName
.NOEQ
)
11513 fun ppAbsTyEnv(T
,TE
) =
11515 (fn(tycon
, (theta
as (alphas
,tau
), VE
), doc
) =>
11516 if VIdMap
.isEmpty VE
then
11517 case absTy(T
, tycon
, theta
)
11522 text(if eq
then "eqtype" else "type") ^
/^
11523 ppSeq ppTyVar alphas ^
/^
11533 fun ppSynTyEnv(T
,TE
) =
11535 (fn(tycon
, (theta
as (alphas
,tau
), VE
), doc
) =>
11536 if VIdMap
.isEmpty VE
11537 andalso not(isSome(absTy(T
, tycon
, theta
))) then
11541 ppSeq ppTyVar alphas ^
/^
11546 abox(PPType
.ppType tau
)
11555 fun ppDataTyEnv TE
=
11557 (fn(tycon
, ((alphas
,tau
),VE
), doc
) =>
11558 if VIdMap
.isEmpty VE
then
11563 text
"datatype" ^
/^
11564 ppSeq ppTyVar alphas ^
/^
11576 fun ppTyEnv(T
,TE
) =
11578 ppAbsTyEnv(T
,TE
) ^
/^
11579 ppSynTyEnv(T
,TE
) ^
/^
11583 fun ppStrEnv(T
,SE
) =
11585 (fn(strid
, StaticEnv
.Str E
, doc
) =>
11588 text
"structure" ^
/^
11600 and ppEnv
'(T
,(SE
,TE
,VE
)) =
11608 and ppEnv E
= ppEnv
'(TyNameSet
.empty
,E
)
11615 val doc
= ppEnv
'(T
, E
)
11619 brace(ppCommaList
ppTyName (TyNameSet
.listItems T
)) ^^
11620 (if isEmpty doc
then
11623 nest(vbox(break ^^ doc
))
11630 (* stop
of PPStaticEnv
.sml
*)
11631 (* start
of PP_STATIC_BASIS
.sml
*)
11633 * Standard ML pretty printing
of the static basis
11636 signature PP_STATIC_BASIS
=
11639 type doc
= PrettyPrint
.doc
11640 type Basis
= StaticBasis
.Basis
11641 type SigEnv
= StaticBasis
.SigEnv
11642 type FunEnv
= StaticBasis
.FunEnv
11644 val ppBasis
: Basis
-> doc
11645 val ppSigEnv
: SigEnv
-> doc
11646 val ppFunEnv
: FunEnv
-> doc
11649 (* stop
of PP_STATIC_BASIS
.sml
*)
11650 (* start
of PPStaticBasis
.sml
*)
11652 * Standard ML pretty printing
of the static basis
11655 structure PPStaticBasis
:> PP_STATIC_BASIS
=
11660 type Basis
= StaticBasis
.Basis
11661 type SigEnv
= StaticBasis
.SigEnv
11662 type FunEnv
= StaticBasis
.FunEnv
11670 (* Simple objects
*)
11672 fun ppSigId sigid
= text(SigId
.toString sigid
)
11673 fun ppFunId funid
= text(FunId
.toString funid
)
11680 (fn(sigid
, Sigma
, doc
) =>
11683 text
"signature" ^
/^
11688 PPStaticEnv
.ppSig Sigma
11697 (fn(funid
, (T
,(E
,Sigma
)), doc
) =>
11711 PPStaticEnv
.ppSig(T
,E
)
11718 PPStaticEnv
.ppSig Sigma
11728 fun ppBasis (T
,F
,G
,E
) =
11732 PPStaticEnv
.ppEnv E ^
/^
11737 (* stop
of PPStaticBasis
.sml
*)
11738 (* start
of PP_ENV
.sml
*)
11740 * Standard ML pretty printing
of the combined static
/dynamic environment
11746 type doc
= PrettyPrint
.doc
11747 type Env
= StaticEnv
.Env
* DynamicEnv
.Env
11748 type State
= PPDynamicEnv
.State
11750 val ppEnv
: State
* Env
-> doc
11753 (* stop
of PP_ENV
.sml
*)
11754 (* start
of PPEnv
.sml
*)
11756 * Standard ML pretty printing
of the combined static
/dynamic environment
11759 structure PPEnv
:> PP_ENV
=
11764 type Env
= StaticEnv
.Env
* DynamicEnv
.Env
11765 type State
= PPDynamicEnv
.State
11773 (* Simple objects
*)
11775 fun ppVId vid
= text(VId
.toString vid
)
11776 fun ppStrId strid
= text(StrId
.toString strid
)
11781 fun ppValEnv(s
, (VE_STAT
,VE_DYN
)) =
11783 (fn(vid
, (sigma
,IdStatus
.v
), doc
) =>
11785 val (v
,is
) = valOf(VIdMap
.find(VE_DYN
, vid
))
11794 below(abox(PPVal
.ppVal(s
, v
))) ^
/^
11796 below(abox(PPType
.ppTypeScheme sigma
))
11802 |
(vid
, (sigma
,_
), doc
) => doc
11806 fun ppStrEnv(s
, T
, (SE_STAT
,SE_DYN
)) =
11808 (fn(strid
, StaticEnv
.Str E_STAT
, doc
) =>
11810 val DynamicEnv
.Str E_DYN
= valOf(StrIdMap
.find(SE_DYN
, strid
))
11814 text
"structure" ^
/^
11819 ppStr (s
, T
, (E_STAT
,E_DYN
))
11827 and ppEnv
'(s
, T
, ((SE_STAT
,TE_STAT
,VE_STAT
), (SE_DYN
, TE_DYN
, VE_DYN
))) =
11829 ppStrEnv(s
, T
, (SE_STAT
,SE_DYN
)) ^
/^
11830 PPStaticEnv
.ppTyEnv(T
,TE_STAT
) ^
/^
11831 PPStaticEnv
.ppExEnv VE_STAT ^
/^
11832 ppValEnv(s
, (VE_STAT
,VE_DYN
))
11835 and ppEnv(s
, E
) = ppEnv
'(s
, TyNameSet
.empty
, E
)
11840 and ppStr(s
, T
, E
) =
11842 val doc
= ppEnv
'(s
, T
, E
)
11846 (if isEmpty doc
then
11849 nest(vbox(break ^^ doc
))
11856 (* stop
of PPEnv
.sml
*)
11857 (* start
of PP_BASIS
.sml
*)
11859 * Standard ML pretty printing
of the combined basis
11862 signature PP_BASIS
=
11865 type doc
= PrettyPrint
.doc
11866 type Basis
= Basis
.Basis
11867 type State
= PPEnv
.State
11869 val ppBasis
: State
* Basis
-> doc
11872 (* stop
of PP_BASIS
.sml
*)
11873 (* start
of PPBasis
.sml
*)
11875 * Standard ML pretty printing
of the combined basis
11878 structure PPBasis
:> PP_BASIS
=
11883 type Basis
= Basis
.Basis
11884 type State
= PPEnv
.State
11893 fun ppBasis (s
, ((T
,F_STAT
,G_STAT
,E_STAT
), (F_DYN
,G_DYN
,E_DYN
))) =
11895 PPStaticBasis
.ppSigEnv G_STAT ^
/^
11896 PPStaticBasis
.ppFunEnv F_STAT ^
/^
11897 PPEnv
.ppEnv(s
, (E_STAT
,E_DYN
)) ^
/^
11902 (* stop
of PPBasis
.sml
*)
11903 (* start
of PROGRAM
.sml
*)
11905 * Standard ML programs
11907 * Definition
, section
8
11910 * State is passed
as reference
and modified via side effects
. This way
11911 * expanding out the state
and exception convention
in the inference rules
11912 * of modules
and core can be avoided
. Note that the state therefore
11913 * never is returned
.
11916 signature PROGRAM
=
11921 type Program
= GrammarProgram
.Program
11922 type StaticBasis
= StaticBasis
.Basis
11923 type DynamicBasis
= DynamicBasis
.Basis
11924 type Basis
= Basis
.Basis
11925 type State
= EvalModule
.State
11930 val execProgram
: State ref
* Basis
* Program
-> Basis
11931 val elabProgram
: StaticBasis
* Program
-> StaticBasis
11932 val evalProgram
: State ref
* DynamicBasis
* Program
-> DynamicBasis
11935 (* stop
of PROGRAM
.sml
*)
11936 (* start
of Program
.sml
*)
11938 * Standard ML programs
11940 * Definition
, section
8
11943 * State is passed
as reference
and modified via side effects
. This way
11944 * expanding out the state
and exception convention
in the inference rules
11945 * of modules
and core can be avoided
. Note that the state therefore
11946 * never is returned
.
11949 structure Program
:> PROGRAM
=
11954 type StaticBasis
= StaticBasis
.Basis
11955 type DynamicBasis
= DynamicBasis
.Basis
11956 type Basis
= Basis
.Basis
11957 type State
= EvalModule
.State
11960 open GrammarProgram
11963 (* Helpers for output
*)
11967 fun printException(s
, e
) =
11968 ( TextIO.output(TextIO.stdOut
, "Uncaught exception: ")
11969 ; PrettyPrint
.output(TextIO.stdOut
, PPVal
.ppExVal(s
, e
), width
)
11970 ; TextIO.output1(TextIO.stdOut
, #
"\n")
11971 ; TextIO.flushOut
TextIO.stdOut
11974 fun printStaticBasis B_STAT
=
11975 ( PrettyPrint
.output(TextIO.stdOut
, PPStaticBasis
.ppBasis B_STAT
,
11977 ; TextIO.flushOut
TextIO.stdOut
11980 fun printDynamicBasis(s
, B_DYN
) =
11981 ( PrettyPrint
.output(TextIO.stdOut
, PPDynamicBasis
.ppBasis(s
, B_DYN
),
11983 ; TextIO.flushOut
TextIO.stdOut
11986 fun printBasis(s
, B
) =
11987 ( PrettyPrint
.output(TextIO.stdOut
, PPBasis
.ppBasis(s
, B
), width
)
11988 ; TextIO.flushOut
TextIO.stdOut
11992 (* Helpers for basis modification
*)
11994 val oplus
= Basis
.oplus
11999 (* Inference rules
[Section
8] *)
12001 fun execProgram(s
,B
, Program(I
, topdec
, program_opt
)) =
12002 (* [Rules
187 to
189] *)
12004 val B_STAT1
= ElabModule
.elabTopDec(Basis
.B_STATof B
, topdec
)
12005 val B_DYN1
= EvalModule
.evalTopDec(s
,Basis
.B_DYNof B
, topdec
)
12007 val _
= printBasis(!s
, (B_STAT1
,B_DYN1
))
12008 val B
' = B
oplus (B_STAT1
,B_DYN1
)
12009 val B
'' = case program_opt
12011 | SOME program
=> execProgram(s
,B
', program
)
12015 handle Error
.Error m
=>
12018 val B
' = case program_opt
12020 | SOME program
=> execProgram(s
,B
, program
)
12028 val _
= printException(!s
, e
)
12029 val B
' = case program_opt
12031 | SOME program
=> execProgram(s
,B
, program
)
12037 (* Elaboration only
*)
12039 fun elabProgram(B_STAT
, Program(I
, topdec
, program_opt
)) =
12041 val B_STAT1
= ElabModule
.elabTopDec(B_STAT
, topdec
)
12042 val _
= printStaticBasis B_STAT1
12043 val B_STAT
' = StaticBasis
.plus(B_STAT
, B_STAT1
)
12044 val B_STAT
'' = case program_opt
12046 | SOME program
=> elabProgram(B_STAT
', program
)
12050 handle Error
.Error m
=>
12054 (* Evaluation only
*)
12056 fun evalProgram(s
,B_DYN
, Program(I
, topdec
, program_opt
)) =
12058 val B_DYN1
= EvalModule
.evalTopDec(s
,B_DYN
, topdec
)
12059 val _
= printDynamicBasis(!s
, B_DYN1
)
12060 val B_DYN
' = DynamicBasis
.plus(B_DYN
, B_DYN1
)
12061 val B_DYN
'' = case program_opt
12063 | SOME program
=> evalProgram(s
,B_DYN
', program
)
12067 handle Error
.Error m
=>
12068 (* Runtime error
*)
12070 val B_DYN
' = case program_opt
12073 evalProgram(s
,B_DYN
, program
)
12080 val _
= printException(!s
, e
)
12081 val B_DYN
' = case program_opt
12084 evalProgram(s
,B_DYN
, program
)
12090 (* stop
of Program
.sml
*)
12091 (* start
of ml
-yacc
/lib
/base
.sig *)
12092 (* ML
-Yacc Parser
Generator (c
) 1989 Andrew W
. Appel
, David R
. Tarditi
*)
12094 (* base
.sig: Base
signature file for SML
-Yacc
. This file contains signatures
12095 that must be loaded
before any
of the files produced by ML
-Yacc are loaded
12098 (* STREAM
: signature for a lazy stream
.*)
12101 sig type 'xa stream
12102 val streamify
: (unit
-> '_a
) -> '_a stream
12103 val cons
: '_a
* '_a stream
-> '_a stream
12104 val get
: '_a stream
-> '_a
* '_a stream
12107 (* LR_TABLE
: signature for an LR Table
.
12109 The list
of actions
and gotos passed to mkLrTable must be ordered by state
12110 number
. The values for state
0 are the first
in the list
, the values for
12111 state
1 are next
, etc
.
12114 signature LR_TABLE
=
12116 datatype ('a
,'b
) pairlist
= EMPTY | PAIR
of 'a
* 'b
* ('a
,'b
) pairlist
12117 datatype state
= STATE
of int
12118 datatype term
= T
of int
12119 datatype nonterm
= NT
of int
12120 datatype action
= SHIFT
of state
12126 val numStates
: table
-> int
12127 val numRules
: table
-> int
12128 val describeActions
: table
-> state
->
12129 (term
,action
) pairlist
* action
12130 val describeGoto
: table
-> state
-> (nonterm
,state
) pairlist
12131 val action
: table
-> state
* term
-> action
12132 val goto
: table
-> state
* nonterm
-> state
12133 val initialState
: table
-> state
12134 exception Goto
of state
* nonterm
12136 val mkLrTable
: {actions
: ((term
,action
) pairlist
* action
) array
,
12137 gotos
: (nonterm
,state
) pairlist array
,
12138 numStates
: int, numRules
: int,
12139 initialState
: state
} -> table
12142 (* TOKEN
: signature revealing the internal
structure of a token
. This
signature
12143 TOKEN distinct from the
signature {parser name
}_TOKENS produced by ML
-Yacc
.
12144 The
{parser name
}_TOKENS structures contain some types
and functions to
12145 construct tokens from values
and positions
.
12147 The representation
of token was very carefully chosen here to allow the
12148 polymorphic parser to work without knowing the types
of semantic values
12151 This has had an impact on the TOKENS
structure produced by SML
-Yacc
, which
12152 is a
structure parameter to lexer functors
. We would like to have some
12153 type 'a token which functions to construct tokens would create
. A
12154 constructor function for a integer token might be
12156 INT
: int * 'a
* 'a
-> 'a token
.
12158 This is not possible because we need to have tokens
with the representation
12159 given below for the polymorphic parser
.
12161 Thus our constructur functions for tokens have the form
:
12163 INT
: int * 'a
* 'a
-> (svalue
,'a
) token
12165 This
in turn has had an impact on the
signature that lexers for SML
-Yacc
12166 must match
and the types that a user must declare
in the user declarations
12172 structure LrTable
: LR_TABLE
12173 datatype ('a
,'b
) token
= TOKEN
of LrTable
.term
* ('a
* 'b
* 'b
)
12174 val sameToken
: ('a
,'b
) token
* ('a
,'b
) token
-> bool
12177 (* LR_PARSER
: signature for a polymorphic LR parser
*)
12179 signature LR_PARSER
=
12181 structure Stream
: STREAM
12182 structure LrTable
: LR_TABLE
12183 structure Token
: TOKEN
12185 sharing LrTable
= Token
.LrTable
12187 exception ParseError
12189 val parse
: {table
: LrTable
.table
,
12190 lexer
: ('_b
,'_c
) Token
.token Stream
.stream
,
12194 (LrTable
.state
* ('_b
* '_c
* '_c
)) list
*
12197 ('_b
* '_c
* '_c
) *
12198 ((LrTable
.state
*('_b
* '_c
* '_c
)) list
),
12200 ec
: { is_keyword
: LrTable
.term
-> bool,
12201 noShift
: LrTable
.term
-> bool,
12202 preferred_change
: (LrTable
.term list
* LrTable
.term list
) list
,
12203 errtermvalue
: LrTable
.term
-> '_b
,
12204 showTerminal
: LrTable
.term
-> string,
12205 terms
: LrTable
.term list
,
12206 error
: string * '_c
* '_c
-> unit
12208 lookahead
: int (* max amount
of lookahead used
in *)
12209 (* error correction
*)
12211 (('_b
,'_c
) Token
.token Stream
.stream
)
12214 (* LEXER
: a
signature that most lexers produced for use
with SML
-Yacc
's
12215 output will match
. The user is responsible for declaring
type token
,
12216 type pos
, and type svalue
in the UserDeclarations section
of a lexer
.
12218 Note that
type token is abstract
in the lexer
. This allows SML
-Yacc to
12219 create a TOKENS
signature for use
with lexers produced by ML
-Lex that
12220 treats the
type token abstractly
. Lexers that are functors parametrized by
12221 a Tokens
structure matching a TOKENS
signature cannot examine the
structure
12227 structure UserDeclarations
:
12233 val makeLexer
: (int -> string) -> unit
->
12234 (UserDeclarations
.svalue
,UserDeclarations
.pos
) UserDeclarations
.token
12237 (* ARG_LEXER
: the
%arg option
of ML
-Lex allows users to produce lexers which
12238 also take an argument
before yielding a function from unit to a token
12241 signature ARG_LEXER
=
12243 structure UserDeclarations
:
12250 val makeLexer
: (int -> string) -> UserDeclarations
.arg
-> unit
->
12251 (UserDeclarations
.svalue
,UserDeclarations
.pos
) UserDeclarations
.token
12254 (* PARSER_DATA
: the
signature of ParserData structures
in {parser name
}LrValsFun
12255 produced by SML
-Yacc
. All such structures match this
signature.
12257 The
{parser name
}LrValsFun produces a
structure which contains all the values
12258 except for the lexer needed to call the polymorphic parser mentioned
12263 signature PARSER_DATA
=
12265 (* the
type of line numbers
*)
12269 (* the
type of semantic values
*)
12273 (* the
type of the user
-supplied argument to the parser
*)
12276 (* the intended
type of the result
of the parser
. This value is
12277 produced by applying extract from the
structure Actions to the
12278 final semantic value resultiing from a parse
.
12283 structure LrTable
: LR_TABLE
12284 structure Token
: TOKEN
12285 sharing Token
.LrTable
= LrTable
12287 (* structure Actions contains the functions which mantain the
12288 semantic values stack
in the parser
. Void is used to provide
12289 a default value for the semantic stack
.
12292 structure Actions
:
12294 val actions
: int * pos
*
12295 (LrTable
.state
* (svalue
* pos
* pos
)) list
* arg
->
12296 LrTable
.nonterm
* (svalue
* pos
* pos
) *
12297 ((LrTable
.state
*(svalue
* pos
* pos
)) list
)
12299 val extract
: svalue
-> result
12302 (* structure EC contains information used to improve error
12303 recovery
in an error
-correcting parser
*)
12307 val is_keyword
: LrTable
.term
-> bool
12308 val noShift
: LrTable
.term
-> bool
12309 val preferred_change
: (LrTable
.term list
* LrTable
.term list
) list
12310 val errtermvalue
: LrTable
.term
-> svalue
12311 val showTerminal
: LrTable
.term
-> string
12312 val terms
: LrTable
.term list
12315 (* table is the LR table for the parser
*)
12317 val table
: LrTable
.table
12320 (* signature PARSER is the
signature that most user parsers created by
12321 SML
-Yacc will match
.
12326 structure Token
: TOKEN
12327 structure Stream
: STREAM
12328 exception ParseError
12330 (* type pos is the
type of line numbers
*)
12334 (* type result is the
type of the result from the parser
*)
12338 (* the
type of the user
-supplied argument to the parser
*)
12341 (* type svalue is the
type of semantic values for the semantic value
12347 (* val makeLexer is used to create a stream
of tokens for the parser
*)
12349 val makeLexer
: (int -> string) ->
12350 (svalue
,pos
) Token
.token Stream
.stream
12352 (* val parse takes a stream
of tokens
and a function to print
12353 errors
and returns a value
of type result
and a stream containing
12357 val parse
: int * ((svalue
,pos
) Token
.token Stream
.stream
) *
12358 (string * pos
* pos
-> unit
) * arg
->
12359 result
* (svalue
,pos
) Token
.token Stream
.stream
12361 val sameToken
: (svalue
,pos
) Token
.token
* (svalue
,pos
) Token
.token
->
12365 (* signature ARG_PARSER is the
signature that will be matched by parsers whose
12366 lexer takes an additional argument
.
12369 signature ARG_PARSER
=
12371 structure Token
: TOKEN
12372 structure Stream
: STREAM
12373 exception ParseError
12381 val makeLexer
: (int -> string) -> lexarg
->
12382 (svalue
,pos
) Token
.token Stream
.stream
12383 val parse
: int * ((svalue
,pos
) Token
.token Stream
.stream
) *
12384 (string * pos
* pos
-> unit
) * arg
->
12385 result
* (svalue
,pos
) Token
.token Stream
.stream
12387 val sameToken
: (svalue
,pos
) Token
.token
* (svalue
,pos
) Token
.token
->
12391 (* stop
of ml
-yacc
/lib
/base
.sig *)
12392 (* start
of ml
-yacc
/lib
/join
.sml
*)
12393 (* ML
-Yacc Parser
Generator (c
) 1989 Andrew W
. Appel
, David R
. Tarditi
*)
12395 (* functor Join creates a user parser by putting together a Lexer
structure,
12396 an LrValues
structure, and a polymorphic parser
structure. Note that
12397 the Lexer
and LrValues
structure must share the
type pos (i
.e
. the
type
12398 of line numbers
), the
type svalues for semantic values
, and the
type
12402 functor Join(structure Lex
: LEXER
12403 structure ParserData
: PARSER_DATA
12404 structure LrParser
: LR_PARSER
12405 sharing ParserData
.LrTable
= LrParser
.LrTable
12406 sharing ParserData
.Token
= LrParser
.Token
12407 sharing type Lex
.UserDeclarations
.svalue
= ParserData
.svalue
12408 sharing type Lex
.UserDeclarations
.pos
= ParserData
.pos
12409 sharing type Lex
.UserDeclarations
.token
= ParserData
.Token
.token
)
12412 structure Token
= ParserData
.Token
12413 structure Stream
= LrParser
.Stream
12415 exception ParseError
= LrParser
.ParseError
12417 type arg
= ParserData
.arg
12418 type pos
= ParserData
.pos
12419 type result
= ParserData
.result
12420 type svalue
= ParserData
.svalue
12421 val makeLexer
= LrParser
.Stream
.streamify
o Lex
.makeLexer
12422 val parse
= fn (lookahead
,lexer
,error
,arg
) =>
12423 (fn (a
,b
) => (ParserData
.Actions
.extract a
,b
))
12424 (LrParser
.parse
{table
= ParserData
.table
,
12426 lookahead
=lookahead
,
12427 saction
= ParserData
.Actions
.actions
,
12429 void
= ParserData
.Actions
.void
,
12430 ec
= {is_keyword
= ParserData
.EC
.is_keyword
,
12431 noShift
= ParserData
.EC
.noShift
,
12432 preferred_change
= ParserData
.EC
.preferred_change
,
12433 errtermvalue
= ParserData
.EC
.errtermvalue
,
12435 showTerminal
= ParserData
.EC
.showTerminal
,
12436 terms
= ParserData
.EC
.terms
}}
12438 val sameToken
= Token
.sameToken
12441 (* functor JoinWithArg creates a variant
of the parser
structure produced
12442 above
. In this
case, the makeLexer take an additional argument
before
12443 yielding a value
of type unit
-> (svalue
,pos
) token
12446 functor JoinWithArg(structure Lex
: ARG_LEXER
12447 structure ParserData
: PARSER_DATA
12448 structure LrParser
: LR_PARSER
12449 sharing ParserData
.LrTable
= LrParser
.LrTable
12450 sharing ParserData
.Token
= LrParser
.Token
12451 sharing type Lex
.UserDeclarations
.svalue
= ParserData
.svalue
12452 sharing type Lex
.UserDeclarations
.pos
= ParserData
.pos
12453 sharing type Lex
.UserDeclarations
.token
= ParserData
.Token
.token
)
12456 structure Token
= ParserData
.Token
12457 structure Stream
= LrParser
.Stream
12459 exception ParseError
= LrParser
.ParseError
12461 type arg
= ParserData
.arg
12462 type lexarg
= Lex
.UserDeclarations
.arg
12463 type pos
= ParserData
.pos
12464 type result
= ParserData
.result
12465 type svalue
= ParserData
.svalue
12467 val makeLexer
= fn s
=> fn arg
=>
12468 LrParser
.Stream
.streamify (Lex
.makeLexer s arg
)
12469 val parse
= fn (lookahead
,lexer
,error
,arg
) =>
12470 (fn (a
,b
) => (ParserData
.Actions
.extract a
,b
))
12471 (LrParser
.parse
{table
= ParserData
.table
,
12473 lookahead
=lookahead
,
12474 saction
= ParserData
.Actions
.actions
,
12476 void
= ParserData
.Actions
.void
,
12477 ec
= {is_keyword
= ParserData
.EC
.is_keyword
,
12478 noShift
= ParserData
.EC
.noShift
,
12479 preferred_change
= ParserData
.EC
.preferred_change
,
12480 errtermvalue
= ParserData
.EC
.errtermvalue
,
12482 showTerminal
= ParserData
.EC
.showTerminal
,
12483 terms
= ParserData
.EC
.terms
}}
12485 val sameToken
= Token
.sameToken
12487 (* stop
of ml
-yacc
/lib
/join
.sml
*)
12488 (* start
of ml
-yacc
/lib
/lrtable
.sml
*)
12489 (* ML
-Yacc Parser
Generator (c
) 1989 Andrew W
. Appel
, David R
. Tarditi
*)
12490 structure LrTable
: LR_TABLE
=
12494 datatype ('a
,'b
) pairlist
= EMPTY
12495 | PAIR
of 'a
* 'b
* ('a
,'b
) pairlist
12496 datatype term
= T
of int
12497 datatype nonterm
= NT
of int
12498 datatype state
= STATE
of int
12499 datatype action
= SHIFT
of state
12500 | REDUCE
of int (* rulenum from grammar
*)
12503 exception Goto
of state
* nonterm
12504 type table
= {states
: int, rules
: int,initialState
: state
,
12505 action
: ((term
,action
) pairlist
* action
) array
,
12506 goto
: (nonterm
,state
) pairlist array
}
12507 val numStates
= fn ({states
,...} : table
) => states
12508 val numRules
= fn ({rules
,...} : table
) => rules
12509 val describeActions
=
12510 fn ({action
,...} : table
) =>
12511 fn (STATE s
) => action sub s
12513 fn ({goto
,...} : table
) =>
12514 fn (STATE s
) => goto sub s
12515 fun findTerm (T term
,row
,default
) =
12516 let fun find (PAIR (T key
,data
,r
)) =
12517 if key
< term
then find r
12518 else if key
=term
then data
12520 | find EMPTY
= default
12523 fun findNonterm (NT nt
,row
) =
12524 let fun find (PAIR (NT key
,data
,r
)) =
12525 if key
< nt
then find r
12526 else if key
=nt
then SOME data
12528 | find EMPTY
= NONE
12531 val action
= fn ({action
,...} : table
) =>
12532 fn (STATE state
,term
) =>
12533 let val (row
,default
) = action sub state
12534 in findTerm(term
,row
,default
)
12536 val goto
= fn ({goto
,...} : table
) =>
12537 fn (a
as (STATE state
,nonterm
)) =>
12538 case findNonterm(nonterm
,goto sub state
)
12539 of SOME state
=> state
12540 | NONE
=> raise (Goto a
)
12541 val initialState
= fn ({initialState
,...} : table
) => initialState
12542 val mkLrTable
= fn {actions
,gotos
,initialState
,numStates
,numRules
} =>
12543 ({action
=actions
,goto
=gotos
,
12546 initialState
=initialState
} : table
)
12548 (* stop
of ml
-yacc
/lib
/lrtable
.sml
*)
12549 (* start
of ml
-yacc
/lib
/stream
.sml
*)
12550 (* ML
-Yacc Parser
Generator (c
) 1989 Andrew W
. Appel
, David R
. Tarditi
*)
12552 (* Stream
: a
structure implementing a lazy stream
. The
signature STREAM
12553 is found
in base
.sig *)
12555 structure Stream
:> STREAM
=
12557 datatype 'a str
= EVAL
of 'a
* 'a str ref | UNEVAL
of (unit
->'a
)
12559 type 'a stream
= 'a str ref
12561 fun get(ref(EVAL t
)) = t
12562 |
get(s
as ref(UNEVAL f
)) =
12563 let val t
= (f(), ref(UNEVAL f
)) in s
:= EVAL t
; t
end
12565 fun streamify f
= ref(UNEVAL f
)
12566 fun cons(a
,s
) = ref(EVAL(a
,s
))
12569 (* stop
of ml
-yacc
/lib
/stream
.sml
*)
12570 (* start
of ml
-yacc
/lib
/parser2
.sml
*)
12571 (* ML
-Yacc Parser
Generator (c
) 1989 Andrew W
. Appel
, David R
. Tarditi
*)
12573 (* parser
.sml
: This is a parser driver for LR tables
with an error
-recovery
12574 routine added to it
. The routine used is described
in detail
in this
12577 'A Practical Method for LR
and LL Syntactic Error Diagnosis
and
12578 Recovery
', by M
. Burke
and G
. Fisher
, ACM Transactions on
12579 Programming Langauges
and Systems
, Vol
. 9, No
. 2, April
1987,
12582 This program is an implementation is the partial
, deferred method discussed
12583 in the article
. The algorithm
and data structures used
in the program
12584 are described below
.
12586 This program assumes that all semantic actions are delayed
. A semantic
12587 action should produce a function from unit
-> value instead
of producing the
12588 normal value
. The parser returns the semantic value on the top
of the
12589 stack when accept is encountered
. The user can deconstruct this value
12590 and apply the unit
-> value function
in it to get the answer
.
12592 It also assumes that the lexer is a lazy stream
.
12599 The state stack has the
type
12601 (state
* (semantic value
* line #
* line #
)) list
12603 The parser keeps a queue
of (state stack
* lexer pair
). A lexer pair
12604 consists
of a terminal
* value pair
and a lexer
. This allows the
12605 parser to reconstruct the states for terminals to the left
of a
12606 syntax error
, and attempt to make error corrections there
.
12608 The queue consists
of a pair
of lists (x
,y
). New additions to
12609 the queue are cons
'ed onto y
. The first element
of x is the top
12610 of the queue
. If x is nil
, then y is reversed
and used
12616 * The steady
-state parser
:
12618 This parser keeps the length
of the queue
of state stacks at
12619 a steady state by always removing an element from the front when
12620 another element is placed on the
end.
12622 It has these arguments
:
12624 stack
: current stack
12625 queue
: value
of the queue
12626 lexPair ((terminal
,value
),lex stream
)
12628 When SHIFT is encountered
, the state to shift to
and the value are
12629 are pushed onto the state stack
. The state stack
and lexPair are
12630 placed on the queue
. The front element
of the queue is removed
.
12632 When REDUCTION is encountered
, the rule is applied to the current
12633 stack to yield a
triple (nonterm
,value
,new stack
). A new
12634 stack is formed by
adding (goto(top state
of stack
,nonterm
),value
)
12637 When ACCEPT is encountered
, the top value from the stack
and the
12638 lexer are returned
.
12640 When an ERROR is encountered
, fixError is called
. FixError
12641 takes the arguments to the parser
, fixes the error
if possible
and
12642 returns a new set
of arguments
.
12644 * The distance
-parser
:
12646 This parser includes an additional argument distance
. It pushes
12647 elements on the queue until it has parsed distance tokens
, or an
12648 ACCEPT or ERROR occurs
. It returns a stack
, lexer
, the number
of
12649 tokens left unparsed
, a queue
, and an action option
.
12654 val empty
: 'a queue
12656 val get
: 'a queue
-> 'a
* 'a queue
12657 val put
: 'a
* 'a queue
-> 'a queue
12660 (* drt (12/15/89) -- the
functor should be used
in development work
, but
12661 it wastes space
in the release version
.
12663 functor ParserGen(structure LrTable
: LR_TABLE
12664 structure Stream
: STREAM
) : LR_PARSER
=
12667 structure LrParser
:> LR_PARSER
=
12669 structure LrTable
= LrTable
12670 structure Stream
= Stream
12672 structure Token
: TOKEN
=
12674 structure LrTable
= LrTable
12675 datatype ('a
,'b
) token
= TOKEN
of LrTable
.term
* ('a
* 'b
* 'b
)
12676 val sameToken
= fn (TOKEN(t
,_
),TOKEN(t
',_
)) => t
=t
'
12684 exception ParseError
12685 exception ParseImpossible
of int
12687 structure Fifo
:> FIFO
=
12689 type 'a queue
= ('a list
* 'a list
)
12690 val empty
= (nil
,nil
)
12692 fun get(a
::x
, y
) = (a
, (x
,y
))
12693 |
get(nil
, nil
) = raise Empty
12694 |
get(nil
, y
) = get(rev y
, nil
)
12695 fun put(a
,(x
,y
)) = (x
,a
::y
)
12698 type ('a
,'b
) elem
= (state
* ('a
* 'b
* 'b
))
12699 type ('a
,'b
) stack
= ('a
,'b
) elem list
12700 type ('a
,'b
) lexv
= ('a
,'b
) token
12701 type ('a
,'b
) lexpair
= ('a
,'b
) lexv
* (('a
,'b
) lexv Stream
.stream
)
12702 type ('a
,'b
) distanceParse
=
12705 (('a
,'b
) stack
* ('a
,'b
) lexpair
) Fifo
.queue
*
12709 (('a
,'b
) stack
* ('a
,'b
) lexpair
) Fifo
.queue
*
12713 type ('a
,'b
) ecRecord
=
12714 {is_keyword
: term
-> bool,
12715 preferred_change
: (term list
* term list
) list
,
12716 error
: string * 'b
* 'b
-> unit
,
12717 errtermvalue
: term
-> 'a
,
12719 showTerminal
: term
-> string,
12720 noShift
: term
-> bool}
12723 val print
= fn s
=> TextIO.output(TextIO.stdOut
,s
)
12724 val println
= fn s
=> (print s
; print
"\n")
12725 val showState
= fn (STATE s
) => "STATE " ^
(Int.toString s
)
12727 fun printStack(stack
: ('a
,'b
) stack
, n
: int) =
12729 of (state
,_
) :: rest
=>
12730 (print("\t" ^
Int.toString n ^
": ");
12731 println(showState state
);
12732 printStack(rest
, n
+1))
12735 fun prAction showTerminal
12736 (stack
as (state
,_
) :: _
, next
as (TOKEN (term
,_
),_
), action
) =
12737 (println
"Parse: state stack:";
12738 printStack(stack
, 0);
12742 ^ showTerminal term
12746 of SHIFT state
=> println ("SHIFT " ^
(showState state
))
12747 | REDUCE i
=> println ("REDUCE " ^
(Int.toString i
))
12748 | ERROR
=> println
"ERROR"
12749 | ACCEPT
=> println
"ACCEPT")
12750 | prAction
_ (_
,_
,action
) = ()
12753 (* ssParse
: parser which maintains the queue
of (state
* lexvalues
) in a
12754 steady
-state
. It takes a table
, showTerminal function
, saction
12755 function
, and fixError function
. It parses until an ACCEPT is
12756 encountered
, or an
exception is raised
. When an error is encountered
,
12757 fixError is called
with the arguments
of parseStep (lexv
,stack
,and
12758 queue
). It returns the lexv
, and a new stack
and queue adjusted so
12759 that the lexv can be parsed
*)
12762 fn (table
,showTerminal
,saction
,fixError
,arg
) =>
12763 let val prAction
= prAction showTerminal
12764 val action
= LrTable
.action table
12765 val goto
= LrTable
.goto table
12766 fun parseStep(args
as
12767 (lexPair
as (TOKEN (terminal
, value
as (_
,leftPos
,_
)),
12770 stack
as (state
,_
) :: _
,
12772 let val nextAction
= action (state
,terminal
)
12773 val _
= if DEBUG1
then prAction(stack
,lexPair
,nextAction
)
12777 let val newStack
= (s
,value
) :: stack
12778 val newLexPair
= Stream
.get lexer
12779 val (_
,newQueue
) =Fifo
.get(Fifo
.put((newStack
,newLexPair
),
12781 in parseStep(newLexPair
,(s
,value
)::stack
,newQueue
)
12784 (case saction(i
,leftPos
,stack
,arg
)
12785 of (nonterm
,value
,stack
as (state
,_
) :: _
) =>
12786 parseStep(lexPair
,(goto(state
,nonterm
),value
)::stack
,
12788 | _
=> raise (ParseImpossible
197))
12789 | ERROR
=> parseStep(fixError args
)
12792 of (_
,(topvalue
,_
,_
)) :: _
=>
12793 let val (token
,restLexer
) = lexPair
12794 in (topvalue
,Stream
.cons(token
,restLexer
))
12796 | _
=> raise (ParseImpossible
202))
12798 | parseStep _
= raise (ParseImpossible
204)
12802 (* distanceParse
: parse until n tokens are shifted
, or accept or
12803 error are encountered
. Takes a table
, showTerminal function
, and
12804 semantic action function
. Returns a parser which takes a lexPair
12805 (lex result
* lexer
), a state stack
, a queue
, and a distance
12806 (must be
> 0) to parse
. The parser returns a new lex
-value
, a stack
12807 with the nth token shifted on top
, a queue
, a distance
, and action
12810 val distanceParse
=
12811 fn (table
,showTerminal
,saction
,arg
) =>
12812 let val prAction
= prAction showTerminal
12813 val action
= LrTable
.action table
12814 val goto
= LrTable
.goto table
12815 fun parseStep(lexPair
,stack
,queue
,0) = (lexPair
,stack
,queue
,0,NONE
)
12816 |
parseStep(lexPair
as (TOKEN (terminal
, value
as (_
,leftPos
,_
)),
12819 stack
as (state
,_
) :: _
,
12821 let val nextAction
= action(state
,terminal
)
12822 val _
= if DEBUG1
then prAction(stack
,lexPair
,nextAction
)
12826 let val newStack
= (s
,value
) :: stack
12827 val newLexPair
= Stream
.get lexer
12828 in parseStep(newLexPair
,(s
,value
)::stack
,
12829 Fifo
.put((newStack
,newLexPair
),queue
),distance
-1)
12832 (case saction(i
,leftPos
,stack
,arg
)
12833 of (nonterm
,value
,stack
as (state
,_
) :: _
) =>
12834 parseStep(lexPair
,(goto(state
,nonterm
),value
)::stack
,
12836 | _
=> raise (ParseImpossible
240))
12837 | ERROR
=> (lexPair
,stack
,queue
,distance
,SOME nextAction
)
12838 | ACCEPT
=> (lexPair
,stack
,queue
,distance
,SOME nextAction
)
12840 | parseStep _
= raise (ParseImpossible
242)
12841 in parseStep
: ('_a
,'_b
) distanceParse
12844 (* mkFixError
: function to create fixError function which adjusts parser state
12845 so that parse may continue
in the presence
of an error
*)
12847 fun mkFixError({is_keyword
,terms
,errtermvalue
,
12848 preferred_change
,noShift
,
12849 showTerminal
,error
,...} : ('_a
,'_b
) ecRecord
,
12850 distanceParse
: ('_a
,'_b
) distanceParse
,
12851 minAdvance
,maxAdvance
)
12853 (lexv
as (TOKEN (term
,value
as (_
,leftPos
,_
)),_
),stack
,queue
) =
12854 let val _
= if DEBUG2
then
12855 error("syntax error found at " ^
(showTerminal term
),
12859 fun tokAt(t
,p
) = TOKEN(t
,(errtermvalue t
,p
,p
))
12863 (* pull all the state
* lexv elements from the queue
*)
12866 let fun f q
= let val (elem
,newQueue
) = Fifo
.get q
12867 in elem
:: (f newQueue
)
12868 end handle Fifo
.Empty
=> nil
12872 (* now number elements
of stateList
, giving distance from
12875 val (_
, numStateList
) =
12876 List.foldr (fn (a
,(num
,r
)) => (num
+1,(a
,num
)::r
)) (0, []) stateList
12878 (* Represent the set
of potential changes
as a linked list
.
12880 Values
of datatype Change hold information about a potential change
.
12882 oper
= oper to be applied
12883 pos
= the #
of the element
in stateList that would be altered
.
12884 distance
= the number
of tokens beyond the error token which the
12885 change allows us to parse
.
12886 new
= new terminal
* value pair at that point
12887 orig
= original terminal
* value pair at the point being changed
.
12890 datatype ('a
,'b
) change
= CHANGE
of
12891 {pos
: int, distance
: int, leftPos
: 'b
, rightPos
: 'b
,
12892 new
: ('a
,'b
) lexv list
, orig
: ('a
,'b
) lexv list
}
12895 val showTerms
= concat
o map (fn TOKEN(t
,_
) => " " ^ showTerminal t
)
12897 val printChange
= fn c
=>
12898 let val CHANGE
{distance
,new
,orig
,pos
,...} = c
12899 in (print ("{distance= " ^
(Int.toString distance
));
12900 print (",orig ="); print(showTerms orig
);
12901 print (",new ="); print(showTerms new
);
12902 print (",pos= " ^
(Int.toString pos
));
12906 val printChangeList
= app printChange
12908 (* parse
: given a lexPair
, a stack
, and the distance from the error
12909 token
, return the distance past the error token that we are able to parse
.*)
12911 fun parse (lexPair
,stack
,queuePos
: int) =
12912 case distanceParse(lexPair
,stack
,Fifo
.empty
,queuePos
+maxAdvance
+1)
12913 of (_
,_
,_
,distance
,SOME ACCEPT
) =>
12914 if maxAdvance
-distance
-1 >= 0
12916 else maxAdvance
-distance
-1
12917 |
(_
,_
,_
,distance
,_
) => maxAdvance
- distance
- 1
12919 (* catList
: concatenate results
of scanning list
*)
12921 fun catList l f
= List.foldr (fn(a
,r
)=> f a @ r
) [] l
12923 fun keywordsDelta new
= if List.exists (fn(TOKEN(t
,_
))=>is_keyword t
) new
12924 then minDelta
else 0
12926 fun tryChange
{lex
,stack
,pos
,leftPos
,rightPos
,orig
,new
} =
12927 let val lex
' = List.foldr (fn (t
',p
)=>(t
',Stream
.cons p
)) lex new
12928 val distance
= parse(lex
',stack
,pos
+length new
-length orig
)
12929 in if distance
>= minAdvance
+ keywordsDelta new
12930 then [CHANGE
{pos
=pos
,leftPos
=leftPos
,rightPos
=rightPos
,
12931 distance
=distance
,orig
=orig
,new
=new
}]
12936 (* tryDelete
: Try to delete n terminals
.
12937 Return single
-element
[success
] or nil
.
12938 Do not delete unshiftable terminals
. *)
12941 fun tryDelete
n ((stack
,lexPair
as (TOKEN(term
,(_
,l
,r
)),_
)),qPos
) =
12942 let fun del(0,accum
,left
,right
,lexPair
) =
12943 tryChange
{lex
=lexPair
,stack
=stack
,
12944 pos
=qPos
,leftPos
=left
,rightPos
=right
,
12945 orig
=rev accum
, new
=[]}
12946 |
del(n
,accum
,left
,right
,(tok
as TOKEN(term
,(_
,_
,r
)),lexer
)) =
12947 if noShift term
then []
12948 else del(n
-1,tok
::accum
,left
,r
,Stream
.get lexer
)
12949 in del(n
,[],l
,r
,lexPair
)
12952 (* tryInsert
: try to insert tokens
before the current terminal
;
12953 return a list
of the successes
*)
12955 fun tryInsert((stack
,lexPair
as (TOKEN(_
,(_
,l
,_
)),_
)),queuePos
) =
12956 catList
terms (fn t
=>
12957 tryChange
{lex
=lexPair
,stack
=stack
,
12958 pos
=queuePos
,orig
=[],new
=[tokAt(t
,l
)],
12959 leftPos
=l
,rightPos
=l
})
12961 (* trySubst
: try to substitute tokens for the current terminal
;
12962 return a list
of the successes
*)
12964 fun trySubst ((stack
,lexPair
as (orig
as TOKEN (term
,(_
,l
,r
)),lexer
)),
12966 if noShift term
then []
12968 catList
terms (fn t
=>
12969 tryChange
{lex
=Stream
.get lexer
,stack
=stack
,
12971 leftPos
=l
,rightPos
=r
,orig
=[orig
],
12974 (* do_delete(toks
,lexPair
) tries to delete tokens
"toks" from
"lexPair".
12975 If it succeeds
, returns
SOME(toks
',l
,r
,lp
), where
12976 toks
' is the actual
tokens (with positions
and values
) deleted
,
12977 (l
,r
) are
the (leftmost
,rightmost
) position
of toks
',
12978 lp is what remains
of the stream after deletion
12980 fun do_delete(nil
,lp
as (TOKEN(_
,(_
,l
,_
)),_
)) = SOME(nil
,l
,l
,lp
)
12981 |
do_delete([t
],(tok
as TOKEN(t
',(_
,l
,r
)),lp
')) =
12983 then SOME([tok
],l
,r
,Stream
.get lp
')
12985 |
do_delete(t
::rest
,(tok
as TOKEN(t
',(_
,l
,r
)),lp
')) =
12987 then case do_delete(rest
,Stream
.get lp
')
12988 of SOME(deleted
,l
',r
',lp
'') =>
12989 SOME(tok
::deleted
,l
,r
',lp
'')
12993 fun tryPreferred((stack
,lexPair
),queuePos
) =
12994 catList
preferred_change (fn (delete
,insert
) =>
12995 if List.exists noShift delete
then [] (* should give warning at
12996 parser
-generation time
*)
12997 else case do_delete(delete
,lexPair
)
12998 of SOME(deleted
,l
,r
,lp
) =>
12999 tryChange
{lex
=lp
,stack
=stack
,pos
=queuePos
,
13000 leftPos
=l
,rightPos
=r
,orig
=deleted
,
13001 new
=map (fn t
=>(tokAt(t
,r
))) insert
}
13004 val changes
= catList numStateList tryPreferred @
13005 catList numStateList tryInsert @
13006 catList numStateList trySubst @
13007 catList
numStateList (tryDelete
1) @
13008 catList
numStateList (tryDelete
2) @
13009 catList
numStateList (tryDelete
3)
13011 val findMaxDist
= fn l
=>
13012 foldr (fn (CHANGE
{distance
,...},high
) => Int.max(distance
,high
)) 0 l
13014 (* maxDist
: max distance past error taken that we could parse
*)
13016 val maxDist
= findMaxDist changes
13018 (* remove changes which did not parse maxDist tokens past the error token
*)
13020 val changes
= catList changes
13021 (fn(c
as CHANGE
{distance
,...}) =>
13022 if distance
=maxDist
then [c
] else [])
13025 of (l
as change
:: _
) =>
13026 let fun print_msg (CHANGE
{new
,orig
,leftPos
,rightPos
,...}) =
13029 of (_
::_
,[]) => "deleting " ^
(showTerms orig
)
13030 |
([],_
::_
) => "inserting " ^
(showTerms new
)
13031 | _
=> "replacing " ^
(showTerms orig
) ^
13032 " with " ^
(showTerms new
)
13033 in error ("syntax error: " ^ s
,leftPos
,rightPos
)
13037 (if length l
> 1 andalso DEBUG2
then
13038 (print
"multiple fixes possible; could fix it by:\n";
13040 print
"chosen correction:\n")
13044 (* findNth
: find nth queue entry from the error
13045 entry
. Returns the Nth queue entry
and the portion
of
13046 the queue from the beginning to the nth
-1 entry
. The
13047 error entry is at the
end of the queue
.
13052 findNth
0 = (e
,a b c d
)
13053 findNth
1 = (d
,a b c
)
13056 val findNth
= fn n
=>
13057 let fun f (h
::t
,0) = (h
,rev t
)
13058 |
f (h
::t
,n
) = f(t
,n
-1)
13059 |
f (nil
,_
) = let exception FindNth
13062 in f (rev stateList
,n
)
13065 val CHANGE
{pos
,orig
,new
,...} = change
13066 val (last
,queueFront
) = findNth pos
13067 val (stack
,lexPair
) = last
13069 val lp1
= foldl(fn (_
,(_
,r
)) => Stream
.get r
) lexPair orig
13070 val lp2
= foldr(fn(t
,r
)=>(t
,Stream
.cons r
)) lp1 new
13073 Fifo
.put((stack
,lp2
),
13074 foldl Fifo
.put Fifo
.empty queueFront
)
13076 val (lexPair
,stack
,queue
,_
,_
) =
13077 distanceParse(lp2
,stack
,restQueue
,pos
)
13079 in (lexPair
,stack
,queue
)
13081 | nil
=> (error("syntax error found at " ^
(showTerminal term
),
13082 leftPos
,leftPos
); raise ParseError
)
13085 val parse
= fn {arg
,table
,lexer
,saction
,void
,lookahead
,
13086 ec
=ec
as {showTerminal
,...} : ('_a
,'_b
) ecRecord
} =>
13087 let val distance
= 15 (* defer distance tokens
*)
13088 val minAdvance
= 1 (* must parse at least
1 token past error
*)
13089 val maxAdvance
= Int.max(lookahead
,0)(* max distance for parse check
*)
13090 val lexPair
= Stream
.get lexer
13091 val (TOKEN (_
,(_
,leftPos
,_
)),_
) = lexPair
13092 val startStack
= [(initialState table
,(void
,leftPos
,leftPos
))]
13093 val startQueue
= Fifo
.put((startStack
,lexPair
),Fifo
.empty
)
13094 val distanceParse
= distanceParse(table
,showTerminal
,saction
,arg
)
13095 val fixError
= mkFixError(ec
,distanceParse
,minAdvance
,maxAdvance
)
13096 val ssParse
= ssParse(table
,showTerminal
,saction
,fixError
,arg
)
13097 fun loop (lexPair
,stack
,queue
,_
,SOME ACCEPT
) =
13098 ssParse(lexPair
,stack
,queue
)
13099 |
loop (lexPair
,stack
,queue
,0,_
) = ssParse(lexPair
,stack
,queue
)
13100 |
loop (lexPair
,stack
,queue
,distance
,SOME ERROR
) =
13101 let val (lexPair
,stack
,queue
) = fixError(lexPair
,stack
,queue
)
13102 in loop (distanceParse(lexPair
,stack
,queue
,distance
))
13104 | loop _
= let exception ParseInternal
13105 in raise ParseInternal
13107 in loop (distanceParse(lexPair
,startStack
,startQueue
,distance
))
13111 (* stop
of ml
-yacc
/lib
/parser2
.sml
*)
13112 (* start
of DERIVED_FORMS_CORE
.sml
*)
13114 * Standard ML core derived forms
13116 * Definition
, Section
2.7 and appendix A
13119 * Two phrases named Fmatch
and Fmrule have been added to factorize FvalBind
.
13123 signature DERIVED_FORMS_CORE
=
13128 type Info
= GrammarCore
.Info
13130 type Lab
= GrammarCore
.Lab
13131 type VId
= GrammarCore
.VId
13133 type Op
= GrammarCore
.Op
13134 type AtExp
= GrammarCore
.AtExp
13135 type AppExp
= GrammarCore
.AtExp list
13136 type InfExp
= GrammarCore
.Exp
13137 type Exp
= GrammarCore
.Exp
13138 type Match
= GrammarCore
.Match
13139 type Mrule
= GrammarCore
.Mrule
13140 type Dec
= GrammarCore
.Dec
13141 type ValBind
= GrammarCore
.ValBind
13142 type FvalBind
= GrammarCore
.ValBind
13143 type Fmatch
= GrammarCore
.Match
* VId
* int
13144 type Fmrule
= GrammarCore
.Mrule
* VId
* int
13145 type TypBind
= GrammarCore
.TypBind
13146 type DatBind
= GrammarCore
.DatBind
13147 type AtPat
= GrammarCore
.AtPat
13148 type PatRow
= GrammarCore
.PatRow
13149 type Pat
= GrammarCore
.Pat
13150 type Ty
= GrammarCore
.Ty
13151 type TyVarseq
= GrammarCore
.TyVarseq
13154 (* Expressions
[Figure
15] *)
13156 val UNITAtExp
: Info
-> AtExp
13157 val TUPLEAtExp
: Info
* Exp list
-> AtExp
13158 val HASHAtExp
: Info
* Lab
-> AtExp
13159 val CASEExp
: Info
* Exp
* Match
-> Exp
13160 val IFExp
: Info
* Exp
* Exp
* Exp
-> Exp
13161 val ANDALSOExp
: Info
* Exp
* Exp
-> Exp
13162 val ORELSEExp
: Info
* Exp
* Exp
-> Exp
13163 val SEQAtExp
: Info
* Exp list
-> AtExp
13164 val LETAtExp
: Info
* Dec
* Exp list
-> AtExp
13165 val WHILEExp
: Info
* Exp
* Exp
-> Exp
13166 val LISTAtExp
: Info
* Exp list
-> AtExp
13168 (* Patterns
[Figure
16] *)
13170 val UNITAtPat
: Info
-> AtPat
13171 val TUPLEAtPat
: Info
* Pat list
-> AtPat
13172 val LISTAtPat
: Info
* Pat list
-> AtPat
13174 val VIDPatRow
: Info
* VId
* Ty option
* Pat option
* PatRow option
13176 (* Types
[Figure
16] *)
13178 val TUPLETy
: Info
* Ty list
-> Ty
13180 (* Function
-value bindings
[Figure
17] *)
13182 val FvalBind
: Info
* Fmatch
* FvalBind option
-> FvalBind
13183 val Fmatch
: Info
* Fmrule
* Fmatch option
-> Fmatch
13184 val Fmrule
: Info
* Op
* VId
* AtPat list
* Ty option
* Exp
-> Fmrule
13186 (* Declarations
[Figure
17] *)
13188 val FUNDec
: Info
* TyVarseq
* FvalBind
-> Dec
13189 val DATATYPEDec
: Info
* DatBind
* TypBind option
-> Dec
13190 val ABSTYPEDec
: Info
* DatBind
* TypBind option
* Dec
-> Dec
13193 (* stop
of DERIVED_FORMS_CORE
.sml
*)
13194 (* start
of DerivedFormsCore
.sml
*)
13196 * Standard ML core derived forms
13198 * Definition
, Section
2.7 and appendix A
13201 * - Two phrases named Fmatch
and Fmrule have been added to factorize FvalBind
.
13202 * - In Fvalbinds we
do not enforce that all optional
type annotations are
13203 * syntactically
identical (as the Definition enforces
, although this seems
13204 * to be a mistake
).
13205 * - The Definition is somewhat inaccurate about the derived forms
of Exp
13206 * [Definition
, Appendix A
, Figure
15] in that most forms are actually AtExp
13207 * derived forms
, as can be seen from the full grammar
[Definition
,
13208 * Appendix B
, Figure
20]. To achieve consistency
, the equivalent forms must
13209 * be put
in parentheses
in some cases
.
13210 * - The same goes for pattern derived forms
[Definition
, Appendix A
, Figure
16;
13211 * Appendix B
, Figure
22].
13215 structure DerivedFormsCore
:> DERIVED_FORMS_CORE
=
13220 structure C
= GrammarCore
13228 type AtExp
= C
.AtExp
13229 type AppExp
= C
.AtExp list
13230 type InfExp
= C
.Exp
13232 type Match
= C
.Match
13233 type Mrule
= C
.Mrule
13235 type ValBind
= C
.ValBind
13236 type FvalBind
= C
.ValBind
13237 type Fmatch
= C
.Match
* C
.VId
* int
13238 type Fmrule
= C
.Mrule
* C
.VId
* int
13239 type TypBind
= C
.TypBind
13240 type DatBind
= C
.DatBind
13241 type AtPat
= C
.AtPat
13242 type PatRow
= C
.PatRow
13245 type TyVarseq
= C
.TyVarseq
13250 val vidFALSE
= VId
.fromString
"false"
13251 val vidTRUE
= VId
.fromString
"true"
13252 val vidNIL
= VId
.fromString
"nil"
13253 val vidCONS
= VId
.fromString
"::"
13255 val longvidCONS
= LongVId
.fromId vidCONS
13258 fun LONGVIDExp(I
, longvid
) = C
.ATEXPExp(I
, C
.LONGVIDAtExp(I
, C
.SANSOp
,
13260 fun LONGVIDPat(I
, longvid
) = C
.ATPATPat(I
, C
.LONGVIDAtPat(I
, C
.SANSOp
,
13263 fun VIDExp(I
, vid
) = LONGVIDExp(I
, LongVId
.fromId vid
)
13264 fun VIDPat(I
, vid
) = LONGVIDPat(I
, LongVId
.fromId vid
)
13266 fun FALSEExp(I
) = VIDExp(I
, vidFALSE
)
13267 fun TRUEExp(I
) = VIDExp(I
, vidTRUE
)
13268 fun NILExp(I
) = VIDExp(I
, vidNIL
)
13269 fun CONSExp(I
) = VIDExp(I
, vidCONS
)
13271 fun FALSEPat(I
) = VIDPat(I
, vidFALSE
)
13272 fun TRUEPat(I
) = VIDPat(I
, vidTRUE
)
13273 fun NILPat(I
) = VIDPat(I
, vidNIL
)
13276 (* Rewriting
of withtype declarations
[Appendix A
, 2nd bullet
] *)
13278 fun lookupTyCon(tycon
, C
.TypBind(_
, tyvarseq
, tycon
', ty
, typbind_opt
)) =
13279 if tycon
' = tycon
then
13282 lookupTyCon(tycon
, Option
.valOf typbind_opt
)
13283 (* may
raise Option
*)
13286 fun replaceTy (C
.TyVarseq(_
,tyvars
), C
.Tyseq(i
',tys
)) (C
.TYVARTy(i
,tyvar
)) =
13288 fun loop(tyvar
'::tyvars
', ty
'::tys
') =
13289 if tyvar
' = tyvar
then
13292 loop(tyvars
', tys
')
13294 Error
.error(i
, "unbound type variable")
13296 Error
.error(i
', "type sequence has wrong arity")
13301 | replaceTy
tyvarseq_tyseq (C
.RECORDTy(I
, tyrow_opt
)) =
13302 C
.RECORDTy(I
, Option
.map (replaceTyRow tyvarseq_tyseq
) tyrow_opt
)
13304 | replaceTy
tyvarseq_tyseq (C
.TYCONTy(I
, tyseq
', tycon
)) =
13305 C
.TYCONTy(I
, replaceTyseq tyvarseq_tyseq tyseq
', tycon
)
13307 | replaceTy
tyvarseq_tyseq (C
.ARROWTy(I
, ty1
, ty2
)) =
13308 C
.ARROWTy(I
, replaceTy tyvarseq_tyseq ty1
,
13309 replaceTy tyvarseq_tyseq ty2
)
13311 | replaceTy
tyvarseq_tyseq (C
.PARTy(I
, ty
)) =
13312 C
.PARTy(I
, replaceTy tyvarseq_tyseq ty
)
13314 and replaceTyRow
tyvarseq_tyseq (C
.TyRow(I
, lab
, ty
, tyrow_opt
)) =
13315 C
.TyRow(I
, lab
, replaceTy tyvarseq_tyseq ty
,
13316 Option
.map (replaceTyRow tyvarseq_tyseq
) tyrow_opt
)
13318 and replaceTyseq
tyvarseq_tyseq (C
.Tyseq(I
, tys
)) =
13319 C
.Tyseq(I
, List.map (replaceTy tyvarseq_tyseq
) tys
)
13322 fun rewriteTy
typbind (ty
as C
.TYVARTy _
) = ty
13324 | rewriteTy
typbind (C
.RECORDTy(I
, tyrow_opt
)) =
13325 C
.RECORDTy(I
, Option
.map (rewriteTyRow typbind
) tyrow_opt
)
13327 | rewriteTy
typbind (C
.TYCONTy(I
, tyseq
, longtycon
)) =
13329 val tyseq
' = rewriteTyseq typbind tyseq
13330 val (strids
, tycon
) = LongTyCon
.explode longtycon
13332 if not(List.null strids
) then
13333 C
.TYCONTy(I
, tyseq
', longtycon
)
13336 val (tyvarseq
', ty
') = lookupTyCon(tycon
, typbind
)
13338 replaceTy (tyvarseq
',tyseq
') ty
'
13340 handle Option
=> C
.TYCONTy(I
, tyseq
', longtycon
)
13343 | rewriteTy
typbind (C
.ARROWTy(I
, ty1
, ty2
)) =
13344 C
.ARROWTy(I
, rewriteTy typbind ty1
, rewriteTy typbind ty2
)
13346 | rewriteTy
typbind (C
.PARTy(I
, ty
)) =
13347 C
.PARTy(I
, rewriteTy typbind ty
)
13349 and rewriteTyRow
typbind (C
.TyRow(I
, lab
, ty
, tyrow_opt
)) =
13350 C
.TyRow(I
, lab
, rewriteTy typbind ty
,
13351 Option
.map (rewriteTyRow typbind
) tyrow_opt
)
13353 and rewriteTyseq
typbind (C
.Tyseq(I
, tys
)) =
13354 C
.Tyseq(I
, List.map (rewriteTy typbind
) tys
)
13356 fun rewriteConBind
typbind (C
.ConBind(I
, op_opt
, vid
, ty_opt
, conbind_opt
))=
13357 C
.ConBind(I
, op_opt
, vid
,
13358 Option
.map (rewriteTy typbind
) ty_opt
,
13359 Option
.map (rewriteConBind typbind
) conbind_opt
)
13361 fun rewriteDatBind
typbind (C
.DatBind(I
, tyvarseq
, tycon
, conbind
,
13363 C
.DatBind(I
, tyvarseq
, tycon
, rewriteConBind typbind conbind
,
13364 Option
.map (rewriteDatBind typbind
) datbind_opt
)
13367 (* Patterns
[Figure
16] *)
13369 fun UNITAtPat(I
) = C
.RECORDAtPat(I
, NONE
)
13371 fun TUPLEAtPat(I
, [pat
]) = C
.PARAtPat(I
, pat
)
13372 |
TUPLEAtPat(I
, pats
) =
13374 fun toPatRow(n
, [] ) = NONE
13375 |
toPatRow(n
, pat
::pats
') =
13376 SOME(C
.ROWPatRow(I
, Lab
.fromInt n
, pat
, toPatRow(n
+1,pats
')))
13378 C
.RECORDAtPat(I
, toPatRow(1, pats
))
13381 fun LISTAtPat(I
, pats
) =
13383 fun toPatList
[] = NILPat(I
)
13384 |
toPatList(pat
::pats
') =
13385 C
.CONPat(I
, C
.SANSOp
, longvidCONS
,
13386 TUPLEAtPat(I
, [pat
,toPatList pats
']))
13388 C
.PARAtPat(I
, toPatList pats
)
13392 (* Pattern Rows
[Figure
16] *)
13394 fun VIDPatRow(I
, vid
, ty_opt
, pat_opt
, patrow_opt
) =
13396 val lab
= Lab
.fromString(VId
.toString vid
)
13397 val vidPat
= VIDPat(I
, vid
)
13399 case (ty_opt
, pat_opt
)
13400 of (NONE
, NONE
) => vidPat
13401 |
(SOME ty
, NONE
) => C
.TYPEDPat(I
, vidPat
, ty
)
13402 |
( _
, SOME pat
) => C
.ASPat(I
, C
.SANSOp
,vid
,ty_opt
,pat
)
13404 C
.ROWPatRow(I
, lab
, pat
, patrow_opt
)
13408 (* Expressions
[Figure
15] *)
13410 fun UNITAtExp(I
) = C
.RECORDAtExp(I
, NONE
)
13412 fun TUPLEAtExp(I
, [exp
]) = C
.PARAtExp(I
, exp
)
13413 |
TUPLEAtExp(I
, exps
) =
13415 fun toExpRow(n
, [] ) = NONE
13416 |
toExpRow(n
, exp
::exps
') =
13417 SOME(C
.ExpRow(I
, Lab
.fromInt n
, exp
, toExpRow(n
+1, exps
')))
13419 C
.RECORDAtExp(I
, toExpRow(1, exps
))
13422 fun HASHAtExp(I
, lab
) =
13424 val vid
= VId
.invent()
13425 val dots
= C
.WILDCARDPatRow(I
)
13426 val patrow
= C
.ROWPatRow(I
, lab
, VIDPat(I
, vid
), SOME dots
)
13427 val pat
= C
.ATPATPat(I
, C
.RECORDAtPat(I
, SOME patrow
))
13428 val mrule
= C
.Mrule(I
, pat
, VIDExp(I
, vid
))
13429 val match
= C
.Match(I
, mrule
, NONE
)
13431 C
.PARAtExp(I
, C
.FNExp(I
, match
))
13434 fun CASEExp(I
, exp
, match
) =
13436 val function
= C
.ATEXPExp(I
, C
.PARAtExp(I
, C
.FNExp(I
, match
)))
13438 C
.APPExp(I
, function
, C
.PARAtExp(I
, exp
))
13441 fun IFExp(I
, exp1
, exp2
, exp3
) =
13443 val mruleTrue
= C
.Mrule(I
, TRUEPat(I
), exp2
)
13444 val mruleFalse
= C
.Mrule(I
, FALSEPat(I
), exp3
)
13445 val matchFalse
= C
.Match(I
, mruleFalse
, NONE
)
13446 val matchTrue
= C
.Match(I
, mruleTrue
, SOME matchFalse
)
13448 CASEExp(I
, exp1
, matchTrue
)
13451 fun ORELSEExp (I
, exp1
, exp2
) = IFExp(I
, exp1
, TRUEExp(I
), exp2
)
13453 fun ANDALSOExp(I
, exp1
, exp2
) = IFExp(I
, exp1
, exp2
, FALSEExp(I
))
13455 fun SEQAtExp(I
, exps
) =
13457 val wildcard
= C
.ATPATPat(I
, C
.WILDCARDAtPat(I
))
13459 fun toExpSeq
[] = raise Fail
"DerivedFormsCore.SEQAtExp: \
13461 | toExpSeq
[exp
] = exp
13462 |
toExpSeq(exp
::exps
') =
13464 val mrule
= C
.Mrule(I
, wildcard
, toExpSeq exps
')
13465 val match
= C
.Match(I
, mrule
, NONE
)
13467 CASEExp(I
, exp
, match
)
13470 C
.PARAtExp(I
, toExpSeq exps
)
13473 fun LETAtExp(I
, dec
, [exp
]) = C
.LETAtExp(I
, dec
, exp
)
13474 |
LETAtExp(I
, dec
, exps
) =
13475 C
.LETAtExp(I
, dec
, C
.ATEXPExp(I
, SEQAtExp(I
, exps
)))
13477 fun WHILEExp(I
, exp1
, exp2
) =
13479 val vid
= VId
.invent()
13480 val vidExp
= VIDExp(I
, vid
)
13481 val unitAtExp
= UNITAtExp(I
)
13482 val unitExp
= C
.ATEXPExp(I
, unitAtExp
)
13483 val callVid
= C
.APPExp(I
, vidExp
, unitAtExp
)
13485 val seqExp
= C
.ATEXPExp(I
, SEQAtExp(I
, [exp2
, callVid
]))
13486 val fnBody
= IFExp(I
, exp1
, seqExp
, unitExp
)
13487 val mrule
= C
.Mrule(I
, C
.ATPATPat(I
, UNITAtPat(I
)), fnBody
)
13488 val match
= C
.Match(I
, mrule
, NONE
)
13489 val fnExp
= C
.FNExp(I
, match
)
13490 val fnBind
= C
.PLAINValBind(I
, VIDPat(I
, vid
), fnExp
, NONE
)
13491 val valbind
= C
.RECValBind(I
, fnBind
)
13492 val dec
= C
.VALDec(I
, C
.TyVarseq(I
, []), valbind
)
13494 C
.ATEXPExp(I
, C
.LETAtExp(I
, dec
, callVid
))
13497 fun LISTAtExp(I
, exps
) =
13499 fun toExpList
[] = NILExp(I
)
13500 |
toExpList(exp
::exps
') =
13501 C
.APPExp(I
, CONSExp(I
), TUPLEAtExp(I
, [exp
, toExpList exps
']))
13503 C
.PARAtExp(I
, toExpList exps
)
13507 (* Type Expressions
[Figure
16] *)
13509 fun TUPLETy(I
, [ty
]) = ty
13510 |
TUPLETy(I
, tys
) =
13512 fun toTyRow(n
, [] ) = NONE
13513 |
toTyRow(n
, ty
::tys
') =
13514 SOME(C
.TyRow(I
, Lab
.fromInt n
, ty
, toTyRow(n
+1, tys
')))
13516 C
.RECORDTy(I
, toTyRow(1, tys
))
13520 (* Function
-value Bindings
[Figure
17] *)
13522 fun FvalBind(I
, (match
, vid
, arity
), fvalbind_opt
) =
13524 fun abstract(0, vidExps
) =
13526 val exp
= C
.ATEXPExp(I
, TUPLEAtExp(I
, List.rev vidExps
))
13528 CASEExp(I
, exp
, match
)
13531 |
abstract(n
, vidExps
) =
13533 val vid
= VId
.invent()
13534 val exp
= VIDExp(I
, vid
)
13535 val pat
= VIDPat(I
, vid
)
13536 val mrule
= C
.Mrule(I
, pat
, abstract(n
-1, exp
::vidExps
))
13538 C
.FNExp(I
, C
.Match(I
, mrule
, NONE
))
13541 val exp
= abstract(arity
, [])
13542 val pat
= VIDPat(I
, vid
)
13544 C
.PLAINValBind(I
, pat
, exp
, fvalbind_opt
)
13548 fun Fmatch(I
, (mrule
, vid
, arity
), NONE
) =
13549 ( C
.Match(I
, mrule
, NONE
), vid
, arity
)
13551 |
Fmatch(I
, (mrule
, vid
, arity
), SOME(match
, vid
', arity
')) =
13552 if vid
<> vid
' then
13553 Error
.error(I
, "inconsistent function identifier")
13554 else if arity
<> arity
' then
13555 Error
.error(I
, "inconsistent function arity")
13557 ( C
.Match(I
, mrule
, SOME match
), vid
, arity
)
13560 fun Fmrule(I
, _
, vid
, atpats
, ty_opt
, exp
) =
13562 val pats
= List.map (fn atpat
=> C
.ATPATPat(I
, atpat
)) atpats
13563 val pat
' = C
.ATPATPat(I
, TUPLEAtPat(I
, pats
))
13564 val exp
' = case ty_opt
13566 | SOME ty
=> C
.TYPEDExp(I
, exp
, ty
)
13567 val arity
= List.length atpats
13569 ( C
.Mrule(I
, pat
', exp
'), vid
, arity
)
13573 (* Declarations
[Figure
17] *)
13575 fun FUNDec(I
, tyvarseq
, fvalbind
) =
13576 C
.VALDec(I
, tyvarseq
, C
.RECValBind(I
, fvalbind
))
13578 fun DATATYPEDec(I
, datbind
, NONE
) = C
.DATATYPEDec(I
, datbind
)
13579 |
DATATYPEDec(I
, datbind
, SOME typbind
) =
13581 val datbind
' = rewriteDatBind typbind datbind
13583 C
.SEQDec(I
, C
.DATATYPEDec(C
.infoDatBind datbind
, datbind
'),
13584 C
.TYPEDec(C
.infoTypBind typbind
, typbind
))
13587 fun ABSTYPEDec(I
, datbind
, NONE
, dec
) = C
.ABSTYPEDec(I
, datbind
,dec
)
13588 |
ABSTYPEDec(I
, datbind
, SOME typbind
, dec
) =
13590 val I
' = C
.infoTypBind typbind
13591 val datbind
' = rewriteDatBind typbind datbind
13593 C
.ABSTYPEDec(I
, datbind
', C
.SEQDec(I
, C
.TYPEDec(I
', typbind
), dec
))
13597 (* stop
of DerivedFormsCore
.sml
*)
13598 (* start
of DERIVED_FORMS_MODULE
.sml
*)
13600 * Standard ML modules derived forms
13602 * Definition
, Appendix A
13605 * - A phrase named SynDesc has been added to factorize
type synonym
13607 * - Similarly
, a phrase named TyReaDesc has been added to factorize
type
13608 * realisation
signature expressions
.
13609 * - The
structure sharing derived form is missing since it cannot be resolved
13610 * syntactically
. It has been moved to the bare grammar
.
13614 signature DERIVED_FORMS_MODULE
=
13619 type Info
= GrammarModule
.Info
13621 type VId
= GrammarCore
.VId
13622 type TyCon
= GrammarCore
.TyCon
13623 type StrId
= GrammarCore
.StrId
13624 type SigId
= GrammarModule
.SigId
13625 type FunId
= GrammarModule
.FunId
13626 type longTyCon
= GrammarCore
.longTyCon
13628 type Ty
= GrammarCore
.Ty
13629 type TyVarseq
= GrammarCore
.TyVarseq
13631 type StrExp
= GrammarModule
.StrExp
13632 type StrDec
= GrammarModule
.StrDec
13633 type StrBind
= GrammarModule
.StrBind
13634 type SigExp
= GrammarModule
.SigExp
13635 type TyReaDesc
= (Info
* TyVarseq
* longTyCon
* Ty
) list
13636 type Spec
= GrammarModule
.Spec
13637 type SynDesc
= (Info
* TyVarseq
* TyCon
* Ty
) list
13638 type FunBind
= GrammarModule
.FunBind
13641 (* Structure Bindings
[Figure
18] *)
13643 val TRANSStrBind
: Info
* StrId
* SigExp option
* StrExp
13644 * StrBind option
-> StrBind
13645 val OPAQStrBind
: Info
* StrId
* SigExp
* StrExp
13646 * StrBind option
-> StrBind
13648 (* Structure Expressions
[Figure
18] *)
13650 val APPDECStrExp
: Info
* FunId
* StrDec
-> StrExp
13652 (* Functor Bindings
[Figure
18] *)
13654 val TRANSFunBind
: Info
* FunId
* StrId
* SigExp
* SigExp option
13655 * StrExp
* FunBind option
-> FunBind
13656 val OPAQFunBind
: Info
* FunId
* StrId
* SigExp
* SigExp
13657 * StrExp
* FunBind option
-> FunBind
13658 val TRANSSPECFunBind
: Info
* FunId
* Spec
* SigExp option
13659 * StrExp
* FunBind option
-> FunBind
13660 val OPAQSPECFunBind
: Info
* FunId
* Spec
* SigExp
13661 * StrExp
* FunBind option
-> FunBind
13663 (* Specifications
[Figure
19] *)
13665 val SYNSpec
: Info
* SynDesc
-> Spec
13666 val INCLUDEMULTISpec
: Info
* SigId list
-> Spec
13668 val SynDesc
: Info
* TyVarseq
* TyCon
* Ty
13669 * SynDesc option
-> SynDesc
13671 (* Signature Expressions
[Figure
19] *)
13673 val WHERETYPESigExp
: Info
* SigExp
* TyReaDesc
-> SigExp
13675 val TyReaDesc
: Info
* TyVarseq
* longTyCon
* Ty
13676 * TyReaDesc option
-> TyReaDesc
13678 (* stop
of DERIVED_FORMS_MODULE
.sml
*)
13679 (* start
of DerivedFormsModule
.sml
*)
13681 * Standard ML modules derived forms
13683 * Definition
, Appendix A
13686 * - A phrase named SynDesc has been added to factorize
type synonym
13688 * - Similarly
, a phrase named TyReaDesc has been added to factorize
type
13689 * realisation
signature expressions
.
13690 * - The
structure sharing derived form is missing since it cannot be resolved
13691 * syntactically
. It has been moved to the bare grammar
.
13695 structure DerivedFormsModule
:> DERIVED_FORMS_MODULE
=
13700 structure C
= GrammarCore
13701 structure M
= GrammarModule
13706 type TyCon
= M
.TyCon
13707 type StrId
= M
.StrId
13708 type SigId
= M
.SigId
13709 type FunId
= M
.FunId
13710 type longTyCon
= M
.longTyCon
13713 type TyVarseq
= M
.TyVarseq
13715 type StrExp
= M
.StrExp
13716 type StrDec
= M
.StrDec
13717 type StrBind
= M
.StrBind
13718 type SigExp
= M
.SigExp
13719 type TyReaDesc
= (M
.Info
* M
.TyVarseq
* M
.longTyCon
* M
.Ty
) list
13721 type SynDesc
= (M
.Info
* M
.TyVarseq
* M
.TyCon
* M
.Ty
) list
13722 type FunBind
= M
.FunBind
13725 (* Structure Bindings
[Figure
18] *)
13727 fun TRANSStrBind(I
, strid
, NONE
, strexp
, strbind_opt
) =
13728 M
.StrBind(I
, strid
, strexp
, strbind_opt
)
13730 |
TRANSStrBind(I
, strid
, SOME sigexp
, strexp
, strbind_opt
) =
13731 M
.StrBind(I
, strid
, M
.TRANSStrExp(I
, strexp
, sigexp
), strbind_opt
)
13733 fun OPAQStrBind(I
, strid
, sigexp
, strexp
, strbind_opt
) =
13734 M
.StrBind(I
, strid
, M
.OPAQStrExp(I
, strexp
, sigexp
), strbind_opt
)
13737 (* Structure Expressions
[Figure
18] *)
13739 fun APPDECStrExp(I
, funid
, strdec
) =
13740 M
.APPStrExp(I
, funid
, M
.STRUCTStrExp(M
.infoStrDec strdec
, strdec
))
13743 (* Functor Bindings
[Figure
18] *)
13745 fun TRANSFunBind(I
, funid
, strid
, sigexp
, NONE
, strexp
, funbind_opt
) =
13746 M
.FunBind(I
, funid
, strid
, sigexp
, strexp
, funbind_opt
)
13748 |
TRANSFunBind(I
, funid
, strid
,sigexp
, SOME sigexp
', strexp
, funbind_opt
)=
13749 M
.FunBind(I
, funid
, strid
, sigexp
, M
.TRANSStrExp(I
, strexp
,sigexp
'),
13752 fun OPAQFunBind(I
, funid
, strid
, sigexp
, sigexp
', strexp
, funbind_opt
) =
13753 M
.FunBind(I
, funid
, strid
, sigexp
, M
.OPAQStrExp(I
, strexp
, sigexp
'),
13757 fun TRANSSPECFunBind(I
, funid
, spec
, sigexp_opt
, strexp
, funbind_opt
) =
13759 val I
' = M
.infoStrExp strexp
13760 val strid
= StrId
.invent()
13761 val sigexp
= M
.SIGSigExp(M
.infoSpec spec
, spec
)
13763 val strdec
= M
.DECStrDec(I
', C
.OPENDec(I
',[LongStrId
.fromId strid
]))
13764 val strexp
'= case sigexp_opt
13766 | SOME sigexp
' => M
.TRANSStrExp(I
', strexp
, sigexp
')
13767 val letexp
= M
.LETStrExp(I
', strdec
, strexp
')
13769 M
.FunBind(I
, funid
, strid
, sigexp
, letexp
, funbind_opt
)
13772 fun OPAQSPECFunBind(I
, funid
, spec
, sigexp
', strexp
, funbind_opt
) =
13774 val I
' = M
.infoStrExp strexp
13775 val strid
= StrId
.invent()
13776 val sigexp
= M
.SIGSigExp(M
.infoSpec spec
, spec
)
13778 val strdec
= M
.DECStrDec(I
', C
.OPENDec(I
',[LongStrId
.fromId strid
]))
13779 val strexp
'= M
.TRANSStrExp(I
', strexp
, sigexp
')
13780 val letexp
= M
.LETStrExp(I
', strdec
, strexp
')
13782 M
.FunBind(I
, funid
, strid
, sigexp
, letexp
, funbind_opt
)
13786 (* Specifications
[Figure
19] *)
13788 fun SYNSpec(I
, []) = M
.EMPTYSpec(I
)
13789 |
SYNSpec(I
, (I
',tyvarseq
,tycon
,ty
)::syns
') =
13791 val longtycon
= LongTyCon
.fromId tycon
13792 val typdesc
= M
.TypDesc(I
', tyvarseq
, tycon
, NONE
)
13793 val sigexp
= M
.SIGSigExp(I
', M
.TYPESpec(I
', typdesc
))
13794 val sigexp
' = M
.WHERETYPESigExp(I
', sigexp
, tyvarseq
, longtycon
, ty
)
13795 val spec1
= M
.INCLUDESpec(I
', sigexp
')
13797 M
.SEQSpec(I
, spec1
, SYNSpec(I
, syns
'))
13800 fun INCLUDEMULTISpec(I
, [] ) = M
.EMPTYSpec(I
)
13801 |
INCLUDEMULTISpec(I
, sigid
::sigids
') =
13803 val spec1
= M
.INCLUDESpec(I
, M
.SIGIDSigExp(I
, sigid
))
13805 M
.SEQSpec(I
, spec1
, INCLUDEMULTISpec(I
, sigids
'))
13809 fun SynDesc(I
, tyvarseq
, tycon
, ty
, NONE
) =
13810 (I
, tyvarseq
, tycon
, ty
) :: []
13812 |
SynDesc(I
, tyvarseq
, tycon
, ty
, SOME syndesc
) =
13813 (I
, tyvarseq
, tycon
, ty
) :: syndesc
13816 (* Signature Expressions
[Figure
19] *)
13818 fun WHERETYPESigExp(I
, sigexp
, [] ) = sigexp
13819 |
WHERETYPESigExp(I
, sigexp
, (I
',tyvarseq
,longtycon
,ty
)::reas
') =
13821 val sigexp
' = M
.WHERETYPESigExp(I
', sigexp
, tyvarseq
, longtycon
, ty
)
13823 WHERETYPESigExp(I
, sigexp
', reas
')
13827 fun TyReaDesc(I
, tyvarseq
, longtycon
, ty
, NONE
) =
13828 (I
, tyvarseq
, longtycon
, ty
) :: []
13830 |
TyReaDesc(I
, tyvarseq
, longtycon
, ty
, SOME tyreadesc
) =
13831 (I
, tyvarseq
, longtycon
, ty
) :: tyreadesc
13834 (* stop
of DerivedFormsModule
.sml
*)
13835 (* start
of DERIVED_FORMS_PROGRAM
.sml
*)
13837 * Standard ML program derived forms
13839 * Definition
, Appendix A
13843 signature DERIVED_FORMS_PROGRAM
=
13848 type Info
= GrammarProgram
.Info
13850 type Exp
= GrammarCore
.Exp
13851 type TopDec
= GrammarModule
.TopDec
13852 type Program
= GrammarProgram
.Program
13855 (* Programs
[Figure
18] *)
13857 val TOPDECProgram
: Info
* TopDec
* Program option
-> Program
13858 val EXPProgram
: Info
* Exp
* Program option
-> Program
13861 (* stop
of DERIVED_FORMS_PROGRAM
.sml
*)
13862 (* start
of DerivedFormsProgram
.sml
*)
13864 * Standard ML program derived forms
13866 * Definition
, Appendix A
13870 structure DerivedFormsProgram
:> DERIVED_FORMS_PROGRAM
=
13875 structure C
= GrammarCore
13876 structure M
= GrammarModule
13877 structure P
= GrammarProgram
13879 type Info
= GrammarProgram
.Info
13881 type Exp
= GrammarCore
.Exp
13882 type TopDec
= GrammarModule
.TopDec
13883 type Program
= GrammarProgram
.Program
13886 (* Programs
[Figure
18] *)
13888 fun TOPDECProgram(I
, topdec
, program_opt
) =
13889 P
.Program(I
, topdec
, program_opt
)
13891 fun EXPProgram(I
, exp
, program_opt
) =
13893 val longvid
= LongVId
.fromId(VId
.fromString
"it")
13894 val pat
= C
.ATPATPat(I
, C
.LONGVIDAtPat(I
, C
.SANSOp
, longvid
))
13895 val valbind
= C
.PLAINValBind(I
, pat
, exp
, NONE
)
13896 val dec
= C
.VALDec(I
, C
.TyVarseq(I
, []), valbind
)
13897 val topdec
= M
.STRDECTopDec(I
, M
.DECStrDec(I
, dec
), NONE
)
13899 P
.Program(I
, topdec
, program_opt
)
13903 (* stop
of DerivedFormsProgram
.sml
*)
13904 (* start
of Parser
.grm
.sig *)
13905 signature Parser_TOKENS
=
13909 val LONGID
: (string list
*string) * 'a
* 'a
-> (svalue
,'a
) token
13910 val ETYVAR
: (string) * 'a
* 'a
-> (svalue
,'a
) token
13911 val TYVAR
: (string) * 'a
* 'a
-> (svalue
,'a
) token
13912 val STAR
: 'a
* 'a
-> (svalue
,'a
) token
13913 val SYMBOL
: (string) * 'a
* 'a
-> (svalue
,'a
) token
13914 val ALPHA
: (string) * 'a
* 'a
-> (svalue
,'a
) token
13915 val CHAR
: (char
) * 'a
* 'a
-> (svalue
,'a
) token
13916 val STRING
: (string) * 'a
* 'a
-> (svalue
,'a
) token
13917 val REAL
: (real) * 'a
* 'a
-> (svalue
,'a
) token
13918 val WORD
: (word) * 'a
* 'a
-> (svalue
,'a
) token
13919 val INT
: (int) * 'a
* 'a
-> (svalue
,'a
) token
13920 val NUMERIC
: (int) * 'a
* 'a
-> (svalue
,'a
) token
13921 val DIGIT
: (int) * 'a
* 'a
-> (svalue
,'a
) token
13922 val ZERO
: 'a
* 'a
-> (svalue
,'a
) token
13923 val COLONGREATER
: 'a
* 'a
-> (svalue
,'a
) token
13924 val WHERE
: 'a
* 'a
-> (svalue
,'a
) token
13925 val STRUCTURE
: 'a
* 'a
-> (svalue
,'a
) token
13926 val STRUCT
: 'a
* 'a
-> (svalue
,'a
) token
13927 val SIGNATURE
: 'a
* 'a
-> (svalue
,'a
) token
13928 val SIG
: 'a
* 'a
-> (svalue
,'a
) token
13929 val SHARING
: 'a
* 'a
-> (svalue
,'a
) token
13930 val INCLUDE
: 'a
* 'a
-> (svalue
,'a
) token
13931 val FUNCTOR
: 'a
* 'a
-> (svalue
,'a
) token
13932 val EQTYPE
: 'a
* 'a
-> (svalue
,'a
) token
13933 val HASH
: 'a
* 'a
-> (svalue
,'a
) token
13934 val ARROW
: 'a
* 'a
-> (svalue
,'a
) token
13935 val DARROW
: 'a
* 'a
-> (svalue
,'a
) token
13936 val EQUALS
: 'a
* 'a
-> (svalue
,'a
) token
13937 val BAR
: 'a
* 'a
-> (svalue
,'a
) token
13938 val UNDERBAR
: 'a
* 'a
-> (svalue
,'a
) token
13939 val DOTS
: 'a
* 'a
-> (svalue
,'a
) token
13940 val SEMICOLON
: 'a
* 'a
-> (svalue
,'a
) token
13941 val COLON
: 'a
* 'a
-> (svalue
,'a
) token
13942 val COMMA
: 'a
* 'a
-> (svalue
,'a
) token
13943 val RBRACE
: 'a
* 'a
-> (svalue
,'a
) token
13944 val LBRACE
: 'a
* 'a
-> (svalue
,'a
) token
13945 val RBRACK
: 'a
* 'a
-> (svalue
,'a
) token
13946 val LBRACK
: 'a
* 'a
-> (svalue
,'a
) token
13947 val RPAR
: 'a
* 'a
-> (svalue
,'a
) token
13948 val LPAR
: 'a
* 'a
-> (svalue
,'a
) token
13949 val WHILE
: 'a
* 'a
-> (svalue
,'a
) token
13950 val WITHTYPE
: 'a
* 'a
-> (svalue
,'a
) token
13951 val WITH
: 'a
* 'a
-> (svalue
,'a
) token
13952 val VAL
: 'a
* 'a
-> (svalue
,'a
) token
13953 val TYPE
: 'a
* 'a
-> (svalue
,'a
) token
13954 val THEN
: 'a
* 'a
-> (svalue
,'a
) token
13955 val REC
: 'a
* 'a
-> (svalue
,'a
) token
13956 val RAISE
: 'a
* 'a
-> (svalue
,'a
) token
13957 val ORELSE
: 'a
* 'a
-> (svalue
,'a
) token
13958 val OPEN
: 'a
* 'a
-> (svalue
,'a
) token
13959 val OP
: 'a
* 'a
-> (svalue
,'a
) token
13960 val OF
: 'a
* 'a
-> (svalue
,'a
) token
13961 val NONFIX
: 'a
* 'a
-> (svalue
,'a
) token
13962 val LOCAL
: 'a
* 'a
-> (svalue
,'a
) token
13963 val LET
: 'a
* 'a
-> (svalue
,'a
) token
13964 val INFIXR
: 'a
* 'a
-> (svalue
,'a
) token
13965 val INFIX
: 'a
* 'a
-> (svalue
,'a
) token
13966 val IN
: 'a
* 'a
-> (svalue
,'a
) token
13967 val IF
: 'a
* 'a
-> (svalue
,'a
) token
13968 val HANDLE
: 'a
* 'a
-> (svalue
,'a
) token
13969 val FUN
: 'a
* 'a
-> (svalue
,'a
) token
13970 val FN
: 'a
* 'a
-> (svalue
,'a
) token
13971 val EXCEPTION
: 'a
* 'a
-> (svalue
,'a
) token
13972 val END
: 'a
* 'a
-> (svalue
,'a
) token
13973 val ELSE
: 'a
* 'a
-> (svalue
,'a
) token
13974 val DATATYPE
: 'a
* 'a
-> (svalue
,'a
) token
13975 val DO
: 'a
* 'a
-> (svalue
,'a
) token
13976 val CASE
: 'a
* 'a
-> (svalue
,'a
) token
13977 val AS
: 'a
* 'a
-> (svalue
,'a
) token
13978 val ANDALSO
: 'a
* 'a
-> (svalue
,'a
) token
13979 val AND
: 'a
* 'a
-> (svalue
,'a
) token
13980 val ABSTYPE
: 'a
* 'a
-> (svalue
,'a
) token
13981 val EOF
: 'a
* 'a
-> (svalue
,'a
) token
13983 signature Parser_LRVALS
=
13985 structure Tokens
: Parser_TOKENS
13986 structure ParserData
:PARSER_DATA
13987 sharing type ParserData
.Token
.token
= Tokens
.token
13988 sharing type ParserData
.svalue
= Tokens
.svalue
13990 (* stop
of Parser
.grm
.sig *)
13991 (* start
of Parser
.grm
.sml
*)
13992 functor LrValsFn(structure Token
: TOKEN
) =
13994 structure ParserData
=
13999 (* Standard ML syntactical analysis
*)
14001 (* Definition
, sections
2, 3, and 8, Appendix A
and B
*)
14004 (* - Two phrases named Fmatch
and Fmrule have been added to factorize
*)
14006 (* - A phrase named SynDesc has been added to factorize
type synonym
*)
14007 (* specifications
. Similarly
, a phrase named TyReaDesc has been added to
*)
14008 (* factorize
type realisation
signature expressions
. *)
14009 (* - Infix expressions
[Definition
, section
2.6] are resolved externally
in *)
14010 (* structure Infix
. The parser just maintains the
infix environment J by
*)
14011 (* side effect
. To achieve correct treatment
of scoped fixity directives
, *)
14012 (* a stack
of environments is used
. To
handle `
local' we even need a
*)
14013 (* second environment J
' (together
with a a second stack
). *)
14014 (* - Syntactic restrictions
[Definition
, sections
2.9 and 3.5] are checked
*)
14015 (* during elaboration
, as well
as the Fvalbind derived form
. *)
14016 (* - The Definition is not clear about whether `
=' should also be legal
as *)
14017 (* a tycon
. Since this would result
in massive conflicts
, and a
type named
*)
14018 (* `
=' could only be used legally
if an implementation would be mad enough
*)
14019 (* to predefine it anyway
, we simply disallow it
. *)
14020 (* - The Definition is also vague about what consists a non
-infixed occurance
*)
14021 (* of an
infix identifier
: we assume any occurances
in expressions
*)
14022 (* or patterns
. This implies that uses
of the keyword `
op' in constructor
*)
14023 (* and exception bindings are completely redundant
. *)
14024 (* - Datatype replication requires rules for
datatype to be duplicated to
*)
14025 (* avoid conflicts on empty tyvarseqs
. *)
14026 (* - Layered patterns require some grammar transformation hack
, see pat
. *)
14027 (* - The messy `sigexp
where type ... and type ...' syntax requires some
*)
14028 (* really ugly
transformations (in absence
of a lookahead
of 2), watch out
*)
14029 (* for non
-terminals
of the form xxx__AND_yyybind_opt
. *)
14030 (* - ML
-Yacc does not seem to like comments that stretch over several
*)
14031 (* lines
... Similarly
, comments
in semantic actions make it puke
... *)
14034 (* - We
do NOT support declarations like
*)
14035 (* fun f p1
= case e1
of p2
=> e2
*)
14037 (* (without parentheses around the
case) because the transformations
*)
14038 (* required to support this would be even a magnitude uglier than those
*)
14039 (* above
. In fact
, no compiler I know
of supports this
. *)
14048 open GrammarProgram
14049 open DerivedFormsCore
14050 open DerivedFormsModule
14051 open DerivedFormsProgram
14054 (* Helper to build info fields
*)
14056 fun I(left
, right
) = if right
= 0 then (left
, left
) else (left
, right
)
14059 (* Handling
infix environments
*)
14061 val J
= ref Infix
.empty (* context
*)
14062 val J
' = ref Infix
.empty (* local environment (+ enclosing one
) *)
14064 val stackJ
= ref
[] : Infix
.InfEnv list ref
14065 val stackJ
' = ref
[] : Infix
.InfEnv list ref
14067 fun initJandJ
'(J0
) =
14077 stackJ
:= !J
:: !stackJ
14082 J
:= List.hd(!stackJ
);
14083 stackJ
:= List.tl(!stackJ
)
14086 fun pushJ
'shiftJ() =
14088 stackJ
' := !J
' :: !stackJ
';
14089 J
' := List.hd(!stackJ
)
14095 J
' := List.hd(!stackJ
');
14096 stackJ
:= List.tl(!stackJ
);
14097 stackJ
' := List.tl(!stackJ
')
14101 fun assignInfix(infstatus
, vids
) =
14103 J
:= Infix
.assign(!J
, vids
, infstatus
);
14104 J
' := Infix
.assign(!J
', vids
, infstatus
)
14107 fun cancelInfix(vids
) =
14109 J
:= Infix
.cancel(!J
, vids
);
14110 J
' := Infix
.cancel(!J
', vids
)
14114 (* Helper for long identifiers
*)
14116 fun toLongId
toId (strids
, id
) =
14117 ( List.map StrId
.fromString strids
, toId id
)
14120 (* Helper to
handle typed
patterns (needed because
of layered patterns
) *)
14122 fun typedPat(pat
, [] ) = pat
14123 |
typedPat(pat
, ty
::tys
) =
14125 val I
= Source
.over(infoPat pat
, infoTy ty
)
14127 typedPat(TYPEDPat(I
, pat
, ty
), tys
)
14134 structure LrTable
= Token
.LrTable
14135 structure Token
= Token
14136 local open LrTable
in
14137 val table
=let val actionRows
=
14139 \\001\000\001\000\000\000\000\000\
14140 \\001\000\001\000\184\003\002\000\049\000\006\000\048\000\008\000\047\000\
14141 \\011\000\046\000\012\000\045\000\013\000\044\000\015\000\043\000\
14142 \\017\000\042\000\018\000\041\000\019\000\040\000\020\000\039\000\
14143 \\021\000\038\000\023\000\037\000\024\000\036\000\026\000\035\000\
14144 \\029\000\034\000\030\000\033\000\033\000\032\000\034\000\031\000\
14145 \\036\000\030\000\038\000\029\000\042\000\174\003\046\000\151\002\
14146 \\049\000\028\000\051\000\027\000\055\000\026\000\057\000\025\000\
14147 \\060\000\024\000\061\000\023\000\062\000\022\000\063\000\021\000\
14148 \\064\000\020\000\065\000\019\000\066\000\018\000\067\000\017\000\
14149 \\068\000\151\002\069\000\151\002\070\000\151\002\073\000\151\002\000\000\
14150 \\001\000\002\000\139\002\003\000\139\002\008\000\139\002\010\000\139\002\
14151 \\011\000\139\002\013\000\139\002\016\000\139\002\017\000\139\002\
14152 \\018\000\139\002\020\000\139\002\021\000\139\002\024\000\139\002\
14153 \\029\000\139\002\030\000\139\002\034\000\141\002\035\000\139\002\
14154 \\041\000\139\002\042\000\139\002\051\000\139\002\055\000\139\002\
14155 \\057\000\139\002\059\000\139\002\000\000\
14156 \\001\000\002\000\178\002\003\000\178\002\004\000\178\002\007\000\178\002\
14157 \\008\000\178\002\009\000\178\002\010\000\178\002\011\000\178\002\
14158 \\013\000\178\002\014\000\178\002\016\000\178\002\017\000\178\002\
14159 \\018\000\178\002\019\000\040\000\020\000\178\002\021\000\178\002\
14160 \\022\000\178\002\023\000\037\000\024\000\178\002\025\000\178\002\
14161 \\028\000\178\002\029\000\178\002\030\000\178\002\034\000\031\000\
14162 \\035\000\178\002\036\000\030\000\037\000\178\002\038\000\029\000\
14163 \\039\000\178\002\040\000\178\002\041\000\178\002\042\000\178\002\
14164 \\045\000\178\002\046\000\151\002\049\000\028\000\051\000\178\002\
14165 \\055\000\178\002\057\000\178\002\060\000\024\000\061\000\023\000\
14166 \\062\000\022\000\063\000\021\000\064\000\020\000\065\000\019\000\
14167 \\066\000\018\000\067\000\017\000\068\000\151\002\069\000\151\002\
14168 \\070\000\151\002\073\000\151\002\000\000\
14169 \\001\000\002\000\034\003\003\000\034\003\004\000\034\003\005\000\034\003\
14170 \\007\000\034\003\008\000\034\003\009\000\034\003\010\000\034\003\
14171 \\011\000\034\003\013\000\034\003\014\000\034\003\016\000\034\003\
14172 \\017\000\034\003\018\000\034\003\020\000\034\003\021\000\034\003\
14173 \\022\000\034\003\024\000\034\003\025\000\034\003\028\000\034\003\
14174 \\029\000\034\003\030\000\034\003\031\000\034\003\032\000\034\003\
14175 \\035\000\034\003\037\000\034\003\039\000\034\003\040\000\034\003\
14176 \\041\000\034\003\042\000\034\003\045\000\034\003\046\000\034\003\
14177 \\047\000\034\003\048\000\034\003\050\000\034\003\051\000\034\003\
14178 \\052\000\034\003\053\000\034\003\055\000\034\003\057\000\034\003\
14179 \\058\000\034\003\059\000\034\003\068\000\045\003\069\000\045\003\
14180 \\070\000\248\000\073\000\045\003\000\000\
14181 \\001\000\002\000\075\003\003\000\148\001\008\000\075\003\010\000\075\003\
14182 \\011\000\075\003\013\000\075\003\016\000\075\003\017\000\075\003\
14183 \\018\000\075\003\020\000\075\003\021\000\075\003\024\000\075\003\
14184 \\029\000\075\003\030\000\075\003\035\000\075\003\041\000\056\003\
14185 \\042\000\075\003\051\000\075\003\055\000\075\003\057\000\075\003\
14186 \\059\000\056\003\000\000\
14187 \\001\000\002\000\075\003\003\000\148\001\008\000\075\003\010\000\075\003\
14188 \\011\000\075\003\013\000\075\003\016\000\075\003\017\000\075\003\
14189 \\018\000\075\003\020\000\075\003\021\000\075\003\024\000\075\003\
14190 \\029\000\075\003\030\000\075\003\035\000\075\003\041\000\086\003\
14191 \\042\000\075\003\051\000\075\003\055\000\075\003\057\000\075\003\
14192 \\058\000\086\003\059\000\086\003\000\000\
14193 \\001\000\002\000\075\003\003\000\097\002\008\000\075\003\010\000\075\003\
14194 \\011\000\075\003\013\000\075\003\016\000\075\003\017\000\075\003\
14195 \\018\000\075\003\020\000\075\003\021\000\075\003\024\000\075\003\
14196 \\029\000\075\003\030\000\075\003\035\000\075\003\041\000\101\003\
14197 \\042\000\075\003\051\000\075\003\055\000\075\003\057\000\075\003\
14198 \\058\000\101\003\059\000\101\003\000\000\
14199 \\001\000\002\000\093\003\003\000\086\001\008\000\093\003\011\000\093\003\
14200 \\013\000\093\003\017\000\093\003\018\000\093\003\020\000\093\003\
14201 \\021\000\093\003\024\000\093\003\029\000\093\003\030\000\093\003\
14202 \\042\000\093\003\051\000\093\003\055\000\093\003\057\000\093\003\
14203 \\058\000\086\003\000\000\
14204 \\001\000\002\000\093\003\003\000\077\002\008\000\093\003\011\000\093\003\
14205 \\013\000\093\003\017\000\093\003\018\000\093\003\020\000\093\003\
14206 \\021\000\093\003\024\000\093\003\029\000\093\003\030\000\093\003\
14207 \\042\000\093\003\051\000\093\003\055\000\093\003\057\000\093\003\
14208 \\058\000\101\003\000\000\
14209 \\001\000\002\000\164\003\003\000\032\002\008\000\164\003\011\000\164\003\
14210 \\013\000\164\003\017\000\164\003\018\000\164\003\020\000\164\003\
14211 \\021\000\164\003\024\000\164\003\029\000\164\003\030\000\164\003\
14212 \\041\000\056\003\042\000\164\003\051\000\164\003\055\000\164\003\
14213 \\057\000\164\003\059\000\056\003\000\000\
14214 \\001\000\002\000\164\003\003\000\032\002\008\000\164\003\011\000\164\003\
14215 \\013\000\164\003\017\000\164\003\018\000\164\003\020\000\164\003\
14216 \\021\000\164\003\024\000\164\003\029\000\164\003\030\000\164\003\
14217 \\041\000\086\003\042\000\164\003\051\000\164\003\055\000\164\003\
14218 \\057\000\164\003\058\000\086\003\059\000\086\003\000\000\
14219 \\001\000\002\000\164\003\003\000\108\002\008\000\164\003\011\000\164\003\
14220 \\013\000\164\003\017\000\164\003\018\000\164\003\020\000\164\003\
14221 \\021\000\164\003\024\000\164\003\029\000\164\003\030\000\164\003\
14222 \\041\000\101\003\042\000\164\003\051\000\164\003\055\000\164\003\
14223 \\057\000\164\003\058\000\101\003\059\000\101\003\000\000\
14224 \\001\000\002\000\049\000\006\000\048\000\008\000\047\000\011\000\046\000\
14225 \\012\000\045\000\013\000\044\000\015\000\043\000\017\000\042\000\
14226 \\018\000\041\000\019\000\040\000\020\000\039\000\021\000\038\000\
14227 \\023\000\037\000\024\000\036\000\026\000\035\000\029\000\034\000\
14228 \\030\000\033\000\033\000\032\000\034\000\031\000\036\000\030\000\
14229 \\038\000\029\000\042\000\174\003\046\000\151\002\049\000\028\000\
14230 \\051\000\027\000\055\000\026\000\057\000\025\000\060\000\024\000\
14231 \\061\000\023\000\062\000\022\000\063\000\021\000\064\000\020\000\
14232 \\065\000\019\000\066\000\018\000\067\000\017\000\068\000\151\002\
14233 \\069\000\151\002\070\000\151\002\073\000\151\002\000\000\
14234 \\001\000\003\000\005\002\008\000\152\003\010\000\152\003\011\000\152\003\
14235 \\029\000\152\003\030\000\152\003\035\000\152\003\050\000\152\003\
14236 \\052\000\152\003\053\000\152\003\057\000\152\003\058\000\086\003\000\000\
14237 \\001\000\003\000\101\002\008\000\152\003\010\000\152\003\011\000\152\003\
14238 \\029\000\152\003\030\000\152\003\035\000\152\003\050\000\152\003\
14239 \\052\000\152\003\053\000\152\003\057\000\152\003\058\000\101\003\000\000\
14240 \\001\000\004\000\059\000\007\000\183\000\014\000\058\000\025\000\057\000\
14241 \\041\000\056\000\000\000\
14242 \\001\000\004\000\059\000\009\000\131\001\014\000\058\000\025\000\057\000\
14243 \\041\000\056\000\000\000\
14244 \\001\000\004\000\059\000\014\000\058\000\022\000\242\000\025\000\057\000\
14245 \\041\000\056\000\000\000\
14246 \\001\000\004\000\059\000\014\000\058\000\025\000\057\000\028\000\224\000\
14247 \\041\000\056\000\000\000\
14248 \\001\000\004\000\059\000\014\000\058\000\025\000\057\000\035\000\180\000\
14249 \\040\000\179\000\041\000\056\000\042\000\178\000\000\000\
14250 \\001\000\004\000\059\000\014\000\058\000\025\000\057\000\041\000\056\000\
14251 \\042\000\055\000\000\000\
14252 \\001\000\005\000\133\002\039\000\133\002\040\000\133\002\041\000\133\002\
14253 \\046\000\126\002\000\000\
14254 \\001\000\005\000\134\002\039\000\134\002\040\000\134\002\041\000\134\002\
14255 \\046\000\127\002\000\000\
14256 \\001\000\005\000\135\002\039\000\135\002\040\000\135\002\041\000\135\002\
14257 \\046\000\128\002\000\000\
14258 \\001\000\005\000\012\003\035\000\029\003\037\000\029\003\039\000\029\003\
14259 \\040\000\029\003\041\000\186\000\046\000\029\003\047\000\029\003\000\000\
14260 \\001\000\005\000\013\003\023\000\144\002\034\000\144\002\035\000\144\002\
14261 \\036\000\144\002\037\000\144\002\038\000\144\002\039\000\144\002\
14262 \\040\000\144\002\041\000\031\001\044\000\144\002\046\000\144\002\
14263 \\047\000\144\002\060\000\144\002\061\000\144\002\062\000\144\002\
14264 \\063\000\144\002\064\000\144\002\065\000\144\002\066\000\144\002\
14265 \\067\000\144\002\068\000\144\002\069\000\144\002\070\000\144\002\
14266 \\073\000\144\002\000\000\
14267 \\001\000\005\000\118\001\000\000\
14268 \\001\000\006\000\048\000\012\000\045\000\015\000\043\000\019\000\040\000\
14269 \\023\000\037\000\026\000\035\000\033\000\032\000\034\000\031\000\
14270 \\036\000\030\000\037\000\163\002\038\000\029\000\046\000\151\002\
14271 \\049\000\028\000\060\000\024\000\061\000\023\000\062\000\022\000\
14272 \\063\000\021\000\064\000\020\000\065\000\019\000\066\000\018\000\
14273 \\067\000\017\000\068\000\151\002\069\000\151\002\070\000\151\002\
14274 \\073\000\151\002\000\000\
14275 \\001\000\008\000\233\001\068\000\067\000\069\000\066\000\070\000\065\000\000\000\
14276 \\001\000\010\000\157\001\000\000\
14277 \\001\000\010\000\198\001\000\000\
14278 \\001\000\010\000\238\001\000\000\
14279 \\001\000\010\000\020\002\000\000\
14280 \\001\000\010\000\027\002\000\000\
14281 \\001\000\010\000\070\002\000\000\
14282 \\001\000\010\000\072\002\000\000\
14283 \\001\000\016\000\045\001\000\000\
14284 \\001\000\016\000\047\001\000\000\
14285 \\001\000\016\000\190\001\000\000\
14286 \\001\000\016\000\251\001\000\000\
14287 \\001\000\019\000\081\001\056\000\080\001\068\000\079\001\073\000\118\000\000\000\
14288 \\001\000\023\000\037\000\034\000\142\000\035\000\018\003\036\000\107\000\
14289 \\037\000\018\003\038\000\106\000\039\000\018\003\040\000\018\003\
14290 \\044\000\105\000\046\000\018\003\047\000\018\003\060\000\024\000\
14291 \\061\000\023\000\062\000\022\000\063\000\021\000\064\000\020\000\
14292 \\065\000\019\000\066\000\018\000\067\000\017\000\068\000\151\002\
14293 \\069\000\151\002\070\000\151\002\073\000\151\002\000\000\
14294 \\001\000\023\000\037\000\034\000\142\000\035\000\026\003\036\000\107\000\
14295 \\037\000\026\003\038\000\106\000\039\000\026\003\040\000\026\003\
14296 \\041\000\026\003\044\000\105\000\046\000\026\003\047\000\026\003\
14297 \\060\000\024\000\061\000\023\000\062\000\022\000\063\000\021\000\
14298 \\064\000\020\000\065\000\019\000\066\000\018\000\067\000\017\000\
14299 \\068\000\151\002\069\000\151\002\070\000\151\002\073\000\151\002\000\000\
14300 \\001\000\023\000\037\000\034\000\142\000\036\000\107\000\037\000\003\003\
14301 \\038\000\106\000\044\000\105\000\060\000\024\000\061\000\023\000\
14302 \\062\000\022\000\063\000\021\000\064\000\020\000\065\000\019\000\
14303 \\066\000\018\000\067\000\017\000\068\000\151\002\069\000\151\002\
14304 \\070\000\151\002\073\000\151\002\000\000\
14305 \\001\000\029\000\096\001\068\000\071\000\073\000\118\000\000\000\
14306 \\001\000\029\000\155\001\000\000\
14307 \\001\000\029\000\160\001\000\000\
14308 \\001\000\029\000\160\001\068\000\074\000\000\000\
14309 \\001\000\029\000\162\001\068\000\071\000\073\000\118\000\000\000\
14310 \\001\000\029\000\024\002\000\000\
14311 \\001\000\029\000\024\002\068\000\071\000\000\000\
14312 \\001\000\029\000\040\002\000\000\
14313 \\001\000\029\000\040\002\068\000\071\000\000\000\
14314 \\001\000\029\000\088\002\000\000\
14315 \\001\000\029\000\088\002\068\000\077\000\000\000\
14316 \\001\000\031\000\066\001\000\000\
14317 \\001\000\034\000\113\000\068\000\150\000\069\000\149\000\071\000\104\000\000\000\
14318 \\001\000\034\000\173\000\000\000\
14319 \\001\000\034\000\151\001\000\000\
14320 \\001\000\035\000\181\000\000\000\
14321 \\001\000\035\000\182\000\000\000\
14322 \\001\000\035\000\038\001\000\000\
14323 \\001\000\035\000\040\001\040\000\039\001\000\000\
14324 \\001\000\035\000\041\001\000\000\
14325 \\001\000\035\000\071\001\000\000\
14326 \\001\000\035\000\073\001\040\000\072\001\000\000\
14327 \\001\000\035\000\090\001\000\000\
14328 \\001\000\035\000\217\001\058\000\082\001\000\000\
14329 \\001\000\035\000\246\001\000\000\
14330 \\001\000\035\000\249\001\041\000\248\001\059\000\247\001\000\000\
14331 \\001\000\037\000\177\000\000\000\
14332 \\001\000\037\000\037\001\000\000\
14333 \\001\000\039\000\174\000\000\000\
14334 \\001\000\039\000\033\001\000\000\
14335 \\001\000\039\000\069\001\000\000\
14336 \\001\000\041\000\070\001\000\000\
14337 \\001\000\041\000\091\001\000\000\
14338 \\001\000\041\000\150\001\059\000\149\001\000\000\
14339 \\001\000\041\000\166\001\000\000\
14340 \\001\000\041\000\173\001\000\000\
14341 \\001\000\041\000\034\002\059\000\033\002\000\000\
14342 \\001\000\042\000\050\000\000\000\
14343 \\001\000\043\000\200\000\061\000\083\000\062\000\082\000\068\000\199\000\
14344 \\069\000\198\000\070\000\197\000\000\000\
14345 \\001\000\046\000\068\000\068\000\067\000\069\000\066\000\070\000\065\000\
14346 \\073\000\064\000\000\000\
14347 \\001\000\046\000\122\000\068\000\067\000\069\000\066\000\070\000\065\000\000\000\
14348 \\001\000\046\000\172\000\000\000\
14349 \\001\000\046\000\175\000\000\000\
14350 \\001\000\046\000\187\000\000\000\
14351 \\001\000\046\000\241\000\000\000\
14352 \\001\000\046\000\255\000\000\000\
14353 \\001\000\046\000\035\001\000\000\
14354 \\001\000\046\000\043\001\000\000\
14355 \\001\000\046\000\050\001\000\000\
14356 \\001\000\046\000\059\001\000\000\
14357 \\001\000\046\000\065\001\000\000\
14358 \\001\000\046\000\083\001\058\000\082\001\000\000\
14359 \\001\000\046\000\167\001\000\000\
14360 \\001\000\046\000\177\001\000\000\
14361 \\001\000\046\000\215\001\000\000\
14362 \\001\000\046\000\223\001\000\000\
14363 \\001\000\046\000\227\001\000\000\
14364 \\001\000\046\000\230\001\000\000\
14365 \\001\000\046\000\001\002\058\000\082\001\000\000\
14366 \\001\000\046\000\029\002\000\000\
14367 \\001\000\046\000\030\002\000\000\
14368 \\001\000\046\000\036\002\000\000\
14369 \\001\000\046\000\063\002\058\000\082\001\000\000\
14370 \\001\000\046\000\083\002\000\000\
14371 \\001\000\046\000\084\002\000\000\
14372 \\001\000\046\000\089\002\000\000\
14373 \\001\000\046\000\103\002\000\000\
14374 \\001\000\047\000\233\000\000\000\
14375 \\001\000\054\000\003\001\068\000\074\000\000\000\
14376 \\001\000\058\000\087\001\000\000\
14377 \\001\000\058\000\006\002\000\000\
14378 \\001\000\061\000\083\000\062\000\082\000\068\000\081\000\069\000\080\000\
14379 \\070\000\079\000\000\000\
14380 \\001\000\068\000\067\000\069\000\066\000\070\000\065\000\000\000\
14381 \\001\000\068\000\067\000\069\000\066\000\070\000\065\000\073\000\064\000\000\000\
14382 \\001\000\068\000\067\000\069\000\066\000\070\000\065\000\073\000\192\000\000\000\
14383 \\001\000\068\000\071\000\000\000\
14384 \\001\000\068\000\071\000\073\000\118\000\000\000\
14385 \\001\000\068\000\074\000\000\000\
14386 \\001\000\068\000\077\000\000\000\
14387 \\001\000\068\000\150\000\069\000\149\000\000\000\
14388 \\001\000\068\000\150\000\069\000\149\000\073\000\247\000\000\000\
14389 \\001\000\071\000\104\000\000\000\
14393 \\113\002\041\000\248\001\059\000\247\001\000\000\
14426 \\145\002\041\000\186\000\000\000\
14432 \\151\002\006\000\048\000\012\000\045\000\015\000\043\000\019\000\040\000\
14433 \\023\000\037\000\026\000\035\000\033\000\032\000\034\000\031\000\
14434 \\035\000\093\000\036\000\030\000\038\000\029\000\049\000\028\000\
14435 \\060\000\024\000\061\000\023\000\062\000\022\000\063\000\021\000\
14436 \\064\000\020\000\065\000\019\000\066\000\018\000\067\000\017\000\000\000\
14437 \\151\002\006\000\048\000\012\000\045\000\015\000\043\000\019\000\040\000\
14438 \\023\000\037\000\026\000\035\000\033\000\032\000\034\000\031\000\
14439 \\036\000\030\000\038\000\029\000\049\000\028\000\060\000\024\000\
14440 \\061\000\023\000\062\000\022\000\063\000\021\000\064\000\020\000\
14441 \\065\000\019\000\066\000\018\000\067\000\017\000\000\000\
14442 \\151\002\008\000\063\001\023\000\037\000\000\000\
14443 \\151\002\023\000\037\000\000\000\
14444 \\151\002\023\000\037\000\027\000\109\000\034\000\108\000\036\000\107\000\
14445 \\038\000\106\000\044\000\105\000\060\000\024\000\061\000\023\000\
14446 \\062\000\022\000\063\000\021\000\064\000\020\000\065\000\019\000\
14447 \\066\000\018\000\067\000\017\000\071\000\104\000\000\000\
14448 \\151\002\023\000\037\000\027\000\109\000\034\000\142\000\036\000\107\000\
14449 \\038\000\106\000\044\000\105\000\060\000\024\000\061\000\023\000\
14450 \\062\000\022\000\063\000\021\000\064\000\020\000\065\000\019\000\
14451 \\066\000\018\000\067\000\017\000\000\000\
14452 \\151\002\023\000\037\000\034\000\108\000\036\000\107\000\038\000\106\000\
14453 \\044\000\105\000\060\000\024\000\061\000\023\000\062\000\022\000\
14454 \\063\000\021\000\064\000\020\000\065\000\019\000\066\000\018\000\
14455 \\067\000\017\000\071\000\104\000\000\000\
14456 \\151\002\023\000\037\000\034\000\142\000\035\000\208\000\036\000\107\000\
14457 \\038\000\106\000\044\000\105\000\060\000\024\000\061\000\023\000\
14458 \\062\000\022\000\063\000\021\000\064\000\020\000\065\000\019\000\
14459 \\066\000\018\000\067\000\017\000\000\000\
14460 \\151\002\023\000\037\000\034\000\142\000\035\000\208\000\036\000\107\000\
14461 \\038\000\106\000\044\000\105\000\060\000\024\000\061\000\023\000\
14462 \\062\000\022\000\063\000\021\000\064\000\020\000\065\000\019\000\
14463 \\066\000\018\000\067\000\017\000\071\000\104\000\000\000\
14464 \\151\002\023\000\037\000\034\000\142\000\036\000\107\000\038\000\106\000\
14465 \\044\000\105\000\060\000\024\000\061\000\023\000\062\000\022\000\
14466 \\063\000\021\000\064\000\020\000\065\000\019\000\066\000\018\000\
14467 \\067\000\017\000\000\000\
14480 \\165\002\004\000\059\000\014\000\058\000\025\000\057\000\040\000\176\000\
14481 \\041\000\056\000\000\000\
14484 \\168\002\004\000\059\000\014\000\058\000\025\000\057\000\041\000\056\000\
14485 \\042\000\188\001\000\000\
14487 \\170\002\004\000\059\000\014\000\058\000\025\000\057\000\041\000\056\000\
14488 \\042\000\178\000\000\000\
14491 \\173\002\004\000\059\000\014\000\058\000\025\000\057\000\040\000\114\001\
14492 \\041\000\056\000\000\000\
14494 \\175\002\061\000\083\000\062\000\082\000\068\000\081\000\069\000\080\000\
14495 \\070\000\079\000\000\000\
14500 \\181\002\004\000\059\000\041\000\056\000\000\000\
14501 \\182\002\004\000\059\000\025\000\057\000\041\000\056\000\000\000\
14503 \\184\002\004\000\059\000\014\000\058\000\025\000\057\000\041\000\056\000\000\000\
14504 \\185\002\004\000\059\000\014\000\058\000\025\000\057\000\041\000\056\000\000\000\
14505 \\186\002\004\000\059\000\014\000\058\000\025\000\057\000\041\000\056\000\000\000\
14510 \\191\002\045\000\235\000\000\000\
14511 \\192\002\004\000\059\000\014\000\058\000\025\000\057\000\041\000\056\000\000\000\
14512 \\193\002\002\000\049\000\008\000\047\000\011\000\046\000\013\000\044\000\
14513 \\017\000\042\000\018\000\041\000\020\000\221\000\021\000\038\000\
14514 \\024\000\036\000\029\000\034\000\030\000\033\000\042\000\220\000\000\000\
14515 \\194\002\002\000\049\000\008\000\047\000\011\000\046\000\013\000\044\000\
14516 \\017\000\042\000\018\000\041\000\020\000\221\000\021\000\038\000\
14517 \\024\000\036\000\029\000\034\000\030\000\033\000\042\000\220\000\000\000\
14520 \\197\002\002\000\049\000\008\000\047\000\011\000\046\000\013\000\044\000\
14521 \\017\000\042\000\018\000\041\000\020\000\221\000\021\000\038\000\
14522 \\024\000\036\000\029\000\034\000\030\000\033\000\000\000\
14539 \\214\002\032\000\239\000\000\000\
14541 \\216\002\046\000\122\000\068\000\067\000\069\000\066\000\070\000\065\000\000\000\
14543 \\218\002\068\000\071\000\073\000\118\000\000\000\
14545 \\220\002\060\000\128\000\061\000\127\000\000\000\
14549 \\224\002\003\000\117\001\004\000\059\000\014\000\058\000\025\000\057\000\
14550 \\041\000\056\000\000\000\
14553 \\227\002\003\000\232\000\000\000\
14556 \\230\002\045\000\230\000\000\000\
14557 \\231\002\004\000\059\000\014\000\058\000\025\000\057\000\041\000\056\000\000\000\
14560 \\234\002\003\000\186\001\000\000\
14565 \\239\002\003\000\139\001\000\000\
14568 \\242\002\045\000\242\001\000\000\
14570 \\244\002\022\000\058\001\000\000\
14571 \\244\002\022\000\058\001\046\000\057\001\000\000\
14575 \\248\002\003\000\134\001\000\000\
14577 \\249\002\041\000\186\000\000\000\
14588 \\005\003\040\000\036\001\000\000\
14594 \\011\003\040\000\182\001\000\000\
14596 \\013\003\041\000\227\000\000\000\
14598 \\015\003\005\000\121\001\000\000\
14600 \\017\003\043\000\200\000\061\000\083\000\062\000\082\000\068\000\199\000\
14601 \\069\000\198\000\070\000\197\000\000\000\
14602 \\019\003\041\000\186\000\000\000\
14611 \\029\003\041\000\186\000\000\000\
14612 \\030\003\048\000\249\000\000\000\
14623 \\042\003\040\000\200\001\000\000\
14625 \\044\003\061\000\083\000\062\000\082\000\068\000\081\000\069\000\080\000\
14626 \\070\000\079\000\000\000\
14627 \\046\003\034\000\165\000\038\000\164\000\071\000\104\000\000\000\
14630 \\049\003\040\000\072\001\000\000\
14632 \\051\003\034\000\113\000\071\000\104\000\000\000\
14636 \\055\003\040\000\042\001\000\000\
14638 \\057\003\058\000\082\001\000\000\
14639 \\057\003\058\000\245\001\000\000\
14640 \\057\003\058\000\079\002\000\000\
14641 \\058\003\058\000\082\001\000\000\
14642 \\058\003\058\000\245\001\000\000\
14643 \\058\003\058\000\079\002\000\000\
14649 \\064\003\002\000\049\000\008\000\047\000\011\000\046\000\013\000\044\000\
14650 \\017\000\042\000\018\000\041\000\020\000\039\000\021\000\038\000\
14651 \\024\000\036\000\029\000\034\000\030\000\033\000\042\000\216\000\
14652 \\057\000\025\000\000\000\
14653 \\065\003\002\000\049\000\008\000\047\000\011\000\046\000\013\000\044\000\
14654 \\017\000\042\000\018\000\041\000\019\000\081\001\020\000\039\000\
14655 \\021\000\038\000\024\000\036\000\029\000\034\000\030\000\033\000\
14656 \\042\000\216\000\056\000\080\001\057\000\025\000\068\000\079\001\
14657 \\073\000\118\000\000\000\
14658 \\065\003\002\000\049\000\008\000\047\000\011\000\046\000\013\000\044\000\
14659 \\017\000\042\000\018\000\041\000\020\000\039\000\021\000\038\000\
14660 \\024\000\036\000\029\000\034\000\030\000\033\000\042\000\216\000\
14661 \\057\000\025\000\000\000\
14663 \\067\003\002\000\049\000\008\000\047\000\011\000\046\000\013\000\044\000\
14664 \\017\000\042\000\018\000\041\000\020\000\039\000\021\000\038\000\
14665 \\024\000\036\000\029\000\034\000\030\000\033\000\057\000\025\000\000\000\
14681 \\084\003\058\000\082\001\000\000\
14682 \\085\003\041\000\171\000\059\000\170\000\000\000\
14683 \\085\003\041\000\171\000\059\000\164\001\000\000\
14684 \\085\003\041\000\171\000\059\000\003\002\000\000\
14689 \\089\003\068\000\074\000\000\000\
14700 \\101\003\003\000\074\002\000\000\
14701 \\102\003\008\000\020\001\011\000\019\001\029\000\018\001\030\000\017\001\
14702 \\050\000\015\001\052\000\014\001\053\000\089\001\057\000\012\001\000\000\
14703 \\103\003\008\000\020\001\011\000\019\001\029\000\018\001\030\000\017\001\
14704 \\042\000\016\001\050\000\015\001\052\000\014\001\053\000\013\001\
14705 \\057\000\012\001\000\000\
14706 \\103\003\008\000\020\001\011\000\019\001\029\000\018\001\030\000\017\001\
14707 \\042\000\016\001\050\000\015\001\052\000\014\001\053\000\013\001\
14708 \\057\000\012\001\068\000\071\000\000\000\
14725 \\120\003\058\000\082\001\000\000\
14728 \\123\003\068\000\074\000\000\000\
14730 \\125\003\046\000\042\002\000\000\
14733 \\128\003\046\000\007\002\000\000\
14737 \\132\003\003\000\012\002\000\000\
14740 \\135\003\003\000\225\001\000\000\
14741 \\135\003\003\000\225\001\046\000\227\001\000\000\
14744 \\138\003\003\000\045\002\000\000\
14749 \\143\003\003\000\017\002\000\000\
14752 \\146\003\045\000\050\002\000\000\
14755 \\149\003\003\000\229\001\000\000\
14782 \\179\003\002\000\049\000\008\000\047\000\011\000\046\000\013\000\044\000\
14783 \\017\000\042\000\018\000\041\000\020\000\039\000\021\000\038\000\
14784 \\024\000\036\000\029\000\034\000\030\000\033\000\051\000\027\000\
14785 \\055\000\026\000\057\000\025\000\000\000\
14791 val actionRowNumbers =
14792 "\127\000\013\000\207\001\201\001\
14793 \\082\000\206\001\206\001\206\001\
14794 \\096\001\021\000\204\000\003\000\
14795 \\202\000\084\000\179\000\139\000\
14796 \\138\000\140\000\137\000\136\000\
14797 \\135\000\134\000\133\000\120\000\
14798 \\122\000\123\000\116\000\201\000\
14799 \\028\000\169\000\170\000\173\000\
14800 \\073\001\170\000\121\000\168\000\
14801 \\085\000\128\000\128\000\245\000\
14802 \\245\000\170\000\175\000\178\000\
14803 \\172\000\057\000\170\000\073\001\
14804 \\001\000\204\001\205\001\203\001\
14805 \\202\001\001\000\068\001\170\000\
14806 \\178\000\170\000\203\000\159\000\
14807 \\180\000\161\000\162\000\152\000\
14808 \\151\000\150\000\160\000\097\001\
14809 \\111\001\156\000\119\001\086\000\
14810 \\157\000\187\001\058\000\158\000\
14811 \\182\000\145\000\144\000\143\000\
14812 \\147\000\146\000\073\000\200\000\
14813 \\087\000\191\000\189\000\071\000\
14814 \\020\000\060\000\061\000\183\000\
14815 \\016\000\174\000\044\001\088\000\
14816 \\020\001\042\000\224\000\119\000\
14817 \\074\001\023\001\155\000\022\001\
14818 \\043\001\044\000\177\000\174\000\
14819 \\072\001\124\000\228\000\126\000\
14820 \\209\000\234\000\243\000\166\000\
14821 \\167\000\237\000\148\000\241\000\
14822 \\149\000\092\001\219\000\085\000\
14823 \\244\000\142\000\141\000\085\000\
14824 \\019\000\178\000\039\001\019\001\
14825 \\043\000\255\000\252\000\226\000\
14826 \\118\000\112\000\216\000\213\000\
14827 \\176\000\233\000\117\000\124\000\
14828 \\239\000\239\000\089\000\154\000\
14829 \\153\000\018\000\124\000\239\000\
14830 \\208\001\210\001\209\001\125\000\
14831 \\058\001\004\000\056\001\054\001\
14832 \\205\000\060\001\067\001\068\001\
14833 \\207\000\208\000\206\000\090\000\
14834 \\113\000\113\000\113\000\132\001\
14835 \\181\000\170\000\170\000\185\000\
14836 \\170\000\170\000\188\000\186\000\
14837 \\184\000\170\000\225\000\046\001\
14838 \\068\001\170\000\045\001\051\001\
14839 \\021\001\026\000\163\000\074\000\
14840 \\042\001\039\001\091\000\024\000\
14841 \\023\000\022\000\033\001\031\001\
14842 \\029\001\072\000\062\000\063\000\
14843 \\064\000\077\001\025\001\247\000\
14844 \\092\000\242\000\240\000\093\001\
14845 \\090\001\037\000\095\001\220\000\
14846 \\218\000\038\000\223\000\128\000\
14847 \\236\000\235\000\170\000\227\000\
14848 \\093\000\068\001\050\001\253\000\
14849 \\178\000\250\000\178\000\170\000\
14850 \\214\000\178\000\014\001\094\000\
14851 \\230\000\073\001\229\000\171\000\
14852 \\178\000\095\000\056\000\059\001\
14853 \\164\000\165\000\068\001\068\001\
14854 \\075\000\066\001\076\000\065\000\
14855 \\066\000\041\000\114\001\096\000\
14856 \\117\001\131\001\110\001\120\001\
14857 \\008\000\114\000\133\001\130\001\
14858 \\067\000\077\000\120\000\045\000\
14859 \\113\000\073\001\135\001\117\000\
14860 \\073\001\117\000\057\000\199\000\
14861 \\190\000\196\000\195\000\192\000\
14862 \\211\000\053\001\249\000\047\001\
14863 \\027\000\068\001\048\001\024\001\
14864 \\041\001\178\000\178\000\027\001\
14865 \\075\001\178\000\028\001\026\001\
14866 \\126\000\068\001\094\001\131\000\
14867 \\222\000\170\000\219\000\017\000\
14868 \\170\000\038\001\254\000\251\000\
14869 \\217\000\215\000\018\001\172\000\
14870 \\068\001\172\000\238\000\008\001\
14871 \\117\000\125\000\212\000\172\000\
14872 \\219\000\057\001\055\001\061\001\
14873 \\068\001\069\001\068\001\062\001\
14874 \\099\001\005\000\078\000\086\001\
14875 \\059\000\002\000\128\000\128\000\
14876 \\046\000\041\000\030\000\122\001\
14877 \\122\000\047\000\134\001\049\000\
14878 \\112\001\113\000\148\001\079\000\
14879 \\138\001\097\000\125\000\150\001\
14880 \\149\001\118\001\142\001\124\000\
14881 \\140\001\080\000\143\001\141\001\
14882 \\124\000\147\001\013\001\145\001\
14883 \\144\001\124\000\098\000\197\000\
14884 \\116\000\052\001\246\000\174\000\
14885 \\178\000\025\000\037\001\178\000\
14886 \\037\001\030\001\032\001\076\001\
14887 \\003\001\092\001\194\000\129\000\
14888 \\039\000\170\000\000\001\015\001\
14889 \\172\000\084\000\012\001\008\001\
14890 \\005\001\073\001\013\001\231\000\
14891 \\008\001\031\000\065\001\070\001\
14892 \\071\001\102\001\120\000\113\000\
14893 \\113\000\091\001\092\001\092\001\
14894 \\115\001\073\001\100\001\116\001\
14895 \\121\001\123\001\073\001\139\001\
14896 \\125\000\099\000\113\000\068\000\
14897 \\113\000\121\000\136\001\100\000\
14898 \\151\001\152\001\164\001\068\001\
14899 \\165\001\179\001\102\000\029\000\
14900 \\198\000\248\000\049\001\035\001\
14901 \\083\000\040\001\034\001\001\001\
14902 \\073\001\132\000\170\000\032\000\
14903 \\131\000\210\000\017\001\018\001\
14904 \\006\001\007\001\011\001\004\001\
14905 \\232\000\063\001\116\000\101\001\
14906 \\006\000\083\001\104\001\080\001\
14907 \\103\001\069\000\078\001\070\000\
14908 \\129\000\040\000\125\000\125\000\
14909 \\137\001\041\000\103\000\113\001\
14910 \\180\001\014\000\115\000\158\001\
14911 \\157\001\125\000\162\001\073\001\
14912 \\161\001\068\001\177\001\117\000\
14913 \\117\000\173\001\013\001\125\000\
14914 \\036\001\002\001\033\000\193\000\
14915 \\187\000\219\000\016\001\009\001\
14916 \\172\000\064\001\105\001\050\000\
14917 \\088\001\113\000\113\000\087\001\
14918 \\034\000\041\000\104\000\105\000\
14919 \\190\001\010\000\081\000\041\000\
14920 \\106\000\113\000\182\001\120\000\
14921 \\052\000\121\000\155\001\154\001\
14922 \\163\001\159\001\117\000\168\001\
14923 \\178\001\173\001\170\001\073\001\
14924 \\176\001\146\001\098\001\132\000\
14925 \\010\001\106\001\073\001\082\001\
14926 \\079\001\085\001\130\000\068\001\
14927 \\068\001\193\001\123\000\113\000\
14928 \\113\000\191\001\041\000\107\000\
14929 \\181\001\183\001\073\001\156\001\
14930 \\125\000\160\001\166\001\073\001\
14931 \\171\001\172\001\124\000\174\001\
14932 \\117\000\035\000\125\000\036\000\
14933 \\129\001\009\000\192\001\195\001\
14934 \\011\000\084\001\194\001\081\001\
14935 \\188\001\041\000\125\000\153\001\
14936 \\167\001\124\000\108\000\175\001\
14937 \\221\000\109\000\089\001\127\001\
14938 \\046\000\124\001\125\001\048\000\
14939 \\196\001\054\000\189\001\110\000\
14940 \\101\000\117\000\068\001\128\001\
14941 \\126\001\197\001\073\001\068\001\
14942 \\173\001\007\000\125\000\015\000\
14943 \\169\001\107\001\108\001\051\000\
14944 \\111\000\184\001\185\001\053\000\
14945 \\109\001\068\001\186\001\012\000\
14946 \\198\001\199\001\055\000\200\001\
14950 \\142\000\108\002\145\000\001\000\000\000\
14951 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
14952 \\026\000\010\000\027\000\009\000\033\000\008\000\087\000\007\000\
14953 \\097\000\006\000\132\000\005\000\139\000\004\000\140\000\003\000\
14954 \\143\000\002\000\000\000\
14958 \\033\000\008\000\087\000\007\000\097\000\006\000\132\000\005\000\
14959 \\140\000\050\000\141\000\049\000\000\000\
14960 \\033\000\008\000\087\000\007\000\097\000\006\000\132\000\005\000\
14961 \\140\000\050\000\141\000\051\000\000\000\
14962 \\033\000\008\000\087\000\007\000\097\000\006\000\132\000\005\000\
14963 \\140\000\050\000\141\000\052\000\000\000\
14967 \\001\000\014\000\015\000\013\000\016\000\058\000\000\000\
14969 \\005\000\061\000\011\000\060\000\012\000\059\000\000\000\
14979 \\008\000\068\000\088\000\067\000\000\000\
14980 \\009\000\071\000\098\000\070\000\000\000\
14981 \\010\000\074\000\133\000\073\000\000\000\
14982 \\003\000\076\000\000\000\
14983 \\003\000\084\000\022\000\083\000\023\000\082\000\000\000\
14984 \\001\000\014\000\015\000\013\000\016\000\012\000\017\000\087\000\
14985 \\018\000\086\000\025\000\011\000\026\000\010\000\027\000\085\000\000\000\
14986 \\001\000\014\000\015\000\013\000\016\000\012\000\019\000\090\000\
14987 \\021\000\089\000\025\000\011\000\026\000\010\000\027\000\088\000\000\000\
14988 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
14989 \\026\000\010\000\027\000\092\000\000\000\
14990 \\001\000\101\000\007\000\100\000\015\000\099\000\038\000\098\000\
14991 \\056\000\097\000\057\000\096\000\066\000\095\000\068\000\094\000\
14992 \\081\000\093\000\000\000\
14993 \\007\000\100\000\045\000\110\000\080\000\109\000\081\000\108\000\000\000\
14994 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
14995 \\026\000\010\000\027\000\112\000\000\000\
14996 \\008\000\115\000\014\000\114\000\036\000\113\000\000\000\
14998 \\004\000\119\000\005\000\118\000\035\000\117\000\000\000\
14999 \\146\000\121\000\000\000\
15000 \\146\000\122\000\000\000\
15001 \\002\000\124\000\037\000\123\000\000\000\
15002 \\002\000\124\000\037\000\127\000\000\000\
15003 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15004 \\026\000\010\000\027\000\128\000\000\000\
15005 \\001\000\101\000\007\000\100\000\015\000\136\000\040\000\135\000\
15006 \\042\000\134\000\044\000\133\000\056\000\132\000\057\000\131\000\
15007 \\067\000\130\000\081\000\129\000\000\000\
15008 \\001\000\101\000\015\000\099\000\028\000\139\000\030\000\138\000\
15009 \\056\000\097\000\057\000\096\000\066\000\137\000\068\000\094\000\000\000\
15010 \\015\000\142\000\054\000\141\000\000\000\
15011 \\006\000\146\000\007\000\100\000\048\000\145\000\049\000\144\000\
15012 \\081\000\143\000\000\000\
15013 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15014 \\026\000\010\000\027\000\149\000\000\000\
15015 \\007\000\100\000\047\000\151\000\080\000\150\000\081\000\108\000\000\000\
15016 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15017 \\026\000\010\000\027\000\009\000\033\000\008\000\087\000\007\000\
15018 \\097\000\006\000\132\000\005\000\139\000\004\000\140\000\003\000\
15019 \\143\000\153\000\144\000\152\000\000\000\
15024 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15025 \\026\000\010\000\027\000\009\000\033\000\008\000\087\000\007\000\
15026 \\097\000\006\000\132\000\005\000\139\000\004\000\140\000\003\000\
15027 \\143\000\153\000\144\000\154\000\000\000\
15028 \\007\000\161\000\070\000\160\000\071\000\159\000\072\000\158\000\
15029 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15030 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15031 \\026\000\010\000\027\000\164\000\000\000\
15032 \\001\000\101\000\015\000\099\000\028\000\165\000\030\000\138\000\
15033 \\056\000\097\000\057\000\096\000\066\000\137\000\068\000\094\000\000\000\
15034 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15035 \\026\000\010\000\027\000\166\000\000\000\
15046 \\094\000\167\000\000\000\
15071 \\001\000\101\000\015\000\099\000\038\000\182\000\056\000\097\000\
15072 \\057\000\096\000\066\000\095\000\068\000\094\000\000\000\
15073 \\069\000\183\000\000\000\
15075 \\069\000\186\000\000\000\
15076 \\001\000\101\000\015\000\136\000\056\000\132\000\057\000\131\000\
15077 \\067\000\187\000\000\000\
15079 \\005\000\189\000\012\000\188\000\000\000\
15084 \\003\000\194\000\005\000\193\000\061\000\192\000\062\000\191\000\000\000\
15085 \\001\000\101\000\015\000\099\000\056\000\097\000\057\000\096\000\
15086 \\058\000\201\000\059\000\200\000\066\000\199\000\068\000\094\000\000\000\
15087 \\001\000\101\000\007\000\205\000\015\000\099\000\056\000\097\000\
15088 \\057\000\096\000\060\000\204\000\066\000\203\000\068\000\094\000\
15089 \\082\000\202\000\000\000\
15090 \\001\000\101\000\015\000\099\000\038\000\207\000\056\000\097\000\
15091 \\057\000\096\000\066\000\095\000\068\000\094\000\000\000\
15093 \\006\000\208\000\000\000\
15095 \\007\000\205\000\082\000\202\000\000\000\
15098 \\008\000\115\000\014\000\114\000\036\000\209\000\000\000\
15103 \\004\000\119\000\005\000\118\000\035\000\210\000\000\000\
15105 \\033\000\008\000\085\000\213\000\086\000\212\000\087\000\211\000\000\000\
15106 \\031\000\217\000\032\000\216\000\033\000\215\000\000\000\
15107 \\004\000\119\000\005\000\118\000\035\000\220\000\000\000\
15111 \\004\000\119\000\005\000\118\000\035\000\221\000\000\000\
15113 \\001\000\101\000\015\000\136\000\040\000\223\000\042\000\134\000\
15114 \\044\000\133\000\056\000\132\000\057\000\131\000\067\000\130\000\000\000\
15115 \\064\000\224\000\000\000\
15117 \\001\000\101\000\015\000\136\000\056\000\132\000\057\000\131\000\
15118 \\067\000\226\000\000\000\
15119 \\043\000\227\000\000\000\
15120 \\041\000\229\000\000\000\
15122 \\005\000\061\000\012\000\188\000\000\000\
15124 \\029\000\232\000\000\000\
15126 \\001\000\101\000\015\000\099\000\056\000\097\000\057\000\096\000\
15127 \\060\000\204\000\066\000\203\000\068\000\094\000\000\000\
15129 \\005\000\234\000\000\000\
15130 \\006\000\235\000\000\000\
15131 \\034\000\236\000\000\000\
15132 \\034\000\238\000\000\000\
15137 \\006\000\241\000\000\000\
15138 \\034\000\242\000\000\000\
15142 \\006\000\244\000\013\000\243\000\000\000\
15149 \\003\000\250\000\075\000\249\000\076\000\248\000\000\000\
15150 \\007\000\161\000\070\000\252\000\071\000\159\000\072\000\158\000\
15151 \\073\000\157\000\074\000\156\000\078\000\155\000\079\000\251\000\000\000\
15156 \\009\000\000\001\095\000\255\000\096\000\254\000\000\000\
15157 \\009\000\000\001\095\000\002\001\096\000\254\000\000\000\
15158 \\009\000\000\001\095\000\005\001\096\000\004\001\100\000\003\001\000\000\
15159 \\008\000\009\001\105\000\008\001\106\000\007\001\107\000\006\001\000\000\
15161 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15162 \\026\000\010\000\027\000\019\001\000\000\
15163 \\001\000\014\000\015\000\013\000\016\000\012\000\018\000\020\001\
15164 \\025\000\011\000\026\000\010\000\027\000\085\000\000\000\
15166 \\001\000\014\000\015\000\013\000\016\000\012\000\021\000\022\001\
15167 \\025\000\011\000\026\000\010\000\027\000\021\001\000\000\
15168 \\001\000\014\000\015\000\013\000\016\000\012\000\018\000\023\001\
15169 \\025\000\011\000\026\000\010\000\027\000\085\000\000\000\
15173 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15174 \\026\000\010\000\027\000\024\001\000\000\
15177 \\007\000\161\000\070\000\025\001\071\000\159\000\072\000\158\000\
15178 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15179 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15180 \\026\000\010\000\027\000\026\001\000\000\
15184 \\064\000\028\001\069\000\027\001\000\000\
15185 \\069\000\030\001\000\000\
15188 \\064\000\032\001\000\000\
15207 \\033\000\008\000\086\000\042\001\087\000\211\000\000\000\
15211 \\032\000\044\001\033\000\215\000\000\000\
15214 \\146\000\046\001\000\000\
15217 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15218 \\026\000\010\000\027\000\047\001\000\000\
15221 \\007\000\161\000\070\000\049\001\071\000\159\000\072\000\158\000\
15222 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15225 \\001\000\101\000\015\000\136\000\042\000\050\001\044\000\133\000\
15226 \\056\000\132\000\057\000\131\000\067\000\130\000\000\000\
15228 \\001\000\101\000\015\000\136\000\040\000\051\001\042\000\134\000\
15229 \\044\000\133\000\056\000\132\000\057\000\131\000\067\000\130\000\000\000\
15230 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15231 \\026\000\010\000\027\000\052\001\000\000\
15233 \\001\000\101\000\015\000\099\000\028\000\053\001\030\000\138\000\
15234 \\056\000\097\000\057\000\096\000\066\000\137\000\068\000\094\000\000\000\
15235 \\053\000\054\001\000\000\
15238 \\007\000\100\000\045\000\058\001\080\000\109\000\081\000\108\000\000\000\
15240 \\015\000\060\001\051\000\059\001\000\000\
15241 \\001\000\101\000\015\000\099\000\028\000\062\001\030\000\138\000\
15242 \\056\000\097\000\057\000\096\000\066\000\137\000\068\000\094\000\000\000\
15248 \\007\000\161\000\072\000\065\001\073\000\157\000\074\000\156\000\
15249 \\078\000\155\000\000\000\
15250 \\007\000\161\000\070\000\066\001\071\000\159\000\072\000\158\000\
15251 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15257 \\008\000\115\000\010\000\076\001\014\000\075\001\083\000\074\001\
15258 \\084\000\073\001\090\000\072\001\000\000\
15262 \\105\000\082\001\106\000\007\001\107\000\006\001\000\000\
15265 \\099\000\083\001\000\000\
15268 \\107\000\086\001\000\000\
15271 \\008\000\091\001\127\000\090\001\000\000\
15272 \\008\000\115\000\014\000\093\001\112\000\092\001\000\000\
15273 \\009\000\097\001\095\000\096\001\096\000\254\000\108\000\095\001\000\000\
15274 \\007\000\100\000\080\000\099\001\081\000\108\000\115\000\098\001\000\000\
15276 \\005\000\101\001\113\000\100\001\000\000\
15277 \\007\000\100\000\080\000\104\001\081\000\108\000\115\000\103\001\
15278 \\117\000\102\001\000\000\
15279 \\005\000\106\001\125\000\105\001\000\000\
15280 \\006\000\110\001\007\000\100\000\081\000\109\001\120\000\108\001\
15281 \\121\000\107\001\000\000\
15282 \\024\000\111\001\000\000\
15288 \\069\000\113\001\000\000\
15289 \\039\000\114\001\000\000\
15292 \\007\000\161\000\070\000\117\001\071\000\159\000\072\000\158\000\
15293 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15296 \\065\000\118\001\000\000\
15297 \\001\000\101\000\015\000\099\000\056\000\097\000\057\000\096\000\
15298 \\066\000\120\001\068\000\094\000\000\000\
15299 \\001\000\101\000\015\000\099\000\056\000\097\000\057\000\096\000\
15300 \\059\000\121\001\066\000\199\000\068\000\094\000\000\000\
15303 \\001\000\101\000\015\000\099\000\056\000\097\000\057\000\096\000\
15304 \\059\000\122\001\066\000\199\000\068\000\094\000\000\000\
15307 \\007\000\205\000\082\000\123\001\000\000\
15308 \\007\000\161\000\070\000\124\001\071\000\159\000\072\000\158\000\
15309 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15310 \\033\000\008\000\086\000\042\001\087\000\211\000\000\000\
15311 \\148\000\125\001\000\000\
15312 \\032\000\044\001\033\000\215\000\000\000\
15313 \\001\000\014\000\015\000\013\000\016\000\012\000\020\000\127\001\
15314 \\025\000\011\000\026\000\010\000\027\000\126\001\000\000\
15315 \\031\000\128\001\032\000\216\000\033\000\215\000\000\000\
15317 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15318 \\026\000\010\000\027\000\130\001\000\000\
15324 \\055\000\131\001\000\000\
15325 \\015\000\133\001\000\000\
15326 \\007\000\161\000\070\000\134\001\071\000\159\000\072\000\158\000\
15327 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15328 \\015\000\060\001\051\000\135\001\000\000\
15330 \\050\000\136\001\000\000\
15331 \\005\000\138\001\000\000\
15332 \\006\000\244\000\013\000\139\001\000\000\
15334 \\015\000\060\001\051\000\140\001\000\000\
15335 \\031\000\141\001\032\000\216\000\033\000\215\000\000\000\
15339 \\007\000\161\000\070\000\142\001\071\000\159\000\072\000\158\000\
15340 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15342 \\007\000\161\000\070\000\144\001\071\000\159\000\072\000\158\000\
15343 \\073\000\157\000\074\000\156\000\078\000\155\000\079\000\143\001\000\000\
15346 \\089\000\145\001\000\000\
15351 \\146\000\150\001\000\000\
15352 \\146\000\151\001\000\000\
15353 \\103\000\152\001\000\000\
15354 \\008\000\115\000\010\000\076\001\014\000\075\001\083\000\074\001\
15355 \\084\000\073\001\090\000\154\001\000\000\
15358 \\009\000\071\000\098\000\156\001\000\000\
15359 \\101\000\157\001\103\000\152\001\000\000\
15361 \\008\000\115\000\014\000\093\001\112\000\159\001\000\000\
15362 \\094\000\161\001\000\000\
15363 \\009\000\000\001\095\000\163\001\096\000\254\000\000\000\
15368 \\006\000\244\000\013\000\167\001\110\000\166\001\000\000\
15371 \\009\000\169\001\108\000\168\001\000\000\
15373 \\006\000\170\001\000\000\
15378 \\006\000\172\001\000\000\
15380 \\053\000\173\001\000\000\
15383 \\006\000\174\001\000\000\
15386 \\003\000\084\000\022\000\176\001\000\000\
15389 \\001\000\101\000\015\000\099\000\038\000\177\001\056\000\097\000\
15390 \\057\000\096\000\066\000\095\000\068\000\094\000\000\000\
15391 \\001\000\101\000\015\000\099\000\056\000\097\000\057\000\096\000\
15392 \\066\000\178\001\068\000\094\000\000\000\
15393 \\069\000\113\001\000\000\
15394 \\063\000\179\001\000\000\
15395 \\001\000\101\000\015\000\099\000\056\000\097\000\057\000\096\000\
15396 \\066\000\181\001\068\000\094\000\000\000\
15397 \\063\000\182\001\000\000\
15401 \\046\000\183\001\000\000\
15402 \\033\000\008\000\085\000\185\001\086\000\212\000\087\000\211\000\000\000\
15404 \\147\000\187\001\000\000\
15406 \\001\000\014\000\015\000\013\000\016\000\012\000\025\000\011\000\
15407 \\026\000\010\000\027\000\189\001\000\000\
15410 \\015\000\142\000\054\000\190\001\000\000\
15411 \\005\000\061\000\011\000\191\001\012\000\059\000\000\000\
15413 \\050\000\192\001\000\000\
15415 \\007\000\100\000\047\000\193\001\080\000\150\000\081\000\108\000\000\000\
15416 \\053\000\194\001\000\000\
15418 \\050\000\195\001\000\000\
15420 \\077\000\197\001\000\000\
15424 \\008\000\068\000\088\000\199\001\000\000\
15425 \\009\000\000\001\091\000\202\001\095\000\201\001\096\000\200\001\000\000\
15426 \\009\000\000\001\091\000\204\001\095\000\203\001\096\000\200\001\000\000\
15427 \\008\000\115\000\010\000\076\001\014\000\075\001\033\000\008\000\
15428 \\083\000\207\001\084\000\206\001\085\000\205\001\086\000\212\000\
15429 \\087\000\211\000\000\000\
15430 \\033\000\008\000\085\000\208\001\086\000\212\000\087\000\211\000\000\000\
15431 \\033\000\008\000\085\000\209\001\086\000\212\000\087\000\211\000\000\000\
15433 \\007\000\100\000\080\000\210\001\081\000\108\000\000\000\
15438 \\007\000\100\000\080\000\211\001\081\000\108\000\000\000\
15440 \\006\000\244\000\013\000\167\001\110\000\212\001\000\000\
15442 \\009\000\000\001\095\000\214\001\096\000\254\000\000\000\
15444 \\009\000\000\001\095\000\218\001\096\000\217\001\129\000\216\001\000\000\
15445 \\008\000\115\000\014\000\220\001\111\000\219\001\000\000\
15449 \\009\000\169\001\108\000\168\001\000\000\
15450 \\116\000\222\001\000\000\
15451 \\007\000\161\000\070\000\224\001\071\000\159\000\072\000\158\000\
15452 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15453 \\116\000\222\001\000\000\
15454 \\126\000\226\001\000\000\
15456 \\005\000\230\001\123\000\229\001\000\000\
15461 \\003\000\194\000\005\000\193\000\061\000\232\001\000\000\
15465 \\007\000\100\000\045\000\233\001\080\000\109\000\081\000\108\000\000\000\
15466 \\149\000\234\001\000\000\
15467 \\001\000\014\000\015\000\013\000\016\000\012\000\020\000\235\001\
15468 \\025\000\011\000\026\000\010\000\027\000\126\001\000\000\
15470 \\148\000\237\001\000\000\
15473 \\055\000\238\001\000\000\
15476 \\052\000\239\001\000\000\
15480 \\003\000\250\000\075\000\241\001\000\000\
15482 \\089\000\242\001\000\000\
15490 \\147\000\248\001\000\000\
15492 \\006\000\244\000\013\000\250\001\000\000\
15493 \\006\000\244\000\013\000\251\001\000\000\
15495 \\008\000\115\000\010\000\076\001\014\000\075\001\083\000\254\001\
15496 \\084\000\253\001\135\000\252\001\000\000\
15498 \\094\000\000\002\000\000\
15500 \\128\000\002\002\000\000\
15504 \\006\000\244\000\013\000\007\002\109\000\006\002\000\000\
15506 \\007\000\100\000\080\000\099\001\081\000\108\000\115\000\008\002\000\000\
15507 \\114\000\009\002\000\000\
15508 \\007\000\161\000\070\000\011\002\071\000\159\000\072\000\158\000\
15509 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15511 \\005\000\106\001\125\000\012\002\000\000\
15512 \\005\000\230\001\123\000\013\002\000\000\
15513 \\122\000\014\002\000\000\
15514 \\053\000\016\002\000\000\
15515 \\006\000\244\000\013\000\017\002\000\000\
15521 \\031\000\019\002\032\000\216\000\033\000\215\000\000\000\
15524 \\015\000\060\001\051\000\020\002\000\000\
15527 \\092\000\021\002\103\000\152\001\000\000\
15529 \\009\000\000\001\095\000\023\002\096\000\254\000\000\000\
15530 \\009\000\000\001\095\000\024\002\096\000\254\000\000\000\
15533 \\008\000\115\000\010\000\076\001\014\000\075\001\083\000\026\002\
15534 \\084\000\206\001\000\000\
15538 \\134\000\029\002\000\000\
15540 \\008\000\115\000\010\000\076\001\014\000\075\001\083\000\254\001\
15541 \\084\000\253\001\135\000\033\002\000\000\
15543 \\009\000\000\001\095\000\035\002\096\000\254\000\000\000\
15545 \\008\000\091\001\127\000\036\002\000\000\
15546 \\103\000\152\001\130\000\037\002\000\000\
15547 \\008\000\115\000\014\000\220\001\111\000\039\002\000\000\
15552 \\005\000\101\001\113\000\041\002\000\000\
15553 \\118\000\042\002\000\000\
15555 \\122\000\044\002\000\000\
15557 \\007\000\100\000\080\000\046\002\081\000\108\000\119\000\045\002\000\000\
15558 \\124\000\047\002\000\000\
15561 \\149\000\049\002\000\000\
15564 \\007\000\100\000\080\000\050\002\081\000\108\000\000\000\
15568 \\147\000\051\002\000\000\
15569 \\007\000\161\000\070\000\052\002\071\000\159\000\072\000\158\000\
15570 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15571 \\007\000\161\000\070\000\053\002\071\000\159\000\072\000\158\000\
15572 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15574 \\010\000\074\000\133\000\054\002\000\000\
15575 \\009\000\000\001\095\000\057\002\096\000\056\002\136\000\055\002\000\000\
15576 \\009\000\000\001\095\000\059\002\096\000\056\002\136\000\058\002\000\000\
15578 \\008\000\115\000\010\000\076\001\014\000\075\001\083\000\254\001\
15579 \\084\000\253\001\135\000\060\002\000\000\
15583 \\007\000\100\000\080\000\062\002\081\000\108\000\000\000\
15585 \\006\000\244\000\013\000\007\002\109\000\063\002\000\000\
15588 \\007\000\100\000\080\000\065\002\081\000\108\000\117\000\064\002\000\000\
15591 \\006\000\066\002\000\000\
15593 \\005\000\230\001\123\000\067\002\000\000\
15595 \\006\000\244\000\013\000\069\002\000\000\
15597 \\104\000\071\002\000\000\
15598 \\099\000\074\002\102\000\073\002\104\000\071\002\000\000\
15601 \\134\000\076\002\000\000\
15606 \\008\000\115\000\010\000\076\001\014\000\075\001\083\000\254\001\
15607 \\084\000\253\001\135\000\078\002\000\000\
15608 \\006\000\244\000\013\000\079\002\000\000\
15611 \\006\000\080\002\000\000\
15618 \\103\000\083\002\000\000\
15621 \\009\000\071\000\098\000\156\001\101\000\084\002\103\000\083\002\000\000\
15623 \\103\000\152\001\137\000\085\002\000\000\
15627 \\005\000\230\001\123\000\088\002\000\000\
15628 \\007\000\161\000\070\000\089\002\071\000\159\000\072\000\158\000\
15629 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15633 \\007\000\100\000\080\000\090\002\081\000\108\000\000\000\
15634 \\007\000\161\000\070\000\091\002\071\000\159\000\072\000\158\000\
15635 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15636 \\122\000\092\002\000\000\
15637 \\089\000\094\002\093\000\093\002\104\000\071\002\000\000\
15638 \\006\000\244\000\013\000\096\002\000\000\
15639 \\104\000\071\002\128\000\098\002\131\000\097\002\000\000\
15643 \\008\000\068\000\088\000\199\001\092\000\100\002\103\000\083\002\000\000\
15647 \\008\000\091\001\103\000\083\002\127\000\036\002\130\000\102\002\000\000\
15649 \\007\000\161\000\070\000\103\002\071\000\159\000\072\000\158\000\
15650 \\073\000\157\000\074\000\156\000\078\000\155\000\000\000\
15652 \\104\000\071\002\134\000\105\002\138\000\104\002\000\000\
15655 \\010\000\074\000\103\000\083\002\133\000\054\002\137\000\107\002\000\000\
15659 val numstates
= 621
15661 val s
= ref
"" and index
= ref
0
15662 val string_to_int
= fn () =>
15664 in index
:= i
+2; Char.ord(String.sub(!s
,i
)) + Char.ord(String.sub(!s
,i
+1)) * 256
15666 val string_to_list
= fn s
' =>
15667 let val len
= String.size s
'
15669 if !index
< len
then string_to_int() :: f()
15671 in index
:= 0; s
:= s
'; f ()
15673 val string_to_pairlist
= fn (conv_key
,conv_entry
) =>
15675 case string_to_int()
15677 | n
=> PAIR(conv_key (n
-1),conv_entry (string_to_int()),f())
15680 val string_to_pairlist_default
= fn (conv_key
,conv_entry
) =>
15681 let val conv_row
= string_to_pairlist(conv_key
,conv_entry
)
15683 let val default
= conv_entry(string_to_int())
15684 val row
= conv_row()
15688 val string_to_table
= fn (convert_row
,s
') =>
15689 let val len
= String.size s
'
15691 if !index
< len
then convert_row() :: f()
15693 in (s
:= s
'; index
:= 0; f ())
15696 val memo
= Array
.array(numstates
+numrules
,ERROR
)
15697 val _
=let fun g i
=(Array
.update(memo
,i
,REDUCE(i
-numstates
)); g(i
+1))
15699 if i
=numstates
then g i
15700 else (Array
.update(memo
,i
,SHIFT (STATE i
)); f (i
+1))
15701 in f
0 handle Subscript
=> ()
15704 val entry_to_action
= fn 0 => ACCEPT |
1 => ERROR | j
=> Array
.sub(memo
,(j
-2))
15706 val gotoT
=Array
.fromList(string_to_table(string_to_pairlist(NT
,STATE
),gotoT
))
15707 val actionRows
=string_to_table(string_to_pairlist_default(T
,entry_to_action
),actionRows
)
15708 val actionRowNumbers
= string_to_list actionRowNumbers
15709 val actionT
= let val actionRowLookUp
=
15710 let val a
=Array
.fromList(actionRows
) in fn i
=>Array
.sub(a
,i
) end
15711 in Array
.fromList(map actionRowLookUp actionRowNumbers
)
15713 in LrTable
.mkLrTable
{actions
=actionT
,gotos
=gotoT
,numRules
=numrules
,
15714 numStates
=numstates
,initialState
=STATE
0}
15717 local open Header
in
15719 type arg
= Infix
.InfEnv
15720 structure MlyValue
=
15722 datatype svalue
= VOID | ntVOID
of unit
-> unit
15723 | LONGID
of unit
-> (string list
*string)
15724 | ETYVAR
of unit
-> (string) | TYVAR
of unit
-> (string)
15725 | SYMBOL
of unit
-> (string) | ALPHA
of unit
-> (string)
15726 | CHAR
of unit
-> (char
) | STRING
of unit
-> (string)
15727 | REAL
of unit
-> (real) | WORD
of unit
-> (word)
15728 | INT
of unit
-> (int) | NUMERIC
of unit
-> (int)
15729 | DIGIT
of unit
-> (int) | popLocalInfix
of unit
-> (unit
)
15730 | pushLocalInfix
of unit
-> (unit
) | popInfix
of unit
-> (unit
)
15731 | pushInfix
of unit
-> (unit
) | initInfix
of unit
-> (unit
)
15732 | program_opt
of unit
-> (Program option
)
15733 | program
' of unit
-> (Program
)
15734 | program
of unit
-> (Program
*Infix
.InfEnv
)
15735 | topdec_opt
of unit
-> (TopDec option
)
15736 | topdec1
of unit
-> (TopDec
) | topdec
of unit
-> (TopDec
)
15737 | AND_tyreadesc_opt__AND_funbind_opt
of unit
-> (TyReaDesc option
*FunBind option
)
15738 | tyreadesc__AND_funbind_opt
of unit
-> (TyReaDesc
*FunBind option
)
15739 | sigexp__AND_funbind_opt
of unit
-> (SigExp
*FunBind option
)
15740 | strexp__AND_funbind_opt
of unit
-> (StrExp
*FunBind option
)
15741 | AND_funbind_opt
of unit
-> (FunBind option
)
15742 | funbind
of unit
-> (FunBind
) | fundec
of unit
-> (FunDec
)
15743 | AND_tyreadesc_opt__AND_strdesc_opt
of unit
-> (TyReaDesc option
*StrDesc option
)
15744 | tyreadesc__AND_strdesc_opt
of unit
-> (TyReaDesc
*StrDesc option
)
15745 | sigexp__AND_strdesc_opt
of unit
-> (SigExp
*StrDesc option
)
15746 | AND_strdesc_opt
of unit
-> (StrDesc option
)
15747 | strdesc
of unit
-> (StrDesc
)
15748 | AND_exdesc_opt
of unit
-> (ExDesc option
)
15749 | exdesc
of unit
-> (ExDesc
)
15750 | BAR_condesc_opt
of unit
-> (ConDesc option
)
15751 | condesc
of unit
-> (ConDesc
)
15752 | AND_datdesc_opt
of unit
-> (DatDesc option
)
15753 | datdesc1
of unit
-> (DatDesc
) | datdesc0
of unit
-> (DatDesc
)
15754 | datdesc
of unit
-> (DatDesc
)
15755 | AND_syndesc_opt
of unit
-> (SynDesc option
)
15756 | syndesc
of unit
-> (SynDesc
)
15757 | AND_typdesc_opt
of unit
-> (TypDesc option
)
15758 | typdesc
of unit
-> (TypDesc
)
15759 | AND_valdesc_opt
of unit
-> (ValDesc option
)
15760 | valdesc
of unit
-> (ValDesc
)
15761 | longstrid_EQUALS_list2
of unit
-> (longStrId list
)
15762 | longstrid_EQUALS_list1
of unit
-> (longStrId list
)
15763 | longtycon_EQUALS_list2
of unit
-> (longTyCon list
)
15764 | longtycon_EQUALS_list1
of unit
-> (longTyCon list
)
15765 | sigid_list2
of unit
-> (SigId list
) | spec1
' of unit
-> (Spec
)
15766 | spec1
of unit
-> (Spec
) | spec
of unit
-> (Spec
)
15767 | AND_tyreadesc_opt
of unit
-> (TyReaDesc option
)
15768 | tyreadesc
of unit
-> (TyReaDesc
)
15769 | AND_tyreadesc_opt__AND_sigbind_opt
of unit
-> (TyReaDesc option
*SigBind option
)
15770 | tyreadesc__AND_sigbind_opt
of unit
-> (TyReaDesc
*SigBind option
)
15771 | sigexp__AND_sigbind_opt
of unit
-> (SigExp
*SigBind option
)
15772 | AND_sigbind_opt
of unit
-> (SigBind option
)
15773 | sigbind
of unit
-> (SigBind
) | sigdec
of unit
-> (SigDec
)
15774 | sigexp
' of unit
-> (SigExp
) | sigexp
of unit
-> (SigExp
)
15775 | COLON_sigexp_opt
of unit
-> (SigExp option
)
15776 | AND_tyreadesc_opt__AND_strbind_opt
of unit
-> (TyReaDesc option
*StrBind option
)
15777 | tyreadesc__AND_strbind_opt
of unit
-> (TyReaDesc
*StrBind option
)
15778 | sigexp__AND_strbind_opt
of unit
-> (SigExp
*StrBind option
)
15779 | strexp__AND_strbind_opt
of unit
-> (StrExp
*StrBind option
)
15780 | AND_strbind_opt
of unit
-> (StrBind option
)
15781 | strbind
of unit
-> (StrBind
) | strdec1
' of unit
-> (StrDec
)
15782 | strdec1
of unit
-> (StrDec
) | strdec
of unit
-> (StrDec
)
15783 | strexp
' of unit
-> (StrExp
) | strexp
of unit
-> (StrExp
)
15784 | tyvar_COMMA_list1
of unit
-> (TyVar list
)
15785 | tyvarseq1
of unit
-> (TyVarseq
) | tyvarseq
of unit
-> (TyVarseq
)
15786 | ty_COMMA_list2
of unit
-> (Ty list
) | tyseq
of unit
-> (Tyseq
)
15787 | COMMA_tyrow_opt
of unit
-> (TyRow option
)
15788 | tyrow_opt
of unit
-> (TyRow option
) | tyrow
of unit
-> (TyRow
)
15789 | atty
of unit
-> (Ty
) | consty
of unit
-> (Ty
)
15790 | ty_STAR_list
of unit
-> (Ty list
) | tupty
of unit
-> (Ty
)
15791 | ty
of unit
-> (Ty
) | COLON_ty_list1
of unit
-> (Ty list
)
15792 | atpat_list2
of unit
-> (AtPat list
)
15793 | atpat_list1
of unit
-> (AtPat list
) | pat
of unit
-> (Pat
)
15794 | AS_pat_opt
of unit
-> (Pat option
)
15795 | COLON_ty_opt
of unit
-> (Ty option
)
15796 | COMMA_patrow_opt
of unit
-> (PatRow option
)
15797 | patrow_opt
of unit
-> (PatRow option
)
15798 | patrow
of unit
-> (PatRow
)
15799 | pat_COMMA_list2
of unit
-> (Pat list
)
15800 | pat_COMMA_list1
of unit
-> (Pat list
)
15801 | pat_COMMA_list0
of unit
-> (Pat list
) | atpat
' of unit
-> (AtPat
)
15802 | atpat
of unit
-> (AtPat
)
15803 | AND_exbind_opt
of unit
-> (ExBind option
)
15804 | exbind
of unit
-> (ExBind
) | OF_ty_opt
of unit
-> (Ty option
)
15805 | BAR_conbind_opt
of unit
-> (ConBind option
)
15806 | conbind
of unit
-> (ConBind
)
15807 | AND_datbind_opt
of unit
-> (DatBind option
)
15808 | datbind1
of unit
-> (DatBind
) | datbind0
of unit
-> (DatBind
)
15809 | datbind
of unit
-> (DatBind
)
15810 | AND_typbind_opt
of unit
-> (TypBind option
)
15811 | typbind
of unit
-> (TypBind
) | fmrule
of unit
-> (Fmrule
)
15812 | BAR_fmatch_opt
of unit
-> (Fmatch option
)
15813 | fmatch
of unit
-> (Fmatch
)
15814 | AND_fvalbind_opt
of unit
-> (FvalBind option
)
15815 | fvalbind
of unit
-> (FvalBind
)
15816 | AND_valbind_opt
of unit
-> (ValBind option
)
15817 | valbind
of unit
-> (ValBind
) | d_opt
of unit
-> (int)
15818 | longstrid_list1
of unit
-> (longStrId list
)
15819 | vid_list1
of unit
-> (VId list
)
15820 | WITHTYPE_typbind_opt
of unit
-> (TypBind option
)
15821 | dec1
' of unit
-> (Dec
) | dec1
of unit
-> (Dec
)
15822 | dec
of unit
-> (Dec
) | mrule
of unit
-> (Mrule
)
15823 | BAR_match_opt
of unit
-> (Match option
)
15824 | match
of unit
-> (Match
) | exp
of unit
-> (Exp
)
15825 | infexp
of unit
-> (InfExp
) | appexp
of unit
-> (AppExp
)
15826 | COMMA_exprow_opt
of unit
-> (ExpRow option
)
15827 | exprow_opt
of unit
-> (ExpRow option
)
15828 | exprow
of unit
-> (ExpRow
)
15829 | exp_SEMICOLON_list2
of unit
-> (Exp list
)
15830 | exp_SEMICOLON_list1
of unit
-> (Exp list
)
15831 | exp_COMMA_list2
of unit
-> (Exp list
)
15832 | exp_COMMA_list1
of unit
-> (Exp list
)
15833 | exp_COMMA_list0
of unit
-> (Exp list
) | atexp
of unit
-> (AtExp
)
15834 | OP_opt
of unit
-> (Op
) | longstrid
of unit
-> (longStrId
)
15835 | longtycon
of unit
-> (longTyCon
) | longvid
' of unit
-> (longVId
)
15836 | longvid
of unit
-> (longVId
) | funid
of unit
-> (FunId
)
15837 | sigid
of unit
-> (SigId
) | strid
of unit
-> (StrId
)
15838 | tyvar
of unit
-> (TyVar
) | tycon
of unit
-> (TyCon
)
15839 | vid
' of unit
-> (VId
) | vid
of unit
-> (VId
)
15840 | lab
of unit
-> (Lab
) | d
of unit
-> (int)
15841 | scon
of unit
-> (SCon
)
15843 type svalue
= MlyValue
.svalue
15844 type result
= Program
*Infix
.InfEnv
15850 fn (T
1) => true |
(T
2) => true |
(T
3) => true |
(T
4) => true |
(T
15851 5) => true |
(T
6) => true |
(T
7) => true |
(T
8) => true |
(T
9)
15852 => true |
(T
10) => true |
(T
11) => true |
(T
12) => true |
(T
13)
15853 => true |
(T
14) => true |
(T
15) => true |
(T
16) => true |
(T
17)
15854 => true |
(T
18) => true |
(T
19) => true |
(T
20) => true |
(T
21)
15855 => true |
(T
22) => true |
(T
23) => true |
(T
24) => true |
(T
25)
15856 => true |
(T
26) => true |
(T
27) => true |
(T
28) => true |
(T
29)
15857 => true |
(T
30) => true |
(T
31) => true |
(T
32) => true |
(T
49)
15858 => true |
(T
50) => true |
(T
51) => true |
(T
52) => true |
(T
53)
15859 => true |
(T
54) => true |
(T
55) => true |
(T
56) => true |
(T
57)
15860 => true | _
=> false
15861 val preferred_change
=
15864 fn (T
0) => true | _
=> false
15867 |
(T
1) => "ABSTYPE"
15869 |
(T
3) => "ANDALSO"
15873 |
(T
7) => "DATATYPE"
15876 |
(T
10) => "EXCEPTION"
15879 |
(T
13) => "HANDLE"
15882 |
(T
16) => "INFIX"
15883 |
(T
17) => "INFIXR"
15885 |
(T
19) => "LOCAL"
15886 |
(T
20) => "NONFIX"
15890 |
(T
24) => "ORELSE"
15891 |
(T
25) => "RAISE"
15897 |
(T
31) => "WITHTYPE"
15898 |
(T
32) => "WHILE"
15901 |
(T
35) => "LBRACK"
15902 |
(T
36) => "RBRACK"
15903 |
(T
37) => "LBRACE"
15904 |
(T
38) => "RBRACE"
15905 |
(T
39) => "COMMA"
15906 |
(T
40) => "COLON"
15907 |
(T
41) => "SEMICOLON"
15909 |
(T
43) => "UNDERBAR"
15911 |
(T
45) => "EQUALS"
15912 |
(T
46) => "DARROW"
15913 |
(T
47) => "ARROW"
15915 |
(T
49) => "EQTYPE"
15916 |
(T
50) => "FUNCTOR"
15917 |
(T
51) => "INCLUDE"
15918 |
(T
52) => "SHARING"
15920 |
(T
54) => "SIGNATURE"
15921 |
(T
55) => "STRUCT"
15922 |
(T
56) => "STRUCTURE"
15923 |
(T
57) => "WHERE"
15924 |
(T
58) => "COLONGREATER"
15926 |
(T
60) => "DIGIT"
15927 |
(T
61) => "NUMERIC"
15931 |
(T
65) => "STRING"
15933 |
(T
67) => "ALPHA"
15934 |
(T
68) => "SYMBOL"
15936 |
(T
70) => "TYVAR"
15937 |
(T
71) => "ETYVAR"
15938 |
(T
72) => "LONGID"
15939 | _
=> "bogus-term"
15940 local open Header
in
15942 fn _
=> MlyValue
.VOID
15944 val terms
= (T
0) :: (T
1) :: (T
2) :: (T
3) :: (T
4) :: (T
5) :: (T
6
15945 ) :: (T
7) :: (T
8) :: (T
9) :: (T
10) :: (T
11) :: (T
12) :: (T
13)
15946 :: (T
14) :: (T
15) :: (T
16) :: (T
17) :: (T
18) :: (T
19) :: (T
20)
15947 :: (T
21) :: (T
22) :: (T
23) :: (T
24) :: (T
25) :: (T
26) :: (T
27)
15948 :: (T
28) :: (T
29) :: (T
30) :: (T
31) :: (T
32) :: (T
33) :: (T
34)
15949 :: (T
35) :: (T
36) :: (T
37) :: (T
38) :: (T
39) :: (T
40) :: (T
41)
15950 :: (T
42) :: (T
43) :: (T
44) :: (T
45) :: (T
46) :: (T
47) :: (T
48)
15951 :: (T
49) :: (T
50) :: (T
51) :: (T
52) :: (T
53) :: (T
54) :: (T
55)
15952 :: (T
56) :: (T
57) :: (T
58) :: (T
59) :: (T
69) :: nil
15954 structure Actions
=
15957 exception mlyAction
of int
15958 local open Header
in
15960 fn (i392
:int,defaultPos
,stack
,
15963 of (0,rest671
) => let val result
=MlyValue
.initInfix(fn _
=> (
15965 in (LrTable
.NT
144,(result
,defaultPos
,defaultPos
),rest671
) end
15966 |
(1,rest671
) => let val result
=MlyValue
.pushInfix(fn _
=> ( pushJ() )
15968 in (LrTable
.NT
145,(result
,defaultPos
,defaultPos
),rest671
) end
15969 |
(2,rest671
) => let val result
=MlyValue
.popInfix(fn _
=> ( popJ() ))
15970 in (LrTable
.NT
146,(result
,defaultPos
,defaultPos
),rest671
) end
15971 |
(3,rest671
) => let val result
=MlyValue
.pushLocalInfix(fn _
=> (
15973 in (LrTable
.NT
147,(result
,defaultPos
,defaultPos
),rest671
) end
15974 |
(4,rest671
) => let val result
=MlyValue
.popLocalInfix(fn _
=> (
15976 in (LrTable
.NT
148,(result
,defaultPos
,defaultPos
),rest671
) end
15977 |
(5,(_
,(_
,ZERO1left
,ZERO1right
))::rest671
) => let val result
=
15978 MlyValue
.scon(fn _
=> ( SCon
.fromInt
0 ))
15979 in (LrTable
.NT
0,(result
,ZERO1left
,ZERO1right
),rest671
) end
15980 |
(6,(_
,(MlyValue
.DIGIT DIGIT1
,DIGIT1left
,DIGIT1right
))::rest671
) =>
15981 let val result
=MlyValue
.scon(fn _
=> let val DIGIT
as DIGIT1
=DIGIT1 ()
15982 in ( SCon
.fromInt DIGIT
) end
15984 in (LrTable
.NT
0,(result
,DIGIT1left
,DIGIT1right
),rest671
) end
15985 |
(7,(_
,(MlyValue
.NUMERIC NUMERIC1
,NUMERIC1left
,NUMERIC1right
))::
15986 rest671
) => let val result
=MlyValue
.scon(fn _
=> let val NUMERIC
as
15987 NUMERIC1
=NUMERIC1 ()
15988 in ( SCon
.fromInt NUMERIC
) end
15990 in (LrTable
.NT
0,(result
,NUMERIC1left
,NUMERIC1right
),rest671
) end
15991 |
(8,(_
,(MlyValue
.INT INT1
,INT1left
,INT1right
))::rest671
) => let val
15992 result
=MlyValue
.scon(fn _
=> let val INT
as INT1
=INT1 ()
15993 in ( SCon
.fromInt INT
) end
15995 in (LrTable
.NT
0,(result
,INT1left
,INT1right
),rest671
) end
15996 |
(9,(_
,(MlyValue
.WORD WORD1
,WORD1left
,WORD1right
))::rest671
) => let
15997 val result
=MlyValue
.scon(fn _
=> let val WORD
as WORD1
=WORD1 ()
15998 in ( SCon
.fromWord WORD
) end
16000 in (LrTable
.NT
0,(result
,WORD1left
,WORD1right
),rest671
) end
16001 |
(10,(_
,(MlyValue
.STRING STRING1
,STRING1left
,STRING1right
))::rest671
)
16002 => let val result
=MlyValue
.scon(fn _
=> let val STRING
as STRING1
=
16004 in ( SCon
.fromString STRING
) end
16006 in (LrTable
.NT
0,(result
,STRING1left
,STRING1right
),rest671
) end
16007 |
(11,(_
,(MlyValue
.CHAR CHAR1
,CHAR1left
,CHAR1right
))::rest671
) => let
16008 val result
=MlyValue
.scon(fn _
=> let val CHAR
as CHAR1
=CHAR1 ()
16009 in ( SCon
.fromChar CHAR
) end
16011 in (LrTable
.NT
0,(result
,CHAR1left
,CHAR1right
),rest671
) end
16012 |
(12,(_
,(MlyValue
.REAL REAL1
,REAL1left
,REAL1right
))::rest671
) => let
16013 val result
=MlyValue
.scon(fn _
=> let val REAL
as REAL1
=REAL1 ()
16014 in ( SCon
.fromReal REAL
) end
16016 in (LrTable
.NT
0,(result
,REAL1left
,REAL1right
),rest671
) end
16017 |
(13,(_
,(_
,ZERO1left
,ZERO1right
))::rest671
) => let val result
=
16018 MlyValue
.d(fn _
=> ( 0 ))
16019 in (LrTable
.NT
1,(result
,ZERO1left
,ZERO1right
),rest671
) end
16020 |
(14,(_
,(MlyValue
.DIGIT DIGIT1
,DIGIT1left
,DIGIT1right
))::rest671
) =>
16021 let val result
=MlyValue
.d(fn _
=> let val DIGIT
as DIGIT1
=DIGIT1 ()
16024 in (LrTable
.NT
1,(result
,DIGIT1left
,DIGIT1right
),rest671
) end
16025 |
(15,(_
,(MlyValue
.ALPHA ALPHA1
,ALPHA1left
,ALPHA1right
))::rest671
) =>
16026 let val result
=MlyValue
.lab(fn _
=> let val ALPHA
as ALPHA1
=ALPHA1 ()
16027 in ( Lab
.fromString ALPHA
) end
16029 in (LrTable
.NT
2,(result
,ALPHA1left
,ALPHA1right
),rest671
) end
16030 |
(16,(_
,(MlyValue
.SYMBOL SYMBOL1
,SYMBOL1left
,SYMBOL1right
))::rest671
)
16031 => let val result
=MlyValue
.lab(fn _
=> let val SYMBOL
as SYMBOL1
=
16033 in ( Lab
.fromString SYMBOL
) end
16035 in (LrTable
.NT
2,(result
,SYMBOL1left
,SYMBOL1right
),rest671
) end
16036 |
(17,(_
,(_
,STAR1left
,STAR1right
))::rest671
) => let val result
=
16037 MlyValue
.lab(fn _
=> ( Lab
.fromString
"*" ))
16038 in (LrTable
.NT
2,(result
,STAR1left
,STAR1right
),rest671
) end
16039 |
(18,(_
,(MlyValue
.DIGIT DIGIT1
,DIGIT1left
,DIGIT1right
))::rest671
) =>
16040 let val result
=MlyValue
.lab(fn _
=> let val DIGIT
as DIGIT1
=DIGIT1 ()
16041 in ( Lab
.fromInt DIGIT
) end
16043 in (LrTable
.NT
2,(result
,DIGIT1left
,DIGIT1right
),rest671
) end
16044 |
(19,(_
,(MlyValue
.NUMERIC NUMERIC1
,NUMERIC1left
,NUMERIC1right
))::
16045 rest671
) => let val result
=MlyValue
.lab(fn _
=> let val NUMERIC
as
16046 NUMERIC1
=NUMERIC1 ()
16047 in ( Lab
.fromInt NUMERIC
) end
16049 in (LrTable
.NT
2,(result
,NUMERIC1left
,NUMERIC1right
),rest671
) end
16050 |
(20,(_
,(MlyValue
.vid
' vid
'1,vid
'1left
,vid
'1right
))::rest671
) => let
16051 val result
=MlyValue
.vid(fn _
=> let val vid
' as vid
'1=vid
'1 ()
16054 in (LrTable
.NT
3,(result
,vid
'1left
,vid
'1right
),rest671
) end
16055 |
(21,(_
,(_
,EQUALS1left
,EQUALS1right
))::rest671
) => let val result
=
16056 MlyValue
.vid(fn _
=> ( VId
.fromString
"=" ))
16057 in (LrTable
.NT
3,(result
,EQUALS1left
,EQUALS1right
),rest671
) end
16058 |
(22,(_
,(MlyValue
.ALPHA ALPHA1
,ALPHA1left
,ALPHA1right
))::rest671
) =>
16059 let val result
=MlyValue
.vid
'(fn _
=> let val ALPHA
as ALPHA1
=ALPHA1 ()
16060 in ( VId
.fromString ALPHA
) end
16062 in (LrTable
.NT
4,(result
,ALPHA1left
,ALPHA1right
),rest671
) end
16063 |
(23,(_
,(MlyValue
.SYMBOL SYMBOL1
,SYMBOL1left
,SYMBOL1right
))::rest671
)
16064 => let val result
=MlyValue
.vid
'(fn _
=> let val SYMBOL
as SYMBOL1
=
16066 in ( VId
.fromString SYMBOL
) end
16068 in (LrTable
.NT
4,(result
,SYMBOL1left
,SYMBOL1right
),rest671
) end
16069 |
(24,(_
,(_
,STAR1left
,STAR1right
))::rest671
) => let val result
=
16070 MlyValue
.vid
'(fn _
=> ( VId
.fromString
"*" ))
16071 in (LrTable
.NT
4,(result
,STAR1left
,STAR1right
),rest671
) end
16072 |
(25,(_
,(MlyValue
.ALPHA ALPHA1
,ALPHA1left
,ALPHA1right
))::rest671
) =>
16073 let val result
=MlyValue
.tycon(fn _
=> let val ALPHA
as ALPHA1
=ALPHA1
16075 in ( TyCon
.fromString ALPHA
) end
16077 in (LrTable
.NT
5,(result
,ALPHA1left
,ALPHA1right
),rest671
) end
16078 |
(26,(_
,(MlyValue
.SYMBOL SYMBOL1
,SYMBOL1left
,SYMBOL1right
))::rest671
)
16079 => let val result
=MlyValue
.tycon(fn _
=> let val SYMBOL
as SYMBOL1
=
16081 in ( TyCon
.fromString SYMBOL
) end
16083 in (LrTable
.NT
5,(result
,SYMBOL1left
,SYMBOL1right
),rest671
) end
16084 |
(27,(_
,(MlyValue
.TYVAR TYVAR1
,TYVAR1left
,TYVAR1right
))::rest671
) =>
16085 let val result
=MlyValue
.tyvar(fn _
=> let val TYVAR
as TYVAR1
=TYVAR1
16087 in ( TyVar
.fromString TYVAR
) end
16089 in (LrTable
.NT
6,(result
,TYVAR1left
,TYVAR1right
),rest671
) end
16090 |
(28,(_
,(MlyValue
.ALPHA ALPHA1
,ALPHA1left
,ALPHA1right
))::rest671
) =>
16091 let val result
=MlyValue
.strid(fn _
=> let val ALPHA
as ALPHA1
=ALPHA1
16093 in ( StrId
.fromString ALPHA
) end
16095 in (LrTable
.NT
7,(result
,ALPHA1left
,ALPHA1right
),rest671
) end
16096 |
(29,(_
,(MlyValue
.ALPHA ALPHA1
,ALPHA1left
,ALPHA1right
))::rest671
) =>
16097 let val result
=MlyValue
.sigid(fn _
=> let val ALPHA
as ALPHA1
=ALPHA1
16099 in ( SigId
.fromString ALPHA
) end
16101 in (LrTable
.NT
8,(result
,ALPHA1left
,ALPHA1right
),rest671
) end
16102 |
(30,(_
,(MlyValue
.ALPHA ALPHA1
,ALPHA1left
,ALPHA1right
))::rest671
) =>
16103 let val result
=MlyValue
.funid(fn _
=> let val ALPHA
as ALPHA1
=ALPHA1
16105 in ( FunId
.fromString ALPHA
) end
16107 in (LrTable
.NT
9,(result
,ALPHA1left
,ALPHA1right
),rest671
) end
16108 |
(31,(_
,(MlyValue
.longvid
' longvid
'1,longvid
'1left
,longvid
'1right
))::
16109 rest671
) => let val result
=MlyValue
.longvid(fn _
=> let val longvid
'
16110 as longvid
'1=longvid
'1 ()
16111 in ( longvid
' ) end
16113 in (LrTable
.NT
10,(result
,longvid
'1left
,longvid
'1right
),rest671
) end
16114 |
(32,(_
,(_
,EQUALS1left
,EQUALS1right
))::rest671
) => let val result
=
16115 MlyValue
.longvid(fn _
=> ( LongVId
.fromId(VId
.fromString
"=") ))
16116 in (LrTable
.NT
10,(result
,EQUALS1left
,EQUALS1right
),rest671
) end
16117 |
(33,(_
,(MlyValue
.vid
' vid
'1,vid
'1left
,vid
'1right
))::rest671
) => let
16118 val result
=MlyValue
.longvid
'(fn _
=> let val vid
' as vid
'1=vid
'1 ()
16119 in ( LongVId
.fromId vid
' ) end
16121 in (LrTable
.NT
11,(result
,vid
'1left
,vid
'1right
),rest671
) end
16122 |
(34,(_
,(MlyValue
.LONGID LONGID1
,LONGID1left
,LONGID1right
))::rest671
)
16123 => let val result
=MlyValue
.longvid
'(fn _
=> let val LONGID
as LONGID1
16125 in ( LongVId
.implode(toLongId VId
.fromString LONGID
) ) end
16127 in (LrTable
.NT
11,(result
,LONGID1left
,LONGID1right
),rest671
) end
16128 |
(35,(_
,(MlyValue
.tycon tycon1
,tycon1left
,tycon1right
))::rest671
) =>
16129 let val result
=MlyValue
.longtycon(fn _
=> let val tycon
as tycon1
=
16131 in ( LongTyCon
.fromId tycon
) end
16133 in (LrTable
.NT
12,(result
,tycon1left
,tycon1right
),rest671
) end
16134 |
(36,(_
,(MlyValue
.LONGID LONGID1
,LONGID1left
,LONGID1right
))::rest671
)
16135 => let val result
=MlyValue
.longtycon(fn _
=> let val LONGID
as
16137 in ( LongTyCon
.implode(toLongId TyCon
.fromString LONGID
) ) end
16139 in (LrTable
.NT
12,(result
,LONGID1left
,LONGID1right
),rest671
) end
16140 |
(37,(_
,(MlyValue
.strid strid1
,strid1left
,strid1right
))::rest671
) =>
16141 let val result
=MlyValue
.longstrid(fn _
=> let val strid
as strid1
=
16143 in ( LongStrId
.fromId strid
) end
16145 in (LrTable
.NT
13,(result
,strid1left
,strid1right
),rest671
) end
16146 |
(38,(_
,(MlyValue
.LONGID LONGID1
,LONGID1left
,LONGID1right
))::rest671
)
16147 => let val result
=MlyValue
.longstrid(fn _
=> let val LONGID
as
16149 in ( LongStrId
.implode(toLongId StrId
.fromString LONGID
) ) end
16151 in (LrTable
.NT
13,(result
,LONGID1left
,LONGID1right
),rest671
) end
16152 |
(39,(_
,(_
,OP1left
,OP1right
))::rest671
) => let val result
=
16153 MlyValue
.OP_opt(fn _
=> ( WITHOp
))
16154 in (LrTable
.NT
14,(result
,OP1left
,OP1right
),rest671
) end
16155 |
(40,rest671
) => let val result
=MlyValue
.OP_opt(fn _
=> ( SANSOp
))
16156 in (LrTable
.NT
14,(result
,defaultPos
,defaultPos
),rest671
) end
16157 |
(41,(_
,(MlyValue
.scon scon1
,sconleft
as scon1left
,sconright
as
16158 scon1right
))::rest671
) => let val result
=MlyValue
.atexp(fn _
=> let
16159 val scon
as scon1
=scon1 ()
16160 in ( SCONAtExp(I(sconleft
,sconright
), scon
) ) end
16162 in (LrTable
.NT
15,(result
,scon1left
,scon1right
),rest671
) end
16163 |
(42,(_
,(MlyValue
.longvid longvid1
,_
,longvidright
as longvid1right
))
16164 ::(_
,(MlyValue
.OP_opt OP_opt1
,OP_optleft
as OP_opt1left
,_
))::rest671
)
16165 => let val result
=MlyValue
.atexp(fn _
=> let val OP_opt
as OP_opt1
=
16167 val longvid
as longvid1
=longvid1 ()
16169 LONGVIDAtExp(I(OP_optleft
,longvidright
),
16173 in (LrTable
.NT
15,(result
,OP_opt1left
,longvid1right
),rest671
) end
16174 |
(43,(_
,(_
,_
,RBRACEright
as RBRACE1right
))::(_
,(MlyValue
.exprow_opt
16175 exprow_opt1
,_
,_
))::(_
,(_
,LBRACEleft
as LBRACE1left
,_
))::rest671
) =>
16176 let val result
=MlyValue
.atexp(fn _
=> let val exprow_opt
as
16177 exprow_opt1
=exprow_opt1 ()
16178 in ( RECORDAtExp(I(LBRACEleft
,RBRACEright
), exprow_opt
) ) end
16180 in (LrTable
.NT
15,(result
,LBRACE1left
,RBRACE1right
),rest671
) end
16181 |
(44,(_
,(MlyValue
.lab lab1
,_
,labright
as lab1right
))::(_
,(_
,HASHleft
16182 as HASH1left
,_
))::rest671
) => let val result
=MlyValue
.atexp(fn _
=>
16183 let val lab
as lab1
=lab1 ()
16184 in ( HASHAtExp(I(HASHleft
,labright
), lab
) ) end
16186 in (LrTable
.NT
15,(result
,HASH1left
,lab1right
),rest671
) end
16187 |
(45,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(_
,LPARleft
as LPAR1left
,_
16188 ))::rest671
) => let val result
=MlyValue
.atexp(fn _
=> (
16189 UNITAtExp(I(LPARleft
,RPARright
)) ))
16190 in (LrTable
.NT
15,(result
,LPAR1left
,RPAR1right
),rest671
) end
16191 |
(46,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(MlyValue
.exp_COMMA_list2
16192 exp_COMMA_list21
,_
,_
))::(_
,(_
,LPARleft
as LPAR1left
,_
))::rest671
) =>
16193 let val result
=MlyValue
.atexp(fn _
=> let val exp_COMMA_list2
as
16194 exp_COMMA_list21
=exp_COMMA_list21 ()
16195 in ( TUPLEAtExp(I(LPARleft
,RPARright
), exp_COMMA_list2
) ) end
16197 in (LrTable
.NT
15,(result
,LPAR1left
,RPAR1right
),rest671
) end
16198 |
(47,(_
,(_
,_
,RBRACKright
as RBRACK1right
))::(_
,(
16199 MlyValue
.exp_COMMA_list0 exp_COMMA_list01
,_
,_
))::(_
,(_
,LBRACKleft
as
16200 LBRACK1left
,_
))::rest671
) => let val result
=MlyValue
.atexp(fn _
=>
16201 let val exp_COMMA_list0
as exp_COMMA_list01
=exp_COMMA_list01 ()
16202 in ( LISTAtExp(I(LBRACKleft
,RBRACKright
),
16206 in (LrTable
.NT
15,(result
,LBRACK1left
,RBRACK1right
),rest671
) end
16207 |
(48,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(
16208 MlyValue
.exp_SEMICOLON_list2 exp_SEMICOLON_list21
,_
,_
))::(_
,(_
,
16209 LPARleft
as LPAR1left
,_
))::rest671
) => let val result
=MlyValue
.atexp(
16210 fn _
=> let val exp_SEMICOLON_list2
as exp_SEMICOLON_list21
=
16211 exp_SEMICOLON_list21 ()
16212 in ( SEQAtExp(I(LPARleft
,RPARright
), exp_SEMICOLON_list2
) ) end
16214 in (LrTable
.NT
15,(result
,LPAR1left
,RPAR1right
),rest671
) end
16215 |
(49,(_
,(_
,_
,ENDright
as END1right
))::(_
,(MlyValue
.popInfix popInfix1
16216 ,_
,_
))::(_
,(MlyValue
.exp_SEMICOLON_list1 exp_SEMICOLON_list11
,_
,_
))::_
16217 ::(_
,(MlyValue
.dec dec1
,_
,_
))::(_
,(MlyValue
.pushInfix pushInfix1
,_
,_
))
16218 ::(_
,(_
,LETleft
as LET1left
,_
))::rest671
) => let val result
=
16219 MlyValue
.atexp(fn _
=> let val pushInfix1
=pushInfix1 ()
16220 val dec
as dec1
=dec1 ()
16221 val exp_SEMICOLON_list1
as exp_SEMICOLON_list11
=exp_SEMICOLON_list11
16223 val popInfix1
=popInfix1 ()
16224 in ( LETAtExp(I(LETleft
,ENDright
),
16225 dec
, exp_SEMICOLON_list1
) )
16228 in (LrTable
.NT
15,(result
,LET1left
,END1right
),rest671
) end
16229 |
(50,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(MlyValue
.exp exp1
,_
,_
))::
16230 (_
,(_
,LPARleft
as LPAR1left
,_
))::rest671
) => let val result
=
16231 MlyValue
.atexp(fn _
=> let val exp
as exp1
=exp1 ()
16232 in ( PARAtExp(I(LPARleft
,RPARright
), exp
) ) end
16234 in (LrTable
.NT
15,(result
,LPAR1left
,RPAR1right
),rest671
) end
16235 |
(51,(_
,(MlyValue
.exp_COMMA_list1 exp_COMMA_list11
,
16236 exp_COMMA_list11left
,exp_COMMA_list11right
))::rest671
) => let val
16237 result
=MlyValue
.exp_COMMA_list0(fn _
=> let val exp_COMMA_list1
as
16238 exp_COMMA_list11
=exp_COMMA_list11 ()
16239 in ( exp_COMMA_list1
) end
16241 in (LrTable
.NT
16,(result
,exp_COMMA_list11left
,exp_COMMA_list11right
)
16243 |
(52,rest671
) => let val result
=MlyValue
.exp_COMMA_list0(fn _
=> (
16245 in (LrTable
.NT
16,(result
,defaultPos
,defaultPos
),rest671
) end
16246 |
(53,(_
,(MlyValue
.exp_COMMA_list1 exp_COMMA_list11
,_
,
16247 exp_COMMA_list11right
))::_
::(_
,(MlyValue
.exp exp1
,exp1left
,_
))::
16248 rest671
) => let val result
=MlyValue
.exp_COMMA_list1(fn _
=> let val
16249 exp
as exp1
=exp1 ()
16250 val exp_COMMA_list1
as exp_COMMA_list11
=exp_COMMA_list11 ()
16251 in ( exp
::exp_COMMA_list1
) end
16253 in (LrTable
.NT
17,(result
,exp1left
,exp_COMMA_list11right
),rest671
)
16255 |
(54,(_
,(MlyValue
.exp exp1
,exp1left
,exp1right
))::rest671
) => let val
16256 result
=MlyValue
.exp_COMMA_list1(fn _
=> let val exp
as exp1
=exp1 ()
16259 in (LrTable
.NT
17,(result
,exp1left
,exp1right
),rest671
) end
16260 |
(55,(_
,(MlyValue
.exp_COMMA_list1 exp_COMMA_list11
,_
,
16261 exp_COMMA_list11right
))::_
::(_
,(MlyValue
.exp exp1
,exp1left
,_
))::
16262 rest671
) => let val result
=MlyValue
.exp_COMMA_list2(fn _
=> let val
16263 exp
as exp1
=exp1 ()
16264 val exp_COMMA_list1
as exp_COMMA_list11
=exp_COMMA_list11 ()
16265 in ( exp
::exp_COMMA_list1
) end
16267 in (LrTable
.NT
18,(result
,exp1left
,exp_COMMA_list11right
),rest671
)
16269 |
(56,(_
,(MlyValue
.exp_SEMICOLON_list1 exp_SEMICOLON_list11
,_
,
16270 exp_SEMICOLON_list11right
))::_
::(_
,(MlyValue
.exp exp1
,exp1left
,_
))::
16271 rest671
) => let val result
=MlyValue
.exp_SEMICOLON_list1(fn _
=> let
16272 val exp
as exp1
=exp1 ()
16273 val exp_SEMICOLON_list1
as exp_SEMICOLON_list11
=exp_SEMICOLON_list11
16275 in ( exp
::exp_SEMICOLON_list1
) end
16277 in (LrTable
.NT
19,(result
,exp1left
,exp_SEMICOLON_list11right
),rest671
16279 |
(57,(_
,(MlyValue
.exp exp1
,exp1left
,exp1right
))::rest671
) => let val
16280 result
=MlyValue
.exp_SEMICOLON_list1(fn _
=> let val exp
as exp1
=exp1
16284 in (LrTable
.NT
19,(result
,exp1left
,exp1right
),rest671
) end
16285 |
(58,(_
,(MlyValue
.exp_SEMICOLON_list2 exp_SEMICOLON_list21
,_
,
16286 exp_SEMICOLON_list21right
))::_
::(_
,(MlyValue
.exp exp1
,exp1left
,_
))::
16287 rest671
) => let val result
=MlyValue
.exp_SEMICOLON_list2(fn _
=> let
16288 val exp
as exp1
=exp1 ()
16289 val exp_SEMICOLON_list2
as exp_SEMICOLON_list21
=exp_SEMICOLON_list21
16291 in ( exp
::exp_SEMICOLON_list2
) end
16293 in (LrTable
.NT
20,(result
,exp1left
,exp_SEMICOLON_list21right
),rest671
16295 |
(59,(_
,(MlyValue
.exp exp2
,_
,exp2right
))::_
::(_
,(MlyValue
.exp exp1
,
16296 exp1left
,_
))::rest671
) => let val result
=MlyValue
.exp_SEMICOLON_list2(
16297 fn _
=> let val exp1
=exp1 ()
16299 in ( [exp1
, exp2
] ) end
16301 in (LrTable
.NT
20,(result
,exp1left
,exp2right
),rest671
) end
16302 |
(60,(_
,(MlyValue
.COMMA_exprow_opt COMMA_exprow_opt1
,_
,
16303 COMMA_exprow_optright
as COMMA_exprow_opt1right
))::(_
,(MlyValue
.exp
16304 exp1
,_
,_
))::_
::(_
,(MlyValue
.lab lab1
,lableft
as lab1left
,_
))::rest671
)
16305 => let val result
=MlyValue
.exprow(fn _
=> let val lab
as lab1
=lab1 ()
16306 val exp
as exp1
=exp1 ()
16307 val COMMA_exprow_opt
as COMMA_exprow_opt1
=COMMA_exprow_opt1 ()
16309 ExpRow(I(lableft
,COMMA_exprow_optright
),
16310 lab
, exp
, COMMA_exprow_opt
)
16313 in (LrTable
.NT
21,(result
,lab1left
,COMMA_exprow_opt1right
),rest671
)
16315 |
(61,(_
,(MlyValue
.exprow exprow1
,_
,exprow1right
))::(_
,(_
,COMMA1left
,_
16316 ))::rest671
) => let val result
=MlyValue
.COMMA_exprow_opt(fn _
=> let
16317 val exprow
as exprow1
=exprow1 ()
16318 in ( SOME exprow
) end
16320 in (LrTable
.NT
23,(result
,COMMA1left
,exprow1right
),rest671
) end
16321 |
(62,rest671
) => let val result
=MlyValue
.COMMA_exprow_opt(fn _
=> (
16323 in (LrTable
.NT
23,(result
,defaultPos
,defaultPos
),rest671
) end
16324 |
(63,(_
,(MlyValue
.exprow exprow1
,exprow1left
,exprow1right
))::rest671
)
16325 => let val result
=MlyValue
.exprow_opt(fn _
=> let val exprow
as
16327 in ( SOME exprow
) end
16329 in (LrTable
.NT
22,(result
,exprow1left
,exprow1right
),rest671
) end
16330 |
(64,rest671
) => let val result
=MlyValue
.exprow_opt(fn _
=> ( NONE
))
16331 in (LrTable
.NT
22,(result
,defaultPos
,defaultPos
),rest671
) end
16332 |
(65,(_
,(MlyValue
.atexp atexp1
,atexp1left
,atexp1right
))::rest671
) =>
16333 let val result
=MlyValue
.appexp(fn _
=> let val atexp
as atexp1
=atexp1
16335 in ( atexp
::[] ) end
16337 in (LrTable
.NT
24,(result
,atexp1left
,atexp1right
),rest671
) end
16338 |
(66,(_
,(MlyValue
.atexp atexp1
,_
,atexp1right
))::(_
,(MlyValue
.appexp
16339 appexp1
,appexp1left
,_
))::rest671
) => let val result
=MlyValue
.appexp(
16340 fn _
=> let val appexp
as appexp1
=appexp1 ()
16341 val atexp
as atexp1
=atexp1 ()
16342 in ( atexp
::appexp
) end
16344 in (LrTable
.NT
24,(result
,appexp1left
,atexp1right
),rest671
) end
16345 |
(67,(_
,(MlyValue
.appexp appexp1
,appexp1left
,appexp1right
))::rest671
)
16346 => let val result
=MlyValue
.infexp(fn _
=> let val appexp
as appexp1
=
16348 in ( Infix
.parseExp(!J
, List.rev appexp
) ) end
16350 in (LrTable
.NT
25,(result
,appexp1left
,appexp1right
),rest671
) end
16351 |
(68,(_
,(MlyValue
.infexp infexp1
,infexp1left
,infexp1right
))::rest671
)
16352 => let val result
=MlyValue
.exp(fn _
=> let val infexp
as infexp1
=
16356 in (LrTable
.NT
26,(result
,infexp1left
,infexp1right
),rest671
) end
16357 |
(69,(_
,(MlyValue
.ty ty1
,_
,tyright
as ty1right
))::_
::(_
,(MlyValue
.exp
16358 exp1
,expleft
as exp1left
,_
))::rest671
) => let val result
=MlyValue
.exp
16359 (fn _
=> let val exp
as exp1
=exp1 ()
16360 val ty
as ty1
=ty1 ()
16361 in ( TYPEDExp(I(expleft
,tyright
), exp
, ty
) ) end
16363 in (LrTable
.NT
26,(result
,exp1left
,ty1right
),rest671
) end
16364 |
(70,(_
,(MlyValue
.exp exp2
,_
,exp2right
))::_
::(_
,(MlyValue
.exp exp1
,
16365 exp1left
,_
))::rest671
) => let val result
=MlyValue
.exp(fn _
=> let val
16368 in ( ANDALSOExp(I(exp1left
,exp2right
), exp1
, exp2
)) end
16370 in (LrTable
.NT
26,(result
,exp1left
,exp2right
),rest671
) end
16371 |
(71,(_
,(MlyValue
.exp exp2
,_
,exp2right
))::_
::(_
,(MlyValue
.exp exp1
,
16372 exp1left
,_
))::rest671
) => let val result
=MlyValue
.exp(fn _
=> let val
16375 in ( ORELSEExp(I(exp1left
,exp2right
), exp1
, exp2
) ) end
16377 in (LrTable
.NT
26,(result
,exp1left
,exp2right
),rest671
) end
16378 |
(72,(_
,(MlyValue
.match match1
,_
,matchright
as match1right
))::_
::(_
,(
16379 MlyValue
.exp exp1
,expleft
as exp1left
,_
))::rest671
) => let val result
=
16380 MlyValue
.exp(fn _
=> let val exp
as exp1
=exp1 ()
16381 val match
as match1
=match1 ()
16382 in ( HANDLEExp(I(expleft
,matchright
), exp
, match
) ) end
16384 in (LrTable
.NT
26,(result
,exp1left
,match1right
),rest671
) end
16385 |
(73,(_
,(MlyValue
.exp exp1
,_
,expright
as exp1right
))::(_
,(_
,RAISEleft
16386 as RAISE1left
,_
))::rest671
) => let val result
=MlyValue
.exp(fn _
=>
16387 let val exp
as exp1
=exp1 ()
16388 in ( RAISEExp(I(RAISEleft
,expright
), exp
) ) end
16390 in (LrTable
.NT
26,(result
,RAISE1left
,exp1right
),rest671
) end
16391 |
(74,(_
,(MlyValue
.exp exp3
,_
,exp3right
))::_
::(_
,(MlyValue
.exp exp2
,_
,
16392 _
))::_
::(_
,(MlyValue
.exp exp1
,_
,_
))::(_
,(_
,IFleft
as IF1left
,_
))::
16393 rest671
) => let val result
=MlyValue
.exp(fn _
=> let val exp1
=exp1 ()
16396 in ( IFExp(I(IFleft
,exp3right
), exp1
, exp2
, exp3
) ) end
16398 in (LrTable
.NT
26,(result
,IF1left
,exp3right
),rest671
) end
16399 |
(75,(_
,(MlyValue
.exp exp2
,_
,exp2right
))::_
::(_
,(MlyValue
.exp exp1
,_
,
16400 _
))::(_
,(_
,WHILEleft
as WHILE1left
,_
))::rest671
) => let val result
=
16401 MlyValue
.exp(fn _
=> let val exp1
=exp1 ()
16403 in ( WHILEExp(I(WHILEleft
,exp2right
), exp1
, exp2
) ) end
16405 in (LrTable
.NT
26,(result
,WHILE1left
,exp2right
),rest671
) end
16406 |
(76,(_
,(MlyValue
.match match1
,_
,matchright
as match1right
))::_
::(_
,(
16407 MlyValue
.exp exp1
,_
,_
))::(_
,(_
,CASEleft
as CASE1left
,_
))::rest671
) =>
16408 let val result
=MlyValue
.exp(fn _
=> let val exp
as exp1
=exp1 ()
16409 val match
as match1
=match1 ()
16410 in ( CASEExp(I(CASEleft
,matchright
), exp
, match
) ) end
16412 in (LrTable
.NT
26,(result
,CASE1left
,match1right
),rest671
) end
16413 |
(77,(_
,(MlyValue
.match match1
,_
,matchright
as match1right
))::(_
,(_
,
16414 FNleft
as FN1left
,_
))::rest671
) => let val result
=MlyValue
.exp(fn _
16415 => let val match
as match1
=match1 ()
16416 in ( FNExp(I(FNleft
,matchright
), match
) ) end
16418 in (LrTable
.NT
26,(result
,FN1left
,match1right
),rest671
) end
16419 |
(78,(_
,(MlyValue
.BAR_match_opt BAR_match_opt1
,_
,BAR_match_optright
16420 as BAR_match_opt1right
))::(_
,(MlyValue
.mrule mrule1
,mruleleft
as
16421 mrule1left
,_
))::rest671
) => let val result
=MlyValue
.match(fn _
=> let
16422 val mrule
as mrule1
=mrule1 ()
16423 val BAR_match_opt
as BAR_match_opt1
=BAR_match_opt1 ()
16425 Match(I(mruleleft
,BAR_match_optright
),
16426 mrule
, BAR_match_opt
) )
16429 in (LrTable
.NT
27,(result
,mrule1left
,BAR_match_opt1right
),rest671
)
16431 |
(79,(_
,(MlyValue
.match match1
,_
,match1right
))::(_
,(_
,BAR1left
,_
))::
16432 rest671
) => let val result
=MlyValue
.BAR_match_opt(fn _
=> let val
16433 match
as match1
=match1 ()
16434 in ( SOME match
) end
16436 in (LrTable
.NT
28,(result
,BAR1left
,match1right
),rest671
) end
16437 |
(80,rest671
) => let val result
=MlyValue
.BAR_match_opt(fn _
=> (
16439 in (LrTable
.NT
28,(result
,defaultPos
,defaultPos
),rest671
) end
16440 |
(81,(_
,(MlyValue
.exp exp1
,_
,expright
as exp1right
))::_
::(_
,(
16441 MlyValue
.pat pat1
,patleft
as pat1left
,_
))::rest671
) => let val result
=
16442 MlyValue
.mrule(fn _
=> let val pat
as pat1
=pat1 ()
16443 val exp
as exp1
=exp1 ()
16444 in ( Mrule(I(patleft
,expright
), pat
, exp
) ) end
16446 in (LrTable
.NT
29,(result
,pat1left
,exp1right
),rest671
) end
16447 |
(82,(_
,(MlyValue
.dec1 dec11
,dec11left
,dec11right
))::rest671
) => let
16448 val result
=MlyValue
.dec(fn _
=> let val dec1
as dec11
=dec11 ()
16451 in (LrTable
.NT
30,(result
,dec11left
,dec11right
),rest671
) end
16452 |
(83,rest671
) => let val result
=MlyValue
.dec(fn _
=> (
16453 EMPTYDec(I(defaultPos
,defaultPos
)) ))
16454 in (LrTable
.NT
30,(result
,defaultPos
,defaultPos
),rest671
) end
16455 |
(84,(_
,(MlyValue
.dec1
' dec1
'1,dec1
'1left
,dec1
'1right
))::rest671
) =>
16456 let val result
=MlyValue
.dec1(fn _
=> let val dec1
' as dec1
'1=dec1
'1 ()
16459 in (LrTable
.NT
31,(result
,dec1
'1left
,dec1
'1right
),rest671
) end
16460 |
(85,(_
,(_
,_
,ENDright
as END1right
))::(_
,(MlyValue
.popLocalInfix
16461 popLocalInfix1
,_
,_
))::(_
,(MlyValue
.dec dec2
,_
,_
))::(_
,(
16462 MlyValue
.pushLocalInfix pushLocalInfix1
,_
,_
))::_
::(_
,(MlyValue
.dec
16463 dec1
,_
,_
))::(_
,(MlyValue
.pushInfix pushInfix1
,_
,_
))::(_
,(_
,LOCALleft
16464 as LOCAL1left
,_
))::rest671
) => let val result
=MlyValue
.dec1(fn _
=>
16465 let val pushInfix1
=pushInfix1 ()
16467 val pushLocalInfix1
=pushLocalInfix1 ()
16469 val popLocalInfix1
=popLocalInfix1 ()
16470 in ( LOCALDec(I(LOCALleft
,ENDright
), dec1
, dec2
) ) end
16472 in (LrTable
.NT
31,(result
,LOCAL1left
,END1right
),rest671
) end
16473 |
(86,(_
,(MlyValue
.dec1 dec12
,_
,dec12right
))::(_
,(MlyValue
.dec1 dec11
,
16474 dec11left
,_
))::rest671
) => let val result
=MlyValue
.dec1(fn _
=> let
16477 in ( SEQDec(I(dec11left
,dec12right
), dec11
, dec12
) ) end
16479 in (LrTable
.NT
31,(result
,dec11left
,dec12right
),rest671
) end
16480 |
(87,(_
,(_
,SEMICOLON1left
,SEMICOLON1right
))::rest671
) => let val
16481 result
=MlyValue
.dec1(fn _
=> ( EMPTYDec(I(defaultPos
,defaultPos
)) ))
16482 in (LrTable
.NT
31,(result
,SEMICOLON1left
,SEMICOLON1right
),rest671
)
16484 |
(88,(_
,(MlyValue
.valbind valbind1
,_
,valbindright
as valbind1right
))
16485 ::(_
,(_
,VALleft
as VAL1left
,_
))::rest671
) => let val result
=
16486 MlyValue
.dec1
'(fn _
=> let val valbind
as valbind1
=valbind1 ()
16488 VALDec(I(VALleft
,valbindright
),
16489 TyVarseq(I(defaultPos
,defaultPos
), []), valbind
)
16492 in (LrTable
.NT
32,(result
,VAL1left
,valbind1right
),rest671
) end
16493 |
(89,(_
,(MlyValue
.valbind valbind1
,_
,valbindright
as valbind1right
))
16494 ::(_
,(MlyValue
.tyvarseq1 tyvarseq11
,_
,_
))::(_
,(_
,VALleft
as VAL1left
,_
16495 ))::rest671
) => let val result
=MlyValue
.dec1
'(fn _
=> let val
16496 tyvarseq1
as tyvarseq11
=tyvarseq11 ()
16497 val valbind
as valbind1
=valbind1 ()
16498 in ( VALDec(I(VALleft
,valbindright
), tyvarseq1
, valbind
) ) end
16500 in (LrTable
.NT
32,(result
,VAL1left
,valbind1right
),rest671
) end
16501 |
(90,(_
,(MlyValue
.fvalbind fvalbind1
,_
,fvalbindright
as
16502 fvalbind1right
))::(_
,(_
,FUNleft
as FUN1left
,_
))::rest671
) => let val
16503 result
=MlyValue
.dec1
'(fn _
=> let val fvalbind
as fvalbind1
=fvalbind1
16506 FUNDec(I(FUNleft
,fvalbindright
),
16507 TyVarseq(I(defaultPos
,defaultPos
), []), fvalbind
)
16510 in (LrTable
.NT
32,(result
,FUN1left
,fvalbind1right
),rest671
) end
16511 |
(91,(_
,(MlyValue
.fvalbind fvalbind1
,_
,fvalbindright
as
16512 fvalbind1right
))::(_
,(MlyValue
.tyvarseq1 tyvarseq11
,_
,_
))::(_
,(_
,
16513 FUNleft
as FUN1left
,_
))::rest671
) => let val result
=MlyValue
.dec1
'(fn
16514 _
=> let val tyvarseq1
as tyvarseq11
=tyvarseq11 ()
16515 val fvalbind
as fvalbind1
=fvalbind1 ()
16516 in ( FUNDec(I(FUNleft
,fvalbindright
), tyvarseq1
, fvalbind
)) end
16518 in (LrTable
.NT
32,(result
,FUN1left
,fvalbind1right
),rest671
) end
16519 |
(92,(_
,(MlyValue
.typbind typbind1
,_
,typbindright
as typbind1right
))
16520 ::(_
,(_
,TYPEleft
as TYPE1left
,_
))::rest671
) => let val result
=
16521 MlyValue
.dec1
'(fn _
=> let val typbind
as typbind1
=typbind1 ()
16522 in ( TYPEDec(I(TYPEleft
,typbindright
), typbind
) ) end
16524 in (LrTable
.NT
32,(result
,TYPE1left
,typbind1right
),rest671
) end
16525 |
(93,(_
,(MlyValue
.WITHTYPE_typbind_opt WITHTYPE_typbind_opt1
,_
,
16526 WITHTYPE_typbind_optright
as WITHTYPE_typbind_opt1right
))::(_
,(
16527 MlyValue
.datbind0 datbind01
,_
,_
))::(_
,(_
,DATATYPEleft
as DATATYPE1left
16528 ,_
))::rest671
) => let val result
=MlyValue
.dec1
'(fn _
=> let val
16529 datbind0
as datbind01
=datbind01 ()
16530 val WITHTYPE_typbind_opt
as WITHTYPE_typbind_opt1
=
16531 WITHTYPE_typbind_opt1 ()
16533 DATATYPEDec(I(DATATYPEleft
,WITHTYPE_typbind_optright
),
16534 datbind0
, WITHTYPE_typbind_opt
)
16537 in (LrTable
.NT
32,(result
,DATATYPE1left
,WITHTYPE_typbind_opt1right
),
16539 |
(94,(_
,(MlyValue
.WITHTYPE_typbind_opt WITHTYPE_typbind_opt1
,_
,
16540 WITHTYPE_typbind_optright
as WITHTYPE_typbind_opt1right
))::(_
,(
16541 MlyValue
.datbind1 datbind11
,_
,_
))::(_
,(_
,DATATYPEleft
as DATATYPE1left
16542 ,_
))::rest671
) => let val result
=MlyValue
.dec1
'(fn _
=> let val
16543 datbind1
as datbind11
=datbind11 ()
16544 val WITHTYPE_typbind_opt
as WITHTYPE_typbind_opt1
=
16545 WITHTYPE_typbind_opt1 ()
16547 DATATYPEDec(I(DATATYPEleft
,WITHTYPE_typbind_optright
),
16548 datbind1
, WITHTYPE_typbind_opt
)
16551 in (LrTable
.NT
32,(result
,DATATYPE1left
,WITHTYPE_typbind_opt1right
),
16553 |
(95,(_
,(MlyValue
.longtycon longtycon1
,_
,longtyconright
as
16554 longtycon1right
))::_
::_
::(_
,(MlyValue
.tycon tycon1
,_
,_
))::(_
,(_
,
16555 DATATYPEleft
as DATATYPE1left
,_
))::rest671
) => let val result
=
16556 MlyValue
.dec1
'(fn _
=> let val tycon
as tycon1
=tycon1 ()
16557 val longtycon
as longtycon1
=longtycon1 ()
16559 REPLICATIONDec(I(DATATYPEleft
,longtyconright
),
16563 in (LrTable
.NT
32,(result
,DATATYPE1left
,longtycon1right
),rest671
) end
16564 |
(96,(_
,(_
,_
,ENDright
as END1right
))::(_
,(MlyValue
.dec dec1
,_
,_
))::_
16565 ::(_
,(MlyValue
.WITHTYPE_typbind_opt WITHTYPE_typbind_opt1
,_
,_
))::(_
,(
16566 MlyValue
.datbind datbind1
,_
,_
))::(_
,(_
,ABSTYPEleft
as ABSTYPE1left
,_
))
16567 ::rest671
) => let val result
=MlyValue
.dec1
'(fn _
=> let val datbind
16568 as datbind1
=datbind1 ()
16569 val WITHTYPE_typbind_opt
as WITHTYPE_typbind_opt1
=
16570 WITHTYPE_typbind_opt1 ()
16571 val dec
as dec1
=dec1 ()
16573 ABSTYPEDec(I(ABSTYPEleft
,ENDright
), datbind
,
16574 WITHTYPE_typbind_opt
, dec
)
16577 in (LrTable
.NT
32,(result
,ABSTYPE1left
,END1right
),rest671
) end
16578 |
(97,(_
,(MlyValue
.exbind exbind1
,_
,exbindright
as exbind1right
))::(_
,
16579 (_
,EXCEPTIONleft
as EXCEPTION1left
,_
))::rest671
) => let val result
=
16580 MlyValue
.dec1
'(fn _
=> let val exbind
as exbind1
=exbind1 ()
16581 in ( EXCEPTIONDec(I(EXCEPTIONleft
,exbindright
), exbind
) ) end
16583 in (LrTable
.NT
32,(result
,EXCEPTION1left
,exbind1right
),rest671
) end
16584 |
(98,(_
,(MlyValue
.longstrid_list1 longstrid_list11
,_
,
16585 longstrid_list1right
as longstrid_list11right
))::(_
,(_
,OPENleft
as
16586 OPEN1left
,_
))::rest671
) => let val result
=MlyValue
.dec1
'(fn _
=> let
16587 val longstrid_list1
as longstrid_list11
=longstrid_list11 ()
16589 OPENDec(I(OPENleft
,longstrid_list1right
),
16593 in (LrTable
.NT
32,(result
,OPEN1left
,longstrid_list11right
),rest671
)
16595 |
(99,(_
,(MlyValue
.vid_list1 vid_list11
,_
,vid_list1right
as
16596 vid_list11right
))::(_
,(MlyValue
.d_opt d_opt1
,_
,_
))::(_
,(_
,INFIXleft
16597 as INFIX1left
,_
))::rest671
) => let val result
=MlyValue
.dec1
'(fn _
=>
16598 let val d_opt
as d_opt1
=d_opt1 ()
16599 val vid_list1
as vid_list11
=vid_list11 ()
16601 assignInfix((Infix
.LEFT
, d_opt
), vid_list1
);
16602 EMPTYDec(I(INFIXleft
,vid_list1right
))
16605 in (LrTable
.NT
32,(result
,INFIX1left
,vid_list11right
),rest671
) end
16606 |
(100,(_
,(MlyValue
.vid_list1 vid_list11
,_
,vid_list1right
as
16607 vid_list11right
))::(_
,(MlyValue
.d_opt d_opt1
,_
,_
))::(_
,(_
,INFIXRleft
16608 as INFIXR1left
,_
))::rest671
) => let val result
=MlyValue
.dec1
'(fn _
16609 => let val d_opt
as d_opt1
=d_opt1 ()
16610 val vid_list1
as vid_list11
=vid_list11 ()
16612 assignInfix((Infix
.RIGHT
, d_opt
), vid_list1
);
16613 EMPTYDec(I(INFIXRleft
,vid_list1right
))
16616 in (LrTable
.NT
32,(result
,INFIXR1left
,vid_list11right
),rest671
) end
16617 |
(101,(_
,(MlyValue
.vid_list1 vid_list11
,_
,vid_list1right
as
16618 vid_list11right
))::(_
,(_
,NONFIXleft
as NONFIX1left
,_
))::rest671
) =>
16619 let val result
=MlyValue
.dec1
'(fn _
=> let val vid_list1
as vid_list11
=
16622 cancelInfix(vid_list1
);
16623 EMPTYDec(I(NONFIXleft
,vid_list1right
)) )
16626 in (LrTable
.NT
32,(result
,NONFIX1left
,vid_list11right
),rest671
) end
16627 |
(102,(_
,(MlyValue
.typbind typbind1
,_
,typbind1right
))::(_
,(_
,
16628 WITHTYPE1left
,_
))::rest671
) => let val result
=
16629 MlyValue
.WITHTYPE_typbind_opt(fn _
=> let val typbind
as typbind1
=
16631 in ( SOME typbind
) end
16633 in (LrTable
.NT
33,(result
,WITHTYPE1left
,typbind1right
),rest671
) end
16634 |
(103,rest671
) => let val result
=MlyValue
.WITHTYPE_typbind_opt(fn _
16636 in (LrTable
.NT
33,(result
,defaultPos
,defaultPos
),rest671
) end
16637 |
(104,(_
,(MlyValue
.vid_list1 vid_list11
,_
,vid_list11right
))::(_
,(
16638 MlyValue
.vid vid1
,vid1left
,_
))::rest671
) => let val result
=
16639 MlyValue
.vid_list1(fn _
=> let val vid
as vid1
=vid1 ()
16640 val vid_list1
as vid_list11
=vid_list11 ()
16641 in ( vid
::vid_list1
) end
16643 in (LrTable
.NT
34,(result
,vid1left
,vid_list11right
),rest671
) end
16644 |
(105,(_
,(MlyValue
.vid vid1
,vid1left
,vid1right
))::rest671
) => let
16645 val result
=MlyValue
.vid_list1(fn _
=> let val vid
as vid1
=vid1 ()
16648 in (LrTable
.NT
34,(result
,vid1left
,vid1right
),rest671
) end
16649 |
(106,(_
,(MlyValue
.longstrid_list1 longstrid_list11
,_
,
16650 longstrid_list11right
))::(_
,(MlyValue
.longstrid longstrid1
,
16651 longstrid1left
,_
))::rest671
) => let val result
=
16652 MlyValue
.longstrid_list1(fn _
=> let val longstrid
as longstrid1
=
16654 val longstrid_list1
as longstrid_list11
=longstrid_list11 ()
16655 in ( longstrid
::longstrid_list1
) end
16657 in (LrTable
.NT
35,(result
,longstrid1left
,longstrid_list11right
),
16659 |
(107,(_
,(MlyValue
.longstrid longstrid1
,longstrid1left
,
16660 longstrid1right
))::rest671
) => let val result
=MlyValue
.longstrid_list1
16661 (fn _
=> let val longstrid
as longstrid1
=longstrid1 ()
16662 in ( longstrid
::[] ) end
16664 in (LrTable
.NT
35,(result
,longstrid1left
,longstrid1right
),rest671
)
16666 |
(108,(_
,(MlyValue
.d d1
,d1left
,d1right
))::rest671
) => let val result
=
16667 MlyValue
.d_opt(fn _
=> let val d
as d1
=d1 ()
16670 in (LrTable
.NT
36,(result
,d1left
,d1right
),rest671
) end
16671 |
(109,rest671
) => let val result
=MlyValue
.d_opt(fn _
=> ( 0 ))
16672 in (LrTable
.NT
36,(result
,defaultPos
,defaultPos
),rest671
) end
16673 |
(110,(_
,(MlyValue
.AND_valbind_opt AND_valbind_opt1
,_
,
16674 AND_valbind_optright
as AND_valbind_opt1right
))::(_
,(MlyValue
.exp exp1
16675 ,_
,_
))::_
::(_
,(MlyValue
.pat pat1
,patleft
as pat1left
,_
))::rest671
) =>
16676 let val result
=MlyValue
.valbind(fn _
=> let val pat
as pat1
=pat1 ()
16677 val exp
as exp1
=exp1 ()
16678 val AND_valbind_opt
as AND_valbind_opt1
=AND_valbind_opt1 ()
16680 PLAINValBind(I(patleft
,AND_valbind_optright
),
16681 pat
, exp
, AND_valbind_opt
)
16684 in (LrTable
.NT
37,(result
,pat1left
,AND_valbind_opt1right
),rest671
)
16686 |
(111,(_
,(MlyValue
.valbind valbind1
,_
,valbindright
as valbind1right
))
16687 ::(_
,(_
,RECleft
as REC1left
,_
))::rest671
) => let val result
=
16688 MlyValue
.valbind(fn _
=> let val valbind
as valbind1
=valbind1 ()
16689 in ( RECValBind(I(RECleft
,valbindright
), valbind
) ) end
16691 in (LrTable
.NT
37,(result
,REC1left
,valbind1right
),rest671
) end
16692 |
(112,(_
,(MlyValue
.valbind valbind1
,_
,valbind1right
))::(_
,(_
,AND1left
16693 ,_
))::rest671
) => let val result
=MlyValue
.AND_valbind_opt(fn _
=> let
16694 val valbind
as valbind1
=valbind1 ()
16695 in ( SOME valbind
) end
16697 in (LrTable
.NT
38,(result
,AND1left
,valbind1right
),rest671
) end
16698 |
(113,rest671
) => let val result
=MlyValue
.AND_valbind_opt(fn _
=> (
16700 in (LrTable
.NT
38,(result
,defaultPos
,defaultPos
),rest671
) end
16701 |
(114,(_
,(MlyValue
.AND_fvalbind_opt AND_fvalbind_opt1
,_
,
16702 AND_fvalbind_optright
as AND_fvalbind_opt1right
))::(_
,(MlyValue
.fmatch
16703 fmatch1
,fmatchleft
as fmatch1left
,_
))::rest671
) => let val result
=
16704 MlyValue
.fvalbind(fn _
=> let val fmatch
as fmatch1
=fmatch1 ()
16705 val AND_fvalbind_opt
as AND_fvalbind_opt1
=AND_fvalbind_opt1 ()
16707 FvalBind(I(fmatchleft
,AND_fvalbind_optright
),
16708 fmatch
, AND_fvalbind_opt
)
16711 in (LrTable
.NT
39,(result
,fmatch1left
,AND_fvalbind_opt1right
),rest671
16713 |
(115,(_
,(MlyValue
.fvalbind fvalbind1
,_
,fvalbind1right
))::(_
,(_
,
16714 AND1left
,_
))::rest671
) => let val result
=MlyValue
.AND_fvalbind_opt(fn
16715 _
=> let val fvalbind
as fvalbind1
=fvalbind1 ()
16716 in ( SOME fvalbind
) end
16718 in (LrTable
.NT
40,(result
,AND1left
,fvalbind1right
),rest671
) end
16719 |
(116,rest671
) => let val result
=MlyValue
.AND_fvalbind_opt(fn _
=> (
16721 in (LrTable
.NT
40,(result
,defaultPos
,defaultPos
),rest671
) end
16722 |
(117,(_
,(MlyValue
.BAR_fmatch_opt BAR_fmatch_opt1
,_
,
16723 BAR_fmatch_optright
as BAR_fmatch_opt1right
))::(_
,(MlyValue
.fmrule
16724 fmrule1
,fmruleleft
as fmrule1left
,_
))::rest671
) => let val result
=
16725 MlyValue
.fmatch(fn _
=> let val fmrule
as fmrule1
=fmrule1 ()
16726 val BAR_fmatch_opt
as BAR_fmatch_opt1
=BAR_fmatch_opt1 ()
16728 Fmatch(I(fmruleleft
,BAR_fmatch_optright
),
16729 fmrule
, BAR_fmatch_opt
)
16732 in (LrTable
.NT
41,(result
,fmrule1left
,BAR_fmatch_opt1right
),rest671
)
16734 |
(118,(_
,(MlyValue
.fmatch fmatch1
,_
,fmatch1right
))::(_
,(_
,BAR1left
,_
)
16735 )::rest671
) => let val result
=MlyValue
.BAR_fmatch_opt(fn _
=> let val
16736 fmatch
as fmatch1
=fmatch1 ()
16737 in ( SOME fmatch
) end
16739 in (LrTable
.NT
42,(result
,BAR1left
,fmatch1right
),rest671
) end
16740 |
(119,rest671
) => let val result
=MlyValue
.BAR_fmatch_opt(fn _
=> (
16742 in (LrTable
.NT
42,(result
,defaultPos
,defaultPos
),rest671
) end
16743 |
(120,(_
,(MlyValue
.exp exp1
,_
,expright
as exp1right
))::_
::(_
,(
16744 MlyValue
.COLON_ty_opt COLON_ty_opt1
,_
,_
))::(_
,(MlyValue
.atpat_list1
16745 atpat_list11
,atpat_list1left
as atpat_list11left
,_
))::rest671
) => let
16746 val result
=MlyValue
.fmrule(fn _
=> let val atpat_list1
as atpat_list11
16748 val COLON_ty_opt
as COLON_ty_opt1
=COLON_ty_opt1 ()
16749 val exp
as exp1
=exp1 ()
16752 val (op_opt
, vid
, atpats
) =
16753 Infix
.parseFmrule(!J
, atpat_list1
)
16755 Fmrule(I(atpat_list1left
,expright
),
16756 op_opt
, vid
, atpats
, COLON_ty_opt
, exp
)
16760 in (LrTable
.NT
43,(result
,atpat_list11left
,exp1right
),rest671
) end
16761 |
(121,(_
,(MlyValue
.AND_typbind_opt AND_typbind_opt1
,_
,
16762 AND_typbind_optright
as AND_typbind_opt1right
))::(_
,(MlyValue
.ty ty1
,_
16763 ,_
))::_
::(_
,(MlyValue
.tycon tycon1
,_
,_
))::(_
,(MlyValue
.tyvarseq
16764 tyvarseq1
,tyvarseqleft
as tyvarseq1left
,_
))::rest671
) => let val
16765 result
=MlyValue
.typbind(fn _
=> let val tyvarseq
as tyvarseq1
=
16767 val tycon
as tycon1
=tycon1 ()
16768 val ty
as ty1
=ty1 ()
16769 val AND_typbind_opt
as AND_typbind_opt1
=AND_typbind_opt1 ()
16771 TypBind(I(tyvarseqleft
,AND_typbind_optright
),
16772 tyvarseq
, tycon
, ty
, AND_typbind_opt
)
16775 in (LrTable
.NT
44,(result
,tyvarseq1left
,AND_typbind_opt1right
),
16777 |
(122,(_
,(MlyValue
.typbind typbind1
,_
,typbind1right
))::(_
,(_
,AND1left
16778 ,_
))::rest671
) => let val result
=MlyValue
.AND_typbind_opt(fn _
=> let
16779 val typbind
as typbind1
=typbind1 ()
16780 in ( SOME typbind
) end
16782 in (LrTable
.NT
45,(result
,AND1left
,typbind1right
),rest671
) end
16783 |
(123,rest671
) => let val result
=MlyValue
.AND_typbind_opt(fn _
=> (
16785 in (LrTable
.NT
45,(result
,defaultPos
,defaultPos
),rest671
) end
16786 |
(124,(_
,(MlyValue
.AND_datbind_opt AND_datbind_opt1
,_
,
16787 AND_datbind_optright
as AND_datbind_opt1right
))::(_
,(MlyValue
.conbind
16788 conbind1
,_
,_
))::_
::(_
,(MlyValue
.tycon tycon1
,_
,_
))::(_
,(
16789 MlyValue
.tyvarseq tyvarseq1
,tyvarseqleft
as tyvarseq1left
,_
))::rest671
16790 ) => let val result
=MlyValue
.datbind(fn _
=> let val tyvarseq
as
16791 tyvarseq1
=tyvarseq1 ()
16792 val tycon
as tycon1
=tycon1 ()
16793 val conbind
as conbind1
=conbind1 ()
16794 val AND_datbind_opt
as AND_datbind_opt1
=AND_datbind_opt1 ()
16796 DatBind(I(tyvarseqleft
,AND_datbind_optright
),
16797 tyvarseq
, tycon
, conbind
, AND_datbind_opt
)
16800 in (LrTable
.NT
46,(result
,tyvarseq1left
,AND_datbind_opt1right
),
16802 |
(125,(_
,(MlyValue
.AND_datbind_opt AND_datbind_opt1
,_
,
16803 AND_datbind_optright
as AND_datbind_opt1right
))::(_
,(MlyValue
.conbind
16804 conbind1
,_
,_
))::_
::(_
,(MlyValue
.tycon tycon1
,tyconleft
as tycon1left
,_
16805 ))::rest671
) => let val result
=MlyValue
.datbind0(fn _
=> let val tycon
16806 as tycon1
=tycon1 ()
16807 val conbind
as conbind1
=conbind1 ()
16808 val AND_datbind_opt
as AND_datbind_opt1
=AND_datbind_opt1 ()
16810 DatBind(I(tyconleft
,AND_datbind_optright
),
16811 TyVarseq(I(defaultPos
,defaultPos
), []),
16812 tycon
, conbind
, AND_datbind_opt
)
16815 in (LrTable
.NT
47,(result
,tycon1left
,AND_datbind_opt1right
),rest671
)
16817 |
(126,(_
,(MlyValue
.AND_datbind_opt AND_datbind_opt1
,_
,
16818 AND_datbind_optright
as AND_datbind_opt1right
))::(_
,(MlyValue
.conbind
16819 conbind1
,_
,_
))::_
::(_
,(MlyValue
.tycon tycon1
,_
,_
))::(_
,(
16820 MlyValue
.tyvarseq1 tyvarseq11
,tyvarseq1left
as tyvarseq11left
,_
))::
16821 rest671
) => let val result
=MlyValue
.datbind1(fn _
=> let val tyvarseq1
16822 as tyvarseq11
=tyvarseq11 ()
16823 val tycon
as tycon1
=tycon1 ()
16824 val conbind
as conbind1
=conbind1 ()
16825 val AND_datbind_opt
as AND_datbind_opt1
=AND_datbind_opt1 ()
16827 DatBind(I(tyvarseq1left
,AND_datbind_optright
),
16828 tyvarseq1
, tycon
, conbind
, AND_datbind_opt
)
16831 in (LrTable
.NT
48,(result
,tyvarseq11left
,AND_datbind_opt1right
),
16833 |
(127,(_
,(MlyValue
.datbind datbind1
,_
,datbind1right
))::(_
,(_
,AND1left
16834 ,_
))::rest671
) => let val result
=MlyValue
.AND_datbind_opt(fn _
=> let
16835 val datbind
as datbind1
=datbind1 ()
16836 in ( SOME datbind
) end
16838 in (LrTable
.NT
49,(result
,AND1left
,datbind1right
),rest671
) end
16839 |
(128,rest671
) => let val result
=MlyValue
.AND_datbind_opt(fn _
=> (
16841 in (LrTable
.NT
49,(result
,defaultPos
,defaultPos
),rest671
) end
16842 |
(129,(_
,(MlyValue
.BAR_conbind_opt BAR_conbind_opt1
,_
,
16843 BAR_conbind_optright
as BAR_conbind_opt1right
))::(_
,(
16844 MlyValue
.OF_ty_opt OF_ty_opt1
,_
,_
))::(_
,(MlyValue
.vid
' vid
'1,_
,_
))::(_
16845 ,(MlyValue
.OP_opt OP_opt1
,OP_optleft
as OP_opt1left
,_
))::rest671
) =>
16846 let val result
=MlyValue
.conbind(fn _
=> let val OP_opt
as OP_opt1
=
16848 val vid
' as vid
'1=vid
'1 ()
16849 val OF_ty_opt
as OF_ty_opt1
=OF_ty_opt1 ()
16850 val BAR_conbind_opt
as BAR_conbind_opt1
=BAR_conbind_opt1 ()
16852 ConBind(I(OP_optleft
,BAR_conbind_optright
),
16853 OP_opt
, vid
', OF_ty_opt
, BAR_conbind_opt
)
16856 in (LrTable
.NT
50,(result
,OP_opt1left
,BAR_conbind_opt1right
),rest671
)
16858 |
(130,(_
,(MlyValue
.conbind conbind1
,_
,conbind1right
))::(_
,(_
,BAR1left
16859 ,_
))::rest671
) => let val result
=MlyValue
.BAR_conbind_opt(fn _
=> let
16860 val conbind
as conbind1
=conbind1 ()
16861 in ( SOME conbind
) end
16863 in (LrTable
.NT
51,(result
,BAR1left
,conbind1right
),rest671
) end
16864 |
(131,rest671
) => let val result
=MlyValue
.BAR_conbind_opt(fn _
=> (
16866 in (LrTable
.NT
51,(result
,defaultPos
,defaultPos
),rest671
) end
16867 |
(132,(_
,(MlyValue
.ty ty1
,_
,ty1right
))::(_
,(_
,OF1left
,_
))::rest671
)
16868 => let val result
=MlyValue
.OF_ty_opt(fn _
=> let val ty
as ty1
=ty1 ()
16871 in (LrTable
.NT
52,(result
,OF1left
,ty1right
),rest671
) end
16872 |
(133,rest671
) => let val result
=MlyValue
.OF_ty_opt(fn _
=> ( NONE
))
16873 in (LrTable
.NT
52,(result
,defaultPos
,defaultPos
),rest671
) end
16874 |
(134,(_
,(MlyValue
.AND_exbind_opt AND_exbind_opt1
,_
,
16875 AND_exbind_optright
as AND_exbind_opt1right
))::(_
,(MlyValue
.OF_ty_opt
16876 OF_ty_opt1
,_
,_
))::(_
,(MlyValue
.vid
' vid
'1,_
,_
))::(_
,(MlyValue
.OP_opt
16877 OP_opt1
,OP_optleft
as OP_opt1left
,_
))::rest671
) => let val result
=
16878 MlyValue
.exbind(fn _
=> let val OP_opt
as OP_opt1
=OP_opt1 ()
16879 val vid
' as vid
'1=vid
'1 ()
16880 val OF_ty_opt
as OF_ty_opt1
=OF_ty_opt1 ()
16881 val AND_exbind_opt
as AND_exbind_opt1
=AND_exbind_opt1 ()
16883 NEWExBind(I(OP_optleft
,AND_exbind_optright
),
16884 OP_opt
, vid
', OF_ty_opt
, AND_exbind_opt
)
16887 in (LrTable
.NT
53,(result
,OP_opt1left
,AND_exbind_opt1right
),rest671
)
16889 |
(135,(_
,(MlyValue
.AND_exbind_opt AND_exbind_opt1
,_
,
16890 AND_exbind_optright
as AND_exbind_opt1right
))::(_
,(MlyValue
.longvid
16891 longvid1
,_
,_
))::(_
,(MlyValue
.OP_opt OP_opt2
,_
,_
))::_
::(_
,(
16892 MlyValue
.vid
' vid
'1,_
,_
))::(_
,(MlyValue
.OP_opt OP_opt1
,OP_opt1left
,_
))
16893 ::rest671
) => let val result
=MlyValue
.exbind(fn _
=> let val OP_opt1
=
16895 val vid
' as vid
'1=vid
'1 ()
16896 val OP_opt2
=OP_opt2 ()
16897 val longvid
as longvid1
=longvid1 ()
16898 val AND_exbind_opt
as AND_exbind_opt1
=AND_exbind_opt1 ()
16900 EQUALExBind(I(OP_opt1left
,AND_exbind_optright
),
16901 OP_opt1
, vid
', OP_opt2
, longvid
,
16905 in (LrTable
.NT
53,(result
,OP_opt1left
,AND_exbind_opt1right
),rest671
)
16907 |
(136,(_
,(MlyValue
.exbind exbind1
,_
,exbind1right
))::(_
,(_
,AND1left
,_
)
16908 )::rest671
) => let val result
=MlyValue
.AND_exbind_opt(fn _
=> let val
16909 exbind
as exbind1
=exbind1 ()
16910 in ( SOME exbind
) end
16912 in (LrTable
.NT
54,(result
,AND1left
,exbind1right
),rest671
) end
16913 |
(137,rest671
) => let val result
=MlyValue
.AND_exbind_opt(fn _
=> (
16915 in (LrTable
.NT
54,(result
,defaultPos
,defaultPos
),rest671
) end
16916 |
(138,(_
,(MlyValue
.atpat
' atpat
'1,atpat
'1left
,atpat
'1right
))::rest671
16917 ) => let val result
=MlyValue
.atpat(fn _
=> let val atpat
' as atpat
'1=
16921 in (LrTable
.NT
55,(result
,atpat
'1left
,atpat
'1right
),rest671
) end
16922 |
(139,(_
,(MlyValue
.longvid
' longvid
'1,_
,longvid
'right
as
16923 longvid
'1right
))::(_
,(MlyValue
.OP_opt OP_opt1
,OP_optleft
as
16924 OP_opt1left
,_
))::rest671
) => let val result
=MlyValue
.atpat(fn _
=>
16925 let val OP_opt
as OP_opt1
=OP_opt1 ()
16926 val longvid
' as longvid
'1=longvid
'1 ()
16928 LONGVIDAtPat(I(OP_optleft
,longvid
'right
),
16932 in (LrTable
.NT
55,(result
,OP_opt1left
,longvid
'1right
),rest671
) end
16933 |
(140,(_
,(_
,UNDERBARleft
as UNDERBAR1left
,UNDERBARright
as
16934 UNDERBAR1right
))::rest671
) => let val result
=MlyValue
.atpat
'(fn _
=> (
16935 WILDCARDAtPat(I(UNDERBARleft
,UNDERBARright
)) ))
16936 in (LrTable
.NT
56,(result
,UNDERBAR1left
,UNDERBAR1right
),rest671
) end
16937 |
(141,(_
,(MlyValue
.scon scon1
,sconleft
as scon1left
,sconright
as
16938 scon1right
))::rest671
) => let val result
=MlyValue
.atpat
'(fn _
=> let
16939 val scon
as scon1
=scon1 ()
16940 in ( SCONAtPat(I(sconleft
,sconright
), scon
) ) end
16942 in (LrTable
.NT
56,(result
,scon1left
,scon1right
),rest671
) end
16943 |
(142,(_
,(_
,_
,RBRACEright
as RBRACE1right
))::(_
,(MlyValue
.patrow_opt
16944 patrow_opt1
,_
,_
))::(_
,(_
,LBRACEleft
as LBRACE1left
,_
))::rest671
) =>
16945 let val result
=MlyValue
.atpat
'(fn _
=> let val patrow_opt
as
16946 patrow_opt1
=patrow_opt1 ()
16947 in ( RECORDAtPat(I(LBRACEleft
,RBRACEright
), patrow_opt
) ) end
16949 in (LrTable
.NT
56,(result
,LBRACE1left
,RBRACE1right
),rest671
) end
16950 |
(143,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(_
,LPARleft
as LPAR1left
,
16951 _
))::rest671
) => let val result
=MlyValue
.atpat
'(fn _
=> (
16952 UNITAtPat(I(LPARleft
,RPARright
)) ))
16953 in (LrTable
.NT
56,(result
,LPAR1left
,RPAR1right
),rest671
) end
16954 |
(144,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(MlyValue
.pat_COMMA_list2
16955 pat_COMMA_list21
,_
,_
))::(_
,(_
,LPARleft
as LPAR1left
,_
))::rest671
) =>
16956 let val result
=MlyValue
.atpat
'(fn _
=> let val pat_COMMA_list2
as
16957 pat_COMMA_list21
=pat_COMMA_list21 ()
16958 in ( TUPLEAtPat(I(LPARleft
,RPARright
), pat_COMMA_list2
) ) end
16960 in (LrTable
.NT
56,(result
,LPAR1left
,RPAR1right
),rest671
) end
16961 |
(145,(_
,(_
,_
,RBRACKright
as RBRACK1right
))::(_
,(
16962 MlyValue
.pat_COMMA_list0 pat_COMMA_list01
,_
,_
))::(_
,(_
,LBRACKleft
as
16963 LBRACK1left
,_
))::rest671
) => let val result
=MlyValue
.atpat
'(fn _
=>
16964 let val pat_COMMA_list0
as pat_COMMA_list01
=pat_COMMA_list01 ()
16965 in ( LISTAtPat(I(LBRACKleft
,RBRACKright
),
16969 in (LrTable
.NT
56,(result
,LBRACK1left
,RBRACK1right
),rest671
) end
16970 |
(146,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(MlyValue
.pat pat1
,_
,_
))
16971 ::(_
,(_
,LPARleft
as LPAR1left
,_
))::rest671
) => let val result
=
16972 MlyValue
.atpat
'(fn _
=> let val pat
as pat1
=pat1 ()
16973 in ( PARAtPat(I(LPARleft
,RPARright
), pat
) ) end
16975 in (LrTable
.NT
56,(result
,LPAR1left
,RPAR1right
),rest671
) end
16976 |
(147,(_
,(MlyValue
.pat_COMMA_list1 pat_COMMA_list11
,
16977 pat_COMMA_list11left
,pat_COMMA_list11right
))::rest671
) => let val
16978 result
=MlyValue
.pat_COMMA_list0(fn _
=> let val pat_COMMA_list1
as
16979 pat_COMMA_list11
=pat_COMMA_list11 ()
16980 in ( pat_COMMA_list1
) end
16982 in (LrTable
.NT
57,(result
,pat_COMMA_list11left
,pat_COMMA_list11right
)
16984 |
(148,rest671
) => let val result
=MlyValue
.pat_COMMA_list0(fn _
=> (
16986 in (LrTable
.NT
57,(result
,defaultPos
,defaultPos
),rest671
) end
16987 |
(149,(_
,(MlyValue
.pat_COMMA_list1 pat_COMMA_list11
,_
,
16988 pat_COMMA_list11right
))::_
::(_
,(MlyValue
.pat pat1
,pat1left
,_
))::
16989 rest671
) => let val result
=MlyValue
.pat_COMMA_list1(fn _
=> let val
16990 pat
as pat1
=pat1 ()
16991 val pat_COMMA_list1
as pat_COMMA_list11
=pat_COMMA_list11 ()
16992 in ( pat
::pat_COMMA_list1
) end
16994 in (LrTable
.NT
58,(result
,pat1left
,pat_COMMA_list11right
),rest671
)
16996 |
(150,(_
,(MlyValue
.pat pat1
,pat1left
,pat1right
))::rest671
) => let
16997 val result
=MlyValue
.pat_COMMA_list1(fn _
=> let val pat
as pat1
=pat1
17001 in (LrTable
.NT
58,(result
,pat1left
,pat1right
),rest671
) end
17002 |
(151,(_
,(MlyValue
.pat_COMMA_list1 pat_COMMA_list11
,_
,
17003 pat_COMMA_list11right
))::_
::(_
,(MlyValue
.pat pat1
,pat1left
,_
))::
17004 rest671
) => let val result
=MlyValue
.pat_COMMA_list2(fn _
=> let val
17005 pat
as pat1
=pat1 ()
17006 val pat_COMMA_list1
as pat_COMMA_list11
=pat_COMMA_list11 ()
17007 in ( pat
::pat_COMMA_list1
) end
17009 in (LrTable
.NT
59,(result
,pat1left
,pat_COMMA_list11right
),rest671
)
17011 |
(152,(_
,(_
,DOTSleft
as DOTS1left
,DOTSright
as DOTS1right
))::rest671
)
17012 => let val result
=MlyValue
.patrow(fn _
=> (
17013 WILDCARDPatRow(I(DOTSleft
,DOTSright
)) ))
17014 in (LrTable
.NT
60,(result
,DOTS1left
,DOTS1right
),rest671
) end
17015 |
(153,(_
,(MlyValue
.COMMA_patrow_opt COMMA_patrow_opt1
,_
,
17016 COMMA_patrow_optright
as COMMA_patrow_opt1right
))::(_
,(MlyValue
.pat
17017 pat1
,_
,_
))::_
::(_
,(MlyValue
.lab lab1
,lableft
as lab1left
,_
))::rest671
)
17018 => let val result
=MlyValue
.patrow(fn _
=> let val lab
as lab1
=lab1 ()
17019 val pat
as pat1
=pat1 ()
17020 val COMMA_patrow_opt
as COMMA_patrow_opt1
=COMMA_patrow_opt1 ()
17022 ROWPatRow(I(lableft
,COMMA_patrow_optright
),
17023 lab
, pat
, COMMA_patrow_opt
)
17026 in (LrTable
.NT
60,(result
,lab1left
,COMMA_patrow_opt1right
),rest671
)
17028 |
(154,(_
,(MlyValue
.COMMA_patrow_opt COMMA_patrow_opt1
,_
,
17029 COMMA_patrow_optright
as COMMA_patrow_opt1right
))::(_
,(
17030 MlyValue
.AS_pat_opt AS_pat_opt1
,_
,_
))::(_
,(MlyValue
.COLON_ty_opt
17031 COLON_ty_opt1
,_
,_
))::(_
,(MlyValue
.vid
' vid
'1,vid
'left
as vid
'1left
,_
))
17032 ::rest671
) => let val result
=MlyValue
.patrow(fn _
=> let val vid
' as
17034 val COLON_ty_opt
as COLON_ty_opt1
=COLON_ty_opt1 ()
17035 val AS_pat_opt
as AS_pat_opt1
=AS_pat_opt1 ()
17036 val COMMA_patrow_opt
as COMMA_patrow_opt1
=COMMA_patrow_opt1 ()
17038 VIDPatRow(I(vid
'left
,COMMA_patrow_optright
),
17039 vid
', COLON_ty_opt
, AS_pat_opt
,
17043 in (LrTable
.NT
60,(result
,vid
'1left
,COMMA_patrow_opt1right
),rest671
)
17045 |
(155,(_
,(MlyValue
.patrow patrow1
,_
,patrow1right
))::(_
,(_
,COMMA1left
,
17046 _
))::rest671
) => let val result
=MlyValue
.COMMA_patrow_opt(fn _
=> let
17047 val patrow
as patrow1
=patrow1 ()
17048 in ( SOME patrow
) end
17050 in (LrTable
.NT
62,(result
,COMMA1left
,patrow1right
),rest671
) end
17051 |
(156,rest671
) => let val result
=MlyValue
.COMMA_patrow_opt(fn _
=> (
17053 in (LrTable
.NT
62,(result
,defaultPos
,defaultPos
),rest671
) end
17054 |
(157,(_
,(MlyValue
.ty ty1
,_
,ty1right
))::(_
,(_
,COLON1left
,_
))::rest671
17055 ) => let val result
=MlyValue
.COLON_ty_opt(fn _
=> let val ty
as ty1
=
17059 in (LrTable
.NT
63,(result
,COLON1left
,ty1right
),rest671
) end
17060 |
(158,rest671
) => let val result
=MlyValue
.COLON_ty_opt(fn _
=> (
17062 in (LrTable
.NT
63,(result
,defaultPos
,defaultPos
),rest671
) end
17063 |
(159,(_
,(MlyValue
.pat pat1
,_
,pat1right
))::(_
,(_
,AS1left
,_
))::rest671
17064 ) => let val result
=MlyValue
.AS_pat_opt(fn _
=> let val pat
as pat1
=
17066 in ( SOME pat
) end
17068 in (LrTable
.NT
64,(result
,AS1left
,pat1right
),rest671
) end
17069 |
(160,rest671
) => let val result
=MlyValue
.AS_pat_opt(fn _
=> ( NONE
)
17071 in (LrTable
.NT
64,(result
,defaultPos
,defaultPos
),rest671
) end
17072 |
(161,(_
,(MlyValue
.patrow patrow1
,patrow1left
,patrow1right
))::rest671
17073 ) => let val result
=MlyValue
.patrow_opt(fn _
=> let val patrow
as
17075 in ( SOME patrow
) end
17077 in (LrTable
.NT
61,(result
,patrow1left
,patrow1right
),rest671
) end
17078 |
(162,rest671
) => let val result
=MlyValue
.patrow_opt(fn _
=> ( NONE
)
17080 in (LrTable
.NT
61,(result
,defaultPos
,defaultPos
),rest671
) end
17081 |
(163,(_
,(MlyValue
.atpat atpat1
,atpat1left
,atpat1right
))::rest671
)
17082 => let val result
=MlyValue
.pat(fn _
=> let val atpat
as atpat1
=atpat1
17084 in ( Infix
.parsePat(!J
, [atpat
]) ) end
17086 in (LrTable
.NT
65,(result
,atpat1left
,atpat1right
),rest671
) end
17087 |
(164,(_
,(MlyValue
.atpat_list2 atpat_list21
,atpat_list21left
,
17088 atpat_list21right
))::rest671
) => let val result
=MlyValue
.pat(fn _
=>
17089 let val atpat_list2
as atpat_list21
=atpat_list21 ()
17090 in ( Infix
.parsePat(!J
, atpat_list2
) ) end
17092 in (LrTable
.NT
65,(result
,atpat_list21left
,atpat_list21right
),rest671
17094 |
(165,(_
,(MlyValue
.COLON_ty_list1 COLON_ty_list11
,_
,
17095 COLON_ty_list11right
))::(_
,(MlyValue
.atpat
' atpat
'1,atpat
'1left
,_
))::
17096 rest671
) => let val result
=MlyValue
.pat(fn _
=> let val atpat
' as
17098 val COLON_ty_list1
as COLON_ty_list11
=COLON_ty_list11 ()
17100 let val pat
= Infix
.parsePat(!J
, [atpat
'])
17101 in typedPat(pat
, COLON_ty_list1
) end
17104 in (LrTable
.NT
65,(result
,atpat
'1left
,COLON_ty_list11right
),rest671
)
17106 |
(166,(_
,(MlyValue
.COLON_ty_list1 COLON_ty_list11
,_
,
17107 COLON_ty_list11right
))::(_
,(MlyValue
.atpat_list2 atpat_list21
,
17108 atpat_list21left
,_
))::rest671
) => let val result
=MlyValue
.pat(fn _
=>
17109 let val atpat_list2
as atpat_list21
=atpat_list21 ()
17110 val COLON_ty_list1
as COLON_ty_list11
=COLON_ty_list11 ()
17112 let val pat
= Infix
.parsePat(!J
, atpat_list2
)
17113 in typedPat(pat
, COLON_ty_list1
) end
17116 in (LrTable
.NT
65,(result
,atpat_list21left
,COLON_ty_list11right
),
17118 |
(167,(_
,(MlyValue
.COLON_ty_list1 COLON_ty_list11
,_
,
17119 COLON_ty_list11right
))::(_
,(MlyValue
.vid
' vid
'1,_
,vid
'right
))::(_
,(
17120 MlyValue
.OP_opt OP_opt1
,OP_optleft
as OP_opt1left
,_
))::rest671
) =>
17121 let val result
=MlyValue
.pat(fn _
=> let val OP_opt
as OP_opt1
=OP_opt1
17123 val vid
' as vid
'1=vid
'1 ()
17124 val COLON_ty_list1
as COLON_ty_list11
=COLON_ty_list11 ()
17126 let val atpat
= LONGVIDAtPat(I(OP_optleft
,vid
'right
),
17128 LongVId
.fromId vid
')
17129 val pat
= Infix
.parsePat(!J
, [atpat
])
17130 in typedPat(pat
, COLON_ty_list1
) end
17133 in (LrTable
.NT
65,(result
,OP_opt1left
,COLON_ty_list11right
),rest671
)
17135 |
(168,(_
,(MlyValue
.COLON_ty_list1 COLON_ty_list11
,_
,
17136 COLON_ty_list11right
))::(_
,(MlyValue
.LONGID LONGID1
,_
,LONGIDright
))::(
17137 _
,(MlyValue
.OP_opt OP_opt1
,OP_optleft
as OP_opt1left
,_
))::rest671
) =>
17138 let val result
=MlyValue
.pat(fn _
=> let val OP_opt
as OP_opt1
=OP_opt1
17140 val LONGID
as LONGID1
=LONGID1 ()
17141 val COLON_ty_list1
as COLON_ty_list11
=COLON_ty_list11 ()
17143 let val longvid
= LongVId
.implode
17144 (toLongId VId
.fromString LONGID
)
17145 val atpat
= LONGVIDAtPat(I(OP_optleft
,LONGIDright
),
17147 val pat
= Infix
.parsePat(!J
, [atpat
])
17148 in typedPat(pat
, COLON_ty_list1
) end
17151 in (LrTable
.NT
65,(result
,OP_opt1left
,COLON_ty_list11right
),rest671
)
17153 |
(169,(_
,(MlyValue
.pat pat1
,_
,patright
as pat1right
))::_
::(_
,(
17154 MlyValue
.COLON_ty_opt COLON_ty_opt1
,_
,_
))::(_
,(MlyValue
.vid
' vid
'1,_
,
17155 vid
'right
))::(_
,(MlyValue
.OP_opt OP_opt1
,OP_optleft
as OP_opt1left
,_
))
17156 ::rest671
) => let val result
=MlyValue
.pat(fn _
=> let val OP_opt
as
17158 val vid
' as vid
'1=vid
'1 ()
17159 val COLON_ty_opt
as COLON_ty_opt1
=COLON_ty_opt1 ()
17160 val pat
as pat1
=pat1 ()
17163 [ LONGVIDAtPat(I(OP_optleft
,vid
'right
),
17165 LongVId
.implode([],vid
')) ] ) ;
17166 ASPat(I(OP_optleft
,patright
),
17167 OP_opt
, vid
', COLON_ty_opt
, pat
)
17170 in (LrTable
.NT
65,(result
,OP_opt1left
,pat1right
),rest671
) end
17171 |
(170,(_
,(MlyValue
.atpat_list1 atpat_list11
,_
,atpat_list11right
))::(_
17172 ,(MlyValue
.atpat atpat1
,atpat1left
,_
))::rest671
) => let val result
=
17173 MlyValue
.atpat_list1(fn _
=> let val atpat
as atpat1
=atpat1 ()
17174 val atpat_list1
as atpat_list11
=atpat_list11 ()
17175 in ( atpat
::atpat_list1
) end
17177 in (LrTable
.NT
66,(result
,atpat1left
,atpat_list11right
),rest671
) end
17178 |
(171,(_
,(MlyValue
.atpat atpat1
,atpat1left
,atpat1right
))::rest671
)
17179 => let val result
=MlyValue
.atpat_list1(fn _
=> let val atpat
as
17181 in ( atpat
::[] ) end
17183 in (LrTable
.NT
66,(result
,atpat1left
,atpat1right
),rest671
) end
17184 |
(172,(_
,(MlyValue
.atpat_list1 atpat_list11
,_
,atpat_list11right
))::(_
17185 ,(MlyValue
.atpat atpat1
,atpat1left
,_
))::rest671
) => let val result
=
17186 MlyValue
.atpat_list2(fn _
=> let val atpat
as atpat1
=atpat1 ()
17187 val atpat_list1
as atpat_list11
=atpat_list11 ()
17188 in ( atpat
::atpat_list1
) end
17190 in (LrTable
.NT
67,(result
,atpat1left
,atpat_list11right
),rest671
) end
17191 |
(173,(_
,(MlyValue
.COLON_ty_list1 COLON_ty_list11
,_
,
17192 COLON_ty_list11right
))::(_
,(MlyValue
.ty ty1
,_
,_
))::(_
,(_
,COLON1left
,_
)
17193 )::rest671
) => let val result
=MlyValue
.COLON_ty_list1(fn _
=> let val
17195 val COLON_ty_list1
as COLON_ty_list11
=COLON_ty_list11 ()
17196 in ( ty
::COLON_ty_list1
) end
17198 in (LrTable
.NT
68,(result
,COLON1left
,COLON_ty_list11right
),rest671
)
17200 |
(174,(_
,(MlyValue
.ty ty1
,_
,ty1right
))::(_
,(_
,COLON1left
,_
))::rest671
17201 ) => let val result
=MlyValue
.COLON_ty_list1(fn _
=> let val ty
as ty1
=
17205 in (LrTable
.NT
68,(result
,COLON1left
,ty1right
),rest671
) end
17206 |
(175,(_
,(MlyValue
.tupty tupty1
,tupty1left
,tupty1right
))::rest671
)
17207 => let val result
=MlyValue
.ty(fn _
=> let val tupty
as tupty1
=tupty1
17211 in (LrTable
.NT
69,(result
,tupty1left
,tupty1right
),rest671
) end
17212 |
(176,(_
,(MlyValue
.ty ty1
,_
,tyright
as ty1right
))::_
::(_
,(
17213 MlyValue
.tupty tupty1
,tuptyleft
as tupty1left
,_
))::rest671
) => let
17214 val result
=MlyValue
.ty(fn _
=> let val tupty
as tupty1
=tupty1 ()
17215 val ty
as ty1
=ty1 ()
17216 in ( ARROWTy(I(tuptyleft
,tyright
), tupty
, ty
) ) end
17218 in (LrTable
.NT
69,(result
,tupty1left
,ty1right
),rest671
) end
17219 |
(177,(_
,(MlyValue
.ty_STAR_list ty_STAR_list1
,ty_STAR_listleft
as
17220 ty_STAR_list1left
,ty_STAR_listright
as ty_STAR_list1right
))::rest671
)
17221 => let val result
=MlyValue
.tupty(fn _
=> let val ty_STAR_list
as
17222 ty_STAR_list1
=ty_STAR_list1 ()
17224 TUPLETy(I(ty_STAR_listleft
,ty_STAR_listright
),
17228 in (LrTable
.NT
70,(result
,ty_STAR_list1left
,ty_STAR_list1right
),
17230 |
(178,(_
,(MlyValue
.ty_STAR_list ty_STAR_list1
,_
,ty_STAR_list1right
))
17231 ::_
::(_
,(MlyValue
.consty consty1
,consty1left
,_
))::rest671
) => let val
17232 result
=MlyValue
.ty_STAR_list(fn _
=> let val consty
as consty1
=consty1
17234 val ty_STAR_list
as ty_STAR_list1
=ty_STAR_list1 ()
17235 in ( consty
::ty_STAR_list
) end
17237 in (LrTable
.NT
71,(result
,consty1left
,ty_STAR_list1right
),rest671
)
17239 |
(179,(_
,(MlyValue
.consty consty1
,consty1left
,consty1right
))::rest671
17240 ) => let val result
=MlyValue
.ty_STAR_list(fn _
=> let val consty
as
17242 in ( consty
::[] ) end
17244 in (LrTable
.NT
71,(result
,consty1left
,consty1right
),rest671
) end
17245 |
(180,(_
,(MlyValue
.atty atty1
,atty1left
,atty1right
))::rest671
) =>
17246 let val result
=MlyValue
.consty(fn _
=> let val atty
as atty1
=atty1 ()
17249 in (LrTable
.NT
72,(result
,atty1left
,atty1right
),rest671
) end
17250 |
(181,(_
,(MlyValue
.longtycon longtycon1
,_
,longtyconright
as
17251 longtycon1right
))::(_
,(MlyValue
.tyseq tyseq1
,tyseqleft
as tyseq1left
,_
17252 ))::rest671
) => let val result
=MlyValue
.consty(fn _
=> let val tyseq
17253 as tyseq1
=tyseq1 ()
17254 val longtycon
as longtycon1
=longtycon1 ()
17255 in ( TYCONTy(I(tyseqleft
,longtyconright
),
17256 tyseq
, longtycon
) )
17259 in (LrTable
.NT
72,(result
,tyseq1left
,longtycon1right
),rest671
) end
17260 |
(182,(_
,(MlyValue
.tyvar tyvar1
,tyvarleft
as tyvar1left
,tyvarright
17261 as tyvar1right
))::rest671
) => let val result
=MlyValue
.atty(fn _
=>
17262 let val tyvar
as tyvar1
=tyvar1 ()
17263 in ( TYVARTy(I(tyvarleft
,tyvarright
), tyvar
) ) end
17265 in (LrTable
.NT
73,(result
,tyvar1left
,tyvar1right
),rest671
) end
17266 |
(183,(_
,(_
,_
,RBRACEright
as RBRACE1right
))::(_
,(MlyValue
.tyrow_opt
17267 tyrow_opt1
,_
,_
))::(_
,(_
,LBRACEleft
as LBRACE1left
,_
))::rest671
) =>
17268 let val result
=MlyValue
.atty(fn _
=> let val tyrow_opt
as tyrow_opt1
=
17270 in ( RECORDTy(I(LBRACEleft
,RBRACEright
), tyrow_opt
) ) end
17272 in (LrTable
.NT
73,(result
,LBRACE1left
,RBRACE1right
),rest671
) end
17273 |
(184,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(MlyValue
.ty ty1
,_
,_
))::(
17274 _
,(_
,LPARleft
as LPAR1left
,_
))::rest671
) => let val result
=
17275 MlyValue
.atty(fn _
=> let val ty
as ty1
=ty1 ()
17276 in ( PARTy(I(LPARleft
,RPARright
), ty
) ) end
17278 in (LrTable
.NT
73,(result
,LPAR1left
,RPAR1right
),rest671
) end
17279 |
(185,(_
,(MlyValue
.COMMA_tyrow_opt COMMA_tyrow_opt1
,_
,
17280 COMMA_tyrow_optright
as COMMA_tyrow_opt1right
))::(_
,(MlyValue
.ty ty1
,_
17281 ,_
))::_
::(_
,(MlyValue
.lab lab1
,lableft
as lab1left
,_
))::rest671
) =>
17282 let val result
=MlyValue
.tyrow(fn _
=> let val lab
as lab1
=lab1 ()
17283 val ty
as ty1
=ty1 ()
17284 val COMMA_tyrow_opt
as COMMA_tyrow_opt1
=COMMA_tyrow_opt1 ()
17286 TyRow(I(lableft
,COMMA_tyrow_optright
),
17287 lab
, ty
, COMMA_tyrow_opt
)
17290 in (LrTable
.NT
74,(result
,lab1left
,COMMA_tyrow_opt1right
),rest671
)
17292 |
(186,(_
,(MlyValue
.tyrow tyrow1
,_
,tyrow1right
))::(_
,(_
,COMMA1left
,_
))
17293 ::rest671
) => let val result
=MlyValue
.COMMA_tyrow_opt(fn _
=> let val
17294 tyrow
as tyrow1
=tyrow1 ()
17295 in ( SOME tyrow
) end
17297 in (LrTable
.NT
76,(result
,COMMA1left
,tyrow1right
),rest671
) end
17298 |
(187,rest671
) => let val result
=MlyValue
.COMMA_tyrow_opt(fn _
=> (
17300 in (LrTable
.NT
76,(result
,defaultPos
,defaultPos
),rest671
) end
17301 |
(188,(_
,(MlyValue
.tyrow tyrow1
,tyrow1left
,tyrow1right
))::rest671
)
17302 => let val result
=MlyValue
.tyrow_opt(fn _
=> let val tyrow
as tyrow1
=
17304 in ( SOME tyrow
) end
17306 in (LrTable
.NT
75,(result
,tyrow1left
,tyrow1right
),rest671
) end
17307 |
(189,rest671
) => let val result
=MlyValue
.tyrow_opt(fn _
=> ( NONE
))
17308 in (LrTable
.NT
75,(result
,defaultPos
,defaultPos
),rest671
) end
17309 |
(190,(_
,(MlyValue
.consty consty1
,constyleft
as consty1left
,
17310 constyright
as consty1right
))::rest671
) => let val result
=
17311 MlyValue
.tyseq(fn _
=> let val consty
as consty1
=consty1 ()
17312 in ( Tyseq(I(constyleft
,constyright
),
17315 in (LrTable
.NT
77,(result
,consty1left
,consty1right
),rest671
) end
17316 |
(191,rest671
) => let val result
=MlyValue
.tyseq(fn _
=> (
17317 Tyseq(I(defaultPos
,defaultPos
), []) ))
17318 in (LrTable
.NT
77,(result
,defaultPos
,defaultPos
),rest671
) end
17319 |
(192,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(MlyValue
.ty_COMMA_list2
17320 ty_COMMA_list21
,_
,_
))::(_
,(_
,LPARleft
as LPAR1left
,_
))::rest671
) =>
17321 let val result
=MlyValue
.tyseq(fn _
=> let val ty_COMMA_list2
as
17322 ty_COMMA_list21
=ty_COMMA_list21 ()
17323 in ( Tyseq(I(LPARleft
,RPARright
),
17324 ty_COMMA_list2
) ) end
17326 in (LrTable
.NT
77,(result
,LPAR1left
,RPAR1right
),rest671
) end
17327 |
(193,(_
,(MlyValue
.ty_COMMA_list2 ty_COMMA_list21
,_
,
17328 ty_COMMA_list21right
))::_
::(_
,(MlyValue
.ty ty1
,ty1left
,_
))::rest671
)
17329 => let val result
=MlyValue
.ty_COMMA_list2(fn _
=> let val ty
as ty1
=
17331 val ty_COMMA_list2
as ty_COMMA_list21
=ty_COMMA_list21 ()
17332 in ( ty
::ty_COMMA_list2
) end
17334 in (LrTable
.NT
78,(result
,ty1left
,ty_COMMA_list21right
),rest671
) end
17335 |
(194,(_
,(MlyValue
.ty ty2
,_
,ty2right
))::_
::(_
,(MlyValue
.ty ty1
,
17336 ty1left
,_
))::rest671
) => let val result
=MlyValue
.ty_COMMA_list2(fn _
17337 => let val ty1
=ty1 ()
17339 in ( [ty1
, ty2
] ) end
17341 in (LrTable
.NT
78,(result
,ty1left
,ty2right
),rest671
) end
17342 |
(195,(_
,(MlyValue
.tyvarseq1 tyvarseq11
,tyvarseq11left
,
17343 tyvarseq11right
))::rest671
) => let val result
=MlyValue
.tyvarseq(fn _
17344 => let val tyvarseq1
as tyvarseq11
=tyvarseq11 ()
17345 in ( tyvarseq1
) end
17347 in (LrTable
.NT
79,(result
,tyvarseq11left
,tyvarseq11right
),rest671
)
17349 |
(196,rest671
) => let val result
=MlyValue
.tyvarseq(fn _
=> (
17350 TyVarseq(I(defaultPos
,defaultPos
),
17352 in (LrTable
.NT
79,(result
,defaultPos
,defaultPos
),rest671
) end
17353 |
(197,(_
,(MlyValue
.tyvar tyvar1
,tyvarleft
as tyvar1left
,tyvarright
17354 as tyvar1right
))::rest671
) => let val result
=MlyValue
.tyvarseq1(fn _
17355 => let val tyvar
as tyvar1
=tyvar1 ()
17356 in ( TyVarseq(I(tyvarleft
,tyvarright
),
17359 in (LrTable
.NT
80,(result
,tyvar1left
,tyvar1right
),rest671
) end
17360 |
(198,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(
17361 MlyValue
.tyvar_COMMA_list1 tyvar_COMMA_list11
,_
,_
))::(_
,(_
,LPARleft
17362 as LPAR1left
,_
))::rest671
) => let val result
=MlyValue
.tyvarseq1(fn _
17363 => let val tyvar_COMMA_list1
as tyvar_COMMA_list11
=tyvar_COMMA_list11
17365 in ( TyVarseq(I(LPARleft
,RPARright
),
17366 tyvar_COMMA_list1
) )
17369 in (LrTable
.NT
80,(result
,LPAR1left
,RPAR1right
),rest671
) end
17370 |
(199,(_
,(MlyValue
.tyvar_COMMA_list1 tyvar_COMMA_list11
,_
,
17371 tyvar_COMMA_list11right
))::_
::(_
,(MlyValue
.tyvar tyvar1
,tyvar1left
,_
))
17372 ::rest671
) => let val result
=MlyValue
.tyvar_COMMA_list1(fn _
=> let
17373 val tyvar
as tyvar1
=tyvar1 ()
17374 val tyvar_COMMA_list1
as tyvar_COMMA_list11
=tyvar_COMMA_list11 ()
17375 in ( tyvar
::tyvar_COMMA_list1
) end
17377 in (LrTable
.NT
81,(result
,tyvar1left
,tyvar_COMMA_list11right
),rest671
17379 |
(200,(_
,(MlyValue
.tyvar tyvar1
,tyvar1left
,tyvar1right
))::rest671
)
17380 => let val result
=MlyValue
.tyvar_COMMA_list1(fn _
=> let val tyvar
17381 as tyvar1
=tyvar1 ()
17382 in ( tyvar
::[] ) end
17384 in (LrTable
.NT
81,(result
,tyvar1left
,tyvar1right
),rest671
) end
17385 |
(201,(_
,(MlyValue
.strexp
' strexp
'1,strexp
'1left
,strexp
'1right
))::
17386 rest671
) => let val result
=MlyValue
.strexp(fn _
=> let val strexp
' as
17387 strexp
'1=strexp
'1 ()
17390 in (LrTable
.NT
82,(result
,strexp
'1left
,strexp
'1right
),rest671
) end
17391 |
(202,(_
,(MlyValue
.sigexp sigexp1
,_
,sigexpright
as sigexp1right
))::_
17392 ::(_
,(MlyValue
.strexp strexp1
,strexpleft
as strexp1left
,_
))::rest671
)
17393 => let val result
=MlyValue
.strexp(fn _
=> let val strexp
as strexp1
=
17395 val sigexp
as sigexp1
=sigexp1 ()
17397 TRANSStrExp(I(strexpleft
,sigexpright
),
17401 in (LrTable
.NT
82,(result
,strexp1left
,sigexp1right
),rest671
) end
17402 |
(203,(_
,(MlyValue
.sigexp sigexp1
,_
,sigexpright
as sigexp1right
))::_
17403 ::(_
,(MlyValue
.strexp strexp1
,strexpleft
as strexp1left
,_
))::rest671
)
17404 => let val result
=MlyValue
.strexp(fn _
=> let val strexp
as strexp1
=
17406 val sigexp
as sigexp1
=sigexp1 ()
17407 in ( OPAQStrExp(I(strexpleft
,sigexpright
), strexp
, sigexp
)) end
17409 in (LrTable
.NT
82,(result
,strexp1left
,sigexp1right
),rest671
) end
17410 |
(204,(_
,(_
,_
,ENDright
as END1right
))::(_
,(MlyValue
.popInfix
17411 popInfix1
,_
,_
))::(_
,(MlyValue
.strdec strdec1
,_
,_
))::(_
,(
17412 MlyValue
.pushInfix pushInfix1
,_
,_
))::(_
,(_
,STRUCTleft
as STRUCT1left
,_
17413 ))::rest671
) => let val result
=MlyValue
.strexp
'(fn _
=> let val
17414 pushInfix1
=pushInfix1 ()
17415 val strdec
as strdec1
=strdec1 ()
17416 val popInfix1
=popInfix1 ()
17417 in ( STRUCTStrExp(I(STRUCTleft
,ENDright
), strdec
) ) end
17419 in (LrTable
.NT
83,(result
,STRUCT1left
,END1right
),rest671
) end
17420 |
(205,(_
,(MlyValue
.longstrid longstrid1
,longstridleft
as
17421 longstrid1left
,longstridright
as longstrid1right
))::rest671
) => let
17422 val result
=MlyValue
.strexp
'(fn _
=> let val longstrid
as longstrid1
=
17425 LONGSTRIDStrExp(I(longstridleft
,longstridright
),
17429 in (LrTable
.NT
83,(result
,longstrid1left
,longstrid1right
),rest671
)
17431 |
(206,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(MlyValue
.strexp strexp1
,
17432 _
,_
))::_
::(_
,(MlyValue
.funid funid1
,funidleft
as funid1left
,_
))::
17433 rest671
) => let val result
=MlyValue
.strexp
'(fn _
=> let val funid
as
17435 val strexp
as strexp1
=strexp1 ()
17436 in ( APPStrExp(I(funidleft
,RPARright
), funid
, strexp
) ) end
17438 in (LrTable
.NT
83,(result
,funid1left
,RPAR1right
),rest671
) end
17439 |
(207,(_
,(_
,_
,RPARright
as RPAR1right
))::(_
,(MlyValue
.strdec strdec1
,
17440 _
,_
))::_
::(_
,(MlyValue
.funid funid1
,funidleft
as funid1left
,_
))::
17441 rest671
) => let val result
=MlyValue
.strexp
'(fn _
=> let val funid
as
17443 val strdec
as strdec1
=strdec1 ()
17444 in ( APPDECStrExp(I(funidleft
,RPARright
), funid
, strdec
) ) end
17446 in (LrTable
.NT
83,(result
,funid1left
,RPAR1right
),rest671
) end
17447 |
(208,(_
,(_
,_
,ENDright
as END1right
))::(_
,(MlyValue
.popInfix
17448 popInfix1
,_
,_
))::(_
,(MlyValue
.strexp strexp1
,_
,_
))::_
::(_
,(
17449 MlyValue
.strdec strdec1
,_
,_
))::(_
,(MlyValue
.pushInfix pushInfix1
,_
,_
))
17450 ::(_
,(_
,LETleft
as LET1left
,_
))::rest671
) => let val result
=
17451 MlyValue
.strexp
'(fn _
=> let val pushInfix1
=pushInfix1 ()
17452 val strdec
as strdec1
=strdec1 ()
17453 val strexp
as strexp1
=strexp1 ()
17454 val popInfix1
=popInfix1 ()
17455 in ( LETStrExp(I(LETleft
,ENDright
), strdec
, strexp
) ) end
17457 in (LrTable
.NT
83,(result
,LET1left
,END1right
),rest671
) end
17458 |
(209,(_
,(MlyValue
.strdec1 strdec11
,strdec11left
,strdec11right
))::
17459 rest671
) => let val result
=MlyValue
.strdec(fn _
=> let val strdec1
as
17460 strdec11
=strdec11 ()
17463 in (LrTable
.NT
84,(result
,strdec11left
,strdec11right
),rest671
) end
17464 |
(210,rest671
) => let val result
=MlyValue
.strdec(fn _
=> (
17465 EMPTYStrDec(I(defaultPos
,defaultPos
)) ))
17466 in (LrTable
.NT
84,(result
,defaultPos
,defaultPos
),rest671
) end
17467 |
(211,(_
,(MlyValue
.strdec1
' strdec1
'1,strdec1
'1left
,strdec1
'1right
))
17468 ::rest671
) => let val result
=MlyValue
.strdec1(fn _
=> let val strdec1
'
17469 as strdec1
'1=strdec1
'1 ()
17470 in ( strdec1
' ) end
17472 in (LrTable
.NT
85,(result
,strdec1
'1left
,strdec1
'1right
),rest671
) end
17473 |
(212,(_
,(MlyValue
.strdec1 strdec12
,_
,strdec12right
))::(_
,(
17474 MlyValue
.strdec1 strdec11
,strdec11left
,_
))::rest671
) => let val result
17475 =MlyValue
.strdec1(fn _
=> let val strdec11
=strdec11 ()
17476 val strdec12
=strdec12 ()
17478 SEQStrDec(I(strdec11left
,strdec12right
),
17479 strdec11
, strdec12
)
17482 in (LrTable
.NT
85,(result
,strdec11left
,strdec12right
),rest671
) end
17483 |
(213,(_
,(_
,SEMICOLONleft
as SEMICOLON1left
,SEMICOLONright
as
17484 SEMICOLON1right
))::rest671
) => let val result
=MlyValue
.strdec1(fn _
17485 => ( EMPTYStrDec(I(SEMICOLONleft
,SEMICOLONright
)) ))
17486 in (LrTable
.NT
85,(result
,SEMICOLON1left
,SEMICOLON1right
),rest671
)
17488 |
(214,(_
,(MlyValue
.dec1
' dec1
'1,dec1
'left
as dec1
'1left
,dec1
'right
17489 as dec1
'1right
))::rest671
) => let val result
=MlyValue
.strdec1
'(fn _
17490 => let val dec1
' as dec1
'1=dec1
'1 ()
17491 in ( DECStrDec(I(dec1
'left
,dec1
'right
), dec1
') ) end
17493 in (LrTable
.NT
86,(result
,dec1
'1left
,dec1
'1right
),rest671
) end
17494 |
(215,(_
,(MlyValue
.strbind strbind1
,_
,strbindright
as strbind1right
))
17495 ::(_
,(_
,STRUCTUREleft
as STRUCTURE1left
,_
))::rest671
) => let val
17496 result
=MlyValue
.strdec1
'(fn _
=> let val strbind
as strbind1
=strbind1
17498 in ( STRUCTUREStrDec(I(STRUCTUREleft
,strbindright
),
17502 in (LrTable
.NT
86,(result
,STRUCTURE1left
,strbind1right
),rest671
) end
17503 |
(216,(_
,(_
,_
,ENDright
as END1right
))::(_
,(MlyValue
.popLocalInfix
17504 popLocalInfix1
,_
,_
))::(_
,(MlyValue
.strdec strdec2
,_
,_
))::(_
,(
17505 MlyValue
.pushLocalInfix pushLocalInfix1
,_
,_
))::_
::(_
,(MlyValue
.strdec
17506 strdec1
,_
,_
))::(_
,(MlyValue
.pushInfix pushInfix1
,_
,_
))::(_
,(_
,
17507 LOCALleft
as LOCAL1left
,_
))::rest671
) => let val result
=
17508 MlyValue
.strdec1
'(fn _
=> let val pushInfix1
=pushInfix1 ()
17509 val strdec1
=strdec1 ()
17510 val pushLocalInfix1
=pushLocalInfix1 ()
17511 val strdec2
=strdec2 ()
17512 val popLocalInfix1
=popLocalInfix1 ()
17513 in ( LOCALStrDec(I(LOCALleft
,ENDright
), strdec1
, strdec2
) ) end
17515 in (LrTable
.NT
86,(result
,LOCAL1left
,END1right
),rest671
) end
17516 |
(217,(_
,(MlyValue
.strexp__AND_strbind_opt strexp__AND_strbind_opt1
,_
17517 ,strexp__AND_strbind_optright
as strexp__AND_strbind_opt1right
))::_
::(
17518 _
,(MlyValue
.COLON_sigexp_opt COLON_sigexp_opt1
,_
,_
))::(_
,(
17519 MlyValue
.strid strid1
,stridleft
as strid1left
,_
))::rest671
) => let
17520 val result
=MlyValue
.strbind(fn _
=> let val strid
as strid1
=strid1 ()
17521 val COLON_sigexp_opt
as COLON_sigexp_opt1
=COLON_sigexp_opt1 ()
17522 val strexp__AND_strbind_opt
as strexp__AND_strbind_opt1
=
17523 strexp__AND_strbind_opt1 ()
17525 TRANSStrBind(I(stridleft
,
17526 strexp__AND_strbind_optright
),
17527 strid
, COLON_sigexp_opt
,
17528 #
1 strexp__AND_strbind_opt
,
17529 #
2 strexp__AND_strbind_opt
)
17532 in (LrTable
.NT
87,(result
,strid1left
,strexp__AND_strbind_opt1right
),
17534 |
(218,(_
,(MlyValue
.strexp__AND_strbind_opt strexp__AND_strbind_opt1
,_
17535 ,strexp__AND_strbind_optright
as strexp__AND_strbind_opt1right
))::_
::(
17536 _
,(MlyValue
.sigexp sigexp1
,_
,_
))::_
::(_
,(MlyValue
.strid strid1
,
17537 stridleft
as strid1left
,_
))::rest671
) => let val result
=
17538 MlyValue
.strbind(fn _
=> let val strid
as strid1
=strid1 ()
17539 val sigexp
as sigexp1
=sigexp1 ()
17540 val strexp__AND_strbind_opt
as strexp__AND_strbind_opt1
=
17541 strexp__AND_strbind_opt1 ()
17543 OPAQStrBind(I(stridleft
,strexp__AND_strbind_optright
),
17544 strid
, sigexp
, #
1 strexp__AND_strbind_opt
,
17545 #
2 strexp__AND_strbind_opt
)
17548 in (LrTable
.NT
87,(result
,strid1left
,strexp__AND_strbind_opt1right
),
17550 |
(219,(_
,(MlyValue
.strbind strbind1
,_
,strbind1right
))::(_
,(_
,AND1left
17551 ,_
))::rest671
) => let val result
=MlyValue
.AND_strbind_opt(fn _
=> let
17552 val strbind
as strbind1
=strbind1 ()
17553 in ( SOME strbind
) end
17555 in (LrTable
.NT
88,(result
,AND1left
,strbind1right
),rest671
) end
17556 |
(220,rest671
) => let val result
=MlyValue
.AND_strbind_opt(fn _
=> (
17558 in (LrTable
.NT
88,(result
,defaultPos
,defaultPos
),rest671
) end
17559 |
(221,(_
,(MlyValue
.AND_strbind_opt AND_strbind_opt1
,_
,
17560 AND_strbind_opt1right
))::(_
,(MlyValue
.strexp
' strexp
'1,strexp
'1left
,_
)
17561 )::rest671
) => let val result
=MlyValue
.strexp__AND_strbind_opt(fn _
17562 => let val strexp
' as strexp
'1=strexp
'1 ()
17563 val AND_strbind_opt
as AND_strbind_opt1
=AND_strbind_opt1 ()
17564 in ( ( strexp
', AND_strbind_opt
) ) end
17566 in (LrTable
.NT
89,(result
,strexp
'1left
,AND_strbind_opt1right
),rest671
17568 |
(222,(_
,(MlyValue
.sigexp__AND_strbind_opt sigexp__AND_strbind_opt1
,_
17569 ,sigexp__AND_strbind_optright
as sigexp__AND_strbind_opt1right
))::_
::(
17570 _
,(MlyValue
.strexp strexp1
,strexpleft
as strexp1left
,_
))::rest671
) =>
17571 let val result
=MlyValue
.strexp__AND_strbind_opt(fn _
=> let val strexp
17572 as strexp1
=strexp1 ()
17573 val sigexp__AND_strbind_opt
as sigexp__AND_strbind_opt1
=
17574 sigexp__AND_strbind_opt1 ()
17576 ( TRANSStrExp(I(strexpleft
,
17577 sigexp__AND_strbind_optright
),
17578 strexp
, #
1 sigexp__AND_strbind_opt
),
17579 #
2 sigexp__AND_strbind_opt
)
17582 in (LrTable
.NT
89,(result
,strexp1left
,sigexp__AND_strbind_opt1right
),
17584 |
(223,(_
,(MlyValue
.sigexp__AND_strbind_opt sigexp__AND_strbind_opt1
,_
17585 ,sigexp__AND_strbind_optright
as sigexp__AND_strbind_opt1right
))::_
::(
17586 _
,(MlyValue
.strexp strexp1
,strexpleft
as strexp1left
,_
))::rest671
) =>
17587 let val result
=MlyValue
.strexp__AND_strbind_opt(fn _
=> let val strexp
17588 as strexp1
=strexp1 ()
17589 val sigexp__AND_strbind_opt
as sigexp__AND_strbind_opt1
=
17590 sigexp__AND_strbind_opt1 ()
17592 ( OPAQStrExp(I(strexpleft
,
17593 sigexp__AND_strbind_optright
),
17594 strexp
, #
1 sigexp__AND_strbind_opt
),
17595 #
2 sigexp__AND_strbind_opt
)
17598 in (LrTable
.NT
89,(result
,strexp1left
,sigexp__AND_strbind_opt1right
),
17600 |
(224,(_
,(MlyValue
.AND_strbind_opt AND_strbind_opt1
,_
,
17601 AND_strbind_opt1right
))::(_
,(MlyValue
.sigexp
' sigexp
'1,sigexp
'1left
,_
)
17602 )::rest671
) => let val result
=MlyValue
.sigexp__AND_strbind_opt(fn _
17603 => let val sigexp
' as sigexp
'1=sigexp
'1 ()
17604 val AND_strbind_opt
as AND_strbind_opt1
=AND_strbind_opt1 ()
17605 in ( ( sigexp
', AND_strbind_opt
) ) end
17607 in (LrTable
.NT
90,(result
,sigexp
'1left
,AND_strbind_opt1right
),rest671
17609 |
(225,(_
,(MlyValue
.tyreadesc__AND_strbind_opt
17610 tyreadesc__AND_strbind_opt1
,_
,tyreadesc__AND_strbind_optright
as
17611 tyreadesc__AND_strbind_opt1right
))::_
::(_
,(MlyValue
.sigexp sigexp1
,
17612 sigexpleft
as sigexp1left
,_
))::rest671
) => let val result
=
17613 MlyValue
.sigexp__AND_strbind_opt(fn _
=> let val sigexp
as sigexp1
=
17615 val tyreadesc__AND_strbind_opt
as tyreadesc__AND_strbind_opt1
=
17616 tyreadesc__AND_strbind_opt1 ()
17618 ( WHERETYPESigExp(I(sigexpleft
,
17619 tyreadesc__AND_strbind_optright
),
17621 #
1 tyreadesc__AND_strbind_opt
),
17622 #
2 tyreadesc__AND_strbind_opt
)
17625 in (LrTable
.NT
90,(result
,sigexp1left
,
17626 tyreadesc__AND_strbind_opt1right
),rest671
) end
17627 |
(226,(_
,(MlyValue
.AND_tyreadesc_opt__AND_strbind_opt
17628 AND_tyreadesc_opt__AND_strbind_opt1
,_
,
17629 AND_tyreadesc_opt__AND_strbind_optright
as
17630 AND_tyreadesc_opt__AND_strbind_opt1right
))::(_
,(MlyValue
.ty ty1
,_
,_
))
17631 ::_
::(_
,(MlyValue
.longtycon longtycon1
,_
,_
))::(_
,(MlyValue
.tyvarseq
17632 tyvarseq1
,_
,_
))::(_
,(_
,TYPEleft
as TYPE1left
,_
))::rest671
) => let val
17633 result
=MlyValue
.tyreadesc__AND_strbind_opt(fn _
=> let val tyvarseq
17634 as tyvarseq1
=tyvarseq1 ()
17635 val longtycon
as longtycon1
=longtycon1 ()
17636 val ty
as ty1
=ty1 ()
17637 val AND_tyreadesc_opt__AND_strbind_opt
as
17638 AND_tyreadesc_opt__AND_strbind_opt1
=
17639 AND_tyreadesc_opt__AND_strbind_opt1 ()
17641 ( TyReaDesc(I(TYPEleft
,
17642 AND_tyreadesc_opt__AND_strbind_optright
),
17643 tyvarseq
, longtycon
, ty
,
17644 #
1 AND_tyreadesc_opt__AND_strbind_opt
),
17645 #
2 AND_tyreadesc_opt__AND_strbind_opt
)
17648 in (LrTable
.NT
91,(result
,TYPE1left
,
17649 AND_tyreadesc_opt__AND_strbind_opt1right
),rest671
) end
17650 |
(227,(_
,(MlyValue
.AND_strbind_opt AND_strbind_opt1
,
17651 AND_strbind_opt1left
,AND_strbind_opt1right
))::rest671
) => let val
17652 result
=MlyValue
.AND_tyreadesc_opt__AND_strbind_opt(fn _
=> let val
17653 AND_strbind_opt
as AND_strbind_opt1
=AND_strbind_opt1 ()
17654 in ( ( NONE
, AND_strbind_opt
) ) end
17656 in (LrTable
.NT
92,(result
,AND_strbind_opt1left
,AND_strbind_opt1right
)
17658 |
(228,(_
,(MlyValue
.tyreadesc__AND_strbind_opt
17659 tyreadesc__AND_strbind_opt1
,_
,tyreadesc__AND_strbind_opt1right
))::(_
,(
17660 _
,AND1left
,_
))::rest671
) => let val result
=
17661 MlyValue
.AND_tyreadesc_opt__AND_strbind_opt(fn _
=> let val
17662 tyreadesc__AND_strbind_opt
as tyreadesc__AND_strbind_opt1
=
17663 tyreadesc__AND_strbind_opt1 ()
17665 ( SOME(#
1 tyreadesc__AND_strbind_opt
),
17666 #
2 tyreadesc__AND_strbind_opt
)
17669 in (LrTable
.NT
92,(result
,AND1left
,tyreadesc__AND_strbind_opt1right
),
17671 |
(229,(_
,(MlyValue
.sigexp sigexp1
,_
,sigexp1right
))::(_
,(_
,COLON1left
,
17672 _
))::rest671
) => let val result
=MlyValue
.COLON_sigexp_opt(fn _
=> let
17673 val sigexp
as sigexp1
=sigexp1 ()
17674 in ( SOME sigexp
) end
17676 in (LrTable
.NT
93,(result
,COLON1left
,sigexp1right
),rest671
) end
17677 |
(230,rest671
) => let val result
=MlyValue
.COLON_sigexp_opt(fn _
=> (
17679 in (LrTable
.NT
93,(result
,defaultPos
,defaultPos
),rest671
) end
17680 |
(231,(_
,(MlyValue
.sigexp
' sigexp
'1,sigexp
'1left
,sigexp
'1right
))::
17681 rest671
) => let val result
=MlyValue
.sigexp(fn _
=> let val sigexp
' as
17682 sigexp
'1=sigexp
'1 ()
17685 in (LrTable
.NT
94,(result
,sigexp
'1left
,sigexp
'1right
),rest671
) end
17686 |
(232,(_
,(MlyValue
.tyreadesc tyreadesc1
,_
,tyreadescright
as
17687 tyreadesc1right
))::_
::(_
,(MlyValue
.sigexp sigexp1
,sigexpleft
as
17688 sigexp1left
,_
))::rest671
) => let val result
=MlyValue
.sigexp(fn _
=>
17689 let val sigexp
as sigexp1
=sigexp1 ()
17690 val tyreadesc
as tyreadesc1
=tyreadesc1 ()
17692 WHERETYPESigExp(I(sigexpleft
,tyreadescright
),
17696 in (LrTable
.NT
94,(result
,sigexp1left
,tyreadesc1right
),rest671
) end
17697 |
(233,(_
,(_
,_
,ENDright
as END1right
))::(_
,(MlyValue
.spec spec1
,_
,_
))
17698 ::(_
,(_
,SIGleft
as SIG1left
,_
))::rest671
) => let val result
=
17699 MlyValue
.sigexp
'(fn _
=> let val spec
as spec1
=spec1 ()
17700 in ( SIGSigExp(I(SIGleft
,ENDright
), spec
) ) end
17702 in (LrTable
.NT
95,(result
,SIG1left
,END1right
),rest671
) end
17703 |
(234,(_
,(MlyValue
.sigid sigid1
,sigidleft
as sigid1left
,sigidright
17704 as sigid1right
))::rest671
) => let val result
=MlyValue
.sigexp
'(fn _
17705 => let val sigid
as sigid1
=sigid1 ()
17706 in ( SIGIDSigExp(I(sigidleft
,sigidright
), sigid
) ) end
17708 in (LrTable
.NT
95,(result
,sigid1left
,sigid1right
),rest671
) end
17709 |
(235,(_
,(MlyValue
.sigbind sigbind1
,_
,sigbindright
as sigbind1right
))
17710 ::(_
,(_
,SIGNATUREleft
as SIGNATURE1left
,_
))::rest671
) => let val
17711 result
=MlyValue
.sigdec(fn _
=> let val sigbind
as sigbind1
=sigbind1 ()
17712 in ( SigDec(I(SIGNATUREleft
,sigbindright
), sigbind
) ) end
17714 in (LrTable
.NT
96,(result
,SIGNATURE1left
,sigbind1right
),rest671
) end
17715 |
(236,(_
,(MlyValue
.sigexp__AND_sigbind_opt sigexp__AND_sigbind_opt1
,_
17716 ,sigexp__AND_sigbind_optright
as sigexp__AND_sigbind_opt1right
))::_
::(
17717 _
,(MlyValue
.sigid sigid1
,sigidleft
as sigid1left
,_
))::rest671
) => let
17718 val result
=MlyValue
.sigbind(fn _
=> let val sigid
as sigid1
=sigid1 ()
17719 val sigexp__AND_sigbind_opt
as sigexp__AND_sigbind_opt1
=
17720 sigexp__AND_sigbind_opt1 ()
17722 SigBind(I(sigidleft
,sigexp__AND_sigbind_optright
),
17723 sigid
, #
1 sigexp__AND_sigbind_opt
,
17724 #
2 sigexp__AND_sigbind_opt
)
17727 in (LrTable
.NT
97,(result
,sigid1left
,sigexp__AND_sigbind_opt1right
),
17729 |
(237,(_
,(MlyValue
.sigbind sigbind1
,_
,sigbind1right
))::(_
,(_
,AND1left
17730 ,_
))::rest671
) => let val result
=MlyValue
.AND_sigbind_opt(fn _
=> let
17731 val sigbind
as sigbind1
=sigbind1 ()
17732 in ( SOME sigbind
) end
17734 in (LrTable
.NT
98,(result
,AND1left
,sigbind1right
),rest671
) end
17735 |
(238,rest671
) => let val result
=MlyValue
.AND_sigbind_opt(fn _
=> (
17737 in (LrTable
.NT
98,(result
,defaultPos
,defaultPos
),rest671
) end
17738 |
(239,(_
,(MlyValue
.AND_sigbind_opt AND_sigbind_opt1
,_
,
17739 AND_sigbind_opt1right
))::(_
,(MlyValue
.sigexp
' sigexp
'1,sigexp
'1left
,_
)
17740 )::rest671
) => let val result
=MlyValue
.sigexp__AND_sigbind_opt(fn _
17741 => let val sigexp
' as sigexp
'1=sigexp
'1 ()
17742 val AND_sigbind_opt
as AND_sigbind_opt1
=AND_sigbind_opt1 ()
17743 in ( ( sigexp
', AND_sigbind_opt
) ) end
17745 in (LrTable
.NT
99,(result
,sigexp
'1left
,AND_sigbind_opt1right
),rest671
17747 |
(240,(_
,(MlyValue
.tyreadesc__AND_sigbind_opt
17748 tyreadesc__AND_sigbind_opt1
,_
,tyreadesc__AND_sigbind_optright
as
17749 tyreadesc__AND_sigbind_opt1right
))::_
::(_
,(MlyValue
.sigexp sigexp1
,
17750 sigexpleft
as sigexp1left
,_
))::rest671
) => let val result
=
17751 MlyValue
.sigexp__AND_sigbind_opt(fn _
=> let val sigexp
as sigexp1
=
17753 val tyreadesc__AND_sigbind_opt
as tyreadesc__AND_sigbind_opt1
=
17754 tyreadesc__AND_sigbind_opt1 ()
17756 ( WHERETYPESigExp(I(sigexpleft
,
17757 tyreadesc__AND_sigbind_optright
),
17759 #
1 tyreadesc__AND_sigbind_opt
),
17760 #
2 tyreadesc__AND_sigbind_opt
)
17763 in (LrTable
.NT
99,(result
,sigexp1left
,
17764 tyreadesc__AND_sigbind_opt1right
),rest671
) end
17765 |
(241,(_
,(MlyValue
.AND_tyreadesc_opt__AND_sigbind_opt
17766 AND_tyreadesc_opt__AND_sigbind_opt1
,_
,
17767 AND_tyreadesc_opt__AND_sigbind_optright
as
17768 AND_tyreadesc_opt__AND_sigbind_opt1right
))::(_
,(MlyValue
.ty ty1
,_
,_
))
17769 ::_
::(_
,(MlyValue
.longtycon longtycon1
,_
,_
))::(_
,(MlyValue
.tyvarseq
17770 tyvarseq1
,_
,_
))::(_
,(_
,TYPEleft
as TYPE1left
,_
))::rest671
) => let val
17771 result
=MlyValue
.tyreadesc__AND_sigbind_opt(fn _
=> let val tyvarseq
17772 as tyvarseq1
=tyvarseq1 ()
17773 val longtycon
as longtycon1
=longtycon1 ()
17774 val ty
as ty1
=ty1 ()
17775 val AND_tyreadesc_opt__AND_sigbind_opt
as
17776 AND_tyreadesc_opt__AND_sigbind_opt1
=
17777 AND_tyreadesc_opt__AND_sigbind_opt1 ()
17779 ( TyReaDesc(I(TYPEleft
,
17780 AND_tyreadesc_opt__AND_sigbind_optright
),
17781 tyvarseq
, longtycon
, ty
,
17782 #
1 AND_tyreadesc_opt__AND_sigbind_opt
),
17783 #
2 AND_tyreadesc_opt__AND_sigbind_opt
)
17786 in (LrTable
.NT
100,(result
,TYPE1left
,
17787 AND_tyreadesc_opt__AND_sigbind_opt1right
),rest671
) end
17788 |
(242,(_
,(MlyValue
.AND_sigbind_opt AND_sigbind_opt1
,
17789 AND_sigbind_opt1left
,AND_sigbind_opt1right
))::rest671
) => let val
17790 result
=MlyValue
.AND_tyreadesc_opt__AND_sigbind_opt(fn _
=> let val
17791 AND_sigbind_opt
as AND_sigbind_opt1
=AND_sigbind_opt1 ()
17792 in ( ( NONE
, AND_sigbind_opt
) ) end
17794 in (LrTable
.NT
101,(result
,AND_sigbind_opt1left
,AND_sigbind_opt1right
17796 |
(243,(_
,(MlyValue
.tyreadesc__AND_sigbind_opt
17797 tyreadesc__AND_sigbind_opt1
,_
,tyreadesc__AND_sigbind_opt1right
))::(_
,(
17798 _
,AND1left
,_
))::rest671
) => let val result
=
17799 MlyValue
.AND_tyreadesc_opt__AND_sigbind_opt(fn _
=> let val
17800 tyreadesc__AND_sigbind_opt
as tyreadesc__AND_sigbind_opt1
=
17801 tyreadesc__AND_sigbind_opt1 ()
17803 ( SOME(#
1 tyreadesc__AND_sigbind_opt
),
17804 #
2 tyreadesc__AND_sigbind_opt
)
17807 in (LrTable
.NT
101,(result
,AND1left
,tyreadesc__AND_sigbind_opt1right
)
17809 |
(244,(_
,(MlyValue
.AND_tyreadesc_opt AND_tyreadesc_opt1
,_
,
17810 AND_tyreadesc_optright
as AND_tyreadesc_opt1right
))::(_
,(MlyValue
.ty
17811 ty1
,_
,_
))::_
::(_
,(MlyValue
.longtycon longtycon1
,_
,_
))::(_
,(
17812 MlyValue
.tyvarseq tyvarseq1
,_
,_
))::(_
,(_
,TYPEleft
as TYPE1left
,_
))::
17813 rest671
) => let val result
=MlyValue
.tyreadesc(fn _
=> let val tyvarseq
17814 as tyvarseq1
=tyvarseq1 ()
17815 val longtycon
as longtycon1
=longtycon1 ()
17816 val ty
as ty1
=ty1 ()
17817 val AND_tyreadesc_opt
as AND_tyreadesc_opt1
=AND_tyreadesc_opt1 ()
17819 TyReaDesc(I(TYPEleft
,AND_tyreadesc_optright
),
17820 tyvarseq
, longtycon
, ty
,
17824 in (LrTable
.NT
102,(result
,TYPE1left
,AND_tyreadesc_opt1right
),rest671
17826 |
(245,(_
,(MlyValue
.tyreadesc tyreadesc1
,_
,tyreadesc1right
))::(_
,(_
,
17827 AND1left
,_
))::rest671
) => let val result
=MlyValue
.AND_tyreadesc_opt(
17828 fn _
=> let val tyreadesc
as tyreadesc1
=tyreadesc1 ()
17829 in ( SOME tyreadesc
) end
17831 in (LrTable
.NT
103,(result
,AND1left
,tyreadesc1right
),rest671
) end
17832 |
(246,rest671
) => let val result
=MlyValue
.AND_tyreadesc_opt(fn _
=> (
17834 in (LrTable
.NT
103,(result
,defaultPos
,defaultPos
),rest671
) end
17835 |
(247,(_
,(MlyValue
.spec1 spec11
,spec11left
,spec11right
))::rest671
)
17836 => let val result
=MlyValue
.spec(fn _
=> let val spec1
as spec11
=
17840 in (LrTable
.NT
104,(result
,spec11left
,spec11right
),rest671
) end
17841 |
(248,rest671
) => let val result
=MlyValue
.spec(fn _
=> (
17842 EMPTYSpec(I(defaultPos
,defaultPos
)) ))
17843 in (LrTable
.NT
104,(result
,defaultPos
,defaultPos
),rest671
) end
17844 |
(249,(_
,(MlyValue
.spec1
' spec1
'1,spec1
'1left
,spec1
'1right
))::rest671
17845 ) => let val result
=MlyValue
.spec1(fn _
=> let val spec1
' as spec1
'1=
17849 in (LrTable
.NT
105,(result
,spec1
'1left
,spec1
'1right
),rest671
) end
17850 |
(250,(_
,(MlyValue
.spec1
' spec1
'1,_
,spec1
'right
as spec1
'1right
))::(_
17851 ,(MlyValue
.spec1 spec11
,spec1left
as spec11left
,_
))::rest671
) => let
17852 val result
=MlyValue
.spec1(fn _
=> let val spec1
as spec11
=spec11 ()
17853 val spec1
' as spec1
'1=spec1
'1 ()
17854 in ( SEQSpec(I(spec1left
,spec1
'right
), spec1
, spec1
') ) end
17856 in (LrTable
.NT
105,(result
,spec11left
,spec1
'1right
),rest671
) end
17857 |
(251,(_
,(_
,SEMICOLON1left
,SEMICOLON1right
))::rest671
) => let val
17858 result
=MlyValue
.spec1(fn _
=> ( EMPTYSpec(I(defaultPos
,defaultPos
)) ))
17859 in (LrTable
.NT
105,(result
,SEMICOLON1left
,SEMICOLON1right
),rest671
)
17861 |
(252,(_
,(MlyValue
.longtycon_EQUALS_list2 longtycon_EQUALS_list21
,_
,
17862 longtycon_EQUALS_list2right
as longtycon_EQUALS_list21right
))::_
::(_
,(
17863 _
,SHARINGleft
as SHARING1left
,_
))::rest671
) => let val result
=
17864 MlyValue
.spec1(fn _
=> let val longtycon_EQUALS_list2
as
17865 longtycon_EQUALS_list21
=longtycon_EQUALS_list21 ()
17867 SHARINGTYPESpec(I(SHARINGleft
,
17868 longtycon_EQUALS_list2right
),
17869 EMPTYSpec(I(SHARINGleft
,SHARINGleft
)),
17870 longtycon_EQUALS_list2
)
17873 in (LrTable
.NT
105,(result
,SHARING1left
,longtycon_EQUALS_list21right
)
17875 |
(253,(_
,(MlyValue
.longtycon_EQUALS_list2 longtycon_EQUALS_list21
,_
,
17876 longtycon_EQUALS_list2right
as longtycon_EQUALS_list21right
))::_
::_
::(
17877 _
,(MlyValue
.spec1 spec11
,spec1left
as spec11left
,_
))::rest671
) => let
17878 val result
=MlyValue
.spec1(fn _
=> let val spec1
as spec11
=spec11 ()
17879 val longtycon_EQUALS_list2
as longtycon_EQUALS_list21
=
17880 longtycon_EQUALS_list21 ()
17882 SHARINGTYPESpec(I(spec1left
,
17883 longtycon_EQUALS_list2right
),
17884 spec1
, longtycon_EQUALS_list2
)
17887 in (LrTable
.NT
105,(result
,spec11left
,longtycon_EQUALS_list21right
),
17889 |
(254,(_
,(MlyValue
.longstrid_EQUALS_list2 longstrid_EQUALS_list21
,_
,
17890 longstrid_EQUALS_list2right
as longstrid_EQUALS_list21right
))::(_
,(_
,
17891 SHARINGleft
as SHARING1left
,_
))::rest671
) => let val result
=
17892 MlyValue
.spec1(fn _
=> let val longstrid_EQUALS_list2
as
17893 longstrid_EQUALS_list21
=longstrid_EQUALS_list21 ()
17895 SHARINGSpec(I(SHARINGleft
,
17896 longstrid_EQUALS_list2right
),
17897 EMPTYSpec(I(SHARINGleft
,SHARINGleft
)),
17898 longstrid_EQUALS_list2
)
17901 in (LrTable
.NT
105,(result
,SHARING1left
,longstrid_EQUALS_list21right
)
17903 |
(255,(_
,(MlyValue
.longstrid_EQUALS_list2 longstrid_EQUALS_list21
,_
,
17904 longstrid_EQUALS_list2right
as longstrid_EQUALS_list21right
))::_
::(_
,(
17905 MlyValue
.spec1 spec11
,spec1left
as spec11left
,_
))::rest671
) => let
17906 val result
=MlyValue
.spec1(fn _
=> let val spec1
as spec11
=spec11 ()
17907 val longstrid_EQUALS_list2
as longstrid_EQUALS_list21
=
17908 longstrid_EQUALS_list21 ()
17910 SHARINGSpec(I(spec1left
,longstrid_EQUALS_list2right
),
17911 spec1
, longstrid_EQUALS_list2
)
17914 in (LrTable
.NT
105,(result
,spec11left
,longstrid_EQUALS_list21right
),
17916 |
(256,(_
,(MlyValue
.valdesc valdesc1
,_
,valdescright
as valdesc1right
))
17917 ::(_
,(_
,VALleft
as VAL1left
,_
))::rest671
) => let val result
=
17918 MlyValue
.spec1
'(fn _
=> let val valdesc
as valdesc1
=valdesc1 ()
17919 in ( VALSpec(I(VALleft
,valdescright
), valdesc
) ) end
17921 in (LrTable
.NT
106,(result
,VAL1left
,valdesc1right
),rest671
) end
17922 |
(257,(_
,(MlyValue
.typdesc typdesc1
,_
,typdescright
as typdesc1right
))
17923 ::(_
,(_
,TYPEleft
as TYPE1left
,_
))::rest671
) => let val result
=
17924 MlyValue
.spec1
'(fn _
=> let val typdesc
as typdesc1
=typdesc1 ()
17925 in ( TYPESpec(I(TYPEleft
,typdescright
), typdesc
) ) end
17927 in (LrTable
.NT
106,(result
,TYPE1left
,typdesc1right
),rest671
) end
17928 |
(258,(_
,(MlyValue
.typdesc typdesc1
,_
,typdescright
as typdesc1right
))
17929 ::(_
,(_
,EQTYPEleft
as EQTYPE1left
,_
))::rest671
) => let val result
=
17930 MlyValue
.spec1
'(fn _
=> let val typdesc
as typdesc1
=typdesc1 ()
17931 in ( EQTYPESpec(I(EQTYPEleft
,typdescright
), typdesc
) ) end
17933 in (LrTable
.NT
106,(result
,EQTYPE1left
,typdesc1right
),rest671
) end
17934 |
(259,(_
,(MlyValue
.syndesc syndesc1
,_
,syndescright
as syndesc1right
))
17935 ::(_
,(_
,TYPEleft
as TYPE1left
,_
))::rest671
) => let val result
=
17936 MlyValue
.spec1
'(fn _
=> let val syndesc
as syndesc1
=syndesc1 ()
17937 in ( SYNSpec(I(TYPEleft
,syndescright
), syndesc
) ) end
17939 in (LrTable
.NT
106,(result
,TYPE1left
,syndesc1right
),rest671
) end
17940 |
(260,(_
,(MlyValue
.datdesc0 datdesc01
,_
,datdesc0right
as
17941 datdesc01right
))::(_
,(_
,DATATYPEleft
as DATATYPE1left
,_
))::rest671
)
17942 => let val result
=MlyValue
.spec1
'(fn _
=> let val datdesc0
as
17943 datdesc01
=datdesc01 ()
17944 in ( DATATYPESpec(I(DATATYPEleft
,datdesc0right
), datdesc0
)) end
17946 in (LrTable
.NT
106,(result
,DATATYPE1left
,datdesc01right
),rest671
) end
17947 |
(261,(_
,(MlyValue
.datdesc1 datdesc11
,_
,datdesc1right
as
17948 datdesc11right
))::(_
,(_
,DATATYPEleft
as DATATYPE1left
,_
))::rest671
)
17949 => let val result
=MlyValue
.spec1
'(fn _
=> let val datdesc1
as
17950 datdesc11
=datdesc11 ()
17951 in ( DATATYPESpec(I(DATATYPEleft
,datdesc1right
), datdesc1
)) end
17953 in (LrTable
.NT
106,(result
,DATATYPE1left
,datdesc11right
),rest671
) end
17954 |
(262,(_
,(MlyValue
.longtycon longtycon1
,_
,longtyconright
as
17955 longtycon1right
))::_
::_
::(_
,(MlyValue
.tycon tycon1
,_
,_
))::(_
,(_
,
17956 DATATYPEleft
as DATATYPE1left
,_
))::rest671
) => let val result
=
17957 MlyValue
.spec1
'(fn _
=> let val tycon
as tycon1
=tycon1 ()
17958 val longtycon
as longtycon1
=longtycon1 ()
17960 REPLICATIONSpec(I(DATATYPEleft
,longtyconright
),
17964 in (LrTable
.NT
106,(result
,DATATYPE1left
,longtycon1right
),rest671
)
17966 |
(263,(_
,(MlyValue
.exdesc exdesc1
,_
,exdescright
as exdesc1right
))::(_
17967 ,(_
,EXCEPTIONleft
as EXCEPTION1left
,_
))::rest671
) => let val result
=
17968 MlyValue
.spec1
'(fn _
=> let val exdesc
as exdesc1
=exdesc1 ()
17969 in ( EXCEPTIONSpec(I(EXCEPTIONleft
,exdescright
), exdesc
) ) end
17971 in (LrTable
.NT
106,(result
,EXCEPTION1left
,exdesc1right
),rest671
) end
17972 |
(264,(_
,(MlyValue
.strdesc strdesc1
,_
,strdescright
as strdesc1right
))
17973 ::(_
,(_
,STRUCTUREleft
as STRUCTURE1left
,_
))::rest671
) => let val
17974 result
=MlyValue
.spec1
'(fn _
=> let val strdesc
as strdesc1
=strdesc1 ()
17975 in ( STRUCTURESpec(I(STRUCTUREleft
,strdescright
), strdesc
)) end
17977 in (LrTable
.NT
106,(result
,STRUCTURE1left
,strdesc1right
),rest671
) end
17978 |
(265,(_
,(MlyValue
.sigexp sigexp1
,_
,sigexpright
as sigexp1right
))::(_
17979 ,(_
,INCLUDEleft
as INCLUDE1left
,_
))::rest671
) => let val result
=
17980 MlyValue
.spec1
'(fn _
=> let val sigexp
as sigexp1
=sigexp1 ()
17981 in ( INCLUDESpec(I(INCLUDEleft
,sigexpright
), sigexp
) ) end
17983 in (LrTable
.NT
106,(result
,INCLUDE1left
,sigexp1right
),rest671
) end
17984 |
(266,(_
,(MlyValue
.sigid_list2 sigid_list21
,_
,sigid_list2right
as
17985 sigid_list21right
))::(_
,(_
,INCLUDEleft
as INCLUDE1left
,_
))::rest671
)
17986 => let val result
=MlyValue
.spec1
'(fn _
=> let val sigid_list2
as
17987 sigid_list21
=sigid_list21 ()
17989 INCLUDEMULTISpec(I(INCLUDEleft
,sigid_list2right
),
17993 in (LrTable
.NT
106,(result
,INCLUDE1left
,sigid_list21right
),rest671
)
17995 |
(267,(_
,(MlyValue
.sigid_list2 sigid_list21
,_
,sigid_list21right
))::(_
17996 ,(MlyValue
.sigid sigid1
,sigid1left
,_
))::rest671
) => let val result
=
17997 MlyValue
.sigid_list2(fn _
=> let val sigid
as sigid1
=sigid1 ()
17998 val sigid_list2
as sigid_list21
=sigid_list21 ()
17999 in ( sigid
::sigid_list2
) end
18001 in (LrTable
.NT
107,(result
,sigid1left
,sigid_list21right
),rest671
) end
18002 |
(268,(_
,(MlyValue
.sigid sigid2
,_
,sigid2right
))::(_
,(MlyValue
.sigid
18003 sigid1
,sigid1left
,_
))::rest671
) => let val result
=MlyValue
.sigid_list2
18004 (fn _
=> let val sigid1
=sigid1 ()
18005 val sigid2
=sigid2 ()
18006 in ( sigid1
::sigid2
::[] ) end
18008 in (LrTable
.NT
107,(result
,sigid1left
,sigid2right
),rest671
) end
18009 |
(269,(_
,(MlyValue
.longtycon_EQUALS_list1 longtycon_EQUALS_list11
,_
,
18010 longtycon_EQUALS_list11right
))::_
::(_
,(MlyValue
.longtycon longtycon1
,
18011 longtycon1left
,_
))::rest671
) => let val result
=
18012 MlyValue
.longtycon_EQUALS_list1(fn _
=> let val longtycon
as
18013 longtycon1
=longtycon1 ()
18014 val longtycon_EQUALS_list1
as longtycon_EQUALS_list11
=
18015 longtycon_EQUALS_list11 ()
18016 in ( longtycon
::longtycon_EQUALS_list1
) end
18018 in (LrTable
.NT
108,(result
,longtycon1left
,
18019 longtycon_EQUALS_list11right
),rest671
) end
18020 |
(270,(_
,(MlyValue
.longtycon longtycon1
,longtycon1left
,
18021 longtycon1right
))::rest671
) => let val result
=
18022 MlyValue
.longtycon_EQUALS_list1(fn _
=> let val longtycon
as
18023 longtycon1
=longtycon1 ()
18024 in ( longtycon
::[] ) end
18026 in (LrTable
.NT
108,(result
,longtycon1left
,longtycon1right
),rest671
)
18028 |
(271,(_
,(MlyValue
.longtycon_EQUALS_list1 longtycon_EQUALS_list11
,_
,
18029 longtycon_EQUALS_list11right
))::_
::(_
,(MlyValue
.longtycon longtycon1
,
18030 longtycon1left
,_
))::rest671
) => let val result
=
18031 MlyValue
.longtycon_EQUALS_list2(fn _
=> let val longtycon
as
18032 longtycon1
=longtycon1 ()
18033 val longtycon_EQUALS_list1
as longtycon_EQUALS_list11
=
18034 longtycon_EQUALS_list11 ()
18035 in ( longtycon
::longtycon_EQUALS_list1
) end
18037 in (LrTable
.NT
109,(result
,longtycon1left
,
18038 longtycon_EQUALS_list11right
),rest671
) end
18039 |
(272,(_
,(MlyValue
.longstrid_EQUALS_list1 longstrid_EQUALS_list11
,_
,
18040 longstrid_EQUALS_list11right
))::_
::(_
,(MlyValue
.longstrid longstrid1
,
18041 longstrid1left
,_
))::rest671
) => let val result
=
18042 MlyValue
.longstrid_EQUALS_list1(fn _
=> let val longstrid
as
18043 longstrid1
=longstrid1 ()
18044 val longstrid_EQUALS_list1
as longstrid_EQUALS_list11
=
18045 longstrid_EQUALS_list11 ()
18046 in ( longstrid
::longstrid_EQUALS_list1
) end
18048 in (LrTable
.NT
110,(result
,longstrid1left
,
18049 longstrid_EQUALS_list11right
),rest671
) end
18050 |
(273,(_
,(MlyValue
.longstrid longstrid1
,longstrid1left
,
18051 longstrid1right
))::rest671
) => let val result
=
18052 MlyValue
.longstrid_EQUALS_list1(fn _
=> let val longstrid
as
18053 longstrid1
=longstrid1 ()
18054 in ( longstrid
::[] ) end
18056 in (LrTable
.NT
110,(result
,longstrid1left
,longstrid1right
),rest671
)
18058 |
(274,(_
,(MlyValue
.longstrid_EQUALS_list1 longstrid_EQUALS_list11
,_
,
18059 longstrid_EQUALS_list11right
))::_
::(_
,(MlyValue
.longstrid longstrid1
,
18060 longstrid1left
,_
))::rest671
) => let val result
=
18061 MlyValue
.longstrid_EQUALS_list2(fn _
=> let val longstrid
as
18062 longstrid1
=longstrid1 ()
18063 val longstrid_EQUALS_list1
as longstrid_EQUALS_list11
=
18064 longstrid_EQUALS_list11 ()
18065 in ( longstrid
::longstrid_EQUALS_list1
) end
18067 in (LrTable
.NT
111,(result
,longstrid1left
,
18068 longstrid_EQUALS_list11right
),rest671
) end
18069 |
(275,(_
,(MlyValue
.AND_valdesc_opt AND_valdesc_opt1
,_
,
18070 AND_valdesc_optright
as AND_valdesc_opt1right
))::(_
,(MlyValue
.ty ty1
,_
18071 ,_
))::_
::(_
,(MlyValue
.vid
' vid
'1,vid
'left
as vid
'1left
,_
))::rest671
)
18072 => let val result
=MlyValue
.valdesc(fn _
=> let val vid
' as vid
'1=
18074 val ty
as ty1
=ty1 ()
18075 val AND_valdesc_opt
as AND_valdesc_opt1
=AND_valdesc_opt1 ()
18077 ValDesc(I(vid
'left
,AND_valdesc_optright
),
18078 vid
', ty
, AND_valdesc_opt
)
18081 in (LrTable
.NT
112,(result
,vid
'1left
,AND_valdesc_opt1right
),rest671
)
18083 |
(276,(_
,(MlyValue
.valdesc valdesc1
,_
,valdesc1right
))::(_
,(_
,AND1left
18084 ,_
))::rest671
) => let val result
=MlyValue
.AND_valdesc_opt(fn _
=> let
18085 val valdesc
as valdesc1
=valdesc1 ()
18086 in ( SOME valdesc
) end
18088 in (LrTable
.NT
113,(result
,AND1left
,valdesc1right
),rest671
) end
18089 |
(277,rest671
) => let val result
=MlyValue
.AND_valdesc_opt(fn _
=> (
18091 in (LrTable
.NT
113,(result
,defaultPos
,defaultPos
),rest671
) end
18092 |
(278,(_
,(MlyValue
.AND_typdesc_opt AND_typdesc_opt1
,_
,
18093 AND_typdesc_optright
as AND_typdesc_opt1right
))::(_
,(MlyValue
.tycon
18094 tycon1
,_
,_
))::(_
,(MlyValue
.tyvarseq tyvarseq1
,tyvarseqleft
as
18095 tyvarseq1left
,_
))::rest671
) => let val result
=MlyValue
.typdesc(fn _
18096 => let val tyvarseq
as tyvarseq1
=tyvarseq1 ()
18097 val tycon
as tycon1
=tycon1 ()
18098 val AND_typdesc_opt
as AND_typdesc_opt1
=AND_typdesc_opt1 ()
18100 TypDesc(I(tyvarseqleft
,AND_typdesc_optright
),
18101 tyvarseq
, tycon
, AND_typdesc_opt
)
18104 in (LrTable
.NT
114,(result
,tyvarseq1left
,AND_typdesc_opt1right
),
18106 |
(279,(_
,(MlyValue
.typdesc typdesc1
,_
,typdesc1right
))::(_
,(_
,AND1left
18107 ,_
))::rest671
) => let val result
=MlyValue
.AND_typdesc_opt(fn _
=> let
18108 val typdesc
as typdesc1
=typdesc1 ()
18109 in ( SOME typdesc
) end
18111 in (LrTable
.NT
115,(result
,AND1left
,typdesc1right
),rest671
) end
18112 |
(280,rest671
) => let val result
=MlyValue
.AND_typdesc_opt(fn _
=> (
18114 in (LrTable
.NT
115,(result
,defaultPos
,defaultPos
),rest671
) end
18115 |
(281,(_
,(MlyValue
.AND_syndesc_opt AND_syndesc_opt1
,_
,
18116 AND_syndesc_optright
as AND_syndesc_opt1right
))::(_
,(MlyValue
.ty ty1
,_
18117 ,_
))::_
::(_
,(MlyValue
.tycon tycon1
,_
,_
))::(_
,(MlyValue
.tyvarseq
18118 tyvarseq1
,tyvarseqleft
as tyvarseq1left
,_
))::rest671
) => let val
18119 result
=MlyValue
.syndesc(fn _
=> let val tyvarseq
as tyvarseq1
=
18121 val tycon
as tycon1
=tycon1 ()
18122 val ty
as ty1
=ty1 ()
18123 val AND_syndesc_opt
as AND_syndesc_opt1
=AND_syndesc_opt1 ()
18125 SynDesc(I(tyvarseqleft
,AND_syndesc_optright
),
18126 tyvarseq
, tycon
, ty
, AND_syndesc_opt
)
18129 in (LrTable
.NT
116,(result
,tyvarseq1left
,AND_syndesc_opt1right
),
18131 |
(282,(_
,(MlyValue
.syndesc syndesc1
,_
,syndesc1right
))::(_
,(_
,AND1left
18132 ,_
))::rest671
) => let val result
=MlyValue
.AND_syndesc_opt(fn _
=> let
18133 val syndesc
as syndesc1
=syndesc1 ()
18134 in ( SOME syndesc
) end
18136 in (LrTable
.NT
117,(result
,AND1left
,syndesc1right
),rest671
) end
18137 |
(283,rest671
) => let val result
=MlyValue
.AND_syndesc_opt(fn _
=> (
18139 in (LrTable
.NT
117,(result
,defaultPos
,defaultPos
),rest671
) end
18140 |
(284,(_
,(MlyValue
.AND_datdesc_opt AND_datdesc_opt1
,_
,
18141 AND_datdesc_optright
as AND_datdesc_opt1right
))::(_
,(MlyValue
.condesc
18142 condesc1
,_
,_
))::_
::(_
,(MlyValue
.tycon tycon1
,_
,_
))::(_
,(
18143 MlyValue
.tyvarseq tyvarseq1
,tyvarseqleft
as tyvarseq1left
,_
))::rest671
18144 ) => let val result
=MlyValue
.datdesc(fn _
=> let val tyvarseq
as
18145 tyvarseq1
=tyvarseq1 ()
18146 val tycon
as tycon1
=tycon1 ()
18147 val condesc
as condesc1
=condesc1 ()
18148 val AND_datdesc_opt
as AND_datdesc_opt1
=AND_datdesc_opt1 ()
18150 DatDesc(I(tyvarseqleft
,AND_datdesc_optright
),
18151 tyvarseq
, tycon
, condesc
, AND_datdesc_opt
)
18154 in (LrTable
.NT
118,(result
,tyvarseq1left
,AND_datdesc_opt1right
),
18156 |
(285,(_
,(MlyValue
.AND_datdesc_opt AND_datdesc_opt1
,_
,
18157 AND_datdesc_optright
as AND_datdesc_opt1right
))::(_
,(MlyValue
.condesc
18158 condesc1
,_
,_
))::_
::(_
,(MlyValue
.tycon tycon1
,tyconleft
as tycon1left
,_
18159 ))::rest671
) => let val result
=MlyValue
.datdesc0(fn _
=> let val tycon
18160 as tycon1
=tycon1 ()
18161 val condesc
as condesc1
=condesc1 ()
18162 val AND_datdesc_opt
as AND_datdesc_opt1
=AND_datdesc_opt1 ()
18164 DatDesc(I(tyconleft
,AND_datdesc_optright
),
18165 TyVarseq(I(defaultPos
,defaultPos
), []),
18166 tycon
, condesc
, AND_datdesc_opt
)
18169 in (LrTable
.NT
119,(result
,tycon1left
,AND_datdesc_opt1right
),rest671
)
18171 |
(286,(_
,(MlyValue
.AND_datdesc_opt AND_datdesc_opt1
,_
,
18172 AND_datdesc_optright
as AND_datdesc_opt1right
))::(_
,(MlyValue
.condesc
18173 condesc1
,_
,_
))::_
::(_
,(MlyValue
.tycon tycon1
,_
,_
))::(_
,(
18174 MlyValue
.tyvarseq1 tyvarseq11
,tyvarseq1left
as tyvarseq11left
,_
))::
18175 rest671
) => let val result
=MlyValue
.datdesc1(fn _
=> let val tyvarseq1
18176 as tyvarseq11
=tyvarseq11 ()
18177 val tycon
as tycon1
=tycon1 ()
18178 val condesc
as condesc1
=condesc1 ()
18179 val AND_datdesc_opt
as AND_datdesc_opt1
=AND_datdesc_opt1 ()
18181 DatDesc(I(tyvarseq1left
,AND_datdesc_optright
),
18182 tyvarseq1
, tycon
, condesc
, AND_datdesc_opt
)
18185 in (LrTable
.NT
120,(result
,tyvarseq11left
,AND_datdesc_opt1right
),
18187 |
(287,(_
,(MlyValue
.datdesc datdesc1
,_
,datdesc1right
))::(_
,(_
,AND1left
18188 ,_
))::rest671
) => let val result
=MlyValue
.AND_datdesc_opt(fn _
=> let
18189 val datdesc
as datdesc1
=datdesc1 ()
18190 in ( SOME datdesc
) end
18192 in (LrTable
.NT
121,(result
,AND1left
,datdesc1right
),rest671
) end
18193 |
(288,rest671
) => let val result
=MlyValue
.AND_datdesc_opt(fn _
=> (
18195 in (LrTable
.NT
121,(result
,defaultPos
,defaultPos
),rest671
) end
18196 |
(289,(_
,(MlyValue
.BAR_condesc_opt BAR_condesc_opt1
,_
,
18197 BAR_condesc_optright
as BAR_condesc_opt1right
))::(_
,(
18198 MlyValue
.OF_ty_opt OF_ty_opt1
,_
,_
))::(_
,(MlyValue
.vid
' vid
'1,vid
'left
18199 as vid
'1left
,_
))::rest671
) => let val result
=MlyValue
.condesc(fn _
18200 => let val vid
' as vid
'1=vid
'1 ()
18201 val OF_ty_opt
as OF_ty_opt1
=OF_ty_opt1 ()
18202 val BAR_condesc_opt
as BAR_condesc_opt1
=BAR_condesc_opt1 ()
18204 ConDesc(I(vid
'left
,BAR_condesc_optright
),
18205 vid
', OF_ty_opt
, BAR_condesc_opt
)
18208 in (LrTable
.NT
122,(result
,vid
'1left
,BAR_condesc_opt1right
),rest671
)
18210 |
(290,(_
,(MlyValue
.condesc condesc1
,_
,condesc1right
))::(_
,(_
,BAR1left
18211 ,_
))::rest671
) => let val result
=MlyValue
.BAR_condesc_opt(fn _
=> let
18212 val condesc
as condesc1
=condesc1 ()
18213 in ( SOME condesc
) end
18215 in (LrTable
.NT
123,(result
,BAR1left
,condesc1right
),rest671
) end
18216 |
(291,rest671
) => let val result
=MlyValue
.BAR_condesc_opt(fn _
=> (
18218 in (LrTable
.NT
123,(result
,defaultPos
,defaultPos
),rest671
) end
18219 |
(292,(_
,(MlyValue
.AND_exdesc_opt AND_exdesc_opt1
,_
,
18220 AND_exdesc_optright
as AND_exdesc_opt1right
))::(_
,(MlyValue
.OF_ty_opt
18221 OF_ty_opt1
,_
,_
))::(_
,(MlyValue
.vid
' vid
'1,vid
'left
as vid
'1left
,_
))::
18222 rest671
) => let val result
=MlyValue
.exdesc(fn _
=> let val vid
' as
18224 val OF_ty_opt
as OF_ty_opt1
=OF_ty_opt1 ()
18225 val AND_exdesc_opt
as AND_exdesc_opt1
=AND_exdesc_opt1 ()
18227 ExDesc(I(vid
'left
,AND_exdesc_optright
),
18228 vid
', OF_ty_opt
, AND_exdesc_opt
)
18231 in (LrTable
.NT
124,(result
,vid
'1left
,AND_exdesc_opt1right
),rest671
)
18233 |
(293,(_
,(MlyValue
.exdesc exdesc1
,_
,exdesc1right
))::(_
,(_
,AND1left
,_
)
18234 )::rest671
) => let val result
=MlyValue
.AND_exdesc_opt(fn _
=> let val
18235 exdesc
as exdesc1
=exdesc1 ()
18236 in ( SOME exdesc
) end
18238 in (LrTable
.NT
125,(result
,AND1left
,exdesc1right
),rest671
) end
18239 |
(294,rest671
) => let val result
=MlyValue
.AND_exdesc_opt(fn _
=> (
18241 in (LrTable
.NT
125,(result
,defaultPos
,defaultPos
),rest671
) end
18242 |
(295,(_
,(MlyValue
.sigexp__AND_strdesc_opt sigexp__AND_strdesc_opt1
,_
18243 ,sigexp__AND_strdesc_optright
as sigexp__AND_strdesc_opt1right
))::_
::(
18244 _
,(MlyValue
.strid strid1
,stridleft
as strid1left
,_
))::rest671
) => let
18245 val result
=MlyValue
.strdesc(fn _
=> let val strid
as strid1
=strid1 ()
18246 val sigexp__AND_strdesc_opt
as sigexp__AND_strdesc_opt1
=
18247 sigexp__AND_strdesc_opt1 ()
18249 StrDesc(I(stridleft
,sigexp__AND_strdesc_optright
),
18250 strid
, #
1 sigexp__AND_strdesc_opt
,
18251 #
2 sigexp__AND_strdesc_opt
)
18254 in (LrTable
.NT
126,(result
,strid1left
,sigexp__AND_strdesc_opt1right
),
18256 |
(296,(_
,(MlyValue
.strdesc strdesc1
,_
,strdesc1right
))::(_
,(_
,AND1left
18257 ,_
))::rest671
) => let val result
=MlyValue
.AND_strdesc_opt(fn _
=> let
18258 val strdesc
as strdesc1
=strdesc1 ()
18259 in ( SOME strdesc
) end
18261 in (LrTable
.NT
127,(result
,AND1left
,strdesc1right
),rest671
) end
18262 |
(297,rest671
) => let val result
=MlyValue
.AND_strdesc_opt(fn _
=> (
18264 in (LrTable
.NT
127,(result
,defaultPos
,defaultPos
),rest671
) end
18265 |
(298,(_
,(MlyValue
.AND_strdesc_opt AND_strdesc_opt1
,_
,
18266 AND_strdesc_opt1right
))::(_
,(MlyValue
.sigexp
' sigexp
'1,sigexp
'1left
,_
)
18267 )::rest671
) => let val result
=MlyValue
.sigexp__AND_strdesc_opt(fn _
18268 => let val sigexp
' as sigexp
'1=sigexp
'1 ()
18269 val AND_strdesc_opt
as AND_strdesc_opt1
=AND_strdesc_opt1 ()
18270 in ( ( sigexp
', AND_strdesc_opt
) ) end
18272 in (LrTable
.NT
128,(result
,sigexp
'1left
,AND_strdesc_opt1right
),
18274 |
(299,(_
,(MlyValue
.tyreadesc__AND_strdesc_opt
18275 tyreadesc__AND_strdesc_opt1
,_
,tyreadesc__AND_strdesc_optright
as
18276 tyreadesc__AND_strdesc_opt1right
))::_
::(_
,(MlyValue
.sigexp sigexp1
,
18277 sigexpleft
as sigexp1left
,_
))::rest671
) => let val result
=
18278 MlyValue
.sigexp__AND_strdesc_opt(fn _
=> let val sigexp
as sigexp1
=
18280 val tyreadesc__AND_strdesc_opt
as tyreadesc__AND_strdesc_opt1
=
18281 tyreadesc__AND_strdesc_opt1 ()
18283 ( WHERETYPESigExp(I(sigexpleft
,
18284 tyreadesc__AND_strdesc_optright
),
18286 #
1 tyreadesc__AND_strdesc_opt
),
18287 #
2 tyreadesc__AND_strdesc_opt
)
18290 in (LrTable
.NT
128,(result
,sigexp1left
,
18291 tyreadesc__AND_strdesc_opt1right
),rest671
) end
18292 |
(300,(_
,(MlyValue
.AND_tyreadesc_opt__AND_strdesc_opt
18293 AND_tyreadesc_opt__AND_strdesc_opt1
,_
,
18294 AND_tyreadesc_opt__AND_strdesc_optright
as
18295 AND_tyreadesc_opt__AND_strdesc_opt1right
))::(_
,(MlyValue
.ty ty1
,_
,_
))
18296 ::_
::(_
,(MlyValue
.longtycon longtycon1
,_
,_
))::(_
,(MlyValue
.tyvarseq
18297 tyvarseq1
,_
,_
))::(_
,(_
,TYPEleft
as TYPE1left
,_
))::rest671
) => let val
18298 result
=MlyValue
.tyreadesc__AND_strdesc_opt(fn _
=> let val tyvarseq
18299 as tyvarseq1
=tyvarseq1 ()
18300 val longtycon
as longtycon1
=longtycon1 ()
18301 val ty
as ty1
=ty1 ()
18302 val AND_tyreadesc_opt__AND_strdesc_opt
as
18303 AND_tyreadesc_opt__AND_strdesc_opt1
=
18304 AND_tyreadesc_opt__AND_strdesc_opt1 ()
18306 ( TyReaDesc(I(TYPEleft
,
18307 AND_tyreadesc_opt__AND_strdesc_optright
),
18308 tyvarseq
, longtycon
, ty
,
18309 #
1 AND_tyreadesc_opt__AND_strdesc_opt
),
18310 #
2 AND_tyreadesc_opt__AND_strdesc_opt
)
18313 in (LrTable
.NT
129,(result
,TYPE1left
,
18314 AND_tyreadesc_opt__AND_strdesc_opt1right
),rest671
) end
18315 |
(301,(_
,(MlyValue
.AND_strdesc_opt AND_strdesc_opt1
,
18316 AND_strdesc_opt1left
,AND_strdesc_opt1right
))::rest671
) => let val
18317 result
=MlyValue
.AND_tyreadesc_opt__AND_strdesc_opt(fn _
=> let val
18318 AND_strdesc_opt
as AND_strdesc_opt1
=AND_strdesc_opt1 ()
18319 in ( ( NONE
, AND_strdesc_opt
) ) end
18321 in (LrTable
.NT
130,(result
,AND_strdesc_opt1left
,AND_strdesc_opt1right
18323 |
(302,(_
,(MlyValue
.tyreadesc__AND_strdesc_opt
18324 tyreadesc__AND_strdesc_opt1
,_
,tyreadesc__AND_strdesc_opt1right
))::(_
,(
18325 _
,AND1left
,_
))::rest671
) => let val result
=
18326 MlyValue
.AND_tyreadesc_opt__AND_strdesc_opt(fn _
=> let val
18327 tyreadesc__AND_strdesc_opt
as tyreadesc__AND_strdesc_opt1
=
18328 tyreadesc__AND_strdesc_opt1 ()
18330 ( SOME(#
1 tyreadesc__AND_strdesc_opt
),
18331 #
2 tyreadesc__AND_strdesc_opt
)
18334 in (LrTable
.NT
130,(result
,AND1left
,tyreadesc__AND_strdesc_opt1right
)
18336 |
(303,(_
,(MlyValue
.funbind funbind1
,_
,funbindright
as funbind1right
))
18337 ::(_
,(_
,FUNCTORleft
as FUNCTOR1left
,_
))::rest671
) => let val result
=
18338 MlyValue
.fundec(fn _
=> let val funbind
as funbind1
=funbind1 ()
18339 in ( FunDec(I(FUNCTORleft
,funbindright
), funbind
) ) end
18341 in (LrTable
.NT
131,(result
,FUNCTOR1left
,funbind1right
),rest671
) end
18342 |
(304,(_
,(MlyValue
.strexp__AND_funbind_opt strexp__AND_funbind_opt1
,_
18343 ,strexp__AND_funbind_optright
as strexp__AND_funbind_opt1right
))::_
::(
18344 _
,(MlyValue
.COLON_sigexp_opt COLON_sigexp_opt1
,_
,_
))::_
::(_
,(
18345 MlyValue
.sigexp sigexp1
,_
,_
))::_
::(_
,(MlyValue
.strid strid1
,_
,_
))::_
::
18346 (_
,(MlyValue
.funid funid1
,funidleft
as funid1left
,_
))::rest671
) =>
18347 let val result
=MlyValue
.funbind(fn _
=> let val funid
as funid1
=funid1
18349 val strid
as strid1
=strid1 ()
18350 val sigexp
as sigexp1
=sigexp1 ()
18351 val COLON_sigexp_opt
as COLON_sigexp_opt1
=COLON_sigexp_opt1 ()
18352 val strexp__AND_funbind_opt
as strexp__AND_funbind_opt1
=
18353 strexp__AND_funbind_opt1 ()
18355 TRANSFunBind(I(funidleft
,
18356 strexp__AND_funbind_optright
),
18357 funid
, strid
, sigexp
, COLON_sigexp_opt
,
18358 #
1 strexp__AND_funbind_opt
,
18359 #
2 strexp__AND_funbind_opt
)
18362 in (LrTable
.NT
132,(result
,funid1left
,strexp__AND_funbind_opt1right
),
18364 |
(305,(_
,(MlyValue
.strexp__AND_funbind_opt strexp__AND_funbind_opt1
,_
18365 ,strexp__AND_funbind_optright
as strexp__AND_funbind_opt1right
))::_
::(
18366 _
,(MlyValue
.sigexp sigexp2
,_
,_
))::_
::_
::(_
,(MlyValue
.sigexp sigexp1
,_
,
18367 _
))::_
::(_
,(MlyValue
.strid strid1
,_
,_
))::_
::(_
,(MlyValue
.funid funid1
,
18368 funidleft
as funid1left
,_
))::rest671
) => let val result
=
18369 MlyValue
.funbind(fn _
=> let val funid
as funid1
=funid1 ()
18370 val strid
as strid1
=strid1 ()
18371 val sigexp1
=sigexp1 ()
18372 val sigexp2
=sigexp2 ()
18373 val strexp__AND_funbind_opt
as strexp__AND_funbind_opt1
=
18374 strexp__AND_funbind_opt1 ()
18376 OPAQFunBind(I(funidleft
,strexp__AND_funbind_optright
),
18377 funid
, strid
, sigexp1
, sigexp2
,
18378 #
1 strexp__AND_funbind_opt
,
18379 #
2 strexp__AND_funbind_opt
)
18382 in (LrTable
.NT
132,(result
,funid1left
,strexp__AND_funbind_opt1right
),
18384 |
(306,(_
,(MlyValue
.strexp__AND_funbind_opt strexp__AND_funbind_opt1
,_
18385 ,strexp__AND_funbind_optright
as strexp__AND_funbind_opt1right
))::_
::(
18386 _
,(MlyValue
.COLON_sigexp_opt COLON_sigexp_opt1
,_
,_
))::_
::(_
,(
18387 MlyValue
.spec spec1
,_
,_
))::_
::(_
,(MlyValue
.funid funid1
,funidleft
as
18388 funid1left
,_
))::rest671
) => let val result
=MlyValue
.funbind(fn _
=>
18389 let val funid
as funid1
=funid1 ()
18390 val spec
as spec1
=spec1 ()
18391 val COLON_sigexp_opt
as COLON_sigexp_opt1
=COLON_sigexp_opt1 ()
18392 val strexp__AND_funbind_opt
as strexp__AND_funbind_opt1
=
18393 strexp__AND_funbind_opt1 ()
18395 TRANSSPECFunBind(I(funidleft
,
18396 strexp__AND_funbind_optright
),
18397 funid
, spec
, COLON_sigexp_opt
,
18398 #
1 strexp__AND_funbind_opt
,
18399 #
2 strexp__AND_funbind_opt
)
18402 in (LrTable
.NT
132,(result
,funid1left
,strexp__AND_funbind_opt1right
),
18404 |
(307,(_
,(MlyValue
.strexp__AND_funbind_opt strexp__AND_funbind_opt1
,_
18405 ,strexp__AND_funbind_optright
as strexp__AND_funbind_opt1right
))::_
::(
18406 _
,(MlyValue
.sigexp sigexp1
,_
,_
))::_
::_
::(_
,(MlyValue
.spec spec1
,_
,_
))
18407 ::_
::(_
,(MlyValue
.funid funid1
,funidleft
as funid1left
,_
))::rest671
)
18408 => let val result
=MlyValue
.funbind(fn _
=> let val funid
as funid1
=
18410 val spec
as spec1
=spec1 ()
18411 val sigexp
as sigexp1
=sigexp1 ()
18412 val strexp__AND_funbind_opt
as strexp__AND_funbind_opt1
=
18413 strexp__AND_funbind_opt1 ()
18415 OPAQSPECFunBind(I(funidleft
,
18416 strexp__AND_funbind_optright
),
18417 funid
, spec
, sigexp
,
18418 #
1 strexp__AND_funbind_opt
,
18419 #
2 strexp__AND_funbind_opt
)
18422 in (LrTable
.NT
132,(result
,funid1left
,strexp__AND_funbind_opt1right
),
18424 |
(308,(_
,(MlyValue
.funbind funbind1
,_
,funbind1right
))::(_
,(_
,AND1left
18425 ,_
))::rest671
) => let val result
=MlyValue
.AND_funbind_opt(fn _
=> let
18426 val funbind
as funbind1
=funbind1 ()
18427 in ( SOME funbind
) end
18429 in (LrTable
.NT
133,(result
,AND1left
,funbind1right
),rest671
) end
18430 |
(309,rest671
) => let val result
=MlyValue
.AND_funbind_opt(fn _
=> (
18432 in (LrTable
.NT
133,(result
,defaultPos
,defaultPos
),rest671
) end
18433 |
(310,(_
,(MlyValue
.AND_funbind_opt AND_funbind_opt1
,_
,
18434 AND_funbind_opt1right
))::(_
,(MlyValue
.strexp
' strexp
'1,strexp
'1left
,_
)
18435 )::rest671
) => let val result
=MlyValue
.strexp__AND_funbind_opt(fn _
18436 => let val strexp
' as strexp
'1=strexp
'1 ()
18437 val AND_funbind_opt
as AND_funbind_opt1
=AND_funbind_opt1 ()
18438 in ( ( strexp
', AND_funbind_opt
) ) end
18440 in (LrTable
.NT
134,(result
,strexp
'1left
,AND_funbind_opt1right
),
18442 |
(311,(_
,(MlyValue
.sigexp__AND_funbind_opt sigexp__AND_funbind_opt1
,_
18443 ,sigexp__AND_funbind_optright
as sigexp__AND_funbind_opt1right
))::_
::(
18444 _
,(MlyValue
.strexp strexp1
,strexpleft
as strexp1left
,_
))::rest671
) =>
18445 let val result
=MlyValue
.strexp__AND_funbind_opt(fn _
=> let val strexp
18446 as strexp1
=strexp1 ()
18447 val sigexp__AND_funbind_opt
as sigexp__AND_funbind_opt1
=
18448 sigexp__AND_funbind_opt1 ()
18450 ( TRANSStrExp(I(strexpleft
,
18451 sigexp__AND_funbind_optright
),
18452 strexp
, #
1 sigexp__AND_funbind_opt
),
18453 #
2 sigexp__AND_funbind_opt
)
18456 in (LrTable
.NT
134,(result
,strexp1left
,sigexp__AND_funbind_opt1right
)
18458 |
(312,(_
,(MlyValue
.sigexp__AND_funbind_opt sigexp__AND_funbind_opt1
,_
18459 ,sigexp__AND_funbind_optright
as sigexp__AND_funbind_opt1right
))::_
::(
18460 _
,(MlyValue
.strexp strexp1
,strexpleft
as strexp1left
,_
))::rest671
) =>
18461 let val result
=MlyValue
.strexp__AND_funbind_opt(fn _
=> let val strexp
18462 as strexp1
=strexp1 ()
18463 val sigexp__AND_funbind_opt
as sigexp__AND_funbind_opt1
=
18464 sigexp__AND_funbind_opt1 ()
18466 ( OPAQStrExp(I(strexpleft
,
18467 sigexp__AND_funbind_optright
),
18468 strexp
, #
1 sigexp__AND_funbind_opt
),
18469 #
2 sigexp__AND_funbind_opt
)
18472 in (LrTable
.NT
134,(result
,strexp1left
,sigexp__AND_funbind_opt1right
)
18474 |
(313,(_
,(MlyValue
.AND_funbind_opt AND_funbind_opt1
,_
,
18475 AND_funbind_opt1right
))::(_
,(MlyValue
.sigexp
' sigexp
'1,sigexp
'1left
,_
)
18476 )::rest671
) => let val result
=MlyValue
.sigexp__AND_funbind_opt(fn _
18477 => let val sigexp
' as sigexp
'1=sigexp
'1 ()
18478 val AND_funbind_opt
as AND_funbind_opt1
=AND_funbind_opt1 ()
18479 in ( ( sigexp
', AND_funbind_opt
) ) end
18481 in (LrTable
.NT
135,(result
,sigexp
'1left
,AND_funbind_opt1right
),
18483 |
(314,(_
,(MlyValue
.tyreadesc__AND_funbind_opt
18484 tyreadesc__AND_funbind_opt1
,_
,tyreadesc__AND_funbind_optright
as
18485 tyreadesc__AND_funbind_opt1right
))::_
::(_
,(MlyValue
.sigexp sigexp1
,
18486 sigexpleft
as sigexp1left
,_
))::rest671
) => let val result
=
18487 MlyValue
.sigexp__AND_funbind_opt(fn _
=> let val sigexp
as sigexp1
=
18489 val tyreadesc__AND_funbind_opt
as tyreadesc__AND_funbind_opt1
=
18490 tyreadesc__AND_funbind_opt1 ()
18492 ( WHERETYPESigExp(I(sigexpleft
,
18493 tyreadesc__AND_funbind_optright
),
18495 #
1 tyreadesc__AND_funbind_opt
),
18496 #
2 tyreadesc__AND_funbind_opt
)
18499 in (LrTable
.NT
135,(result
,sigexp1left
,
18500 tyreadesc__AND_funbind_opt1right
),rest671
) end
18501 |
(315,(_
,(MlyValue
.AND_tyreadesc_opt__AND_funbind_opt
18502 AND_tyreadesc_opt__AND_funbind_opt1
,_
,
18503 AND_tyreadesc_opt__AND_funbind_optright
as
18504 AND_tyreadesc_opt__AND_funbind_opt1right
))::(_
,(MlyValue
.ty ty1
,_
,_
))
18505 ::_
::(_
,(MlyValue
.longtycon longtycon1
,_
,_
))::(_
,(MlyValue
.tyvarseq
18506 tyvarseq1
,_
,_
))::(_
,(_
,TYPEleft
as TYPE1left
,_
))::rest671
) => let val
18507 result
=MlyValue
.tyreadesc__AND_funbind_opt(fn _
=> let val tyvarseq
18508 as tyvarseq1
=tyvarseq1 ()
18509 val longtycon
as longtycon1
=longtycon1 ()
18510 val ty
as ty1
=ty1 ()
18511 val AND_tyreadesc_opt__AND_funbind_opt
as
18512 AND_tyreadesc_opt__AND_funbind_opt1
=
18513 AND_tyreadesc_opt__AND_funbind_opt1 ()
18515 ( TyReaDesc(I(TYPEleft
,
18516 AND_tyreadesc_opt__AND_funbind_optright
),
18517 tyvarseq
, longtycon
, ty
,
18518 #
1 AND_tyreadesc_opt__AND_funbind_opt
),
18519 #
2 AND_tyreadesc_opt__AND_funbind_opt
)
18522 in (LrTable
.NT
136,(result
,TYPE1left
,
18523 AND_tyreadesc_opt__AND_funbind_opt1right
),rest671
) end
18524 |
(316,(_
,(MlyValue
.AND_funbind_opt AND_funbind_opt1
,
18525 AND_funbind_opt1left
,AND_funbind_opt1right
))::rest671
) => let val
18526 result
=MlyValue
.AND_tyreadesc_opt__AND_funbind_opt(fn _
=> let val
18527 AND_funbind_opt
as AND_funbind_opt1
=AND_funbind_opt1 ()
18528 in ( ( NONE
, AND_funbind_opt
) ) end
18530 in (LrTable
.NT
137,(result
,AND_funbind_opt1left
,AND_funbind_opt1right
18532 |
(317,(_
,(MlyValue
.tyreadesc__AND_funbind_opt
18533 tyreadesc__AND_funbind_opt1
,_
,tyreadesc__AND_funbind_opt1right
))::(_
,(
18534 _
,AND1left
,_
))::rest671
) => let val result
=
18535 MlyValue
.AND_tyreadesc_opt__AND_funbind_opt(fn _
=> let val
18536 tyreadesc__AND_funbind_opt
as tyreadesc__AND_funbind_opt1
=
18537 tyreadesc__AND_funbind_opt1 ()
18539 ( SOME(#
1 tyreadesc__AND_funbind_opt
),
18540 #
2 tyreadesc__AND_funbind_opt
)
18543 in (LrTable
.NT
137,(result
,AND1left
,tyreadesc__AND_funbind_opt1right
)
18545 |
(318,(_
,(MlyValue
.topdec1 topdec11
,topdec11left
,topdec11right
))::
18546 rest671
) => let val result
=MlyValue
.topdec(fn _
=> let val topdec1
as
18547 topdec11
=topdec11 ()
18550 in (LrTable
.NT
138,(result
,topdec11left
,topdec11right
),rest671
) end
18551 |
(319,rest671
) => let val result
=MlyValue
.topdec(fn _
=> (
18552 STRDECTopDec(I(defaultPos
,defaultPos
),
18553 EMPTYStrDec(I(defaultPos
,defaultPos
)),
18556 in (LrTable
.NT
138,(result
,defaultPos
,defaultPos
),rest671
) end
18557 |
(320,(_
,(MlyValue
.topdec_opt topdec_opt1
,_
,topdec_optright
as
18558 topdec_opt1right
))::(_
,(MlyValue
.strdec1
' strdec1
'1,strdec1
'left
as
18559 strdec1
'1left
,_
))::rest671
) => let val result
=MlyValue
.topdec1(fn _
18560 => let val strdec1
' as strdec1
'1=strdec1
'1 ()
18561 val topdec_opt
as topdec_opt1
=topdec_opt1 ()
18563 STRDECTopDec(I(strdec1
'left
,topdec_optright
),
18564 strdec1
', topdec_opt
)
18567 in (LrTable
.NT
139,(result
,strdec1
'1left
,topdec_opt1right
),rest671
)
18569 |
(321,(_
,(MlyValue
.topdec_opt topdec_opt1
,_
,topdec_optright
as
18570 topdec_opt1right
))::(_
,(MlyValue
.sigdec sigdec1
,sigdecleft
as
18571 sigdec1left
,_
))::rest671
) => let val result
=MlyValue
.topdec1(fn _
=>
18572 let val sigdec
as sigdec1
=sigdec1 ()
18573 val topdec_opt
as topdec_opt1
=topdec_opt1 ()
18575 SIGDECTopDec(I(sigdecleft
,topdec_optright
),
18576 sigdec
, topdec_opt
)
18579 in (LrTable
.NT
139,(result
,sigdec1left
,topdec_opt1right
),rest671
) end
18580 |
(322,(_
,(MlyValue
.topdec_opt topdec_opt1
,_
,topdec_optright
as
18581 topdec_opt1right
))::(_
,(MlyValue
.fundec fundec1
,fundecleft
as
18582 fundec1left
,_
))::rest671
) => let val result
=MlyValue
.topdec1(fn _
=>
18583 let val fundec
as fundec1
=fundec1 ()
18584 val topdec_opt
as topdec_opt1
=topdec_opt1 ()
18586 FUNDECTopDec(I(fundecleft
,topdec_optright
),
18587 fundec
, topdec_opt
)
18590 in (LrTable
.NT
139,(result
,fundec1left
,topdec_opt1right
),rest671
) end
18591 |
(323,(_
,(MlyValue
.topdec1 topdec11
,topdec11left
,topdec11right
))::
18592 rest671
) => let val result
=MlyValue
.topdec_opt(fn _
=> let val topdec1
18593 as topdec11
=topdec11 ()
18594 in ( SOME topdec1
) end
18596 in (LrTable
.NT
140,(result
,topdec11left
,topdec11right
),rest671
) end
18597 |
(324,rest671
) => let val result
=MlyValue
.topdec_opt(fn _
=> ( NONE
)
18599 in (LrTable
.NT
140,(result
,defaultPos
,defaultPos
),rest671
) end
18600 |
(325,(_
,(MlyValue
.program
' program
'1,_
,program
'1right
))::(_
,(
18601 MlyValue
.initInfix initInfix1
,initInfix1left
,_
))::rest671
) => let val
18602 result
=MlyValue
.program(fn _
=> let val initInfix1
=initInfix1 ()
18603 val program
' as program
'1=program
'1 ()
18604 in ( (program
', !J
) ) end
18606 in (LrTable
.NT
141,(result
,initInfix1left
,program
'1right
),rest671
)
18608 |
(326,(_
,(MlyValue
.program_opt program_opt1
,_
,program_opt1right
))::(_
18609 ,(_
,_
,SEMICOLONright
))::(_
,(MlyValue
.topdec topdec1
,topdecleft
as
18610 topdec1left
,_
))::rest671
) => let val result
=MlyValue
.program
'(fn _
=>
18611 let val topdec
as topdec1
=topdec1 ()
18612 val program_opt
as program_opt1
=program_opt1 ()
18614 TOPDECProgram(I(topdecleft
,SEMICOLONright
),
18615 topdec
, program_opt
)
18618 in (LrTable
.NT
142,(result
,topdec1left
,program_opt1right
),rest671
)
18620 |
(327,(_
,(MlyValue
.program_opt program_opt1
,_
,program_opt1right
))::(_
18621 ,(_
,_
,SEMICOLONright
))::(_
,(MlyValue
.exp exp1
,expleft
as exp1left
,_
))
18622 ::rest671
) => let val result
=MlyValue
.program
'(fn _
=> let val exp
as
18624 val program_opt
as program_opt1
=program_opt1 ()
18626 EXPProgram(I(expleft
,SEMICOLONright
),
18627 exp
, program_opt
) )
18630 in (LrTable
.NT
142,(result
,exp1left
,program_opt1right
),rest671
) end
18631 |
(328,(_
,(MlyValue
.program
' program
'1,program
'1left
,program
'1right
))
18632 ::rest671
) => let val result
=MlyValue
.program_opt(fn _
=> let val
18633 program
' as program
'1=program
'1 ()
18634 in ( SOME program
' ) end
18636 in (LrTable
.NT
143,(result
,program
'1left
,program
'1right
),rest671
) end
18637 |
(329,rest671
) => let val result
=MlyValue
.program_opt(fn _
=> ( NONE
18639 in (LrTable
.NT
143,(result
,defaultPos
,defaultPos
),rest671
) end
18640 | _
=> raise (mlyAction i392
)
18642 val void
= MlyValue
.VOID
18643 val extract
= fn a
=> (fn MlyValue
.program x
=> x
18644 | _
=> let exception ParseInternal
18645 in raise ParseInternal
end) a ()
18648 structure Tokens
: Parser_TOKENS
=
18650 type svalue
= ParserData
.svalue
18651 type ('a
,'b
) token
= ('a
,'b
) Token
.token
18652 fun EOF (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
0,(
18653 ParserData
.MlyValue
.VOID
,p1
,p2
))
18654 fun ABSTYPE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
1,(
18655 ParserData
.MlyValue
.VOID
,p1
,p2
))
18656 fun AND (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
2,(
18657 ParserData
.MlyValue
.VOID
,p1
,p2
))
18658 fun ANDALSO (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
3,(
18659 ParserData
.MlyValue
.VOID
,p1
,p2
))
18660 fun AS (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
4,(
18661 ParserData
.MlyValue
.VOID
,p1
,p2
))
18662 fun CASE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
5,(
18663 ParserData
.MlyValue
.VOID
,p1
,p2
))
18664 fun DO (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
6,(
18665 ParserData
.MlyValue
.VOID
,p1
,p2
))
18666 fun DATATYPE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
7,(
18667 ParserData
.MlyValue
.VOID
,p1
,p2
))
18668 fun ELSE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
8,(
18669 ParserData
.MlyValue
.VOID
,p1
,p2
))
18670 fun END (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
9,(
18671 ParserData
.MlyValue
.VOID
,p1
,p2
))
18672 fun EXCEPTION (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
10,(
18673 ParserData
.MlyValue
.VOID
,p1
,p2
))
18674 fun FN (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
11,(
18675 ParserData
.MlyValue
.VOID
,p1
,p2
))
18676 fun FUN (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
12,(
18677 ParserData
.MlyValue
.VOID
,p1
,p2
))
18678 fun HANDLE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
13,(
18679 ParserData
.MlyValue
.VOID
,p1
,p2
))
18680 fun IF (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
14,(
18681 ParserData
.MlyValue
.VOID
,p1
,p2
))
18682 fun IN (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
15,(
18683 ParserData
.MlyValue
.VOID
,p1
,p2
))
18684 fun INFIX (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
16,(
18685 ParserData
.MlyValue
.VOID
,p1
,p2
))
18686 fun INFIXR (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
17,(
18687 ParserData
.MlyValue
.VOID
,p1
,p2
))
18688 fun LET (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
18,(
18689 ParserData
.MlyValue
.VOID
,p1
,p2
))
18690 fun LOCAL (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
19,(
18691 ParserData
.MlyValue
.VOID
,p1
,p2
))
18692 fun NONFIX (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
20,(
18693 ParserData
.MlyValue
.VOID
,p1
,p2
))
18694 fun OF (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
21,(
18695 ParserData
.MlyValue
.VOID
,p1
,p2
))
18696 fun OP (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
22,(
18697 ParserData
.MlyValue
.VOID
,p1
,p2
))
18698 fun OPEN (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
23,(
18699 ParserData
.MlyValue
.VOID
,p1
,p2
))
18700 fun ORELSE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
24,(
18701 ParserData
.MlyValue
.VOID
,p1
,p2
))
18702 fun RAISE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
25,(
18703 ParserData
.MlyValue
.VOID
,p1
,p2
))
18704 fun REC (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
26,(
18705 ParserData
.MlyValue
.VOID
,p1
,p2
))
18706 fun THEN (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
27,(
18707 ParserData
.MlyValue
.VOID
,p1
,p2
))
18708 fun TYPE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
28,(
18709 ParserData
.MlyValue
.VOID
,p1
,p2
))
18710 fun VAL (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
29,(
18711 ParserData
.MlyValue
.VOID
,p1
,p2
))
18712 fun WITH (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
30,(
18713 ParserData
.MlyValue
.VOID
,p1
,p2
))
18714 fun WITHTYPE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
31,(
18715 ParserData
.MlyValue
.VOID
,p1
,p2
))
18716 fun WHILE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
32,(
18717 ParserData
.MlyValue
.VOID
,p1
,p2
))
18718 fun LPAR (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
33,(
18719 ParserData
.MlyValue
.VOID
,p1
,p2
))
18720 fun RPAR (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
34,(
18721 ParserData
.MlyValue
.VOID
,p1
,p2
))
18722 fun LBRACK (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
35,(
18723 ParserData
.MlyValue
.VOID
,p1
,p2
))
18724 fun RBRACK (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
36,(
18725 ParserData
.MlyValue
.VOID
,p1
,p2
))
18726 fun LBRACE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
37,(
18727 ParserData
.MlyValue
.VOID
,p1
,p2
))
18728 fun RBRACE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
38,(
18729 ParserData
.MlyValue
.VOID
,p1
,p2
))
18730 fun COMMA (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
39,(
18731 ParserData
.MlyValue
.VOID
,p1
,p2
))
18732 fun COLON (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
40,(
18733 ParserData
.MlyValue
.VOID
,p1
,p2
))
18734 fun SEMICOLON (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
41,(
18735 ParserData
.MlyValue
.VOID
,p1
,p2
))
18736 fun DOTS (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
42,(
18737 ParserData
.MlyValue
.VOID
,p1
,p2
))
18738 fun UNDERBAR (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
43,(
18739 ParserData
.MlyValue
.VOID
,p1
,p2
))
18740 fun BAR (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
44,(
18741 ParserData
.MlyValue
.VOID
,p1
,p2
))
18742 fun EQUALS (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
45,(
18743 ParserData
.MlyValue
.VOID
,p1
,p2
))
18744 fun DARROW (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
46,(
18745 ParserData
.MlyValue
.VOID
,p1
,p2
))
18746 fun ARROW (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
47,(
18747 ParserData
.MlyValue
.VOID
,p1
,p2
))
18748 fun HASH (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
48,(
18749 ParserData
.MlyValue
.VOID
,p1
,p2
))
18750 fun EQTYPE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
49,(
18751 ParserData
.MlyValue
.VOID
,p1
,p2
))
18752 fun FUNCTOR (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
50,(
18753 ParserData
.MlyValue
.VOID
,p1
,p2
))
18754 fun INCLUDE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
51,(
18755 ParserData
.MlyValue
.VOID
,p1
,p2
))
18756 fun SHARING (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
52,(
18757 ParserData
.MlyValue
.VOID
,p1
,p2
))
18758 fun SIG (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
53,(
18759 ParserData
.MlyValue
.VOID
,p1
,p2
))
18760 fun SIGNATURE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
54,(
18761 ParserData
.MlyValue
.VOID
,p1
,p2
))
18762 fun STRUCT (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
55,(
18763 ParserData
.MlyValue
.VOID
,p1
,p2
))
18764 fun STRUCTURE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
56,(
18765 ParserData
.MlyValue
.VOID
,p1
,p2
))
18766 fun WHERE (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
57,(
18767 ParserData
.MlyValue
.VOID
,p1
,p2
))
18768 fun COLONGREATER (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
58,(
18769 ParserData
.MlyValue
.VOID
,p1
,p2
))
18770 fun ZERO (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
59,(
18771 ParserData
.MlyValue
.VOID
,p1
,p2
))
18772 fun DIGIT (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
60,(
18773 ParserData
.MlyValue
.DIGIT (fn () => i
),p1
,p2
))
18774 fun NUMERIC (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
61,(
18775 ParserData
.MlyValue
.NUMERIC (fn () => i
),p1
,p2
))
18776 fun INT (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
62,(
18777 ParserData
.MlyValue
.INT (fn () => i
),p1
,p2
))
18778 fun WORD (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
63,(
18779 ParserData
.MlyValue
.WORD (fn () => i
),p1
,p2
))
18780 fun REAL (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
64,(
18781 ParserData
.MlyValue
.REAL (fn () => i
),p1
,p2
))
18782 fun STRING (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
65,(
18783 ParserData
.MlyValue
.STRING (fn () => i
),p1
,p2
))
18784 fun CHAR (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
66,(
18785 ParserData
.MlyValue
.CHAR (fn () => i
),p1
,p2
))
18786 fun ALPHA (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
67,(
18787 ParserData
.MlyValue
.ALPHA (fn () => i
),p1
,p2
))
18788 fun SYMBOL (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
68,(
18789 ParserData
.MlyValue
.SYMBOL (fn () => i
),p1
,p2
))
18790 fun STAR (p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
69,(
18791 ParserData
.MlyValue
.VOID
,p1
,p2
))
18792 fun TYVAR (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
70,(
18793 ParserData
.MlyValue
.TYVAR (fn () => i
),p1
,p2
))
18794 fun ETYVAR (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
71,(
18795 ParserData
.MlyValue
.ETYVAR (fn () => i
),p1
,p2
))
18796 fun LONGID (i
,p1
,p2
) = Token
.TOKEN (ParserData
.LrTable
.T
72,(
18797 ParserData
.MlyValue
.LONGID (fn () => i
),p1
,p2
))
18800 (* stop
of Parser
.grm
.sml
*)
18801 (* start
of Lexer
.lex
.sml
*)
18803 functor LexerFn(structure Tokens
: Parser_TOKENS
) =
18805 structure UserDeclarations
=
18808 * Standard ML lexical analysis
18810 * Definition
, sections
2.1-2.5, 3.1
18813 * Since all lexical classes must be disjoint
:
18814 * - There is no single class ID
, use ALPHA|SYMBOL|STAR|EQUALS
.
18815 * - There is no class LAB
, use ALPHA|SYMBOL|NUMERIC|DIGIT|STAR
.
18816 * - ID does not contain `
=' and `
*', those are EQUALS
and STAR
.
18817 * - LONGID does not contain unqualified
ids (but allows for `
=' and `
*').
18818 * - INT does not contain positive decimal integers without leading
0,
18819 * and single DIGIT integers
, those are
in NUMERIC
, DIGIT
, and ZERO
.
18820 * - NUMERIC does not contain single digit numbers
, those are
in DIGIT
.
18821 * - DIGIT does not contain
0, that is ZERO
.
18823 * The parser uses a global variable to recognise nested comments
, so it is
18831 (* Types to match
structure LEXER
.UserDeclaration
*)
18833 type ('a
,'b
) token
= ('a
,'b
) Tokens
.token
18835 type svalue
= Tokens
.svalue
18836 type lexresult
= (svalue
, pos
) token
18840 (* Handling nested comments
*)
18842 val nesting
= ref
0 (* non
-reentrant side
-effect way
:-P
*)
18846 if !nesting
= 0 then
18849 Error
.error((0,0), "unclosed comment")
18853 (* Some helpers to create tokens
*)
18858 fun toLRPos(yypos
, yytext
) =
18860 val yypos
= yypos
- 2 (* bug
in ML
-Lex
... *)
18862 (yypos
, yypos
+ String.size yytext
)
18865 fun token(TOKEN
, yypos
, yytext
) =
18866 TOKEN(toLRPos(yypos
, yytext
))
18868 fun tokenOf(TOKEN
, toVal
, yypos
, yytext
) =
18870 val i
as (l
,r
) = toLRPos(yypos
, yytext
)
18872 TOKEN(toVal(yytext
, i
), l
, r
)
18875 fun error(yypos
, yytext
, s
) =
18876 Error
.error(toLRPos(yypos
,yytext
), s
)
18878 fun invalid(yypos
, yytext
) =
18880 val s
= "invalid character `" ^
String.toCString yytext ^
"'"
18882 error(yypos
, yytext
, s
)
18887 (* Convert identifiers
*)
18891 fun toLongId(s
, i
) =
18893 fun split
[] = raise Fail
"Lexer.toLongId: empty longid"
18894 | split
[x
] = ([],x
)
18895 |
split(x
::xs
) = let val (ys
,y
) = split xs
in (x
::ys
,y
) end
18897 split(String.fields (fn c
=> c
= #
".") s
)
18901 (* Convert constants
[Section
2.2] *)
18903 local open StringCvt in
18906 (case String.explode s
18907 of #
"0" :: #
"x" :: s
' =>
18908 valOf(scanString (Int.scan HEX
) (String.implode s
'))
18909 | #
"~" :: #
"0" :: #
"x" :: s
' =>
18910 ~
(valOf(scanString (Int.scan HEX
) (String.implode s
')))
18911 | _
=> valOf(scanString (Int.scan DEC
) s
)
18912 ) handle Overflow
=>
18913 Error
.error(i
, "integer constant too big")
18916 (case String.explode s
18917 of #
"0" :: #
"w" :: #
"x" :: s
' =>
18918 valOf(scanString (Word.scan HEX
) (String.implode s
'))
18919 | #
"0" :: #
"w" :: s
' =>
18920 valOf(scanString (Word.scan DEC
) (String.implode s
'))
18921 | _
=> raise Fail
"Lexer.toWord: invalid word constant"
18922 ) handle Overflow
=>
18923 Error
.error(i
, "word constant too big")
18925 fun toReal(s
,i
) = valOf(scanString
Real.scan s
)
18928 fun toString(s
,i
) =
18930 fun convert(#
"\\"::s
, cs
) = escape(s
, cs
)
18931 |
convert([#
"\""], cs
) = cs
18932 |
convert(c
::s
, cs
) = convert(s
, c
::cs
)
18933 |
convert([], cs
) =
18934 raise Fail
"Lexer.toString: unclosed string literal"
18936 and escape(#
"a"::s
, cs
) = convert(s
, #
"\a"::cs
)
18937 |
escape(#
"b"::s
, cs
) = convert(s
, #
"\b"::cs
)
18938 |
escape(#
"t"::s
, cs
) = convert(s
, #
"\t"::cs
)
18939 |
escape(#
"n"::s
, cs
) = convert(s
, #
"\n"::cs
)
18940 |
escape(#
"v"::s
, cs
) = convert(s
, #
"\v"::cs
)
18941 |
escape(#
"f"::s
, cs
) = convert(s
, #
"\f"::cs
)
18942 |
escape(#
"r"::s
, cs
) = convert(s
, #
"\r"::cs
)
18943 |
escape(#
"\""::s
, cs
) = convert(s
, #
"\""::cs
)
18944 |
escape(#
"\\"::s
, cs
) = convert(s
, #
"\\"::cs
)
18945 |
escape(#
"^"::c
::s
, cs
) =
18946 convert(s
, Char.chr(Char.ord c
- 64)::cs
)
18948 |
escape(#
"u"::x1
::x2
::x3
::x4
::s
, cs
) =
18949 convert(s
, unicode
[x1
,x2
,x3
,x4
]::cs
)
18951 |
escape(c
::s
, cs
) =
18952 if Char.isDigit c
then
18954 of c2
::c3
::s
=> convert(s
, ascii
[c
,c2
,c3
]::cs
)
18956 "Lexer.toString: invalid ASCII escape sequence"
18957 else if Char.isSpace c
then
18960 raise Fail
"Lexer.toString: invalid escape sequence"
18963 raise Fail
"Lexer.toString: empty escape character"
18965 and escapeGap(c
::s
, cs
) =
18966 if Char.isSpace c
then
18968 else (* c
= #
"\\" *)
18971 |
escapeGap([], cs
) =
18972 raise Fail
"Lexer.toString: invalid string gap"
18975 Char.chr(valOf(scanString (Int.scan DEC
) (String.implode s
)))
18977 Error
.error(i
, "ASCII escape character too big")
18979 Error
.error(i
, "ASCII escape character too big")
18982 Char.chr(valOf(scanString (Int.scan HEX
) (String.implode s
)))
18984 Error
.error(i
, "unicode escape character too big")
18986 Error
.error(i
, "unicode escape character too big")
18988 val cs
= List.tl(String.explode s
)
18990 String.implode(List.rev(convert(cs
, [])))
18996 val s
' = String.substring(s
, 1, String.size s
-1)
18997 val ss
' = toString(s
',i
)
18999 if String.size ss
' = 1 then
19001 else if ss
' = "" then
19002 Error
.error(i
, "empty character constant")
19004 Error
.error(i
, "character constant too long")
19010 end (* end of user routines
*)
19011 exception LexError (* raised
if illegal leaf action tried
*)
19012 structure Internal
=
19015 datatype yyfinstate
= N
of int
19016 type statedata
= {fin
: yyfinstate list
, trans
: string}
19017 (* transition
& final state table
*)
19021 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19022 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19023 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19024 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19025 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19026 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19027 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19028 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19029 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19030 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19031 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19032 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19033 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19034 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19035 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19036 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19039 "\005\005\005\005\005\005\005\005\005\235\236\235\235\235\005\005\
19040 \\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\
19041 \\235\180\223\211\180\180\180\209\207\206\205\180\204\202\199\180\
19042 \\191\189\189\189\189\189\189\189\189\189\187\186\180\184\180\180\
19043 \\180\025\025\025\025\025\025\025\025\025\025\025\025\025\025\025\
19044 \\025\025\025\025\025\025\025\025\025\025\025\183\180\182\180\181\
19045 \\180\166\025\162\153\134\126\025\120\108\025\025\101\025\095\085\
19046 \\025\025\078\055\048\025\045\030\025\025\025\024\023\022\006\005\
19047 \\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\
19048 \\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\
19049 \\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\
19050 \\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\
19051 \\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\
19052 \\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\
19053 \\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\
19054 \\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005"
19057 "\237\237\237\237\237\237\237\237\237\237\242\237\237\237\237\237\
19058 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19059 \\237\237\237\237\237\237\237\237\240\237\238\237\237\237\237\237\
19060 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19061 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19062 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19063 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19064 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19065 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19066 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19067 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19068 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19069 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19070 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19071 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\
19072 \\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237\237"
19075 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19076 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19077 \\000\007\000\007\007\007\007\000\000\000\007\007\000\007\000\007\
19078 \\019\008\008\008\008\008\008\008\008\008\007\000\007\007\007\007\
19079 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19080 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
19081 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19082 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
19083 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19084 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19085 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19086 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19087 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19088 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19089 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19090 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19093 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19094 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19095 \\000\007\000\007\007\007\007\000\000\000\007\007\000\007\000\007\
19096 \\000\000\000\000\000\000\000\000\000\000\007\000\007\007\007\007\
19097 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19098 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
19099 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19100 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
19101 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19102 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19103 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19104 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19105 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19106 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19107 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19108 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19111 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19112 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19113 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\013\000\
19114 \\008\008\008\008\008\008\008\008\008\008\000\000\000\000\000\000\
19115 \\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\000\
19116 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19117 \\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\000\
19118 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19119 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19120 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19121 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19122 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19123 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19124 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19125 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19126 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19129 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19130 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19131 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19132 \\012\012\012\012\012\012\012\012\012\012\000\000\000\000\000\000\
19133 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19134 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19135 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19136 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010\000\
19137 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19138 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19139 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19140 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19141 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19142 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19143 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19144 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19147 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19148 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19149 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19150 \\011\011\011\011\011\011\011\011\011\011\000\000\000\000\000\000\
19151 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19152 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19153 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19154 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19155 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19156 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19157 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19158 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19159 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19160 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19161 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19162 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19165 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19166 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19167 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19168 \\012\012\012\012\012\012\012\012\012\012\000\000\000\000\000\000\
19169 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19170 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19171 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19172 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19173 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19174 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19175 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19176 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19177 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19178 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19179 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19180 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19183 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19184 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19185 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19186 \\014\014\014\014\014\014\014\014\014\014\000\000\000\000\000\000\
19187 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19188 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19189 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19190 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19191 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19192 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19193 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19194 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19195 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19196 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19197 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19198 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19201 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19202 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19203 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19204 \\014\014\014\014\014\014\014\014\014\014\000\000\000\000\000\000\
19205 \\000\000\000\000\000\015\000\000\000\000\000\000\000\000\000\000\
19206 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19207 \\000\000\000\000\000\015\000\000\000\000\000\000\000\000\000\000\
19208 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19209 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19210 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19211 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19212 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19213 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19214 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19215 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19216 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19219 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19220 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19221 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19222 \\018\018\018\018\018\018\018\018\018\018\000\000\000\000\000\000\
19223 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19224 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19225 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19226 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\
19227 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19228 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19229 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19230 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19231 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19232 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19233 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19234 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19237 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19238 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19239 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19240 \\017\017\017\017\017\017\017\017\017\017\000\000\000\000\000\000\
19241 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19242 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19243 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19244 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19245 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19246 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19247 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19248 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19249 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19250 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19251 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19252 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19255 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19256 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19257 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19258 \\018\018\018\018\018\018\018\018\018\018\000\000\000\000\000\000\
19259 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19260 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19261 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19262 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19263 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19264 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19265 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19266 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19267 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19268 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19269 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19270 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19273 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19274 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19275 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\013\000\
19276 \\008\008\008\008\008\008\008\008\008\008\000\000\000\000\000\000\
19277 \\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\000\
19278 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19279 \\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\000\
19280 \\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\
19281 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19282 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19283 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19284 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19285 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19286 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19287 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19288 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19291 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19292 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19293 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19294 \\021\021\021\021\021\021\021\021\021\021\000\000\000\000\000\000\
19295 \\000\021\021\021\021\021\021\000\000\000\000\000\000\000\000\000\
19296 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19297 \\000\021\021\021\021\021\021\000\000\000\000\000\000\000\000\000\
19298 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19299 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19300 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19301 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19302 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19303 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19304 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19305 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19306 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19309 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19310 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19311 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19312 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19313 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19314 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19315 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19316 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19317 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19318 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19319 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19320 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19321 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19322 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19323 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19324 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19327 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19328 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19329 \\000\028\000\028\028\028\028\000\000\000\028\028\000\028\000\028\
19330 \\000\000\000\000\000\000\000\000\000\000\028\000\028\028\028\028\
19331 \\028\029\029\029\029\029\029\029\029\029\029\029\029\029\029\029\
19332 \\029\029\029\029\029\029\029\029\029\029\029\000\028\000\028\000\
19333 \\028\029\029\029\029\029\029\029\029\029\029\029\029\029\029\029\
19334 \\029\029\029\029\029\029\029\029\029\029\029\000\028\000\028\000\
19335 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19336 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19337 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19338 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19339 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19340 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19341 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19342 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19345 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19346 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19347 \\000\028\000\028\028\028\028\000\000\000\028\028\000\028\000\028\
19348 \\000\000\000\000\000\000\000\000\000\000\028\000\028\028\028\028\
19349 \\028\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19350 \\000\000\000\000\000\000\000\000\000\000\000\000\028\000\028\000\
19351 \\028\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19352 \\000\000\000\000\000\000\000\000\000\000\000\000\028\000\028\000\
19353 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19354 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19355 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19356 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19357 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19358 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19359 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19360 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19363 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19364 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19365 \\000\000\000\000\000\000\000\029\000\000\000\000\000\000\027\000\
19366 \\029\029\029\029\029\029\029\029\029\029\000\000\000\000\000\000\
19367 \\000\029\029\029\029\029\029\029\029\029\029\029\029\029\029\029\
19368 \\029\029\029\029\029\029\029\029\029\029\029\000\000\000\000\029\
19369 \\000\029\029\029\029\029\029\029\029\029\029\029\029\029\029\029\
19370 \\029\029\029\029\029\029\029\029\029\029\029\000\000\000\000\000\
19371 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19372 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19373 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19374 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19375 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19376 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19377 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19378 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19381 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19382 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19383 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19384 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19385 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19386 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19387 \\000\026\026\026\026\026\026\026\038\031\026\026\026\026\026\026\
19388 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19389 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19390 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19391 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19392 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19393 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19394 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19395 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19396 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19399 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19400 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19401 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19402 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19403 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19404 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19405 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19406 \\026\026\026\026\032\026\026\026\026\026\026\000\000\000\000\000\
19407 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19408 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19409 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19410 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19411 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19412 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19413 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19414 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19417 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19418 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19419 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19420 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19421 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19422 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19423 \\000\026\026\026\026\026\026\026\033\026\026\026\026\026\026\026\
19424 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19425 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19426 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19427 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19428 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19429 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19430 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19431 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19432 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19435 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19436 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19437 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19438 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19439 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19440 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19441 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19442 \\026\026\026\026\034\026\026\026\026\026\026\000\000\000\000\000\
19443 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19444 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19445 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19446 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19447 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19448 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19449 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19450 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19453 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19454 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19455 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19456 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19457 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19458 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19459 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19460 \\026\026\026\026\026\026\026\026\026\035\026\000\000\000\000\000\
19461 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19462 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19463 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19464 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19465 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19466 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19467 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19468 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19471 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19472 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19473 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19474 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19475 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19476 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19477 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19478 \\036\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19479 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19480 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19481 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19482 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19483 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19484 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19485 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19486 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19489 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19490 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19491 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19492 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19493 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19494 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19495 \\000\026\026\026\026\037\026\026\026\026\026\026\026\026\026\026\
19496 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19497 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19498 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19499 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19500 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19501 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19502 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19503 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19504 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19507 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19508 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19509 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19510 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19511 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19512 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19513 \\000\026\026\026\026\042\026\026\026\039\026\026\026\026\026\026\
19514 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19515 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19516 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19517 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19518 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19519 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19520 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19521 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19522 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19525 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19526 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19527 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19528 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19529 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19530 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19531 \\000\026\026\026\026\026\026\026\026\026\026\026\040\026\026\026\
19532 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19533 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19534 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19535 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19536 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19537 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19538 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19539 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19540 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19543 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19544 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19545 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19546 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19547 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19548 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19549 \\000\026\026\026\026\041\026\026\026\026\026\026\026\026\026\026\
19550 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19551 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19552 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19553 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19554 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19555 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19556 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19557 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19558 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19561 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19562 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19563 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19564 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19565 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19566 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19567 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19568 \\026\026\043\026\026\026\026\026\026\026\026\000\000\000\000\000\
19569 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19570 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19571 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19572 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19573 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19574 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19575 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19576 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19579 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19580 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19581 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19582 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19583 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19584 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19585 \\000\026\026\026\026\044\026\026\026\026\026\026\026\026\026\026\
19586 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19587 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19588 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19589 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19590 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19591 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19592 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19593 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19594 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19597 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19598 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19599 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19600 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19601 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19602 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19603 \\000\046\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19604 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19605 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19606 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19607 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19608 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19609 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19610 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19611 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19612 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19615 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19616 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19617 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19618 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19619 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19620 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19621 \\000\026\026\026\026\026\026\026\026\026\026\026\047\026\026\026\
19622 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19623 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19624 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19625 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19626 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19627 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19628 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19629 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19630 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19633 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19634 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19635 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19636 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19637 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19638 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19639 \\000\026\026\026\026\026\026\026\052\026\026\026\026\026\026\026\
19640 \\026\026\026\026\026\026\026\026\026\049\026\000\000\000\000\000\
19641 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19642 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19643 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19644 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19645 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19646 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19647 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19648 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19651 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19652 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19653 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19654 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19655 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19656 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19657 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19658 \\050\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19659 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19660 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19661 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19662 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19663 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19664 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19665 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19666 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19669 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19670 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19671 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19672 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19673 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19674 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19675 \\000\026\026\026\026\051\026\026\026\026\026\026\026\026\026\026\
19676 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19677 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19678 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19679 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19680 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19681 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19682 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19683 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19684 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19687 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19688 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19689 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19690 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19691 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19692 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19693 \\000\026\026\026\026\053\026\026\026\026\026\026\026\026\026\026\
19694 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19695 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19696 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19697 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19698 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19699 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19700 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19701 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19702 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19705 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19706 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19707 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19708 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19709 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19710 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19711 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\054\026\
19712 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19713 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19714 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19715 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19716 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19717 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19718 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19719 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19720 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19723 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19724 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19725 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19726 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19727 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19728 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19729 \\000\026\026\026\026\026\026\026\072\064\026\026\026\026\026\026\
19730 \\026\026\026\026\056\026\026\026\026\026\026\000\000\000\000\000\
19731 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19732 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19733 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19734 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19735 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19736 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19737 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19738 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19741 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19742 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19743 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19744 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19745 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19746 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19747 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19748 \\026\026\057\026\026\026\026\026\026\026\026\000\000\000\000\000\
19749 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19750 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19751 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19752 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19753 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19754 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19755 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19756 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19759 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19760 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19761 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19762 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19763 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19764 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19765 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19766 \\026\026\026\026\026\058\026\026\026\026\026\000\000\000\000\000\
19767 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19768 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19769 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19770 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19771 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19772 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19773 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19774 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19777 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19778 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19779 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19780 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19781 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19782 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19783 \\000\026\026\059\026\026\026\026\026\026\026\026\026\026\026\026\
19784 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19785 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19786 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19787 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19788 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19789 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19790 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19791 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19792 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19795 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19796 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19797 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19798 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19799 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19800 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19801 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19802 \\026\026\026\026\060\026\026\026\026\026\026\000\000\000\000\000\
19803 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19804 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19805 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19806 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19807 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19808 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19809 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19810 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19813 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19814 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19815 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19816 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19817 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19818 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19819 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19820 \\026\026\026\026\026\061\026\026\026\026\026\000\000\000\000\000\
19821 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19822 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19823 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19824 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19825 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19826 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19827 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19828 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19831 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19832 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19833 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19834 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19835 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19836 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19837 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19838 \\026\026\062\026\026\026\026\026\026\026\026\000\000\000\000\000\
19839 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19840 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19841 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19842 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19843 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19844 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19845 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19846 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19849 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19850 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19851 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19852 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19853 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19854 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19855 \\000\026\026\026\026\063\026\026\026\026\026\026\026\026\026\026\
19856 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19857 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19858 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19859 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19860 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19861 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19862 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19863 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19864 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19867 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19868 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19869 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19870 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19871 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19872 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19873 \\000\026\026\026\026\026\026\065\026\026\026\026\026\026\026\026\
19874 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19875 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19876 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19877 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19878 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19879 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19880 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19881 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19882 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19885 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19886 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19887 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19888 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19889 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19890 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19891 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\066\026\
19892 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19893 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19894 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19895 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19896 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19897 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19898 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19899 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19900 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19903 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19904 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19905 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19906 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19907 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19908 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19909 \\000\067\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19910 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19911 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19912 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19913 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19914 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19915 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19916 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19917 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19918 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19921 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19922 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19923 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19924 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19925 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19926 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19927 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19928 \\026\026\026\026\068\026\026\026\026\026\026\000\000\000\000\000\
19929 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19930 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19931 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19932 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19933 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19934 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19935 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19936 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19939 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19940 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19941 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19942 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19943 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19944 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19945 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19946 \\026\026\026\026\026\069\026\026\026\026\026\000\000\000\000\000\
19947 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19948 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19949 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19950 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19951 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19952 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19953 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19954 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19957 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19958 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19959 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19960 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19961 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19962 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19963 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19964 \\026\026\070\026\026\026\026\026\026\026\026\000\000\000\000\000\
19965 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19966 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19967 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19968 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19969 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19970 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19971 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19972 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19975 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19976 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19977 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19978 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19979 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19980 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19981 \\000\026\026\026\026\071\026\026\026\026\026\026\026\026\026\026\
19982 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
19983 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19984 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19985 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19986 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19987 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19988 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19989 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19990 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
19993 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19994 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
19995 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
19996 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
19997 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
19998 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
19999 \\000\073\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20000 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20001 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20002 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20003 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20004 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20005 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20006 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20007 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20008 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20011 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20012 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20013 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20014 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20015 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20016 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20017 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20018 \\026\026\074\026\026\026\026\026\026\026\026\000\000\000\000\000\
20019 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20020 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20021 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20022 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20023 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20024 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20025 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20026 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20029 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20030 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20031 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20032 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20033 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20034 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20035 \\000\026\026\026\026\026\026\026\026\075\026\026\026\026\026\026\
20036 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20037 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20038 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20039 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20040 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20041 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20042 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20043 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20044 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20047 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20048 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20049 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20050 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20051 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20052 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20053 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\076\026\
20054 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20055 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20056 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20057 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20058 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20059 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20060 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20061 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20062 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20065 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20066 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20067 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20068 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20069 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20070 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20071 \\000\026\026\026\026\026\026\077\026\026\026\026\026\026\026\026\
20072 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20073 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20074 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20075 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20076 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20077 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20078 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20079 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20080 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20083 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20084 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20085 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20086 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20087 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20088 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20089 \\000\081\026\026\026\079\026\026\026\026\026\026\026\026\026\026\
20090 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20091 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20092 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20093 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20094 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20095 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20096 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20097 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20098 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20101 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20102 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20103 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20104 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20105 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20106 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20107 \\000\026\026\080\026\026\026\026\026\026\026\026\026\026\026\026\
20108 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20109 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20110 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20111 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20112 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20113 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20114 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20115 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20116 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20119 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20120 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20121 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20122 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20123 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20124 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20125 \\000\026\026\026\026\026\026\026\026\082\026\026\026\026\026\026\
20126 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20127 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20128 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20129 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20130 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20131 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20132 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20133 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20134 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20137 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20138 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20139 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20140 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20141 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20142 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20143 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20144 \\026\026\026\083\026\026\026\026\026\026\026\000\000\000\000\000\
20145 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20146 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20147 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20148 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20149 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20150 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20151 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20152 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20155 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20156 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20157 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20158 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20159 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20160 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20161 \\000\026\026\026\026\084\026\026\026\026\026\026\026\026\026\026\
20162 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20163 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20164 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20165 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20166 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20167 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20168 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20169 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20170 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20173 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20174 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20175 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20176 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20177 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20178 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20179 \\000\026\026\026\026\026\094\026\026\026\026\026\026\026\026\026\
20180 \\091\026\086\026\026\026\026\026\026\026\026\000\000\000\000\000\
20181 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20182 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20183 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20184 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20185 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20186 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20187 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20188 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20191 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20192 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20193 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20194 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20195 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20196 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20197 \\000\026\026\026\026\087\026\026\026\026\026\026\026\026\026\026\
20198 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20199 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20200 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20201 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20202 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20203 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20204 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20205 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20206 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20209 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20210 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20211 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20212 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20213 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20214 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20215 \\000\026\026\026\026\026\026\026\026\026\026\026\088\026\026\026\
20216 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20217 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20218 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20219 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20220 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20221 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20222 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20223 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20224 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20227 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20228 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20229 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20230 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20231 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20232 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20233 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20234 \\026\026\026\089\026\026\026\026\026\026\026\000\000\000\000\000\
20235 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20236 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20237 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20238 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20239 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20240 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20241 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20242 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20245 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20246 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20247 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20248 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20249 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20250 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20251 \\000\026\026\026\026\090\026\026\026\026\026\026\026\026\026\026\
20252 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20253 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20254 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20255 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20256 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20257 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20258 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20259 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20260 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20263 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20264 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20265 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20266 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20267 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20268 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20269 \\000\026\026\026\026\092\026\026\026\026\026\026\026\026\026\026\
20270 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20271 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20272 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20273 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20274 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20275 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20276 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20277 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20278 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20281 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20282 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20283 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20284 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20285 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20286 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20287 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\093\026\
20288 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20289 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20290 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20291 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20292 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20293 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20294 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20295 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20296 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20299 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20300 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20301 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20302 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20303 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20304 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20305 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\096\
20306 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20307 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20308 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20309 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20310 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20311 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20312 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20313 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20314 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20317 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20318 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20319 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20320 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20321 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20322 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20323 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\097\026\
20324 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20325 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20326 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20327 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20328 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20329 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20330 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20331 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20332 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20335 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20336 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20337 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20338 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20339 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20340 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20341 \\000\026\026\026\026\026\098\026\026\026\026\026\026\026\026\026\
20342 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20343 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20344 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20345 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20346 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20347 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20348 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20349 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20350 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20353 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20354 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20355 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20356 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20357 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20358 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20359 \\000\026\026\026\026\026\026\026\026\099\026\026\026\026\026\026\
20360 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20361 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20362 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20363 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20364 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20365 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20366 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20367 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20368 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20371 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20372 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20373 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20374 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20375 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20376 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20377 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20378 \\026\026\026\026\026\026\026\026\100\026\026\000\000\000\000\000\
20379 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20380 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20381 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20382 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20383 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20384 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20385 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20386 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20389 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20390 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20391 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20392 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20393 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20394 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20395 \\000\026\026\026\026\106\026\026\026\026\026\026\026\026\026\102\
20396 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20397 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20398 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20399 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20400 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20401 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20402 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20403 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20404 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20407 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20408 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20409 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20410 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20411 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20412 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20413 \\000\026\026\103\026\026\026\026\026\026\026\026\026\026\026\026\
20414 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20415 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20416 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20417 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20418 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20419 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20420 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20421 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20422 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20425 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20426 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20427 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20428 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20429 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20430 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20431 \\000\104\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20432 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20433 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20434 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20435 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20436 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20437 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20438 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20439 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20440 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20443 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20444 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20445 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20446 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20447 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20448 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20449 \\000\026\026\026\026\026\026\026\026\026\026\026\105\026\026\026\
20450 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20451 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20452 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20453 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20454 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20455 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20456 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20457 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20458 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20461 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20462 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20463 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20464 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20465 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20466 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20467 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20468 \\026\026\026\026\107\026\026\026\026\026\026\000\000\000\000\000\
20469 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20470 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20471 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20472 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20473 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20474 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20475 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20476 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20479 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20480 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20481 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20482 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20483 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20484 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20485 \\000\026\026\026\026\026\119\026\026\026\026\026\026\026\109\026\
20486 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20487 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20488 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20489 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20490 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20491 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20492 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20493 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20494 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20497 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20498 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20499 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20500 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20501 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20502 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20503 \\000\026\026\114\026\026\110\026\026\026\026\026\026\026\026\026\
20504 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20505 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20506 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20507 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20508 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20509 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20510 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20511 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20512 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20515 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20516 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20517 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20518 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20519 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20520 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20521 \\000\026\026\026\026\026\026\026\026\111\026\026\026\026\026\026\
20522 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20523 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20524 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20525 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20526 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20527 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20528 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20529 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20530 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20533 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20534 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20535 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20536 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20537 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20538 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20539 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20540 \\026\026\026\026\026\026\026\026\112\026\026\000\000\000\000\000\
20541 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20542 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20543 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20544 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20545 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20546 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20547 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20548 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20551 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20552 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20553 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20554 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20555 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20556 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20557 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20558 \\026\026\113\026\026\026\026\026\026\026\026\000\000\000\000\000\
20559 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20560 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20561 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20562 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20563 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20564 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20565 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20566 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20569 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20570 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20571 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20572 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20573 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20574 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20575 \\000\026\026\026\026\026\026\026\026\026\026\026\115\026\026\026\
20576 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20577 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20578 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20579 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20580 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20581 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20582 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20583 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20584 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20587 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20588 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20589 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20590 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20591 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20592 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20593 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20594 \\026\026\026\026\026\116\026\026\026\026\026\000\000\000\000\000\
20595 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20596 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20597 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20598 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20599 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20600 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20601 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20602 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20605 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20606 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20607 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20608 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20609 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20610 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20611 \\000\026\026\026\117\026\026\026\026\026\026\026\026\026\026\026\
20612 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20613 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20614 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20615 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20616 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20617 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20618 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20619 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20620 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20623 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20624 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20625 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20626 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20627 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20628 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20629 \\000\026\026\026\026\118\026\026\026\026\026\026\026\026\026\026\
20630 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20631 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20632 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20633 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20634 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20635 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20636 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20637 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20638 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20641 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20642 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20643 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20644 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20645 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20646 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20647 \\000\121\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20648 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20649 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20650 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20651 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20652 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20653 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20654 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20655 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20656 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20659 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20660 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20661 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20662 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20663 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20664 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20665 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\122\026\
20666 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20667 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20668 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20669 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20670 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20671 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20672 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20673 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20674 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20677 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20678 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20679 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20680 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20681 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20682 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20683 \\000\026\026\026\123\026\026\026\026\026\026\026\026\026\026\026\
20684 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20685 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20686 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20687 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20688 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20689 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20690 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20691 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20692 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20695 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20696 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20697 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20698 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20699 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20700 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20701 \\000\026\026\026\026\026\026\026\026\026\026\026\124\026\026\026\
20702 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20703 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20704 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20705 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20706 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20707 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20708 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20709 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20710 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20713 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20714 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20715 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20716 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20717 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20718 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20719 \\000\026\026\026\026\125\026\026\026\026\026\026\026\026\026\026\
20720 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20721 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20722 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20723 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20724 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20725 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20726 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20727 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20728 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20731 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20732 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20733 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20734 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20735 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20736 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20737 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\133\026\
20738 \\026\026\026\026\026\127\026\026\026\026\026\000\000\000\000\000\
20739 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20740 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20741 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20742 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20743 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20744 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20745 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20746 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20749 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20750 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20751 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20752 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20753 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20754 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20755 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\128\026\
20756 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20757 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20758 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20759 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20760 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20761 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20762 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20763 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20764 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20767 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20768 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20769 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20770 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20771 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20772 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20773 \\000\026\026\129\026\026\026\026\026\026\026\026\026\026\026\026\
20774 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20775 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20776 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20777 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20778 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20779 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20780 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20781 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20782 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20785 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20786 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20787 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20788 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20789 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20790 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20791 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20792 \\026\026\026\026\130\026\026\026\026\026\026\000\000\000\000\000\
20793 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20794 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20795 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20796 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20797 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20798 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20799 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20800 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20803 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20804 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20805 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20806 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20807 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20808 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20809 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\131\
20810 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20811 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20812 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20813 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20814 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20815 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20816 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20817 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20818 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20821 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20822 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20823 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20824 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20825 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20826 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20827 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20828 \\026\026\132\026\026\026\026\026\026\026\026\000\000\000\000\000\
20829 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20830 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20831 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20832 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20833 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20834 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20835 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20836 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20839 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20840 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20841 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20842 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20843 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20844 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20845 \\000\026\026\026\026\026\026\026\026\026\026\026\150\026\148\026\
20846 \\026\143\026\026\026\026\026\026\135\026\026\000\000\000\000\000\
20847 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20848 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20849 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20850 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20851 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20852 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20853 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20854 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20857 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20858 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20859 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20860 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20861 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20862 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20863 \\000\026\026\136\026\026\026\026\026\026\026\026\026\026\026\026\
20864 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20865 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20866 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20867 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20868 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20869 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20870 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20871 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20872 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20875 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20876 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20877 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20878 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20879 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20880 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20881 \\000\026\026\026\026\137\026\026\026\026\026\026\026\026\026\026\
20882 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20883 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20884 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20885 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20886 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20887 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20888 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20889 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20890 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20893 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20894 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20895 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20896 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20897 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20898 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20899 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20900 \\138\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20901 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20902 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20903 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20904 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20905 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20906 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20907 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20908 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20911 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20912 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20913 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20914 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20915 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20916 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20917 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20918 \\026\026\026\026\139\026\026\026\026\026\026\000\000\000\000\000\
20919 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20920 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20921 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20922 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20923 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20924 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20925 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20926 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20929 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20930 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20931 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20932 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20933 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20934 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20935 \\000\026\026\026\026\026\026\026\026\140\026\026\026\026\026\026\
20936 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20937 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20938 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20939 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20940 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20941 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20942 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20943 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20944 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20947 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20948 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20949 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20950 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20951 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20952 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20953 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\141\
20954 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20955 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20956 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20957 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20958 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20959 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20960 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20961 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20962 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20965 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20966 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20967 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20968 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20969 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20970 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20971 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\142\026\
20972 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
20973 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20974 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20975 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20976 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20977 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20978 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20979 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20980 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
20983 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20984 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20985 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
20986 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
20987 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20988 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
20989 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
20990 \\026\026\026\026\144\026\026\026\026\026\026\000\000\000\000\000\
20991 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20992 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20993 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20994 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20995 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20996 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20997 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
20998 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21001 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21002 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21003 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21004 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21005 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21006 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21007 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21008 \\026\026\026\026\026\026\026\026\026\145\026\000\000\000\000\000\
21009 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21010 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21011 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21012 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21013 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21014 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21015 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21016 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21019 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21020 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21021 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21022 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21023 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21024 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21025 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21026 \\146\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21027 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21028 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21029 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21030 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21031 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21032 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21033 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21034 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21037 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21038 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21039 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21040 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21041 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21042 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21043 \\000\026\026\026\026\147\026\026\026\026\026\026\026\026\026\026\
21044 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21045 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21046 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21047 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21048 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21049 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21050 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21051 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21052 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21055 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21056 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21057 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21058 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21059 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21060 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21061 \\000\026\026\026\149\026\026\026\026\026\026\026\026\026\026\026\
21062 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21063 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21064 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21065 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21066 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21067 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21068 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21069 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21070 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21073 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21074 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21075 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21076 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21077 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21078 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21079 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21080 \\026\026\026\151\026\026\026\026\026\026\026\000\000\000\000\000\
21081 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21082 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21083 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21084 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21085 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21086 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21087 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21088 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21091 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21092 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21093 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21094 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21095 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21096 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21097 \\000\026\026\026\026\152\026\026\026\026\026\026\026\026\026\026\
21098 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21099 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21100 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21101 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21102 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21103 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21104 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21105 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21106 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21109 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21110 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21111 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21112 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21113 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21114 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21115 \\000\155\026\026\026\026\026\026\026\026\026\026\026\026\026\154\
21116 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21117 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21118 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21119 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21120 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21121 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21122 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21123 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21124 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21127 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21128 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21129 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21130 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21131 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21132 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21133 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21134 \\026\026\026\026\156\026\026\026\026\026\026\000\000\000\000\000\
21135 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21136 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21137 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21138 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21139 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21140 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21141 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21142 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21145 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21146 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21147 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21148 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21149 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21150 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21151 \\000\157\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21152 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21153 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21154 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21155 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21156 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21157 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21158 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21159 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21160 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21163 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21164 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21165 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21166 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21167 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21168 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21169 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21170 \\026\026\026\026\158\026\026\026\026\026\026\000\000\000\000\000\
21171 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21172 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21173 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21174 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21175 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21176 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21177 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21178 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21181 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21182 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21183 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21184 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21185 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21186 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21187 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21188 \\026\026\026\026\026\026\026\026\026\159\026\000\000\000\000\000\
21189 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21190 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21191 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21192 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21193 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21194 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21195 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21196 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21199 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21200 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21201 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21202 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21203 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21204 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21205 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21206 \\160\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21207 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21208 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21209 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21210 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21211 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21212 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21213 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21214 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21217 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21218 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21219 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21220 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21221 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21222 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21223 \\000\026\026\026\026\161\026\026\026\026\026\026\026\026\026\026\
21224 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21225 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21226 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21227 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21228 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21229 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21230 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21231 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21232 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21235 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21236 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21237 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21238 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21239 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21240 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21241 \\000\163\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21242 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21243 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21244 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21245 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21246 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21247 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21248 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21249 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21250 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21253 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21254 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21255 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21256 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21257 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21258 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21259 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21260 \\026\026\026\164\026\026\026\026\026\026\026\000\000\000\000\000\
21261 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21262 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21263 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21264 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21265 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21266 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21267 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21268 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21271 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21272 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21273 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21274 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21275 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21276 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21277 \\000\026\026\026\026\165\026\026\026\026\026\026\026\026\026\026\
21278 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21279 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21280 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21281 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21282 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21283 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21284 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21285 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21286 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21289 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21290 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21291 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21292 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21293 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21294 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21295 \\000\026\174\026\026\026\026\026\026\026\026\026\026\026\168\026\
21296 \\026\026\026\167\026\026\026\026\026\026\026\000\000\000\000\000\
21297 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21298 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21299 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21300 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21301 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21302 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21303 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21304 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21307 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21308 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21309 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21310 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21311 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21312 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21313 \\000\026\026\026\169\026\026\026\026\026\026\026\026\026\026\026\
21314 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21315 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21316 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21317 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21318 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21319 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21320 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21321 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21322 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21325 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21326 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21327 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21328 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21329 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21330 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21331 \\000\170\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21332 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21333 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21334 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21335 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21336 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21337 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21338 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21339 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21340 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21343 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21344 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21345 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21346 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21347 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21348 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21349 \\000\026\026\026\026\026\026\026\026\026\026\026\171\026\026\026\
21350 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21351 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21352 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21353 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21354 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21355 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21356 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21357 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21358 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21361 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21362 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21363 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21364 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21365 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21366 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21367 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21368 \\026\026\026\172\026\026\026\026\026\026\026\000\000\000\000\000\
21369 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21370 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21371 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21372 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21373 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21374 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21375 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21376 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21379 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21380 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21381 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21382 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21383 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21384 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21385 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\173\
21386 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21387 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21388 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21389 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21390 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21391 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21392 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21393 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21394 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21397 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21398 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21399 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21400 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21401 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21402 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21403 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21404 \\026\026\026\175\026\026\026\026\026\026\026\000\000\000\000\000\
21405 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21406 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21407 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21408 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21409 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21410 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21411 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21412 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21415 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21416 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21417 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21418 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21419 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21420 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21421 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21422 \\026\026\026\026\176\026\026\026\026\026\026\000\000\000\000\000\
21423 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21424 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21425 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21426 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21427 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21428 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21429 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21430 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21433 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21434 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21435 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21436 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21437 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21438 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21439 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21440 \\026\026\026\026\026\026\026\026\026\177\026\000\000\000\000\000\
21441 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21442 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21443 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21444 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21445 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21446 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21447 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21448 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21451 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21452 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21453 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21454 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21455 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21456 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21457 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21458 \\178\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21459 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21460 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21461 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21462 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21463 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21464 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21465 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21466 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21469 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21470 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21471 \\000\000\000\000\000\000\000\026\000\000\000\000\000\000\027\000\
21472 \\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\000\
21473 \\000\026\026\026\026\026\026\026\026\026\026\026\026\026\026\026\
21474 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\026\
21475 \\000\026\026\026\026\179\026\026\026\026\026\026\026\026\026\026\
21476 \\026\026\026\026\026\026\026\026\026\026\026\000\000\000\000\000\
21477 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21478 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21479 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21480 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21481 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21482 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21483 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21484 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21487 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21488 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21489 \\000\007\000\007\007\007\007\000\000\000\007\007\000\007\000\007\
21490 \\000\000\000\000\000\000\000\000\000\000\007\000\007\007\185\007\
21491 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21492 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
21493 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21494 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
21495 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21496 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21497 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21498 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21499 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21500 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21501 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21502 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21505 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21506 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21507 \\000\007\000\007\007\007\007\000\000\000\007\007\000\007\000\007\
21508 \\000\000\000\000\000\000\000\000\000\000\007\000\007\007\188\007\
21509 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21510 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
21511 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21512 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
21513 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21514 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21515 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21516 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21517 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21518 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21519 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21520 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21523 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21524 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21525 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\013\000\
21526 \\190\190\190\190\190\190\190\190\190\190\000\000\000\000\000\000\
21527 \\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\000\
21528 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21529 \\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\000\
21530 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21531 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21532 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21533 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21534 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21535 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21536 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21537 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21538 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21541 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21542 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21543 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\013\000\
21544 \\198\198\198\198\198\198\198\198\198\198\000\000\000\000\000\000\
21545 \\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\000\
21546 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21547 \\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\000\
21548 \\000\000\000\000\000\000\000\194\192\000\000\000\000\000\000\000\
21549 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21550 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21551 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21552 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21553 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21554 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21555 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21556 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21559 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21560 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21561 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21562 \\193\193\193\193\193\193\193\193\193\193\000\000\000\000\000\000\
21563 \\000\193\193\193\193\193\193\000\000\000\000\000\000\000\000\000\
21564 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21565 \\000\193\193\193\193\193\193\000\000\000\000\000\000\000\000\000\
21566 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21567 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21568 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21569 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21570 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21571 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21572 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21573 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21574 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21577 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21578 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21579 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21580 \\197\197\197\197\197\197\197\197\197\197\000\000\000\000\000\000\
21581 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21582 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21583 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21584 \\000\000\000\000\000\000\000\000\195\000\000\000\000\000\000\000\
21585 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21586 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21587 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21588 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21589 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21590 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21591 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21592 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21595 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21596 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21597 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21598 \\196\196\196\196\196\196\196\196\196\196\000\000\000\000\000\000\
21599 \\000\196\196\196\196\196\196\000\000\000\000\000\000\000\000\000\
21600 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21601 \\000\196\196\196\196\196\196\000\000\000\000\000\000\000\000\000\
21602 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21603 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21604 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21605 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21606 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21607 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21608 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21609 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21610 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21613 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21614 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21615 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21616 \\197\197\197\197\197\197\197\197\197\197\000\000\000\000\000\000\
21617 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21618 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21619 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21620 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21621 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21622 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21623 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21624 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21625 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21626 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21627 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21628 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21631 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21632 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21633 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\013\000\
21634 \\198\198\198\198\198\198\198\198\198\198\000\000\000\000\000\000\
21635 \\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\000\
21636 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21637 \\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\000\
21638 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21639 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21640 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21641 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21642 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21643 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21644 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21645 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21646 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21649 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21650 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21651 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000\
21652 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21653 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21654 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21655 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21656 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21657 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21658 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21659 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21660 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21661 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21662 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21663 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21664 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21667 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21668 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21669 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\201\000\
21670 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21671 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21672 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21673 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21674 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21675 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21676 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21677 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21678 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21679 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21680 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21681 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21682 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21685 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21686 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21687 \\000\007\000\007\007\007\007\000\000\000\007\007\000\007\000\007\
21688 \\000\000\000\000\000\000\000\000\000\000\007\000\007\007\203\007\
21689 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21690 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
21691 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21692 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
21693 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21694 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21695 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21696 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21697 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21698 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21699 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21700 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21703 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21704 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21705 \\000\000\000\000\000\000\000\000\000\000\208\000\000\000\000\000\
21706 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21707 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21708 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21709 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21710 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21711 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21712 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21713 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21714 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21715 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21716 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21717 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21718 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21721 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21722 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21723 \\000\000\000\000\000\000\000\210\000\000\000\000\000\000\000\000\
21724 \\210\210\210\210\210\210\210\210\210\210\000\000\000\000\000\000\
21725 \\000\210\210\210\210\210\210\210\210\210\210\210\210\210\210\210\
21726 \\210\210\210\210\210\210\210\210\210\210\210\000\000\000\000\210\
21727 \\000\210\210\210\210\210\210\210\210\210\210\210\210\210\210\210\
21728 \\210\210\210\210\210\210\210\210\210\210\210\000\000\000\000\000\
21729 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21730 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21731 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21732 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21733 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21734 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21735 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21736 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21739 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21740 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21741 \\000\007\212\007\007\007\007\000\000\000\007\007\000\007\000\007\
21742 \\000\000\000\000\000\000\000\000\000\000\007\000\007\007\007\007\
21743 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21744 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
21745 \\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21746 \\000\000\000\000\000\000\000\000\000\000\000\000\007\000\007\000\
21747 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21748 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21749 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21750 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21751 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21752 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21753 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21754 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21757 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21758 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21759 \\212\212\222\212\212\212\212\212\212\212\212\212\212\212\212\212\
21760 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21761 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21762 \\212\212\212\212\212\212\212\212\212\212\212\212\213\212\212\212\
21763 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21764 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\000\
21765 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21766 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21767 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21768 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21769 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21770 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21771 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21772 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212"
21775 "\000\000\000\000\000\000\000\000\000\221\221\221\221\221\000\000\
21776 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21777 \\221\000\212\000\000\000\000\000\000\000\000\000\000\000\000\000\
21778 \\219\219\219\219\219\219\219\219\219\219\000\000\000\000\000\000\
21779 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21780 \\000\000\000\000\000\000\000\000\000\000\000\000\212\000\218\000\
21781 \\000\212\212\000\000\000\212\000\000\000\000\000\000\000\212\000\
21782 \\000\000\212\000\212\214\212\000\000\000\000\000\000\000\000\000\
21783 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21784 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21785 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21786 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21787 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21788 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21789 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21790 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21793 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21794 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21795 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21796 \\215\215\215\215\215\215\215\215\215\215\000\000\000\000\000\000\
21797 \\000\215\215\215\215\215\215\000\000\000\000\000\000\000\000\000\
21798 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21799 \\000\215\215\215\215\215\215\000\000\000\000\000\000\000\000\000\
21800 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21801 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21802 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21803 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21804 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21805 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21806 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21807 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21808 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21811 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21812 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21813 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21814 \\216\216\216\216\216\216\216\216\216\216\000\000\000\000\000\000\
21815 \\000\216\216\216\216\216\216\000\000\000\000\000\000\000\000\000\
21816 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21817 \\000\216\216\216\216\216\216\000\000\000\000\000\000\000\000\000\
21818 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21819 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21820 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21821 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21822 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21823 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21824 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21825 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21826 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21829 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21830 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21831 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21832 \\217\217\217\217\217\217\217\217\217\217\000\000\000\000\000\000\
21833 \\000\217\217\217\217\217\217\000\000\000\000\000\000\000\000\000\
21834 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21835 \\000\217\217\217\217\217\217\000\000\000\000\000\000\000\000\000\
21836 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21837 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21838 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21839 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21840 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21841 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21842 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21843 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21844 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21847 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21848 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21849 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21850 \\212\212\212\212\212\212\212\212\212\212\000\000\000\000\000\000\
21851 \\000\212\212\212\212\212\212\000\000\000\000\000\000\000\000\000\
21852 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21853 \\000\212\212\212\212\212\212\000\000\000\000\000\000\000\000\000\
21854 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21855 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21856 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21857 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21858 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21859 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21860 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21861 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21862 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21865 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21866 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21867 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21868 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21869 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21870 \\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\212\
21871 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21872 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21873 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21874 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21875 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21876 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21877 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21878 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21879 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21880 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21883 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21884 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21885 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21886 \\220\220\220\220\220\220\220\220\220\220\000\000\000\000\000\000\
21887 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21888 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21889 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21890 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21891 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21892 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21893 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21894 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21895 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21896 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21897 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21898 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21901 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21902 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21903 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21904 \\212\212\212\212\212\212\212\212\212\212\000\000\000\000\000\000\
21905 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21906 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21907 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21908 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21909 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21910 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21911 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21912 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21913 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21914 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21915 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21916 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21919 "\000\000\000\000\000\000\000\000\000\221\221\221\221\221\000\000\
21920 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21921 \\221\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21922 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21923 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21924 \\000\000\000\000\000\000\000\000\000\000\000\000\212\000\000\000\
21925 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21926 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21927 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21928 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21929 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21930 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21931 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21932 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21933 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21934 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21937 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21938 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21939 \\224\224\234\224\224\224\224\224\224\224\224\224\224\224\224\224\
21940 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
21941 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
21942 \\224\224\224\224\224\224\224\224\224\224\224\224\225\224\224\224\
21943 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
21944 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\000\
21945 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
21946 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
21947 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
21948 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
21949 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
21950 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
21951 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
21952 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224"
21955 "\000\000\000\000\000\000\000\000\000\233\233\233\233\233\000\000\
21956 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21957 \\233\000\224\000\000\000\000\000\000\000\000\000\000\000\000\000\
21958 \\231\231\231\231\231\231\231\231\231\231\000\000\000\000\000\000\
21959 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21960 \\000\000\000\000\000\000\000\000\000\000\000\000\224\000\230\000\
21961 \\000\224\224\000\000\000\224\000\000\000\000\000\000\000\224\000\
21962 \\000\000\224\000\224\226\224\000\000\000\000\000\000\000\000\000\
21963 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21964 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21965 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21966 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21967 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21968 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21969 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21970 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21973 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21974 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21975 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21976 \\227\227\227\227\227\227\227\227\227\227\000\000\000\000\000\000\
21977 \\000\227\227\227\227\227\227\000\000\000\000\000\000\000\000\000\
21978 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21979 \\000\227\227\227\227\227\227\000\000\000\000\000\000\000\000\000\
21980 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21981 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21982 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21983 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21984 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21985 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21986 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21987 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21988 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
21991 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21992 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21993 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21994 \\228\228\228\228\228\228\228\228\228\228\000\000\000\000\000\000\
21995 \\000\228\228\228\228\228\228\000\000\000\000\000\000\000\000\000\
21996 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21997 \\000\228\228\228\228\228\228\000\000\000\000\000\000\000\000\000\
21998 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
21999 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22000 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22001 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22002 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22003 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22004 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22005 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22006 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
22009 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22010 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22011 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22012 \\229\229\229\229\229\229\229\229\229\229\000\000\000\000\000\000\
22013 \\000\229\229\229\229\229\229\000\000\000\000\000\000\000\000\000\
22014 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22015 \\000\229\229\229\229\229\229\000\000\000\000\000\000\000\000\000\
22016 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22017 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22018 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22019 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22020 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22021 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22022 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22023 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22024 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
22027 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22028 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22029 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22030 \\224\224\224\224\224\224\224\224\224\224\000\000\000\000\000\000\
22031 \\000\224\224\224\224\224\224\000\000\000\000\000\000\000\000\000\
22032 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22033 \\000\224\224\224\224\224\224\000\000\000\000\000\000\000\000\000\
22034 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22035 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22036 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22037 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22038 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22039 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22040 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22041 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22042 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
22045 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22046 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22047 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22048 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22049 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
22050 \\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\224\
22051 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22052 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22053 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22054 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22055 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22056 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22057 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22058 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22059 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22060 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
22063 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22064 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22065 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22066 \\232\232\232\232\232\232\232\232\232\232\000\000\000\000\000\000\
22067 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22068 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22069 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22070 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22071 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22072 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22073 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22074 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22075 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22076 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22077 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22078 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
22081 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22082 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22083 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22084 \\224\224\224\224\224\224\224\224\224\224\000\000\000\000\000\000\
22085 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22086 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22087 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22088 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22089 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22090 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22091 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22092 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22093 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22094 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22095 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22096 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
22099 "\000\000\000\000\000\000\000\000\000\233\233\233\233\233\000\000\
22100 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22101 \\233\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22102 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22103 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22104 \\000\000\000\000\000\000\000\000\000\000\000\000\224\000\000\000\
22105 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22106 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22107 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22108 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22109 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22110 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22111 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22112 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22113 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22114 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
22117 "\000\000\000\000\000\000\000\000\000\236\236\236\236\236\000\000\
22118 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22119 \\236\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22120 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22121 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22122 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22123 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22124 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22125 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22126 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22127 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22128 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22129 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22130 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22131 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22132 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
22135 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22136 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22137 \\000\000\000\000\000\000\000\000\000\239\000\000\000\000\000\000\
22138 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22139 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22140 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22141 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22142 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22143 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22144 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22145 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22146 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22147 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22148 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22149 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22150 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
22153 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22154 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22155 \\000\000\000\000\000\000\000\000\000\000\241\000\000\000\000\000\
22156 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22157 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22158 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22159 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22160 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22161 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22162 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22163 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22164 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22165 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22166 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22167 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
22168 \\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
22172 val s
= map
f (rev (tl (rev s
)))
22173 exception LexHackingError
22174 fun look ((j
,x
)::r
, i
) = if i
= j
then x
else look(r
, i
)
22175 |
look ([], i
) = raise LexHackingError
22176 fun g
{fin
=x
, trans
=i
} = {fin
=x
, trans
=look(s
,i
)}
22177 in Vector.fromList(map g
22178 [{fin
= [], trans
= 0},
22179 {fin
= [], trans
= 1},
22180 {fin
= [], trans
= 1},
22181 {fin
= [], trans
= 3},
22182 {fin
= [], trans
= 3},
22183 {fin
= [(N
472)], trans
= 0},
22184 {fin
= [(N
436),(N
472)], trans
= 6},
22185 {fin
= [(N
436)], trans
= 7},
22186 {fin
= [(N
304)], trans
= 8},
22187 {fin
= [], trans
= 9},
22188 {fin
= [], trans
= 10},
22189 {fin
= [(N
342)], trans
= 10},
22190 {fin
= [(N
342)], trans
= 12},
22191 {fin
= [], trans
= 13},
22192 {fin
= [(N
342)], trans
= 14},
22193 {fin
= [], trans
= 15},
22194 {fin
= [], trans
= 16},
22195 {fin
= [(N
342)], trans
= 16},
22196 {fin
= [(N
342)], trans
= 18},
22197 {fin
= [(N
304)], trans
= 19},
22198 {fin
= [], trans
= 20},
22199 {fin
= [(N
304)], trans
= 20},
22200 {fin
= [(N
43),(N
472)], trans
= 0},
22201 {fin
= [(N
41),(N
436),(N
472)], trans
= 7},
22202 {fin
= [(N
39),(N
472)], trans
= 0},
22203 {fin
= [(N
433),(N
472)], trans
= 25},
22204 {fin
= [(N
433)], trans
= 25},
22205 {fin
= [], trans
= 27},
22206 {fin
= [(N
455)], trans
= 28},
22207 {fin
= [(N
455)], trans
= 29},
22208 {fin
= [(N
433),(N
472)], trans
= 30},
22209 {fin
= [(N
433)], trans
= 31},
22210 {fin
= [(N
433)], trans
= 32},
22211 {fin
= [(N
273),(N
433)], trans
= 33},
22212 {fin
= [(N
433)], trans
= 34},
22213 {fin
= [(N
433)], trans
= 35},
22214 {fin
= [(N
433)], trans
= 36},
22215 {fin
= [(N
282),(N
433)], trans
= 25},
22216 {fin
= [(N
433)], trans
= 38},
22217 {fin
= [(N
433)], trans
= 39},
22218 {fin
= [(N
433)], trans
= 40},
22219 {fin
= [(N
268),(N
433)], trans
= 25},
22220 {fin
= [(N
433)], trans
= 42},
22221 {fin
= [(N
433)], trans
= 43},
22222 {fin
= [(N
262),(N
433)], trans
= 25},
22223 {fin
= [(N
433),(N
472)], trans
= 45},
22224 {fin
= [(N
433)], trans
= 46},
22225 {fin
= [(N
256),(N
433)], trans
= 25},
22226 {fin
= [(N
433),(N
472)], trans
= 48},
22227 {fin
= [(N
433)], trans
= 49},
22228 {fin
= [(N
433)], trans
= 50},
22229 {fin
= [(N
252),(N
433)], trans
= 25},
22230 {fin
= [(N
433)], trans
= 52},
22231 {fin
= [(N
433)], trans
= 53},
22232 {fin
= [(N
247),(N
433)], trans
= 25},
22233 {fin
= [(N
433),(N
472)], trans
= 55},
22234 {fin
= [(N
433)], trans
= 56},
22235 {fin
= [(N
433)], trans
= 57},
22236 {fin
= [(N
433)], trans
= 58},
22237 {fin
= [(N
433)], trans
= 59},
22238 {fin
= [(N
232),(N
433)], trans
= 60},
22239 {fin
= [(N
433)], trans
= 61},
22240 {fin
= [(N
433)], trans
= 62},
22241 {fin
= [(N
242),(N
433)], trans
= 25},
22242 {fin
= [(N
433)], trans
= 64},
22243 {fin
= [(N
215),(N
433)], trans
= 65},
22244 {fin
= [(N
433)], trans
= 66},
22245 {fin
= [(N
433)], trans
= 67},
22246 {fin
= [(N
433)], trans
= 68},
22247 {fin
= [(N
433)], trans
= 69},
22248 {fin
= [(N
433)], trans
= 70},
22249 {fin
= [(N
225),(N
433)], trans
= 25},
22250 {fin
= [(N
433)], trans
= 72},
22251 {fin
= [(N
433)], trans
= 73},
22252 {fin
= [(N
433)], trans
= 74},
22253 {fin
= [(N
433)], trans
= 75},
22254 {fin
= [(N
433)], trans
= 76},
22255 {fin
= [(N
211),(N
433)], trans
= 25},
22256 {fin
= [(N
433),(N
472)], trans
= 78},
22257 {fin
= [(N
433)], trans
= 79},
22258 {fin
= [(N
203),(N
433)], trans
= 25},
22259 {fin
= [(N
433)], trans
= 81},
22260 {fin
= [(N
433)], trans
= 82},
22261 {fin
= [(N
433)], trans
= 83},
22262 {fin
= [(N
199),(N
433)], trans
= 25},
22263 {fin
= [(N
433),(N
472)], trans
= 85},
22264 {fin
= [(N
433)], trans
= 86},
22265 {fin
= [(N
433)], trans
= 87},
22266 {fin
= [(N
433)], trans
= 88},
22267 {fin
= [(N
433)], trans
= 89},
22268 {fin
= [(N
193),(N
433)], trans
= 25},
22269 {fin
= [(N
181),(N
433)], trans
= 91},
22270 {fin
= [(N
433)], trans
= 92},
22271 {fin
= [(N
186),(N
433)], trans
= 25},
22272 {fin
= [(N
178),(N
433)], trans
= 25},
22273 {fin
= [(N
433),(N
472)], trans
= 95},
22274 {fin
= [(N
433)], trans
= 96},
22275 {fin
= [(N
433)], trans
= 97},
22276 {fin
= [(N
433)], trans
= 98},
22277 {fin
= [(N
433)], trans
= 99},
22278 {fin
= [(N
175),(N
433)], trans
= 25},
22279 {fin
= [(N
433),(N
472)], trans
= 101},
22280 {fin
= [(N
433)], trans
= 102},
22281 {fin
= [(N
433)], trans
= 103},
22282 {fin
= [(N
433)], trans
= 104},
22283 {fin
= [(N
168),(N
433)], trans
= 25},
22284 {fin
= [(N
433)], trans
= 106},
22285 {fin
= [(N
162),(N
433)], trans
= 25},
22286 {fin
= [(N
433),(N
472)], trans
= 108},
22287 {fin
= [(N
137),(N
433)], trans
= 109},
22288 {fin
= [(N
433)], trans
= 110},
22289 {fin
= [(N
433)], trans
= 111},
22290 {fin
= [(N
151),(N
433)], trans
= 112},
22291 {fin
= [(N
158),(N
433)], trans
= 25},
22292 {fin
= [(N
433)], trans
= 114},
22293 {fin
= [(N
433)], trans
= 115},
22294 {fin
= [(N
433)], trans
= 116},
22295 {fin
= [(N
433)], trans
= 117},
22296 {fin
= [(N
145),(N
433)], trans
= 25},
22297 {fin
= [(N
134),(N
433)], trans
= 25},
22298 {fin
= [(N
433),(N
472)], trans
= 120},
22299 {fin
= [(N
433)], trans
= 121},
22300 {fin
= [(N
433)], trans
= 122},
22301 {fin
= [(N
433)], trans
= 123},
22302 {fin
= [(N
433)], trans
= 124},
22303 {fin
= [(N
131),(N
433)], trans
= 25},
22304 {fin
= [(N
433),(N
472)], trans
= 126},
22305 {fin
= [(N
433)], trans
= 127},
22306 {fin
= [(N
116),(N
433)], trans
= 128},
22307 {fin
= [(N
433)], trans
= 129},
22308 {fin
= [(N
433)], trans
= 130},
22309 {fin
= [(N
433)], trans
= 131},
22310 {fin
= [(N
124),(N
433)], trans
= 25},
22311 {fin
= [(N
112),(N
433)], trans
= 25},
22312 {fin
= [(N
433),(N
472)], trans
= 134},
22313 {fin
= [(N
433)], trans
= 135},
22314 {fin
= [(N
433)], trans
= 136},
22315 {fin
= [(N
433)], trans
= 137},
22316 {fin
= [(N
433)], trans
= 138},
22317 {fin
= [(N
433)], trans
= 139},
22318 {fin
= [(N
433)], trans
= 140},
22319 {fin
= [(N
433)], trans
= 141},
22320 {fin
= [(N
109),(N
433)], trans
= 25},
22321 {fin
= [(N
433)], trans
= 143},
22322 {fin
= [(N
433)], trans
= 144},
22323 {fin
= [(N
433)], trans
= 145},
22324 {fin
= [(N
433)], trans
= 146},
22325 {fin
= [(N
99),(N
433)], trans
= 25},
22326 {fin
= [(N
433)], trans
= 148},
22327 {fin
= [(N
92),(N
433)], trans
= 25},
22328 {fin
= [(N
433)], trans
= 150},
22329 {fin
= [(N
433)], trans
= 151},
22330 {fin
= [(N
88),(N
433)], trans
= 25},
22331 {fin
= [(N
433),(N
472)], trans
= 153},
22332 {fin
= [(N
83),(N
433)], trans
= 25},
22333 {fin
= [(N
433)], trans
= 155},
22334 {fin
= [(N
433)], trans
= 156},
22335 {fin
= [(N
433)], trans
= 157},
22336 {fin
= [(N
433)], trans
= 158},
22337 {fin
= [(N
433)], trans
= 159},
22338 {fin
= [(N
433)], trans
= 160},
22339 {fin
= [(N
80),(N
433)], trans
= 25},
22340 {fin
= [(N
433),(N
472)], trans
= 162},
22341 {fin
= [(N
433)], trans
= 163},
22342 {fin
= [(N
433)], trans
= 164},
22343 {fin
= [(N
71),(N
433)], trans
= 25},
22344 {fin
= [(N
433),(N
472)], trans
= 166},
22345 {fin
= [(N
66),(N
433)], trans
= 25},
22346 {fin
= [(N
433)], trans
= 168},
22347 {fin
= [(N
55),(N
433)], trans
= 169},
22348 {fin
= [(N
433)], trans
= 170},
22349 {fin
= [(N
433)], trans
= 171},
22350 {fin
= [(N
433)], trans
= 172},
22351 {fin
= [(N
63),(N
433)], trans
= 25},
22352 {fin
= [(N
433)], trans
= 174},
22353 {fin
= [(N
433)], trans
= 175},
22354 {fin
= [(N
433)], trans
= 176},
22355 {fin
= [(N
433)], trans
= 177},
22356 {fin
= [(N
433)], trans
= 178},
22357 {fin
= [(N
51),(N
433)], trans
= 25},
22358 {fin
= [(N
436),(N
472)], trans
= 7},
22359 {fin
= [(N
37),(N
472)], trans
= 0},
22360 {fin
= [(N
35),(N
472)], trans
= 0},
22361 {fin
= [(N
33),(N
472)], trans
= 0},
22362 {fin
= [(N
28),(N
436),(N
472)], trans
= 184},
22363 {fin
= [(N
31),(N
436)], trans
= 7},
22364 {fin
= [(N
26),(N
472)], trans
= 0},
22365 {fin
= [(N
21),(N
436),(N
472)], trans
= 187},
22366 {fin
= [(N
24),(N
436)], trans
= 7},
22367 {fin
= [(N
286),(N
289),(N
304),(N
472)], trans
= 189},
22368 {fin
= [(N
289),(N
304)], trans
= 189},
22369 {fin
= [(N
284),(N
304),(N
472)], trans
= 191},
22370 {fin
= [], trans
= 192},
22371 {fin
= [(N
304)], trans
= 192},
22372 {fin
= [], trans
= 194},
22373 {fin
= [], trans
= 195},
22374 {fin
= [(N
314)], trans
= 195},
22375 {fin
= [(N
314)], trans
= 197},
22376 {fin
= [(N
304)], trans
= 198},
22377 {fin
= [(N
472)], trans
= 199},
22378 {fin
= [], trans
= 200},
22379 {fin
= [(N
19)], trans
= 0},
22380 {fin
= [(N
436),(N
472)], trans
= 202},
22381 {fin
= [(N
15),(N
436)], trans
= 7},
22382 {fin
= [(N
12),(N
472)], trans
= 0},
22383 {fin
= [(N
10),(N
436),(N
472)], trans
= 7},
22384 {fin
= [(N
8),(N
472)], trans
= 0},
22385 {fin
= [(N
6),(N
472)], trans
= 207},
22386 {fin
= [(N
458)], trans
= 0},
22387 {fin
= [(N
428),(N
472)], trans
= 209},
22388 {fin
= [(N
428)], trans
= 209},
22389 {fin
= [(N
4),(N
436),(N
472)], trans
= 211},
22390 {fin
= [], trans
= 212},
22391 {fin
= [], trans
= 213},
22392 {fin
= [], trans
= 214},
22393 {fin
= [], trans
= 215},
22394 {fin
= [], trans
= 216},
22395 {fin
= [], trans
= 217},
22396 {fin
= [], trans
= 218},
22397 {fin
= [], trans
= 219},
22398 {fin
= [], trans
= 220},
22399 {fin
= [], trans
= 221},
22400 {fin
= [(N
423)], trans
= 0},
22401 {fin
= [(N
470),(N
472)], trans
= 223},
22402 {fin
= [], trans
= 223},
22403 {fin
= [], trans
= 225},
22404 {fin
= [], trans
= 226},
22405 {fin
= [], trans
= 227},
22406 {fin
= [], trans
= 228},
22407 {fin
= [], trans
= 229},
22408 {fin
= [], trans
= 230},
22409 {fin
= [], trans
= 231},
22410 {fin
= [], trans
= 232},
22411 {fin
= [], trans
= 233},
22412 {fin
= [(N
382)], trans
= 0},
22413 {fin
= [(N
2),(N
472)], trans
= 235},
22414 {fin
= [(N
2)], trans
= 235},
22415 {fin
= [(N
466)], trans
= 0},
22416 {fin
= [(N
466)], trans
= 238},
22417 {fin
= [(N
464)], trans
= 0},
22418 {fin
= [(N
466)], trans
= 240},
22419 {fin
= [(N
461)], trans
= 0},
22420 {fin
= [(N
468)], trans
= 0}])
22422 structure StartStates
=
22424 datatype yystartstate
= STARTSTATE
of int
22426 (* start state definitions
*)
22428 val COMMENT
= STARTSTATE
3;
22429 val INITIAL
= STARTSTATE
1;
22432 type result
= UserDeclarations
.lexresult
22433 exception LexerError (* raised
if illegal leaf action tried
*)
22437 fun makeLexer (yyinput
: int -> string) =
22438 let val yygone0
:int=1
22439 val yyb
= ref
"\n" (* buffer
*)
22440 val yybl
: int ref
= ref
1 (*buffer length
*)
22441 val yybufpos
: int ref
= ref
1 (* location
of next character to use
*)
22442 val yygone
: int ref
= ref
yygone0 (* position
in file
of beginning
of buffer
*)
22443 val yydone
= ref
false (* eof found yet?
*)
22444 val yybegin
: int ref
= ref
1 (*Current
'start state
' for lexer
*)
22446 val YYBEGIN
= fn (Internal
.StartStates
.STARTSTATE x
) =>
22449 fun lex () : Internal
.result
=
22450 let fun continue() = lex() in
22451 let fun scan (s
,AcceptingLeaves
: Internal
.yyfinstate list list
,l
,i0
: int) =
22452 let fun action (i
: int,nil
) = raise LexError
22453 |
action (i
,nil
::l
) = action (i
-1,l
)
22454 |
action (i
,(node
::acts
)::l
) =
22457 (let fun yymktext() = String.substring(!yyb
,i0
,i
-i0
)
22458 val yypos
: int = i0
+ !yygone
22459 open UserDeclarations Internal
.StartStates
22460 in (yybufpos
:= i
; case yyk
of
22462 (* Application actions
*)
22464 10 => let val yytext
=yymktext() in token(STAR
, yypos
, yytext
) end
22465 |
109 => let val yytext
=yymktext() in token(EXCEPTION
, yypos
, yytext
) end
22466 |
112 => let val yytext
=yymktext() in token(FN
, yypos
, yytext
) end
22467 |
116 => let val yytext
=yymktext() in token(FUN
, yypos
, yytext
) end
22468 |
12 => let val yytext
=yymktext() in token(COMMA
, yypos
, yytext
) end
22469 |
124 => let val yytext
=yymktext() in token(FUNCTOR
, yypos
, yytext
) end
22470 |
131 => let val yytext
=yymktext() in token(HANDLE
, yypos
, yytext
) end
22471 |
134 => let val yytext
=yymktext() in token(IF
, yypos
, yytext
) end
22472 |
137 => let val yytext
=yymktext() in token(IN
, yypos
, yytext
) end
22473 |
145 => let val yytext
=yymktext() in token(INCLUDE
, yypos
, yytext
) end
22474 |
15 => let val yytext
=yymktext() in token(ARROW
, yypos
, yytext
) end
22475 |
151 => let val yytext
=yymktext() in token(INFIX
, yypos
, yytext
) end
22476 |
158 => let val yytext
=yymktext() in token(INFIXR
, yypos
, yytext
) end
22477 |
162 => let val yytext
=yymktext() in token(LET
, yypos
, yytext
) end
22478 |
168 => let val yytext
=yymktext() in token(LOCAL
, yypos
, yytext
) end
22479 |
175 => let val yytext
=yymktext() in token(NONFIX
, yypos
, yytext
) end
22480 |
178 => let val yytext
=yymktext() in token(OF
, yypos
, yytext
) end
22481 |
181 => let val yytext
=yymktext() in token(OP
, yypos
, yytext
) end
22482 |
186 => let val yytext
=yymktext() in token(OPEN
, yypos
, yytext
) end
22483 |
19 => let val yytext
=yymktext() in token(DOTS
, yypos
, yytext
) end
22484 |
193 => let val yytext
=yymktext() in token(ORELSE
, yypos
, yytext
) end
22485 |
199 => let val yytext
=yymktext() in token(RAISE
, yypos
, yytext
) end
22486 |
2 => ( continue() )
22487 |
203 => let val yytext
=yymktext() in token(REC
, yypos
, yytext
) end
22488 |
21 => let val yytext
=yymktext() in token(COLON
, yypos
, yytext
) end
22489 |
211 => let val yytext
=yymktext() in token(SHARING
, yypos
, yytext
) end
22490 |
215 => let val yytext
=yymktext() in token(SIG
, yypos
, yytext
) end
22491 |
225 => let val yytext
=yymktext() in token(SIGNATURE
, yypos
, yytext
) end
22492 |
232 => let val yytext
=yymktext() in token(STRUCT
, yypos
, yytext
) end
22493 |
24 => let val yytext
=yymktext() in token(COLONGREATER
, yypos
, yytext
) end
22494 |
242 => let val yytext
=yymktext() in token(STRUCTURE
, yypos
, yytext
) end
22495 |
247 => let val yytext
=yymktext() in token(THEN
, yypos
, yytext
) end
22496 |
252 => let val yytext
=yymktext() in token(TYPE
, yypos
, yytext
) end
22497 |
256 => let val yytext
=yymktext() in token(VAL
, yypos
, yytext
) end
22498 |
26 => let val yytext
=yymktext() in token(SEMICOLON
, yypos
, yytext
) end
22499 |
262 => let val yytext
=yymktext() in token(WHERE
, yypos
, yytext
) end
22500 |
268 => let val yytext
=yymktext() in token(WHILE
, yypos
, yytext
) end
22501 |
273 => let val yytext
=yymktext() in token(WITH
, yypos
, yytext
) end
22502 |
28 => let val yytext
=yymktext() in token(EQUALS
, yypos
, yytext
) end
22503 |
282 => let val yytext
=yymktext() in token(WITHTYPE
, yypos
, yytext
) end
22504 |
284 => let val yytext
=yymktext() in token (ZERO
, yypos
, yytext
) end
22505 |
286 => let val yytext
=yymktext() in tokenOf(DIGIT
, toInt
, yypos
, yytext
) end
22506 |
289 => let val yytext
=yymktext() in tokenOf(NUMERIC
, toInt
, yypos
, yytext
) end
22507 |
304 => let val yytext
=yymktext() in tokenOf(INT
, toInt
, yypos
, yytext
) end
22508 |
31 => let val yytext
=yymktext() in token(DARROW
, yypos
, yytext
) end
22509 |
314 => let val yytext
=yymktext() in tokenOf(WORD
, toWord
, yypos
, yytext
) end
22510 |
33 => let val yytext
=yymktext() in token(LBRACK
, yypos
, yytext
) end
22511 |
342 => let val yytext
=yymktext() in tokenOf(REAL
, toReal
, yypos
, yytext
) end
22512 |
35 => let val yytext
=yymktext() in token(RBRACK
, yypos
, yytext
) end
22513 |
37 => let val yytext
=yymktext() in token(UNDERBAR
, yypos
, yytext
) end
22514 |
382 => let val yytext
=yymktext() in tokenOf(STRING
, toString
, yypos
, yytext
) end
22515 |
39 => let val yytext
=yymktext() in token(LBRACE
, yypos
, yytext
) end
22516 |
4 => let val yytext
=yymktext() in token(HASH
, yypos
, yytext
) end
22517 |
41 => let val yytext
=yymktext() in token(BAR
, yypos
, yytext
) end
22518 |
423 => let val yytext
=yymktext() in tokenOf(CHAR
, toChar
, yypos
, yytext
) end
22519 |
428 => let val yytext
=yymktext() in tokenOf(TYVAR
, toId
, yypos
, yytext
) end
22520 |
43 => let val yytext
=yymktext() in token(RBRACE
, yypos
, yytext
) end
22521 |
433 => let val yytext
=yymktext() in tokenOf(ALPHA
, toId
, yypos
, yytext
) end
22522 |
436 => let val yytext
=yymktext() in tokenOf(SYMBOL
, toId
, yypos
, yytext
) end
22523 |
455 => let val yytext
=yymktext() in tokenOf(LONGID
, toLongId
, yypos
, yytext
) end
22524 |
458 => ( nesting
:= 1 ; YYBEGIN COMMENT
; continue() )
22525 |
461 => ( nesting
:= !nesting
+1 ; continue() )
22526 |
464 => ( nesting
:= !nesting
-1 ;
22527 if !nesting
= 0 then YYBEGIN INITIAL
else () ;
22529 |
466 => ( continue() )
22530 |
468 => ( continue() )
22531 |
470 => let val yytext
=yymktext() in error(yypos
, yytext
, "invalid string") end
22532 |
472 => let val yytext
=yymktext() in invalid(yypos
, yytext
) end
22533 |
51 => let val yytext
=yymktext() in token(ABSTYPE
, yypos
, yytext
) end
22534 |
55 => let val yytext
=yymktext() in token(AND
, yypos
, yytext
) end
22535 |
6 => let val yytext
=yymktext() in token(LPAR
, yypos
, yytext
) end
22536 |
63 => let val yytext
=yymktext() in token(ANDALSO
, yypos
, yytext
) end
22537 |
66 => let val yytext
=yymktext() in token(AS
, yypos
, yytext
) end
22538 |
71 => let val yytext
=yymktext() in token(CASE
, yypos
, yytext
) end
22539 |
8 => let val yytext
=yymktext() in token(RPAR
, yypos
, yytext
) end
22540 |
80 => let val yytext
=yymktext() in token(DATATYPE
, yypos
, yytext
) end
22541 |
83 => let val yytext
=yymktext() in token(DO
, yypos
, yytext
) end
22542 |
88 => let val yytext
=yymktext() in token(ELSE
, yypos
, yytext
) end
22543 |
92 => let val yytext
=yymktext() in token(END
, yypos
, yytext
) end
22544 |
99 => let val yytext
=yymktext() in token(EQTYPE
, yypos
, yytext
) end
22545 | _
=> raise Internal
.LexerError
22549 val {fin
,trans
} = Vector.sub(Internal
.tab
, s
)
22550 val NewAcceptingLeaves
= fin
::AcceptingLeaves
22551 in if l
= !yybl
then
22552 if trans
= #
trans(Vector.sub(Internal
.tab
,0))
22553 then action(l
,NewAcceptingLeaves
22554 ) else let val newchars
= if !yydone
then "" else yyinput
1024
22555 in if (String.size newchars
)=0
22556 then (yydone
:= true;
22557 if (l
=i0
) then UserDeclarations
.eof ()
22558 else action(l
,NewAcceptingLeaves
))
22559 else (if i0
=l
then yyb
:= newchars
22560 else yyb
:= String.substring(!yyb
,i0
,l
-i0
)^newchars
;
22561 yygone
:= !yygone
+i0
;
22562 yybl
:= String.size (!yyb
);
22563 scan (s
,AcceptingLeaves
,l
-i0
,0))
22565 else let val NewChar
= Char.ord(CharVector
.sub(!yyb
,l
))
22566 val NewState
= Char.ord(CharVector
.sub(trans
,NewChar
))
22567 in if NewState
=0 then action(l
,NewAcceptingLeaves
)
22568 else scan(NewState
,NewAcceptingLeaves
,l
+1,i0
)
22572 val start
= if String.substring(!yyb
,!yybufpos
-1,1)="\n"
22573 then !yybegin
+1 else !yybegin
22575 in scan(!yybegin (* start
*),nil
,!yybufpos
,!yybufpos
)
22581 (* stop
of Lexer
.lex
.sml
*)
22582 (* start
of PARSE
.sml
*)
22588 type source
= Source
.source
22589 type InfEnv
= Infix
.InfEnv
22590 type Program
= GrammarProgram
.Program
22595 val parse
: InfEnv
* source
-> InfEnv
* Program
22598 (* stop
of PARSE
.sml
*)
22599 (* start
of Parse
.sml
*)
22600 structure Parse
:> PARSE
=
22605 type source
= Source
.source
22606 type InfEnv
= Infix
.InfEnv
22607 type Program
= GrammarProgram
.Program
22610 (* Build Yacc parser
*)
22612 structure LrVals
= LrValsFn(structure Token
= LrParser
.Token
)
22613 structure Lexer
= LexerFn (structure Tokens
= LrVals
.Tokens
)
22614 structure Parser
= Join (structure LrParser
= LrParser
22615 structure ParserData
= LrVals
.ParserData
22616 structure Lex
= Lexer
)
22619 (* The actual parsing function
*)
22621 fun parse(J
, source
) =
22623 val yyread
= ref
false
22628 ( yyread
:= true; source
)
22630 val lexer
= Parser
.makeLexer yyinput
22632 fun onError(s
, pos1
, pos2
) = Error
.error((pos1
,pos2
), s
)
22634 val ((program
,J
'), lexer
') = Parser
.parse(0, lexer
, onError
, J
)
22640 (* stop
of Parse
.sml
*)
22641 (* start
of SML
.sml
*)
22643 * Standard ML implementation main
structure
22649 val parseString
: string -> unit (* Parse only
*)
22650 val elabString
: string -> unit (* Parse
and elaborate
*)
22651 val evalString
: string -> unit (* Parse
and evaluate
*)
22652 val execString
: string -> unit (* Parse
, elaborate
, and evaluate
*)
22654 val parseFile
: string -> unit
22655 val elabFile
: string -> unit
22656 val evalFile
: string -> unit
22657 val execFile
: string -> unit
22659 val parseFiles
: string -> unit
22660 val elabFiles
: string -> unit
22661 val evalFiles
: string -> unit
22662 val execFiles
: string -> unit
22664 val parseSession
: unit
-> unit
22665 val elabSession
: unit
-> unit
22666 val evalSession
: unit
-> unit
22667 val execSession
: unit
-> unit
22670 (* stop
of SML
.sml
*)
22671 (* start
of Sml
.sml
*)
22673 * Standard ML implementation main
structure
22676 structure Sml
:> SML
=
22679 (* Initial arguments
*)
22681 val J0
= InitialInfixEnv
.J0
22682 val B_STAT0
= InitialStaticBasis
.B0
22683 val B_DYN0
= InitialDynamicBasis
.B0
22684 val B0
= (B_STAT0
, B_DYN0
)
22685 val s0
= InitialDynamicBasis
.s
22690 fun parse J source
=
22692 val (J
',program
) = Parse
.parse(J
, source
)
22693 val _
= TextIO.output(TextIO.stdOut
, "OK\n")
22698 val parseInitialArg
= J0
22699 val parseInitial
= parse parseInitialArg
22702 (* Parsing
and elaboration
*)
22704 val elabInitialArg
= (J0
, B_STAT0
)
22706 fun elab (J
, B_STAT
) source
=
22708 val (J
',program
) = Parse
.parse(J
, source
)
22709 val B_STAT
' = Program
.elabProgram(B_STAT
, program
)
22715 (* Parsing
and evaluation
*)
22717 val evalInitialArg
= (J0
, B_DYN0
, s0
)
22719 fun eval (J
, B_DYN
, s
) source
=
22721 val (J
',program
) = Parse
.parse(J
, source
)
22723 val B_DYN
' = Program
.evalProgram(s
', B_DYN
, program
)
22729 (* Parsing
, elaboration
, and evaluation
*)
22731 val execInitialArg
= (J0
, B0
, s0
)
22733 fun exec (J
, B
, s
) source
=
22735 val (J
',program
) = Parse
.parse(J
, source
)
22737 val B
' = Program
.execProgram(s
', B
, program
)
22743 (* Processing
of strings
*)
22745 fun processString (process
, arg
) source
=
22746 ignore(process arg source
)
22747 handle Error
.Error _
=> () (* Syntax error
*)
22749 val parseString
= processString(parse
, parseInitialArg
)
22750 val elabString
= processString(elab
, elabInitialArg
)
22751 val evalString
= processString(eval
, evalInitialArg
)
22752 val execString
= processString(exec
, execInitialArg
)
22755 (* Processing
of files
*)
22757 fun processFile (process
, arg
) name
=
22759 val file
= TextIO.openIn name
22760 val source
= TextIO.inputAll file
22761 val _
= TextIO.closeIn file
22763 ignore(process arg source
)
22764 handle Error
.Error _
=> () (* Syntax error
*)
22767 val parseFile
= processFile(parse
, parseInitialArg
)
22768 val elabFile
= processFile(elab
, elabInitialArg
)
22769 val evalFile
= processFile(eval
, evalInitialArg
)
22770 val execFile
= processFile(exec
, execInitialArg
)
22773 (* Processing several files mentioned
in a list file
*)
22775 fun processFiles (process
, initialArg
) name
=
22777 val file
= TextIO.openIn name
22778 val content
= TextIO.inputAll file
22779 val _
= TextIO.closeIn file
22781 val _
= Stamp
.reset()
22783 fun loop(arg
, [] ) = ()
22784 |
loop(arg
, "" ::names
) = loop(arg
, names
)
22785 |
loop(arg
, name
::names
) =
22787 val file
= TextIO.openIn name
22788 val source
= TextIO.inputAll file
22789 val _
= TextIO.closeIn file
22790 val _
= TextIO.output(TextIO.stdOut
,
22791 ">> File \"" ^ name ^
"\":\n")
22793 loop(process arg source
, names
)
22794 handle Error
.Error _
=> (* Syntax error
*)
22798 loop(initialArg
, String.fields
Char.isSpace content
)
22801 val parseFiles
= processFiles(parse
, parseInitialArg
)
22802 val elabFiles
= processFiles(elab
, elabInitialArg
)
22803 val evalFiles
= processFiles(eval
, evalInitialArg
)
22804 val execFiles
= processFiles(exec
, execInitialArg
)
22809 fun processSession(process
, initialArg
) =
22814 val _
= TextIO.output(TextIO.stdOut
, "SML> ")
22815 val _
= TextIO.flushOut
TextIO.stdOut
22817 case TextIO.inputLine ins
of
22820 loop(process arg source
)
22821 handle Error
.Error _
=> (* Syntax error
*)
22828 fun parseSession() = processSession(parse
, parseInitialArg
)
22829 fun elabSession() = processSession(elab
, elabInitialArg
)
22830 fun evalSession() = processSession(eval
, evalInitialArg
)
22831 fun execSession() = processSession(exec
, execInitialArg
)
22834 (* stop
of Sml
.sml
*)
22835 (* start
of Main
.sml
*)
22837 * Standard ML implementation stand
-alone
22843 val version
= "0.5"
22846 ( TextIO.output(TextIO.stdErr
,
22847 "Usage: hamlet -<mode>\n\
22848 \where <mode> is one of:\n\
22849 \ h help: print this message\n\
22850 \ p parse mode: just parse input\n\
22851 \ l elab mode: parse and elaborate\n\
22852 \ v eval mode: parse and evaluate (no type checking!)\n\
22853 \ x exec mode: parse, elaborate, and evaluate\n"
22855 ; TextIO.flushOut
TextIO.stdErr
22856 ; OS
.Process
.failure
22859 fun start process
=
22860 ( TextIO.output(TextIO.stdOut
, "HaMLet " ^ version ^
22861 " - to be or not to be SML\n")
22862 ; TextIO.flushOut
TextIO.stdOut
22864 ; TextIO.output(TextIO.stdOut
, "\n")
22865 ; TextIO.flushOut
TextIO.stdOut
22866 ; OS
.Process
.success
22869 fun main
' ["-h"] = ( usage() ; OS
.Process
.success
)
22870 | main
' ["-p"] = start Sml
.parseSession
22871 | main
' ["-l"] = start Sml
.elabSession
22872 | main
' ["-v"] = start Sml
.evalSession
22873 | main
' ["-x"] = start Sml
.execSession
22874 | main
' _
= usage()
22876 fun main() = OS
.Process
.exit(main
'(CommandLine
.arguments()))
22879 (* stop
of Main
.sml
*)
22881 (* Here begins the simple test
case. *)
22893 val _
= ins
:= openIn
"DATA/hamlet-input.sml"
22894 val _
= Main
.main
' ["-x"]
22895 val _
= closeIn (!ins
)