3 ms·
That's really neat, thanks for showing me. This looks very straightforward for parsing a straightforward format. I think Nom might be more useful as the format
by adamch 5y ago
That's really neat, thanks for showing me. This looks very straightforward for parsing a straightforward format.
I think Nom might be more useful as the format gets more complicated... the combinators can really save you quite a bit of time. Having things like many0, or delimited_pair, or length_count already tested and documented saves time compared to implementing + testing it yourself. It's cool seeing how many different approaches you can use to solve the same problem :)
- loeg 5y agoNo problem! > I think Nom might be more useful as the format gets more complicated... the combinators can really save you quite a bit of time. Having things like many0, or delimited_pair, or length_count already tested and documented saves time compared to implementing + testing it yourself. Totally agree -- bitvec works for things that are easy to hand write a parser for. Nom is a lot more powerful.