type rule_id = Grammar.token Gramext.g_symbol list
+let compare_rule_id x y =
+ let rec aux = function
+ | [],[] -> 0
+ | [],_ -> ~-1
+ | _,[] -> 1
+ | ((s1::tl1) as x),((s2::tl2) as y) ->
+ if Gramext.eq_symbol s1 s2 then aux (tl1,tl2)
+ else Pervasives.compare x y
+ in
+ aux (x,y)
+
(* mapping: rule_id -> owned keywords. (rule_id, string list) Hashtbl.t *)
let owned_keywords = Hashtbl.create 23