src/Pure/section_utils.ML
changeset 6039 01f67f5f8dd0
parent 4938 c8bbbf3c59fa
child 6390 5d58c100ca3f
     1.1 --- a/src/Pure/section_utils.ML	Mon Dec 28 16:47:47 1998 +0100
     1.2 +++ b/src/Pure/section_utils.ML	Mon Dec 28 16:48:22 1998 +0100
     1.3 @@ -40,21 +40,3 @@
     1.4      |> #1;
     1.5  
     1.6  fun is_backslash c = c = "\\";
     1.7 -
     1.8 -(*Apply string escapes to a quoted string; see Def of Standard ML, page 3
     1.9 -  Does not handle the \ddd form;  no error checking*)
    1.10 -fun escape [] = []
    1.11 -  | escape cs = (case take_prefix (not o is_backslash) cs of
    1.12 -	 (front, []) => front
    1.13 -       | (front, _::"n"::rest) => front @ ("\n" :: escape rest)
    1.14 -       | (front, _::"t"::rest) => front @ ("\t" :: escape rest)
    1.15 -       | (front, _::"^"::c::rest) => front @ (chr(ord(c)-64) :: escape rest)
    1.16 -       | (front, _::"\""::rest) => front @ ("\"" :: escape rest)
    1.17 -       | (front, _::"\\"::rest) => front @ ("\\" :: escape rest)
    1.18 -       | (front, b::c::rest) => 
    1.19 -	   if Symbol.is_blank c   (*remove any further blanks and the following \ *)
    1.20 -	   then front @ escape (tl (snd (take_prefix Symbol.is_blank rest)))
    1.21 -	   else error ("Unrecognized string escape: " ^ implode(b::c::rest)));
    1.22 -
    1.23 -(*Remove the first and last charaters -- presumed to be quotes*)
    1.24 -val trim = implode o escape o rev o tl o rev o tl o Symbol.explode;