projects
/
SXSI
/
xpathcomp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f21bce6
)
Add grammar loading and indexing.
author
Kim Nguyễn
<kn@lri.fr>
Wed, 22 Feb 2012 09:17:10 +0000
(10:17 +0100)
committer
Kim Nguyễn
<kn@lri.fr>
Wed, 22 Feb 2012 09:17:10 +0000
(10:17 +0100)
src/main.ml
patch
|
blob
|
history
diff --git
a/src/main.ml
b/src/main.ml
index
b364275
..
bfbdff9
100644
(file)
--- a/
src/main.ml
+++ b/
src/main.ml
@@
-13,10
+13,10
@@
let () = init_timer();;
let default_gc = Gc.get()
let tuned_gc = { default_gc with
let default_gc = Gc.get()
let tuned_gc = { default_gc with
-
Gc.minor_heap_size = 32*1024*1024;
- Gc.major_heap_increment = 8*1024*1024;
-
Gc.max_overhead = 1000000;
-
Gc.space_overhead = 100;
+ Gc.minor_heap_size = 32*1024*1024;
+ Gc.major_heap_increment = 8*1024*1024;
+ Gc.max_overhead = 1000000;
+ Gc.space_overhead = 100;
}
let mk_runtime run auto doc arg count print outfile =
}
let mk_runtime run auto doc arg count print outfile =
@@
-91,7
+91,14
@@
let () = Options.parse_cmdline()
;;
let document =
;;
let document =
- if Filename.check_suffix !Options.input_file ".g.bin" then
+ if Filename.check_suffix !Options.input_file ".g" then
+ let g = Grammar2.parse !Options.input_file in
+ let () = Grammar2.save g "/tmp/test.g" in
+ let g = Grammar2.load "/tmp/test.g" in
+ ignore g;
+ exit 3
+
+ else if Filename.check_suffix !Options.input_file ".g.bin" then
let g = time ~msg:"Loading grammar" (Grammar.load !Options.input_file) true in
begin
(* Todo Factorise with main *)
let g = time ~msg:"Loading grammar" (Grammar.load !Options.input_file) true in
begin
(* Todo Factorise with main *)