elm / parser

A parsing library, focused on simplicity and great error messages
https://package.elm-lang.org/packages/elm/parser/latest
BSD 3-Clause "New" or "Revised" License
228 stars 46 forks source link

Added parser alternatives for some regex to examples #48

Open Anton-4 opened 4 years ago

Anton-4 commented 4 years ago

Closes #47

philer commented 4 years ago

Thank you for those examples! I had been wondering how to use this thing. Turns out this makes me question that recommendation of a parser over regex even more. A lot of those trivial, easy to read patterns that are universally understood across numerous languages turn into massive blocks of code that require intricate knowledge of one particular parser module. I'm definitely not a fan.

Anton-4 commented 4 years ago

You're welcome! I feel your pain :slightly_smiling_face: , it took me some thought to figure out how to make the parsers. Although I totally understand evan's arguments. Complex regexes really become a mess and may be quite daunting to beginning programmers.