4 ms·
> ...pick up a weird parser combinator library and have bad time. > You're limited by what can be expressed by your parsing methodology of choice, which usuall
by aidenn0 3y ago
> ...pick up a weird parser combinator library and have bad time.
> You're limited by what can be expressed by your parsing methodology of choice, which usually means a context-free grammar.
I know those two quotes were from separate points, but parser combinators are not limited to CFGs; pretty much any recursive-descent parser (parser combinators included) will have zero issue with your Bencode example.
I pretty much agree with the rest of your post, except for the fact that it's unusual for an entire year to go by in which I don't write a parser.
Also, some parser libraries (though not parser combinators) can statically find ambiguities in grammar definitions, which can be helpful if you are designing the language.