3 ms·
It may be true that parser generators are superior from a technical point of view (I can't comment), but parser combinators sure can be nice to use. I very rece
by adwhit 9y ago
It may be true that parser generators are superior from a technical point of view (I can't comment), but parser combinators sure can be nice to use. I very recently used nom to implement a parser for a structured text format, it feels wonderfully expressive and you can knock together a reasonably sophisticated parser in a matter of hours. Performance-wise, it is zero-copy and chomps through a 100MB file in less than half a second on my crappy laptop, so plenty fast enough for most situations.
- ufo 9y agoThe nicest thing about parser generators, IMO, is that they can warn you if your grammar is ambiguous.