package parseff
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Direct-style parser combinator library for OCaml 5 powered by algebraic effects
Install
dune-project
Dependency
Authors
Maintainers
Sources
parseff-0.2.0.tbz
sha256=a49fa685546f8d9bc90d59a62ecc8204a24621b438164503745024e1038ebc9b
sha512=43baed140dcce2fd6e024a1f03daa71a923b1de19efa41c73eced3550528d5d911b8f0fc13dbb795f7af7a6fc963fc9d0a5fa8a9099ca752696e90345514f6ac
doc/CHANGES.html
0.2.0
- Unified
*1variants into base combinators with~at_leastparameter.many1→many ~at_least:1,take_while1→take_while ~at_least:1,sep_by1→sep_by ~at_least:1,end_by1→end_by ~at_least:1,whitespace1→whitespace ~at_least:1. The~at_leastparameter generalizes beyond the binary zero-vs-one distinction (e.g.,many ~at_least:3requires at least three matches). The oldchainl1andchainr1were also removed in favor of making thedefaultargument optional (see next item). - Renamed
chainl/chainrtofold_left/fold_rightwith~otherwise.chainl1 p op→fold_left p op,chainl p op default→fold_left p op ~otherwise:default, and likewise forchainr/fold_right. The new names better describe what the combinators do (parse and fold with associativity) and align with OCaml'sList.fold_left/List.fold_rightnaming conventions. The~otherwiselabeled argument replaces the old positionaldefaultparameter, providing a fallback value when zero elements match.
0.1.0
Initial release of Parseff -- a direct-style parser combinator library for OCaml 5 powered by algebraic effects.
- Direct-style parsers as plain
unit -> 'afunctions, no monadic or binding operators needed - Algebraic effects for control flow, backtracking, and streaming input
- Typed errors via polymorphic variants with position tracking
- Built-in error variants:
`Expected,`Unexpected_end_of_input,`Depth_limit_exceeded - Automatic backtracking with
or_,one_of, andone_of_labeled - Primitive parsers:
consume,satisfy,char,match_regex,take_while,skip_while,fail,error - Repetition combinators:
many,sep_by,between,end_by,count,optional - Operator chains:
fold_left,fold_rightfor expression parsing - Look-ahead parsing and depth-limited recursion via
rec_(default depth: 128) - Convenience parsers:
digit,letter,alphanum,whitespace,any_char - Zero-copy span APIs:
take_while_span,sep_by_take_spanreturning{ buf; off; len }records - Fused operations for hot paths:
sep_by_take,fused_sep_take,skip_while_then_char - Streaming support via
Source.of_string,Source.of_channel,Source.of_function - Backtrack-across-chunk-boundary support for streaming sources
- Non-fatal diagnostics with
warn/warn_at, rolled back on backtracking parse_until_end/parse_source_until_endrunners that collect diagnostics- Error labeling with
expectandone_of_labeledfor clear error messages - Domain-safe: no global mutable state, independent parses run in parallel across OCaml 5 domains
- 2-4x faster than Angstrom and MParser on equivalent parsers
- Single runtime dependency:
refor regex support
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page