git-svn-id: https://projects.brucker.ch/su4sml/svn/su4sml/trunk@7538 3260e6d1-4efc-4170-b0a7-36055960796d

This commit is contained in:
Manuel Krucker 2008-03-27 18:54:30 +00:00
parent 3ef49811e0
commit 2e66cc3501
7 changed files with 17 additions and 27 deletions

View File

@ -64,7 +64,7 @@ fun eval verbose txt =
if verbose then print (output ()) else ()
end
in
eval_fh (fn s => print (s^"\n"), fn s => library.error s) verbose txt
eval_fh (fn s => print (s^"\n"), fn s => Rep_Logger.error s) verbose txt
end
fun exnHistory e = SMLofNJ.exnHistory e

View File

@ -44,8 +44,10 @@ sig
val init_offset : unit -> unit
val error : string -> 'a
val error_msg : string -> unit
val print_stderr : TextIO.vector -> unit
val warn : string -> unit
val info : string -> unit
val log_level : int ref
val line_offset : int ref
@ -67,11 +69,13 @@ sig
val low : int
val development : int
val su4sml_home : unit -> string
end
structure Rep_Logger:REP_LOGGER =
struct
infix |>
fun (x |> f) = f x;
(* minimal tracing support (modifed version of ocl_parser tracing *)
@ -206,10 +210,6 @@ fun ap_some f (SOME x) = SOME(f x)
fun separate s (x :: (xs as _ :: _)) = x :: s :: separate s xs
| separate _ xs = xs;
(* fun suffix sfx s = s ^ sfx;*)
fun take (n, []) = []
| take (n, x :: xs) =
if n > 0 then x :: take (n - 1, xs) else [];
fun space_implode a bs = implode (separate a bs);
@ -230,15 +230,6 @@ fun error_msg s = print (s^"\n")
(** output an error message and Fail *)
fun error s = (print (s^"\n"); raise Fail s)
fun fst (x, y) = x
fun snd (x, y) = y
fun join s nil = ""
| join s (h::nil) = h
| join s (h::t) = h^s^(join s t)
fun uncurry f (x,y) = f x y
fun curry f x y = f (x,y)

View File

@ -119,7 +119,9 @@ end
structure Rep_OclType : REP_OCL_TYPE =
struct
open Rep_Help_Functions
open Rep_Logger
type Path = string list
@ -130,11 +132,6 @@ datatype OclType = Integer | Real | String | Boolean | OclAny
| Classifier of Path
| TemplateParameter of string
fun foldr1 f l =
let fun itr [x] = x
| itr (x::l) = f(x, itr l)
in itr l end;
(** Convert Path to a string using given separator *)
fun path_to_string (path:Path) separator = case path of

View File

@ -67,7 +67,8 @@ end
*)
functor SecureUML(structure Design: DESIGN_LANGUAGE):SECUREUML =
struct
open library
open Rep_Help_Functions
open Rep_Logger
structure Design : DESIGN_LANGUAGE = Design
type User = string

View File

@ -43,7 +43,8 @@ structure XmiParser : sig
val readFile: string -> XMI.XmiContent
end =
struct
open library
open Rep_Help_Functions
open Rep_Logger
open XmlTree
open XmlTreeHelper

View File

@ -57,7 +57,7 @@ structure XmlTree : sig
val value_of : string -> Attribute list -> string
val has_attribute : string -> Tree -> bool
end = struct
open library
open Rep_Logger
infix 1 |>
(** A name-value pair. *)

View File

@ -43,8 +43,8 @@ structure XmlTreeParser : sig
val readFile : string -> XmlTree.Tree
end =
struct
open Rep_Logger
open XmlTree
open library
exception FileNotFound of string
structure Parser = Parse (structure Dtd = Dtd