package pratter

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

Parameters

module Sup : SUPPORT

Signature

val expression : Sup.table -> Sup.term Stream.t -> Sup.term

expression tbl s parses stream of tokens s with table of operators tbl. It transforms a sequence of applications to a structured application tree containing infix and prefix operators. For instance, assuming that + is declared infix, it transforms 3 + 5 + 2, represented as @(@(@(@(3,+),5),+),2) (where @ is the application) into (@(+(@(+,3,5)),2).

OCaml

Innovation. Community. Security.