Implement command line options, clean-up screen output.
[tatoo.git] / src / xpath / parser.ml
index ed5283e..7386577 100644 (file)
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-02-07 10:31:20 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-04-22 16:23:46 CEST by Kim Nguyen>
 *)
 
 include Xpath_internal_parser
 
 let parse (l : Ulexing.lexbuf) =
-  xpath_query (fun _ -> Ulexer.token l) (Lexing.from_string "!!dummy!!")
+  try
+    xpath_query (fun _ -> Ulexer.token l) (Lexing.from_string "!!dummy!!")
+  with
+    Parsing.Parse_error ->
+      Ulexer.error (Ulexing.lexeme_start l) (Ulexing.lexeme_end l) "syntax error"