Commits

Anonymous committed 13e238c

retrait de fonctions inutiles

Comments (0)

Files changed (1)

   end
 ;;
 
-let rec tree_of_string s = 
-  let rec tree_of_string_aux i =
-    if (i >= String.length s)
-    then []
-    else begin
-      match (String.get s i) with
-	| 'S' ->
-	    if ((String.compare (String.sub s i 2) "S ") = 0 &&
-	    (String.compare (try (String.sub s (i+3) 1) with _ -> ";") ";") = 0)
-	    then (brack_of_char (String.get s (i+2)))::(tree_of_string_aux (i + 5))
-	    else raise Not_allowed
-	| 'B' -> 
-	    if ((String.compare (String.sub s i 8) "Branch [") = 0) 
-	    then (Branch (tree_of_string_branch (i+8) (calc_end_branch s (i+10) 1)))::(tree_of_string_aux ((calc_end_branch s (i+10) 1)+3))
-	    else raise Not_allowed
-	| _ -> raise Not_allowed
-    end
-  and tree_of_string_branch i e =
-    if (i >= e)
-    then []
-    else tree_of_string (String.sub s i (e-i))
-  in (tree_of_string_aux 0)
-;;
-
-let trim_extremeties s = 
-  if ((String.compare (try (String.sub s 0 5) with _ -> "") "Seq [") = 0)
-  then begin
-    if (s.[(String.length s)-1] = ']')
-    then String.sub s 5 ((String.length s)-6)
-    else s
-  end
-  else if ((String.compare (try (String.sub s 0 8) with _ -> "") "Branch [") = 0)
-  then begin
-    if (s.[(String.length s)-1] = ']')
-    then String.sub s 8 ((String.length s)-9)
-    else s
-  end
-  else if (s.[0] = '[')
-  then begin
-    if (s.[(String.length s)-1] = ']')
-    then String.sub s 1 ((String.length s)-2)
-    else s
-  end
-  else s
-;;
-
 let rec simpler_syntax s = 
   let rec subroutine i = 
     if (String.length s <= i)