# \#angstrom

**URL:** https://discuss.ocaml.org/tag/angstrom/132.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [Using Angstrom with Eio?](https://discuss.ocaml.org/t/using-angstrom-with-eio/15242)

<div class="topic-metadata">

**Author:** [@enetsee](https://discuss.ocaml.org/u/enetsee)\
**Replies:** 4\
**Last updated:** [September 5, 2024, 11:27am UTC](https://discuss.ocaml.org/t/using-angstrom-with-eio/15242 "2024-09-05T11:27:36Z")

</div>

In the Eio.Buf\_read docs it says: This module provides fairly efficient non-backtracking parsers. It is modelled on Angstrom’s API, and you should use that if backtracking is needed. I have in hand a Cohttp.Body.t wh…

---

## [Parsing with error-handling?](https://discuss.ocaml.org/t/parsing-with-error-handling/14775)

<div class="topic-metadata">

**Author:** [@patrick-nicodemus](https://discuss.ocaml.org/u/patrick-nicodemus)\
**Replies:** 0\
**Last updated:** [June 11, 2024, 6:30pm UTC](https://discuss.ocaml.org/t/parsing-with-error-handling/14775 "2024-06-11T18:30:50Z")

</div>

I am using the Angstrom library to write a parser for a markdown language. How do I return an informative error message to the user about the location of a parsing error? Edit: I want to clarify the problem a bit. A mar…

---

## [Debugging Angstrom (or parser combinators in general)](https://discuss.ocaml.org/t/debugging-angstrom-or-parser-combinators-in-general/13741)

<div class="topic-metadata">

**Author:** [@m-spitfire](https://discuss.ocaml.org/u/m-spitfire)\
**Replies:** 5\
**Last updated:** [December 29, 2023, 9:45am UTC](https://discuss.ocaml.org/t/debugging-angstrom-or-parser-combinators-in-general/13741 "2023-12-29T09:45:18Z")

</div>

Hello. I’m trying to debug a parser that I wrote, but I have no idea how to do it. Is there any resource that I can read upon on about how to debug a parser written with combinators? My current issue is about (I think)…

---

## [Parsing simple recursive expressions with Angstrom](https://discuss.ocaml.org/t/parsing-simple-recursive-expressions-with-angstrom/13734)

<div class="topic-metadata">

**Author:** [@m-spitfire](https://discuss.ocaml.org/u/m-spitfire)\
**Replies:** 4\
**Last updated:** [December 29, 2023, 7:10am UTC](https://discuss.ocaml.org/t/parsing-simple-recursive-expressions-with-angstrom/13734 "2023-12-29T07:10:44Z")

</div>

Hello. I’m trying to write a parser for a simple language with AST definition as follows type term = | TmTrue | TmFalse | TmIf of term \* term \* term | TmZero I’m struggling to write the parser for if expression…

---

## [Does anyone have a way of contacting seliopou author of the inhabitedtype projects?](https://discuss.ocaml.org/t/does-anyone-have-a-way-of-contacting-seliopou-author-of-the-inhabitedtype-projects/13476)

<div class="topic-metadata">

**Author:** [@rbjorklin](https://discuss.ocaml.org/u/rbjorklin)\
**Replies:** 2\
**Last updated:** [November 22, 2023, 5:15pm UTC](https://discuss.ocaml.org/t/does-anyone-have-a-way-of-contacting-seliopou-author-of-the-inhabitedtype-projects/13476 "2023-11-22T17:15:36Z")

</div>

Hello fellow OCamler’s! I think there is a number of us here in the community that appreciate the highly performant projects put forth by seliopou. The popularity of the of the projects under the InhabitedType organizat…

---

## ["not enough input" with Angstrom and Lwt on a TCP stream](https://discuss.ocaml.org/t/not-enough-input-with-angstrom-and-lwt-on-a-tcp-stream/9027)

<div class="topic-metadata">

**Author:** [@jhaberku](https://discuss.ocaml.org/u/jhaberku)\
**Replies:** 0\
**Last updated:** [December 17, 2021, 4:40pm UTC](https://discuss.ocaml.org/t/not-enough-input-with-angstrom-and-lwt-on-a-tcp-stream/9027 "2021-12-17T16:40:53Z")

</div>

I’m using an Angstrom decoder with Lwt. Specifically, I have some code like this: let%lwt input\_channel, output\_channel = Lwt\_io.open\_connection ... in let%lwt unconsumed, r = Angstrom\_lwt\_unix.parse decoder input\_chan…

---

## [Parse tree structure with Angstrom](https://discuss.ocaml.org/t/parse-tree-structure-with-angstrom/8633)

<div class="topic-metadata">

**Author:** [@erhan](https://discuss.ocaml.org/u/erhan)\
**Replies:** 0\
**Last updated:** [October 14, 2021, 4:21pm UTC](https://discuss.ocaml.org/t/parse-tree-structure-with-angstrom/8633 "2021-10-14T16:21:59Z")

</div>

Hello. I need a help with my solution below. My code works but I think it is kinda bloated and there might be an easier solution with Angstrom usage or list/stack solution. Please help me if there are easier/simpler sol…

---

## [Angstrom number parser with GADT](https://discuss.ocaml.org/t/angstrom-number-parser-with-gadt/8563)

<div class="topic-metadata">

**Author:** [@cloudyhug](https://discuss.ocaml.org/u/cloudyhug)\
**Replies:** 1\
**Last updated:** [October 2, 2021, 7:43pm UTC](https://discuss.ocaml.org/t/angstrom-number-parser-with-gadt/8563 "2021-10-02T19:43:34Z")

</div>

Hello. I am building a parser for a number type with integral and rational values. type \_ number = I : int -\> int number | R : rat -\> rat number I have distinct functions to parse hexadecimal, binary, octal and decimal…

---

## [Parsing alternative for more than one char with angstrom](https://discuss.ocaml.org/t/parsing-alternative-for-more-than-one-char-with-angstrom/7575)

<div class="topic-metadata">

**Author:** [@nico\_toll](https://discuss.ocaml.org/u/nico_toll)\
**Replies:** 2\
**Last updated:** [March 31, 2021, 2:41pm UTC](https://discuss.ocaml.org/t/parsing-alternative-for-more-than-one-char-with-angstrom/7575 "2021-03-31T14:41:19Z")

</div>

With parsing library angstrom, this : open Angstrom let ab = char 'a' \<|\> char 'b' parse\_string ~consume:All ab "a";; (\* Ok 'a' \*) parse\_string ~consume:All ab "b";; (\* Ok 'b' \*) works as I expect, but this : open …

---

## [Mutually recursive parser in Angstrom](https://discuss.ocaml.org/t/mutually-recursive-parser-in-angstrom/6724)

<div class="topic-metadata">

**Author:** [@Kakadu](https://discuss.ocaml.org/u/Kakadu)\
**Replies:** 6\
**Last updated:** [November 8, 2020, 7:17pm UTC](https://discuss.ocaml.org/t/mutually-recursive-parser-in-angstrom/6724 "2020-11-08T19:17:28Z")

</div>

I want to defined mutually recursive parser functions using Angstrom and it seems that built-in fix doesn’t help me I can’t declare my own polyvariadic fix because parser type is abstract. I also checked other parser-…

---

## [In Angstrom, how to specify pasers to consume the whole input string?](https://discuss.ocaml.org/t/in-angstrom-how-to-specify-pasers-to-consume-the-whole-input-string/4897)

<div class="topic-metadata">

**Author:** [@arbipher](https://discuss.ocaml.org/u/arbipher)\
**Replies:** 11\
**Last updated:** [May 29, 2020, 4:17pm UTC](https://discuss.ocaml.org/t/in-angstrom-how-to-specify-pasers-to-consume-the-whole-input-string/4897 "2020-05-29T16:17:43Z")

</div>

The simplified version of my code is at (gist link). The snippet is this: type exp = | Int of int | Plus of exp \* exp let integer = ws \*\> take\_while1 is\_digit \>\>| (fun x -\> Int (int\_of\_string x)) (\* this wor…

---

## [Is there a library of angstrom combinators?](https://discuss.ocaml.org/t/is-there-a-library-of-angstrom-combinators/2514)

<div class="topic-metadata">

**Author:** [@Khady](https://discuss.ocaml.org/u/Khady)\
**Replies:** 0\
**Last updated:** [September 3, 2018, 9:03am UTC](https://discuss.ocaml.org/t/is-there-a-library-of-angstrom-combinators/2514 "2018-09-03T09:03:34Z")

</div>

Is there a library of combinators for angstrom? I am starting to use it and I end up writing combinators for things like string that can contain escaped " for example. It seems to me that this is an example of useful com…

---

## [Angstrom: sliding window parser](https://discuss.ocaml.org/t/angstrom-sliding-window-parser/2166)

<div class="topic-metadata">

**Author:** [@Freyr666](https://discuss.ocaml.org/u/Freyr666)\
**Replies:** 0\
**Last updated:** [June 18, 2018, 12:11pm UTC](https://discuss.ocaml.org/t/angstrom-sliding-window-parser/2166 "2018-06-18T12:11:29Z")

</div>

I’m receiving chunks of data containing messages with a possible garbage between them. Each message is \<message\> ::= \<constant prefix\> \<port\> \<length\> \<body of length\> So I have to skip some garbage, find a prefix and…

---

## [Angstrom parser optimization](https://discuss.ocaml.org/t/angstrom-parser-optimization/1754)

<div class="topic-metadata">

**Author:** [@loxs](https://discuss.ocaml.org/u/loxs)\
**Replies:** 1\
**Last updated:** [March 23, 2018, 10:30pm UTC](https://discuss.ocaml.org/t/angstrom-parser-optimization/1754 "2018-03-23T22:30:54Z")

</div>

I am a newbie in parsing and I am still not sure if I get all the terminology and after quite some struggle I only managed to write a suboptimal parser, though luckily, one that works. Here is a simplified version of my…

---

## [Code review: Org mode tangler](https://discuss.ocaml.org/t/code-review-org-mode-tangler/1138)

<div class="topic-metadata">

**Author:** [@ulis](https://discuss.ocaml.org/u/ulis)\
**Replies:** 9\
**Last updated:** [November 19, 2017, 12:51am UTC](https://discuss.ocaml.org/t/code-review-org-mode-tangler/1138 "2017-11-19T00:51:22Z")

</div>

Hi folks, I’m doing my first steps in OCaml. As an exercise I implemented restricted Org mode tangler, because Org’s own is painfully slow. Is anybody keen to review my code? Any feedback including but not limited by mor…
