package csexp

  1. Overview
  2. Docs

Lexical analyser

type t
val create : unit -> t
type _ token =
  1. | Await : [> `other ] token
  2. | Lparen : [> `other ] token
  3. | Rparen : [> `other ] token
  4. | Atom : int -> [> `atom ] token
val feed : t -> char -> [ `other | `atom ] token

Feed a character to the parser.

val feed_eoi : t -> unit

Feed the end of input to the parser.

You should call this function when the end of input has been reached in order to ensure that the lexer is not awaiting more input, which would be an error.

OCaml

Innovation. Community. Security.