package pratter

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

Module type Pratter.SUPPORTSource

Types and utilities on terms that are to be Pratt parsed.

Sourcetype term

The main type of terms, that contains symbols, applications, binary and unary operators.

Sourcetype table

The table is used to store available operators.

Sourceval get_unary : table -> term -> priority option

get_unary tbl t returns the priority, or binding power of operator identified t if it is a unary operator, or None.

Sourceval get_binary : table -> term -> (priority * associativity) option

get_binary tbl t returns the priority (or binding power) and associativity of operator t, or None if t isn't a binary operator.

Sourceval make_appl : table -> term -> term -> term

make_appl tbl t u returns the application of t to u, sometimes noted @(t, u), or just t u, with tbl being the table of operators.