Fix a bug in the parser where a leading '//' would be parsed incorectly.
authorKim Nguyễn <kn@lri.fr>
Sat, 9 Mar 2013 16:19:23 +0000 (17:19 +0100)
committerKim Nguyễn <kn@lri.fr>
Sat, 9 Mar 2013 16:19:23 +0000 (17:19 +0100)
src/xpath/xpath_internal_parser.mly

index a05beb2..de63cdf 100644 (file)
@@ -15,7 +15,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-02-14 14:18:34 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-09 16:56:45 CET by Kim Nguyen>
 *)
 
   open Ast
@@ -68,7 +68,7 @@ simple_path:
 
 absolute_path:
   SLASH relative_path { $2 }
-| SLASHSLASH relative_path { (Descendant true, node, []) :: $2 }
+| SLASHSLASH relative_path { $2 @ [(Descendant true, node, [])] }
 ;
 
 relative_path: