What is the advantage of using a parser generator like happy as opposed to using parser combinators?

后端 未结 5 1266
情歌与酒
情歌与酒 2021-01-31 17:44

To learn how to write and parse a context-free grammar I want to choose a tool. For Haskell, there are two big options: Happy, which generates a parser from a grammar descriptio

5条回答
  •  抹茶落季
    2021-01-31 18:12

    In my opinion Parsec hides most of the nasty grammar details and lets you write your parsers more intuitively. If you want to learn this stuff in the first place go with some parser-generator like Happy (or even try to implement one yourself).

提交回复
热议问题