package camlon

  1. Overview
  2. Docs

Module Ocaml.ParserSource

Sourcetype error = [
  1. | `Invalid_construct of Location.t
  2. | `Lexer of Location.t * Lexer.error
  3. | `Parser of Syntaxerr.error
  4. | `Syntax_error of Location.t
  5. | `Exn of exn
]
Sourceexception Error of error
Sourceval loc_of_error : error -> Location.t

Returns the location of the error. Loaction.none is returned when the location is unknown.

Sourceval format_error : Format.formatter -> error -> unit
Sourceval from_lexbuf : ?source:string -> Lexing.lexbuf -> t list

Parsers. They are not re-entrant, since OCaml's lexer is not.

Sourceval from_channel : ?source:string -> in_channel -> t list
Sourceval from_string : ?source:string -> string -> t list
Sourceval from_function : ?source:string -> (bytes -> int -> int) -> t list
OCaml

Innovation. Community. Security.