5 ms·
The article makes no mention of bison (which is a parser generator) and yacc, and presents a rationale for using parser combinators? I agree that bison/yacc is
by pjc50 9y ago
The article makes no mention of bison (which is a parser generator) and yacc, and presents a rationale for using parser combinators?
I agree that bison/yacc is a terrible user experience in a modern C++ or even modern C environment.
- pjmlp 9y agoIt was more a kind of heads up, because I think pure coding is too low level as parsing tool and most still think the alternative to manually parsing is only bison/yacc.
- to3m 9y agoI like bison and I never minded flex. (ANTLR? Did not enjoy; would not use again. But it was a while ago now and maybe newer versions are improved.) I wonder if I'm the only one...
- CalChris 9y agoI've used yacc/lex and bison/flex but ANTLR4 is the bees knees. It is a considerable improvement on previous ANTLRs. Separating out grammars (ANTLR grammar file) from actions (Java files) makes everything better.
- pjc50 9y agoError handling involves quite a bit of manual work, memory management if you're allocating nodes during the parser and also trying to do error recovery is even worse. Best dealt with by a slab or pool allocator. It's not very OO-frinedly and you can only have one instance running at once. That was my experience of trying to manage several parsers for Verilog, VHDL, DEF and similar ecad formats.