package orsetto

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

The basis used to construct the profile.

type symbol

The interchange language scanner symbol type.

type position

The interchange language scanner position type.

type 'k frame

Encapsulation of a sequence comprising a group of kind 'k.

The form module for interchange language scanners.

module Scan : Cf_scan.Profile with type symbol := symbol and type position := position and type 'a form := 'a Form.t

The interchange language scanner module.

val primitive : 'a Cf_type.nym -> 'a Form.t Scan.t

The scanner compiler uses primitive n to obtain a scanner for the primitive type named by n.

val control : 'a Form.t Scan.t -> ('a, 'b) control -> 'b Form.t Scan.t

The scanner compiler uses control s c to compose a scanner representing the application of control c to the value recognized by the scanner s.

val start : 'k container -> occurs -> 'k frame Form.t Scan.t

The scanner compiler uses start c q to compose a scanner that recognizes the start of a sequence of kind c with length limited by q and produces an abstract frame value annotated with the location of the start in the input stream.

val visit : 'k container -> 'k frame -> ('r -> 'r Scan.t) -> 'r -> 'r Scan.t

The scanner compiler uses visit c w f v to compose a scanner that visits with f every element in a sequence of kind c in the context w. The first element is visited with the initializer v, and each following element is visited with the value returned by the preceding scanner.

val finish : 'k frame -> unit Form.t Scan.t

The scanner compiler uses finish w to compose a scanner that recognizes the end of the sequence that started upon producing w.

val pair : 'k pair -> 'k Form.t Scan.t -> 'v Form.t Scan.t -> ('k * 'v) Form.t Scan.t

The scanner compiler uses pair c k v to compose a scanner that recognizes a pair of kind c comprising a first item recognized by k and a second item recognized by v.

The scanner compiler uses memo to obtain an annotated scanner mark at the beginning of the next element in a sequence, advancing the cursor to one position past the end of the element.