github.com

Single header Parser Combinators for C

steve-chavez · 51 points · 10 comments · 9 ชั่วโมงที่ผ่านมา

Comments

4 preview comments · loading full thread
eqvinox1 ชั่วโมงที่ผ่านมา

> Flex or Bison generated code is also hard to maintain plus it complicates builds. This is, in all honesty, a solved problem in any reasonable build system. (And I have little patience left for people making life hard for themselves through their own choices.)

sph6 ชั่วโมงที่ผ่านมา

Beautiful work! I'm not even gonna wonder if any of it was AI-generated, because the code is clearly crafted meticulously by an experienced C engineer, very readable, and shorter than I expected.

RossBencina3 ชั่วโมงที่ผ่านมา

Now all it needs is a parser in 'examples/' that parses EBNF grammars and emits a parser in terms of these combinators.

zombot3 ชั่วโมงที่ผ่านมา

So many parser combinators operate on bytes assuming ASCII input only. I'd be more interested in a parser combinator lib that has UTF-8 decoding already abstracted away, operating on `wchar_t`, or even polymorphic input stream element types.