diff options
| author | ppedrot | 2011-11-06 00:15:44 +0000 |
|---|---|---|
| committer | ppedrot | 2011-11-06 00:15:44 +0000 |
| commit | 4e1de854561f20e2069df271ed6f240fc521e680 (patch) | |
| tree | 27c33f69d8f4391bf30a843c574cce507a3ee918 /tools | |
| parent | 208730e526df9471781e70a3b57d5dd211159ba6 (diff) | |
Also sprach CoqIDE (in XML)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14637 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/fake_ide.ml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/fake_ide.ml b/tools/fake_ide.ml index 50e56d8468..6ae5f7ea70 100644 --- a/tools/fake_ide.ml +++ b/tools/fake_ide.ml @@ -12,10 +12,16 @@ exception Comment let coqtop = ref (stdin, stdout) +let p = Xml_parser.make () +let () = Xml_parser.check_eof p false + let eval_call (call:'a Ide_intf.call) = prerr_endline (Ide_intf.pr_call call); - Marshal.to_channel (snd !coqtop) call []; flush (snd !coqtop); - let res = ((Marshal.from_channel (fst !coqtop)) : 'a Ide_intf.value) in + let xml_query = Ide_intf.of_call call in + Xml_utils.print_xml (snd !coqtop) xml_query; + flush (snd !coqtop); + let xml_answer = Xml_parser.parse p (Xml_parser.SChannel (fst !coqtop)) in + let res = Ide_intf.to_answer xml_answer in prerr_endline (Ide_intf.pr_full_value call res); match res with Ide_intf.Fail _ -> exit 1 | _ -> () |
