8 Main.with_file filename
Main.parse_sql
11 Error.log
"SQL to C++ Code Generator Version %s" Config.version
;
13 Error.log
" Usage: %s file_with_statements.sql" (Filename.basename
Sys.executable_name
);
15 Error.log
" Parse given file (treating content as SQL statements) and emit corresponding code to stdout"
18 match Array.to_list
Sys.argv
with
19 | _
::"-test"::_
-> Test.run
()
20 | _
::"-version"::_
-> print_endline
Config.version
21 | _
::"-"::_
-> Main.parse_sql
(Std.input_all stdin
)
22 | _
::file
::_
-> work file
25 let _ = Printexc.print
main ()