Commits

Anonymous committed 962b3a8

Use Cf_lex instead of deprecated Cf_lexer module.

  • Participants
  • Parent commits 0679ca0

Comments (0)

Files changed (2)

File sasl/sasl_anonymous.ml

 
 module Id = struct
     open Cf_parser.Op
-    open Cf_lexer.Op
+    open Cf_lex.X.Op
     open Mime_common
         
     type t =
                 end
             end
         in
-        let tlimit_: int -> ('c, string) Cf_lexer.t = fun n s ->
+        let tlimit_: int -> ('c, string) Cf_lex.X.t = fun n s ->
             if n > 255 then
                 None
             else
                 let s = Cf_seq.first s in
                 Some (Cf_seq.to_string s, Lazy.lazy_from_val Cf_seq.Z)
         in
-        let tlexer_ z = Cf_lexer.create !@[ ttext_ $@ tlimit_ ] z in
+        let tlexer_ z = Cf_lex.X.create !@[ ttext_ $@ tlimit_ ] z in
         let token_ =
             tlexer_ >>= fun s ->
             Cf_parser.fin >>= fun () ->
         let pz = lazy (parse ()) in
         fun s ->
             let p = Lazy.force pz in
-            let c = new Cf_lexer.cursor 0 in
+            let c = new Cf_parser.cursor 0 in
             match p (Cf_parser.X.weave ~c (Cf_seq.of_string s)) with
             | None ->
                 invalid_arg "Sasl_anonymous.Id.of_string"

File sasl/sasl_digest.ml

 
 module P = struct
 	open Cf_parser.Op
-	open Cf_lexer.Op
+	open Cf_lex.X.Op
 	
-	let cursor0_ = new Cf_lexer.cursor 0
+	let cursor0_ = new Cf_parser.cursor 0
 	
 	class core = object(self)
-		inherit [Cf_lexer.cursor] Mime_parser.core
+		inherit [char Cf_parser.cursor] Mime_parser.core
 		
 		val p_equal_ = Cf_parser.X.sat (function '=' -> true | _ -> false)
 		val p_comma_ = Cf_parser.X.sat (function ',' -> true | _ -> false)
 			}
 end
 
+module M2 = struct
+    open Cf_parser.Op
+    
+    type t = {
+        username: string;
+        nonce: string;
+        cnonce: string;
+        response: string;
+        realm: string option;
+        authzid: string option;
+        nc: int32 option;
+        uri: (string * string * string option) option;
+        maxbuf: int;
+        utf8: bool;
+        cipher: cipher_t option;
+    }
+    
+    let default_ = {
+        username = "";
+        nonce = "";
+        cnonce = "";
+        response = "";
+        realm = None;
+        authzid = None;
+        nc = None;
+        uri = None;
+        maxbuf = 65536;
+        utf8 = false;
+        cipher = None;
+    }
+end
+
 module type Hash_T = sig
 	val name: string
 	val create: unit -> Cryptokit.hash