if !preprocess then process_input f st entity else f st entity
let process_nostreaming st lexbuf input =
+ let id x = x in
let rec aux1 book = match entity_of_input lexbuf input with
| NoEntity -> List.rev book
- | e -> aux1 (e :: book)
+ | e -> aux1 (id e :: book)
in
let rec aux2 st = function
| [] -> st
in
aux2 st (aux1 [])
-let rec process_streaming st lexbuf input = match entity_of_input lexbuf input with
- | NoEntity -> st
- | e -> process_streaming (process_0 st e) lexbuf input
+let process_streaming st lexbuf input =
+ let rec aux st = match entity_of_input lexbuf input with
+ | NoEntity -> st
+ | e -> aux (process_0 st e)
+ in
+ aux st
(****************************************************************************)
let main =
try
- let version_string = "Helena 0.8.1 M - August 2010" in
+ let version_string = "Helena 0.8.1 M - October 2010" in
let print_version () = L.warn (version_string ^ "\n"); exit 0 in
let set_hierarchy s =
if H.set_graph s then () else
flush_all ()
in
let help =
- "Usage: helena [ -LPVXcgijmopqu1 | -Ss <number> | -x <dir> | -hkr <string> ]* [ <file> ]*\n\n" ^
+ "Usage: helena [ -LPVXcgijopqu1 | -Ss <number> | -x <dir> | -hkr <string> ]* [ <file> ]*\n\n" ^
"Summary levels: 0 just errors (default), 1 time stamps, 2 processed file names, \
3 data information, 4 typing information, 5 reduction information\n\n" ^
"Stages: 0 parsing, 1 to intermediate, 2 to untrusted, 3 to trusted (default)\n"