function argparse()
local result = { }
local files = { }
local long_options = {
engine = "engine",
["halt-on-error"] = "halt" ,
["halt-on-failure"] = "halt" ,
help = "help"
}
local short_options = {
e = "engine",
h = "help" ,
H = "halt"
}
local option_args = {
engine = true ,
halt = false,
help = false
}
-- arg[1] is a special case: must be a command or "-h"/"--help"
-- Deal with this by assuming help and storing only apparently-valid