package orsetto

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

Define a module of this type as the basis of a scanner.

The equivalence relation on input symbols.

module Form : Form

The signature of production forms.

type position

An input stream position.

type iota

An input symbol conceptually attributed with its position.

val init : ?start:position -> Symbol.t -> iota

Scanners use init symbol to make the first iota in the input stream. If ~start is provided, then it specifies the starting position in the stream of the result.

val next : iota -> Symbol.t -> iota

Scanners use next cursor symbol to make the iota comprising symbol at the position immediately following cursor.

val sym : iota -> Symbol.t

Scanners use sym iota to get the symbol contained in iota.

val term : iota -> Symbol.t Form.t

Scanners use term iota to produce a terminal form comprising the symbol contained in iota attributed with its position.