let convert program =
(* Get rid of the end of file *)
let noeof = drop_eof program in
(* Indent in response to blocks *)
let indented = indenting_space noeof in
(* Collapse whitespace around braces *)
let despaced = despace_brace indented in
(* Get rid of trailing whitespace *)
let trimmed = trim_lines despaced in
(* Remove consequetive newlines *)
let squeezed = squeeze_lines trimmed in
(* Turn tokens into semantics *)
let lines = tokens_to_lines squeezed in
(* Consolidate those semantics *)
let merged = merge_lines lines in
(* Turn the semantics into blocks *)
let blocks = block_merge merged in
(* Put in the semicolons *)
let terminated = terminate_blocks blocks in
(* Turn the blocks into braces *)
let converted = space_to_brace terminated in
(* Put the eof on *)
append_eof converted