fixed some things
This commit is contained in:
parent
65a8580522
commit
bce11572ef
10
main.ml
10
main.ml
|
@ -1,5 +1,6 @@
|
||||||
let __prefixes__ = [|"let"; "rec"; "and"|] ;;
|
let __prefixes__ = [|"let"; "rec"; "and"; "for"; "mutable"|] ;;
|
||||||
let __keywords__ = [|"let"; "while"; "do"; "done"; "for"; "to"; "begin"; "end"; "try"; "with"; "raise"; "in"|]
|
let __keywords__ = [|"let"; "while"; "do"; "done"; "for"; "to"; "begin"; "end"; "try"; "with"; "raise"; "in"|] ;;
|
||||||
|
let fbd = [|' '; '\n'; '('; ')'; '['; ']'; '{'; '}'; ';'; ','; '.'; ':'; '*'; '|'; '-'; '+'; '*'; '/'; '='; '<'; '>'; '!'|] ;;
|
||||||
|
|
||||||
let concat_str (str : string ref) nstr =
|
let concat_str (str : string ref) nstr =
|
||||||
let n = String.length nstr in
|
let n = String.length nstr in
|
||||||
|
@ -30,7 +31,6 @@ let parse_the_whole_thing filename =
|
||||||
let is_an_integer ch =
|
let is_an_integer ch =
|
||||||
Char.code ch >= 48 && Char.code ch <= 57 ;;
|
Char.code ch >= 48 && Char.code ch <= 57 ;;
|
||||||
|
|
||||||
let fbd = [|' '; '\n'; '('; ')'; '['; ']'; '{'; '}'; ';'; ','; '.'; ':'; '*'; '|'; '-'; '+'; '='; '<'; '>'; '!'|] ;;
|
|
||||||
let to_list str =
|
let to_list str =
|
||||||
let n = String.length str in
|
let n = String.length str in
|
||||||
let rec aux acc i = match i with
|
let rec aux acc i = match i with
|
||||||
|
@ -146,11 +146,11 @@ let convert filename ext =
|
||||||
let whole = parse_the_whole_thing (filename^"."^ext) in
|
let whole = parse_the_whole_thing (filename^"."^ext) in
|
||||||
(*Printf.printf "%s" whole ;*)
|
(*Printf.printf "%s" whole ;*)
|
||||||
let words = to_list whole in
|
let words = to_list whole in
|
||||||
(*print_to_list words ;*)
|
print_to_list words ;
|
||||||
let fnames = detect_names words in
|
let fnames = detect_names words in
|
||||||
(*print_to_list fnames ;*)
|
(*print_to_list fnames ;*)
|
||||||
let conversion_hash = generate_conversion_hash fnames in
|
let conversion_hash = generate_conversion_hash fnames in
|
||||||
Hashtbl.iter (fun k v -> Printf.printf "%s ----> %s\n" k v) conversion_hash ;
|
(*Hashtbl.iter (fun k v -> Printf.printf "%s ----> %s\n" k v) conversion_hash ;*)
|
||||||
write_out filename whole ext fnames conversion_hash ;;
|
write_out filename whole ext fnames conversion_hash ;;
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Loading…
Reference in New Issue