#arcsecond : #parsing in #javascript made easy
▻https://hackernoon.com/arcsecond-parsing-in-javascript-made-easy-af1894bdcec9?source=rss----3a8
Gandalf should have used arcsecondI recently starting making a serious attempt at learning #haskell (anyone who has tried before will probably sympathise that it usually takes a couple of tries to crack it). Amongst the many cool things Haskell has to offer is an amazing parsing library that comes with the standard set of packages called Parsec, which lets you describe how to parse complex grammars in what essentially looks like natural language.Here is how a CSV parser is implemented using Parsec. Don’t worry if you don’t understand all the syntax, the point is that the whole parser is specified in just four lines.▻https://medium.com/media/f0ddf1f7616431dd0a521dfec70a9006/hrefThis post is not about Haskell however, but rather a library I wrote called arcsecond which is based on Parsec, (...)