package fmlib_parse
Parsing with combinators and indentation sensitivity
Install
Dune Dependency
Authors
Maintainers
Sources
0.5.9.tar.gz
sha256=9efb96fe5c1cfb4edc2ff5c6df4537ce9ded12175a60021e9d482e51eb69ebfb
md5=3fb18b650cfcb0bf3bd05e120e17b28f
doc/fmlib_parse/Fmlib_parse/Parse_with_lexer/index.html
Module Fmlib_parse.Parse_with_lexer
A parser which works with two components: A lexer which splits up the input into a sequence of tokens and parser which parses the tokens.
The parser needs two components, a lexer and a parser. The lexer works on streams of characters and produces tokens of type Position.range * Token.t
. The parser consumes tokens of type Position.range * Token.t
and produces the parsed constructs in case of success.
module type ANY = Fmlib_std.Interfaces.ANY
module Make
(State : ANY)
(Token : ANY)
(Final : ANY)
(Semantic : ANY)
(Lex :
Interfaces.LEXER
with type final = Position.range * Token.t
and type token = char)
(Parse :
Interfaces.FULL_PARSER
with type state = State.t
and type token = Position.range * Token.t
and type expect = string * Indent.expectation option
and type final = Final.t
and type semantic = Semantic.t) :
sig ... end
Generate a parser with a lexer and a token parser.
module Make_utf8
(State : ANY)
(Token : ANY)
(Final : ANY)
(Semantic : ANY)
(Lex :
Interfaces.LEXER
with type final = Position.range * Token.t
and type token = Utf8.Decoder.t)
(Parse :
Interfaces.FULL_PARSER
with type state = State.t
and type token = Position.range * Token.t
and type expect = string * Indent.expectation option
and type final = Final.t
and type semantic = Semantic.t) :
sig ... end
Generate a parser with a utf8 lexer and a token parser.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>