Hacker News new | ask | show | jobs
by throwfaangus 1619 days ago
Just use flex / bison?
2 comments

I've always found ANTLR to be more intuitive and maintainable than the flex/bison combination. And the learning curve is gentler.
And the tooling is better. I always found it hard to find working examples with bison.
Looks like these are grossly underappreciated these days. They are wonderful, easy to use tools.
I think "easy to use" might be an overstatement. I spent a fair bit of time trying to get in to the flex/bison workflow and it never seemed to click. I've found it much easier to use PEG parsers, parser combinators, or a hand-written recursive descent parser. Based on their ubiquity and the high reviews, I'm sure they're great tools once the initial hump is passed but that initial hump is quite large.
I think it's because they're less easy to use tools than writing your own lever/parser, which takes about a day and is fully introspective and debuggable. And if you need decent error reporting at the input it's much easier to thread that through.

Plus almost everything language has some kind of PEG or parser combinator library these days.