package alba
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Alba compiler
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.4.4.tar.gz
sha256=4817038301d3e45bac9edf7e6f2fc8bf0a6d78e76e02ad7ea33ef69bcc17df3b
md5=25234357587126685d64f16236167937
doc/alba.fmlib/Fmlib/Character_parser/Advanced/index.html
Module Character_parser.Advanced
Advanced Parser.
State: User state.Final: Final result type of the parser.Expect_msg: Error message, if something syntactically expected is not there.Semantic: Semantic error message (triggered byfail message)Context_msg: Each new context is opened with a value of typeContext_msg.
Parameters
module State : Module_types.ANYmodule Final : Module_types.ANYmodule Expect_msg : Module_types.ANYmodule Semantic : Module_types.ANYmodule Context_msg : Module_types.ANYSignature
Modules and Types
module Context : CONTEXT with type msg = Context_msg.tmodule Error :
Generic_parser.ERROR
with type expect = Expect_msg.t * Indent.t
and type semantic = Semantic.ttype final = Final.tCombinators
include COMBINATORS
with type expect = Expect_msg.t
and type semantic = Semantic.t
and type state = State.t
and type context = Context_msg.t
Basic Combinators
type expect = Expect_msg.tinclude Generic_parser.COMBINATORS with type semantic = Semantic.t
type semantic = Semantic.tval return : 'a -> 'a tval succeed : 'a -> 'a tPosition and State Combinators
val get_position : Position.t tIndentation Combinators
val get_bounds : (int * int option) tContext Combinator
type context = Context_msg.tCharacter Combinators
val expect : (char -> bool) -> Expect_msg.t -> char tval expect_end : Expect_msg.t -> unit tval one_of_chars : string -> Expect_msg.t -> char tval string : string -> (int -> Expect_msg.t) -> unit tval char : char -> Expect_msg.t -> unit tval space : Expect_msg.t -> unit tval letter : Expect_msg.t -> char tval digit : Expect_msg.t -> char tval word : (char -> bool) -> (char -> bool) -> Expect_msg.t -> string tParser
During Parsing
include PARSER with type state = State.t
type state = State.tState type
val needs_more : parser -> boolDoes the parser need more tokens (i.e. either put_character or put_end)?
val has_ended : parser -> boolHas the parser terminated (opposite of needs_more p)?
val has_succeeded : parser -> boolHas the parser succeeded
val has_failed : parser -> boolHas the parser failed
val position : parser -> Position.tThe current position.
val line : parser -> intThe current line.
val column : parser -> intThe current column.
val error_tabs : parser -> int listput_character p c feeds the parser p with the character token c. Only possible if needs_more p is valid.
Terminated Parser
The result the parser has produced which is either a final value or a list of dead ends. Only valid if the parser has terminated.
The list of tokens (i.e. optional characters) which the parser has not processed at the point of termination.
Create and Run the Parser
make pc st makes a parser from a parser combinator pc and the initial state st.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page