package dolmen

  1. Overview
  2. Docs
A parser library

Install

Dune Dependency

Authors

Maintainers

Sources

dolmen-v0.5.tbz
sha256=b9a6f80bf13fdf1fd69ff2013f583582fa00e13c86ee6f800737fabcfd530458
sha512=84b8c18e56b3fb20674af0a3729b7e15e543f21b0062c565b575b994388eb55ee8123e5d3d31f5f1042b204544b3084089a024c742ab741ddd7e18b5641dd399

doc/dolmen.class/Dolmen_class/Logic/Make/argument-1-L/index.html

Parameter Make.L

type t

The type of locations.

type file

A store for various meta-data about an input file, can be used to optimize representation of locations.

exception Uncaught of t * exn * Printexc.raw_backtrace

The exception to be raised whenever an unexpected exception is raised during parsing.

exception Lexing_error of t * string

The exception to be raised when the lexer cannot parse the input.

exception Syntax_error of t * [ `Regular of Dolmen_intf.Msg.t | `Advanced of Dolmen_intf.Msg.t * Dolmen_intf.Msg.t * Dolmen_intf.Msg.t ]

Syntax_error (loc, msg) denotes a syntax error at the given location. In the `Advanced (prod, parsed, expected) case,

  • prod is a delayed message to print in order to identify which production/syntax construction the parser was trying to reduce,
  • parsed is a description of the token which raised the error,
  • expected is a messages describing what would have been corect tokens/inputs at that point.
val of_lexbuf : Lexing.lexbuf -> t

Make a position using a lexbuf directly.

val mk_pos : Lexing.position -> Lexing.position -> t

Make a position from two lewing positions.

val mk_file : string -> file

Create meta-data for a given filename.

val newline : file -> Lexing.lexbuf -> unit

Offer a way for the file meta-data to store the current location of the lexbuf as the start of a new line.

OCaml

Innovation. Community. Security.