Re:ANTLR 4.6 Released
by nonsince on Friday December 16, 2016 @07:31AM
(#13192791)
At the risk of sounding inflammatory, what would be the point of using a parser generator over a powerful applicative-style combinator library like https://github.com/Marwes/combine ? I've used both in the past and personally massively prefer parser combinators, but I'd be interested to know what the benefits are of parser generators.
[ Parent
| on HN ]
Re:ANTLR 4.6 Released
by Matthias247 on Friday December 16, 2016 @08:37AM
(#13193108)
I think one advantage of things like ANTLR is that the grammer is described in an abstract fashion and that you can then generate parsers in multiple target languages with it. With a parser combinator library you are only targeting a single language. I also think that for project outsiders and beginners it's easier to look at and understand a grammar instead of a parser in combinator style.
I personally have worked with parser generators (Irony for .NET) as well as parser combinator (fparsec) and enjoyed both a lot.
I cannot answer that directly, since I've never used parser combinators.
The general problem is that there's so much software out there to learn that most people are happy when they know yacc-style and antlr parser generators.
Also, most people are regularly disappointed by software that over-promises, which costs them a lot of time. So they stick to what works for them.
In my case, I find Bison/Menhir such great tools that I have zero inclination to even look at other things.
EDIT: A corollary to this is that people who are very productive (Thompson, Torvalds, Bellard,...) don't constantly change their software stacks.