package orsetto

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

Define a module with this signature to represent an imperative interface to a buffer that appends symbols in sequence until a lexeme is recognized.

type symbol

The type of a symbol.

type lexeme

The type of a lexeme.

type t

The type of a buffer.

val create : unit -> t

Scanners use create () to make a buffer.

val reset : t -> unit

Scanners use reset b to reset b to contain an empty lexeme.

val advance : t -> symbol -> unit

Scanners use advance b c to append c to b.

val lexeme : t -> lexeme

Scanners use lexeme b to extract the lexeme from b.