package omd
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8aef085a98c38a20483f953f7ba5fe15d712290b095624af3d7999d4ef7fede9
md5=845fc38e86ec0e85721130f2dd044d00
doc/omd/Omd_lexer/index.html
Module Omd_lexer
type token = Omd_representation.toktype t = token listval lex : string -> tTranslate 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.
type bigstring =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.tval string_of_tokens : t -> stringstring_of_tokens t return the string corresponding to the token list t.
val length : token -> intlength t number of characters of the string represented as t (i.e. String.length(string_of_token t)).
val string_of_token : token -> stringstring_of_token tk return the string corresponding to the token tk.
val make_space : int -> tokensplit_first(Xs n) returns (X, X(n-1)) where X is a token carrying an int count.
val destring_of_tokens : ?limit:int -> t -> stringConverts the tokens to a simple string representation useful for debugging.