package pacomb

  1. Overview
  2. Docs
Parsing library based on combinators and ppx extension to write languages

Install

dune-project
 Dependency

Authors

Maintainers

Sources

1.4.4.tar.gz
md5=17df1ee094890404ec4110f097ac1ab6
sha512=2046537f5dabbe5598c094c4b4e645cd2a4eeb4b3d7fe8fde39659df3398675831f11d2ae3e86069e8a8c350c0725e0299c1571eed2a938f2a3d0c1cc5330804

doc/pacomb/Pacomb/Blank/index.html

Module Pacomb.BlankSource

Position in a buffer is a Input.buffer together with an index Input.pos.

Sourcetype idx = Input.idx
Sourcetype blank = buf -> idx -> buf * idx

A blank function is just a function progressing in a buffer

Sourcetype t = blank

Functions managing blanks

Sourceval none : blank

Use when you have no blank chars

Sourceval from_charset : Charset.t -> blank

Blank from a charset

Sourceval from_terminal : 'a Lex.t -> blank

Blank from a terminal

Sourceval line_comments : ?cs:Charset.t -> string -> blank

line_comments s Blank with standard spaces and line starting with s. cs defaults to Charset.from_string " \t\n\r"

Sourcetype layout_config = {
  1. old_blanks_before : bool;
    (*

    Ignoring blanks with the old blank function before parsing?

    *)
  2. new_blanks_before : bool;
    (*

    Then ignore blanks with the new blank function (before parsing)?

    *)
  3. new_blanks_after : bool;
    (*

    Use the new blank function one last time before resuming old layout?

    *)
  4. old_blanks_after : bool;
    (*

    Use then the old blank function one last time as well?

    *)
}
Sourceval default_layout_config : layout_config

Default configuration, parsing with the old blanks before (i.e., the field old_blanks_before is true), and the new blanks after (i.e., the field old_blanks_after is also true). The other two fields are false.