diff -ru dypgen-orig/demos/demo/demo.ml dypgen/demos/demo/demo.ml --- demos/demo/demo.ml 2026-05-29 06:21:51 +++ demos/demo/demo.ml 2026-05-29 06:21:51 @@ -12,7 +12,7 @@ exit 0) let input_file = !string_ref -let lexbuf = Dyp.from_channel (Parser.pp ()) (Pervasives.open_in input_file) +let lexbuf = Dyp.from_channel (Parser.pp ()) (Stdlib.open_in input_file) let prog = fst (List.hd (Parser.main lexbuf)) let s = str_expr prog diff -ru dypgen-orig/demos/demo_ocamllex/demo.ml dypgen/demos/demo_ocamllex/demo.ml --- demos/demo_ocamllex/demo.ml 2026-05-29 06:21:51 +++ demos/demo_ocamllex/demo.ml 2026-05-29 06:21:51 @@ -12,7 +12,7 @@ exit 0) let input_file = !string_ref -let lexbuf = Lexing.from_channel (Pervasives.open_in input_file) +let lexbuf = Lexing.from_channel (Stdlib.open_in input_file) let prog = fst (List.hd (Parser.main Lexer.token lexbuf)) let s = str_expr prog diff -ru dypgen-orig/demos/demo_ocamllex/parse_tree.ml dypgen/demos/demo_ocamllex/parse_tree.ml --- demos/demo_ocamllex/parse_tree.ml 2026-05-29 06:21:51 +++ demos/demo_ocamllex/parse_tree.ml 2026-05-29 06:21:51 @@ -22,7 +22,7 @@ module Ordered_string = struct type t = string - let compare = Pervasives.compare + let compare = Stdlib.compare end module String_map = Map.Make(Ordered_string) diff -ru dypgen-orig/demos/position/position.ml dypgen/demos/position/position.ml --- demos/position/position.ml 2026-05-29 06:21:51 +++ demos/position/position.ml 2026-05-29 06:21:51 @@ -4,7 +4,7 @@ let input_file = "input" let lexbuf = Dyp.from_channel - (Position_parser.pp ()) (Pervasives.open_in input_file) + (Position_parser.pp ()) (Stdlib.open_in input_file) let std_lb = Dyp.std_lexbuf lexbuf let _ = std_lb.lex_curr_p <- diff -ru dypgen-orig/demos/position_ocamllex/position.ml dypgen/demos/position_ocamllex/position.ml --- demos/position_ocamllex/position.ml 2026-05-29 06:21:51 +++ demos/position_ocamllex/position.ml 2026-05-29 06:21:51 @@ -5,7 +5,7 @@ let input_file = "input" -let lexbuf = Lexing.from_channel (Pervasives.open_in input_file) +let lexbuf = Lexing.from_channel (Stdlib.open_in input_file) let _ = lexbuf.lex_curr_p <- { lexbuf.lex_curr_p with pos_fname = input_file } let pf = Position_parser.main Position_lexer.token lexbuf diff -ru dypgen-orig/demos/position_token_list/position.ml dypgen/demos/position_token_list/position.ml --- demos/position_token_list/position.ml 2026-05-29 06:21:51 +++ demos/position_token_list/position.ml 2026-05-29 06:21:51 @@ -5,7 +5,7 @@ let input_file = "input" -let lexbuf = Lexing.from_channel (Pervasives.open_in input_file) +let lexbuf = Lexing.from_channel (Stdlib.open_in input_file) let _ = lexbuf.lex_curr_p <- { lexbuf.lex_curr_p with pos_fname = input_file } let lexfun = Position_lexer.token diff -ru dypgen-orig/demos/tinyML/parse_tree.ml dypgen/demos/tinyML/parse_tree.ml --- demos/tinyML/parse_tree.ml 2026-05-29 06:21:51 +++ demos/tinyML/parse_tree.ml 2026-05-29 06:21:51 @@ -61,7 +61,7 @@ module Ordered_string = struct type t = string - let compare = Pervasives.compare + let compare = Stdlib.compare end module String_map = Map.Make(Ordered_string) @@ -113,7 +113,7 @@ module Ordered_op = struct type t = string - let compare = Pervasives.compare + let compare = Stdlib.compare end module Op_map = Map.Make(Ordered_op) diff -ru dypgen-orig/demos/tinyML/tinyML.ml dypgen/demos/tinyML/tinyML.ml --- demos/tinyML/tinyML.ml 2026-05-29 06:21:51 +++ demos/tinyML/tinyML.ml 2026-05-29 06:21:51 @@ -3,7 +3,7 @@ open Dyp let input_file_name = !(Argument.string_ref) -let input_file = Pervasives.open_in input_file_name +let input_file = Stdlib.open_in input_file_name let pp, se_code = let (pp:(unit, diff -ru dypgen-orig/demos/tinyML_ulex/parse_tree.ml dypgen/demos/tinyML_ulex/parse_tree.ml --- demos/tinyML_ulex/parse_tree.ml 2026-05-29 06:21:51 +++ demos/tinyML_ulex/parse_tree.ml 2026-05-29 06:21:51 @@ -42,7 +42,7 @@ module Ordered_string = struct type t = string - let compare = Pervasives.compare + let compare = Stdlib.compare end module String_map = Map.Make(Ordered_string) diff -ru dypgen-orig/demos/tinyML_ulex/tinyML.ml dypgen/demos/tinyML_ulex/tinyML.ml --- demos/tinyML_ulex/tinyML.ml 2026-05-29 06:21:51 +++ demos/tinyML_ulex/tinyML.ml 2026-05-29 06:21:51 @@ -4,7 +4,7 @@ let input_file = !(Argument.string_ref) -let lexbuf = Ulexing.from_utf8_channel (Pervasives.open_in input_file) +let lexbuf = Ulexing.from_utf8_channel (Stdlib.open_in input_file) let pf = TinyML_parser.main TinyML_lexer.token lexbuf let prog = fst (List.hd pf) diff -ru dypgen-orig/dypgen/dypgen.ml dypgen/dypgen/dypgen.ml --- dypgen/dypgen.ml 2026-05-29 06:21:51 +++ dypgen/dypgen.ml 2026-05-29 06:21:51 @@ -26,7 +26,7 @@ let output_file_mli = input_file_short^".mli" -let lexbuf = Lexing.from_channel (Pervasives.open_in input_file) +let lexbuf = Lexing.from_channel (Stdlib.open_in input_file) let () = lexbuf.lex_curr_p <- { lexbuf.lex_curr_p with pos_fname = input_file }; lexbuf.lex_start_p <- { lexbuf.lex_start_p with pos_fname = input_file } @@ -651,7 +651,7 @@ module Ordered_str2 = struct type t = string * string - let compare = Pervasives.compare + let compare = Stdlib.compare end module Str2_map = Map.Make(Ordered_str2) diff -ru dypgen-orig/dypgen/dypgen_parser.ml dypgen/dypgen/dypgen_parser.ml --- dypgen/dypgen_parser.ml 2026-05-29 06:21:51 +++ dypgen/dypgen_parser.ml 2026-05-29 06:21:51 @@ -784,7 +784,7 @@ module Ordered_string = struct type t = string - let compare = Pervasives.compare + let compare = Stdlib.compare end module String_set = Set.Make(Ordered_string) diff -ru dypgen-orig/dyplib/automaton.ml dypgen/dyplib/automaton.ml --- dyplib/automaton.ml 2026-05-29 06:21:51 +++ dyplib/automaton.ml 2026-05-29 06:21:51 @@ -55,7 +55,7 @@ module Ordered_non_ter = struct type t = non_ter - let compare = Pervasives.compare + let compare = Stdlib.compare end module Nt_map = Map.Make(Ordered_non_ter) @@ -75,7 +75,7 @@ module Ordered_int = struct type t = int - let compare = Pervasives.compare + let compare = Stdlib.compare end module Int_set = Set.Make(Ordered_int) module Int_map = Map.Make(Ordered_int) @@ -97,7 +97,7 @@ (* the int tells whether the rule allows layout characters inside or afterwards (see rule options) *) let compare l1 l2 = - Pervasives.compare l1 l2 + Stdlib.compare l1 l2 end module Map_rhs = Map.Make (Ordered_rhs) @@ -108,21 +108,21 @@ module Ordered_items = struct type t = item - let compare = Pervasives.compare + let compare = Stdlib.compare end module Item_map = Map.Make(Ordered_items) module Ordered_token_name = struct type t = token_name - let compare = Pervasives.compare + let compare = Stdlib.compare end module TNS = Set.Make (Ordered_token_name) module Ordered_intc = struct type t = int * int - let compare = Pervasives.compare + let compare = Stdlib.compare end module Intc_map = Map.Make(Ordered_intc) module Intc_set = Set.Make(Ordered_intc) @@ -130,7 +130,7 @@ module Ordered_predict = struct type t = (non_ter * (priority nt_prio)) - let compare = Pervasives.compare + let compare = Stdlib.compare end module Predict = Set.Make(Ordered_predict) @@ -196,7 +196,7 @@ if c<>0 then c else let c = Intc_set.compare is1.kernel_nt is2.kernel_nt in if c<>0 then c else - let c = Pervasives.compare is1.non_kernel is2.non_kernel in + let c = Stdlib.compare is1.non_kernel is2.non_kernel in if c<>0 then c else Predict.compare is1.predict is2.predict let soc c = Char.escaped c @@ -300,7 +300,7 @@ module Ordered_ntp = struct type t = priority nt_prio - let compare = Pervasives.compare + let compare = Stdlib.compare end module Ntp_map = Map.Make(Ordered_ntp) @@ -322,7 +322,7 @@ module Ordered_lit_trans= struct type t = lit_trans - let compare = Pervasives.compare + let compare = Stdlib.compare end module Map_lit_trans = Map.Make(Ordered_lit_trans) @@ -338,7 +338,7 @@ let c = Intc_set.compare is1.kernel_nt is2.kernel_nt in if c<>0 then c else Intc_set.compare is1.kernel_t is2.kernel_t - (*else Pervasives.compare + (*else Stdlib.compare (is1.reducible,is1.kernel_nt,is1.kernel_t) (is2.reducible,is2.kernel_nt,is2.kernel_t)*) end @@ -359,7 +359,7 @@ module Ordered_States = struct type t = state - let compare s1 s2 = Pervasives.compare s1.number s2.number + let compare s1 s2 = Stdlib.compare s1.number s2.number (*compare_is s1.items s2.items*) end module State_set = Set.Make(Ordered_States) diff -ru dypgen-orig/dyplib/dyp.ml dypgen/dyplib/dyp.ml --- dyplib/dyp.ml 2026-05-29 06:21:51 +++ dyplib/dyp.ml 2026-05-29 06:21:51 @@ -91,7 +91,7 @@ module Ordered_urule = struct type t = nrule - let compare = Pervasives.compare + let compare = Stdlib.compare end module Urule_map = Map.Make(Ordered_urule) @@ -355,7 +355,7 @@ module Ordered_nrule = struct type t = nrule - let compare = Pervasives.compare + let compare = Stdlib.compare end module RS = Set.Make (Ordered_nrule) @@ -933,7 +933,7 @@ type t = (non_ter * priority) * rhs * int (* the int tells whether the rule allows layout characters inside or afterwards *) - let compare = Pervasives.compare + let compare = Stdlib.compare end module Rule_map = Map.Make(Ordered_rule) @@ -2012,7 +2012,7 @@ module Ordered_edge = struct type t = lit_trans * priority - let compare = Pervasives.compare + let compare = Stdlib.compare end module Edge_map = Map.Make(Ordered_edge) @@ -2391,7 +2391,7 @@ with Not_found -> let new_lhslist = comp_lhslist (nt,ntp) lhslists priodata array_nt_prio in - let new_lhslist = List.sort Pervasives.compare new_lhslist in + let new_lhslist = List.sort Stdlib.compare new_lhslist in try let old_nt = make_old_nt nt ntp pdev priodata str_non_ter in let old_lhslist = @@ -2402,7 +2402,7 @@ nt_of_ind.(i),prio_of_ind.(i),i) old_lhslist in - let old_lhslist = List.sort Pervasives.compare old_lhslist in + let old_lhslist = List.sort Stdlib.compare old_lhslist in let l = diff_list new_lhslist old_lhslist [] in let prio_l = List.map (fun (_,p,_) -> p) l in (*Printf.fprintf !log_channel "diff_lhslist res = "; @@ -3295,9 +3295,9 @@ | None -> assert false in if rel then 1 else - let c = Pervasives.compare (ind,rhs) (ind1,rhs1) in + let c = Stdlib.compare (ind,rhs) (ind1,rhs1) in if c<>0 then c else - let c = Pervasives.compare start_node.sn_nb + let c = Stdlib.compare start_node.sn_nb start1.sn_nb in if c<>0 then c else let rec aux l1 l2 = match l1,l2 with @@ -3305,7 +3305,7 @@ | _,[] -> 1 | [],_ -> -1 | (e1::t1),(e2::t2) -> - let c = Pervasives.compare (snd e1.edge_label) + let c = Stdlib.compare (snd e1.edge_label) (snd e2.edge_label) in if c<>0 then c else aux t1 t2 in aux p p1 @@ -4825,11 +4825,11 @@ output_string !log_channel "select_token called\n"; let topmost = List.sort (fun v1 v2 -> - Pervasives.compare v1.pdev.lex_nb v2.pdev.lex_nb) topmost in + Stdlib.compare v1.pdev.lex_nb v2.pdev.lex_nb) topmost in (*let topmost = match topmost with | [_] -> topmost | _ -> List.sort (fun v1 v2 -> - Pervasives.compare v1.pdev.lex_nb v2.pdev.lex_nb) + Stdlib.compare v1.pdev.lex_nb v2.pdev.lex_nb) topmost in*) let tbl_l, pdev_l, snll, snl, _ = List.fold_left @@ -4926,7 +4926,7 @@ in match act_id_l with [] -> None | x -> - let x = no_double (List.sort Pervasives.compare x) in + let x = no_double (List.sort Stdlib.compare x) in (*Printf.printf "list x = %s\n" (String.concat " " (List.map (fun i -> string_of_int i) x));*) Some ((if all_token then x else [select_act_id x]), pdev) diff -ru dypgen-orig/dyplib/dyplex.ml dypgen/dyplib/dyplex.ml --- dyplib/dyplex.ml 2026-05-29 06:21:51 +++ dyplib/dyplex.ml 2026-05-29 06:21:51 @@ -214,7 +214,7 @@ module Ordered_node = struct type t = node - let compare n1 n2 = Pervasives.compare n1.id n2.id + let compare n1 n2 = Stdlib.compare n1.id n2.id end module Node_set = Set.Make(Ordered_node) @@ -436,7 +436,7 @@ (function ([ci],n1) -> write_interval ci n.id dec_table n1.id | _ -> assert false) trans_l); - final.(n.id) <- List.sort Pervasives.compare (list_of_set n.matched) + final.(n.id) <- List.sort Stdlib.compare (list_of_set n.matched) (* Is it necessary to sort the list or doesn't list_of_set already do it? *)) sl in @@ -491,7 +491,7 @@ (function ([ci],n1) -> write_interval ci n.id dec_table n1.id | _ -> assert false) trans_l); - final.(n.id) <- List.sort Pervasives.compare (list_of_set n.matched) + final.(n.id) <- List.sort Stdlib.compare (list_of_set n.matched) (* Is it necessary to sort the list or doesn't list_of_set already do it? *)) sl in diff -ru dypgen-orig/dyplib/priority_by_relation.ml dypgen/dyplib/priority_by_relation.ml --- dyplib/priority_by_relation.ml 2026-05-29 06:21:51 +++ dyplib/priority_by_relation.ml 2026-05-29 06:21:51 @@ -32,12 +32,12 @@ module OrdPrio = struct type t = priority - let compare = Pervasives.compare + let compare = Stdlib.compare end module Ordered_string = struct type t = string - let compare = Pervasives.compare + let compare = Stdlib.compare end module Prio_set = Set.Make(OrdPrio)