package ostap

  1. Overview
  2. Docs
Parser-combinator library

Install

Dune Dependency

Authors

Maintainers

Sources

ostap-0.6.tbz
sha256=8c310bd119fbc3ccbaf6f048d7cf97454343df01699c6da01fc72e0d09a6d9d5
sha512=784888bf0b6125404406ad1e5a6e08d587fcfb827482a4302de09077631b46a0674406de5b2e82a201be73665411d2021cdce5424a4a5c896fd0378e100f0130

doc/ostap.BNF3/BNF3/Expr/index.html

Module BNF3.ExprSource

BNF expression implementation.

Sourcetype t =
  1. | String of string
    (*

    String terminal

    *)
  2. | Term of string
    (*

    Non-string terminal

    *)
  3. | Nonterm of string
    (*

    Nonterminal

    *)
  4. | Apply of t * t list
    (*

    Rule application

    *)
  5. | Star of t
    (*

    Iteration

    *)
  6. | Plus of t
    (*

    Non-empty iteration

    *)
  7. | Opt of t
    (*

    Optional expression

    *)
  8. | Alt of t list
    (*

    Alternation

    *)
  9. | Seq of t list
    (*

    Sequencing

    *)
  10. | Group of t
    (*

    Expression in brackets

    *)
  11. | Custom of [ `S of string | `T of t ] list
    (*

    Custom mixed structure (for internal use)

    *)

Main type.

Constructors

Sourceval string : string -> t

String terminal.

Sourceval term : string -> t

Non-string terminal.

Sourceval nonterm : string -> t

Nonterminal.

Sourceval apply : t -> t list -> t

Rule application.

Sourceval star : t -> t

Iteration.

Sourceval plus : t -> t

Non-empty iteration.

Sourceval opt : t -> t

Optional expression.

Sourceval alt : t list -> t

Alternation.

Sourceval seq : t list -> t

Sequencing.

Sourceval group : t -> t

Expression in brackets.

Sourceval custom : [ `S of string | `T of t ] list -> t

Custom text.

Sourceval toTeX : t -> string

TeX printer.

Sourceval toTree : t -> string

Tree printer.

OCaml

Innovation. Community. Security.

On This Page
  1. Constructors