2 ms·
> Seriously, what's so wrong with lex + yacc, or antlr or parsec or ragel or any of the others? Not sure ANTLR is as fast (doesn't it use recursive descent? wh
by dataflow 5y ago
> Seriously, what's so wrong with lex + yacc, or antlr or parsec or ragel or any of the others?
Not sure ANTLR is as fast (doesn't it use recursive descent? which is slower algorithmically) but even ignoring performance, it's basically the cost of adding a new tool to your toolchain. If you already have 20 other tools, maybe the 21st isn't a big deal, but if you have 2, the 3rd adds some complexity. And in general it's kinda nice to have fewer things to glue together.
(I'm not claiming "therefore this approach trumps what you listed", I'm just explaining some of its advantages. Obviously it has disadvantages too.)
- jjice 5y agoANTLR is LL, but not sure how that stacks up against LR in yacc in terms of speed.