Single header Parser Combinators for C
github.com
Single header Parser Combinators for C
1–10 of 16 posts
Re: Single header Parser Combinators for C
#2Re: Single header Parser Combinators for C
#3Re: Single header Parser Combinators for C
#4Re: Single header Parser Combinators for C
#5So 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.
Re: Single header Parser Combinators for C
#6So 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.
Isn't working with the utf8 stream sufficient? Especially if you only have ASCII keywords/operators/brackets, I feel a ASCII parser should work with utf8 out of the box
Re: Single header Parser Combinators for C
#7So 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.
On the other hand, if your parser combinators process char-by-char, then maintaining a small "is this valid UTF-8 so far" context on the side should be pretty simple, so providing it would be an useful option, but actually decoding? Please don't.
Re: Single header Parser Combinators for C
#8This 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.)
Re: Single header Parser Combinators for C
#9> 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.)
If I'm not misremembering that case then, it sounds like this should've never been an issue (well, as long as this is after basic version control and make). Curious if I'm missing something.
Re: Single header Parser Combinators for C
#10Now all it needs is a parser in 'examples/' that parses EBNF grammars and emits a parser in terms of these combinators.