package biocaml

  1. Overview
  2. Docs
The OCaml Bioinformatics Library

Install

Dune Dependency

Authors

Maintainers

Sources

v0.10.0.tar.gz
md5=497e3f2f7128a6ca347d66848da38a3d
sha512=4a76ebbafda3bc944afaff40d69791dfe153a0638ef5d7e6e1bc962b7f991d9545cd0af2d7930b39f8b31dbf067d0603cfa03d9b7a49396ab1ae452df47fd1f3

doc/biocaml.base/Biocaml_base/Lines/Parser/index.html

Module Lines.Parser

A parser for lines

This module provides building blocks for a line parser, especially a step function, that given the state of the parser and a chunk of bytes returns a list of lines and a new state. This API is meant to be usable from various contexts, including async or lwt.

type state

Parser state

val initial_state : state

The initial state to be fed to the step function.

val line_number : state -> Base.int

Number of lines seen so far. We have line_number initial_state = 0, and line_number (fst (step _ (Some _))) > 0

step st i parses an input. If i = None, the caller indicates that there is no more input; in that case the returned state is terminal: all inputs read from this state will be ignored.

OCaml

Innovation. Community. Security.