package dns-client

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file dns_resolvconf.ml

1
2
3
4
5
6
7
8
9
10
let parse buf =
  try
    let buf =
      if String.(get buf (pred (length buf))) = '\n' then buf else buf ^ "\n"
    in
    let lexbuf = Lexing.from_string buf in
    Ok (Resolvconf_parser.resolvconf Resolvconf_lexer.lex lexbuf)
  with
    | Parsing.Parse_error -> Error (`Msg "parse error")
    | exn -> Error (`Msg (Printexc.to_string exn))
OCaml

Innovation. Community. Security.