package omd

  1. Overview
  2. Docs
A Markdown frontend in pure OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

omd-1.3.2.tbz
sha256=6023e1642631f08f678eb5725820879ed7bb5a3ffee777cdedebc28c1f85fadb
sha512=fa2070a5f5d30b2cc422937ac4158bb087134a69d47fa15df403afb1c0c60a73dd436c949faa8d44e0b65bdee039779d86191b55085b717253f91ef20a69ef98

doc/omd/Omd_lexer/index.html

Module Omd_lexerSource

Sourcetype t = token list
Sourceval lex : string -> t

Translate a raw string into tokens for the parser. To implement an extension to the lexer, one may process its result before giving it to the parser. To implement an extension to the parser, one may extend it using the constructor Tag from type tok and/or using the extensions mechanism of the parser (cf. the optional argument extensions). The main difference is that Tag is processed by the parser in highest priority whereas functions in extensions are applied with lowest priority.

Sourceval lex_bigarray : bigstring -> t

As lex, but read input from a bigarray rather than from a string.

Sourceval string_of_tokens : t -> string

string_of_tokens t return the string corresponding to the token list t.

Sourceval length : token -> int

length t number of characters of the string represented as t (i.e. String.length(string_of_token t)).

Sourceval string_of_token : token -> string

string_of_token tk return the string corresponding to the token tk.

Sourceval make_space : int -> token
Sourceval split_first : token -> token * token

split_first(Xs n) returns (X, X(n-1)) where X is a token carrying an int count.

Sourceval destring_of_tokens : ?limit:int -> t -> string

Converts the tokens to a simple string representation useful for debugging.

OCaml

Innovation. Community. Security.