ProdSet
Module
signature PROD_SET
structure ProdSet
:> PROD_SET
This module provides operations on finite sets of productions, i.e., values of type
that are standard in the sense that they are compatible with Prod
.prod
Set
.set
Prod
.compare
. All values of type Prod.prod Set.set
will implicitly be assumed/required to be standard.
val memb : Prod.prod * Prod.prod Set.set -> bool
val fromList : Prod.prod list -> Prod.prod Set.set
val compare : Prod.prod Set.set Sort.total_ordering
val subset : Prod.prod Set.set * Prod.prod Set.set -> bool
val equal : Prod.prod Set.set * Prod.prod Set.set -> bool
val map : ('a -> Prod.prod) -> 'a Set.set -> Prod.prod Set.set
val mapFromList : ('a -> Prod.prod) -> 'a list -> Prod.prod Set.set
val union : Prod.prod Set.set * Prod.prod Set.set -> Prod.prod Set.set
val genUnion : Prod.prod Set.set list -> Prod.prod Set.set
val inter : Prod.prod Set.set * Prod.prod Set.set -> Prod.prod Set.set
val genInter : Prod.prod Set.set list -> Prod.prod Set.set
val minus : Prod.prod Set.set * Prod.prod Set.set -> Prod.prod Set.set
val inputFromLabToks : (int * Lex.tok) list -> Prod.prod Set.set * (int * Lex.tok) list
val fromString : string -> Prod.prod Set.set
val input : string -> Prod.prod Set.set
val toPP : Prod.prod Set.set -> PP.pp
val toString : Prod.prod Set.set -> string
val output : string * Prod.prod Set.set -> unit
memb(prod, prods)
prod
is a member of prods
.
fromList prods
prods
.
compare
Set
.compare
Prod
.compare
.
subset(prod1s, prod2s)
prod1s
is a subset of prod2s
.
equal(prod1s, prod2s)
prod1s
is equal to prod2s
.
map f xs
xs
is compatible with a value cmp
of type 'a Sort.total_ordering
, then map
returns the set of all productions f x
such that x
is a member of xs
.
mapFromList f xs
f x
such that x
is a member of xs
.
union(prod1s, prod2s)
prod1s
and prod2s
.
genUnion prodss
prodss
.
inter(prod1s, prod2s)
prod1s
and prod2s
.
genInter prodss
prodss
. Issues an error message if prodss
is empty.
minus(prod1s, prod2s)
prod1s
and prod2s
.
inputFromLabToks lts
lts
, consuming as much of lts
as possible, and returning the pair of the set of productions and the rest of lts
. Issues an error message if it fails. Will only return the empty set if lts
doesn't begin with a symbol. If, after reading a production, the next element of the labeled token list is ","
(Lex
.Comma
), then inputFromLabToks
insists on reading another production, even if this results in failure.
fromString s
s
.
input fil
fil
.
toPP prods
prods
.
toString prods
prods
to a string.
output(fil, prods)
prods
to file fil
.
Forlan Version 4.15
Copyright © 2022 Alley Stoughton