Remove the timestamp header in source files. This information is
[tatoo.git] / src / xpath / parser.ml
index ed5283e..ba99fed 100644 (file)
 (*                                                                     *)
 (***********************************************************************)
 
-(*
-  Time-stamp: <Last modified on 2013-02-07 10:31:20 CET 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"