logoalt Hacker News

Single header Parser Combinators for C

34 pointsby steve-chaveztoday at 3:52 AM4 commentsview on HN

Comments

sphtoday at 6:59 AM

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.

zombottoday at 9:52 AM

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.

show 1 reply
RossBencinatoday at 9:53 AM

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