1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859(* Yoann Padioleau
*
* Copyright (C) 2012 Facebook
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation, with the
* special exception on linking described in file license.txt.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file
* license.txt for more details.
*)(*****************************************************************************)(* Prelude *)(*****************************************************************************)(*
* history:
* - was in main_codestat.ml
*
* Example of project information:
* - http://www.gnu.org/manual/blurbs.html
*)(*****************************************************************************)(* Types *)(*****************************************************************************)typeinfo_txt=Outline.outline(* old: (string * string list) list *)(*****************************************************************************)(* IO *)(*****************************************************************************)letloadfile=Outline.parse_outlinefile(* old:
let xs =
Common.cat file
+> List.map (Str.global_replace (Str.regexp "#.*") "" )
+> List.map (Str.global_replace (Str.regexp "\\*+ -----.*") "" )
+> Common.exclude Common.is_blank_string
in
let xxs = Common.split_list_regexp "^\\*+ " xs in
xxs +> List.map (fun (s, body) ->
if s =~ "^\\*+ \\([^ ]+\\)[ \t]*$"
then
let dir = Common.matched1 s in
dir, body
else
failwith (spf "wrong format in %s, entry: %s" file s)
)
*)