| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
let worker_parse_extra opts extra_args = |
| 12 |
let stm_opts, extra_args = Stmargs.parse_args opts extra_args in |
| 13 |
((),stm_opts), extra_args |
| 14 |
|
| 15 |
let worker_init init ((),stm_opts) injections ~opts : Vernac.State.t = |
| 16 |
Flags.quiet := true; |
| 17 |
init (); |
| 18 |
Coqtop.init_toploop opts stm_opts injections |
| 19 |
|
| 20 |
let usage = Boot.Usage.{ |
| 21 |
executable_name = "rocqworker"; |
| 22 |
extra_args = ""; |
| 23 |
extra_options = ("\n" ^ "rocqworker" ^ " specific options:\ |
| 24 |
\n --xml_format=Ppcmds serialize pretty printing messages using the std_ppcmds format\n"); |
| 25 |
} |
| 26 |
|
| 27 |
let start ~init ~loop args = |
| 28 |
let open Coqtop in |
| 29 |
let custom = { |
| 30 |
parse_extra = worker_parse_extra; |
| 31 |
usage; |
| 32 |
initial_args = Coqargs.default; |
| 33 |
init_extra = worker_init init; |
| 34 |
run = (fun ((),_) ~opts:_ (_state : Vernac.State.t) -> |
| 35 |
|
| 36 |
loop ()); |
| 37 |
} in |
| 38 |
start_coq custom args |