Commit d38b0769 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2002-10-25 19:16:26 by cvscast] Empty log message

Original author: cvscast
Date: 2002-10-25 19:16:27+00:00
parent ba33b148
This diff is collapsed.
...@@ -36,7 +36,14 @@ val filter : Types.descr -> node -> (capture,Types.node) SortedMap.t ...@@ -36,7 +36,14 @@ val filter : Types.descr -> node -> (capture,Types.node) SortedMap.t
module NF : sig module NF : sig
type nf type nf
type normal
val nf : descr -> nf val nf : descr -> nf
val normal : nf -> normal
module Disp : sig
val show : Format.formatter -> Types.descr -> normal array -> unit
end
(*
val show : Format.formatter -> Types.descr -> nf list -> unit val show : Format.formatter -> Types.descr -> nf list -> unit
val get : int -> Types.descr * nf list val get : int -> Types.descr * normal list
*)
end end
...@@ -572,6 +572,13 @@ let normalize n = ...@@ -572,6 +572,13 @@ let normalize n =
module Print = module Print =
struct struct
let print_atom ppf a = Format.fprintf ppf "`%s" (atom_name a)
let print_const ppf = function
| Integer i -> Format.fprintf ppf "%s" (Big_int.string_of_big_int i)
| Atom a -> print_atom ppf a
| Char c -> Chars.Unichar.print ppf c
let named = DescrHash.create 10 let named = DescrHash.create 10
let register_global name d = DescrHash.add named d name let register_global name d = DescrHash.add named d name
...@@ -613,7 +620,6 @@ struct ...@@ -613,7 +620,6 @@ struct
| [h] -> h ppf | [h] -> h ppf
| h::t -> Format.fprintf ppf "@[%t |@ %a@]" h print_union t | h::t -> Format.fprintf ppf "@[%t |@ %a@]" h print_union t
let print_atom ppf a = Format.fprintf ppf "`%s" (atom_name a)
let rec print ppf n = print_descr ppf (descr n) let rec print ppf n = print_descr ppf (descr n)
and print_descr ppf d = and print_descr ppf d =
......
...@@ -179,6 +179,7 @@ end ...@@ -179,6 +179,7 @@ end
module Print : module Print :
sig sig
val register_global : string -> descr -> unit val register_global : string -> descr -> unit
val print_const : Format.formatter -> const -> unit
val print : Format.formatter -> node -> unit val print : Format.formatter -> node -> unit
val print_descr: Format.formatter -> descr -> unit val print_descr: Format.formatter -> descr -> unit
val print_sample : Format.formatter -> Sample.t -> unit val print_sample : Format.formatter -> Sample.t -> unit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment