5 ms·
Just use flex / bison?
by throwfaangus 5y ago
Just use flex / bison?
- Koshkin 5y agoLooks like these are grossly underappreciated these days. They are wonderful, easy to use tools.
- neurotrace 5y agoI 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.
- duped 5y agoI 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.
- therealcamino 5y agoI've always found ANTLR to be more intuitive and maintainable than the flex/bison combination. And the learning curve is gentler.
- base698 5y agoAnd the tooling is better. I always found it hard to find working examples with bison.