Preliminary support for the grammar.
[SXSI/xpathcomp.git] / src / main.ml
index 8c7c81f..cd3d275 100644 (file)
@@ -91,7 +91,13 @@ let () = Options.parse_cmdline()
 ;;
 
 let document =
-  if Filename.check_suffix !Options.input_file ".srx"
+  if Filename.check_suffix !Options.input_file ".g.bin" then
+    let g = time ~msg:"Loading grammar" (Grammar.load !Options.input_file) true in
+    begin
+      ignore(g);
+      exit 0
+    end
+  else if Filename.check_suffix !Options.input_file ".srx"
   then
     time
       ~msg:"Loading file"