Re:Why not to use (f)lex, yacc or bison
by commandlinefan on Thursday March 05, 2020 @10:13AM
(#22494137)
That’s what I expected this article to be about - it looks like it’s actually a long-form sales pitch for ANTLR training (but still worth a read). I’ve never been fortunate (or unfortunate) enough to be called on to put together a real compiler since school, but I’ve spent a lot of time working with “lite” parsers like JAXB and Hibernate (or variants thereof), and I’ve come to the same conclusion: I’m better off just hand-rolling my unmarshalling code than dealing with the gaps left by code generators.
[ Parent
| on HN ]
Re:Why not to use (f)lex, yacc or bison
by ftomassetti on Friday March 06, 2020 @03:19AM
(#22501842)
In my professional experience I build parsers, like at least 10 per year and 99% are written using ANTLR. I did not find a language that I was not able to parse with it, so far.
I think it does make sense to write manually parsers for performance and error messages, but it should be clear that this means raising cost by ~10 times. It is worth the effort if you are building a compiler for Java, for example, probably not if you want to process some DSL you developed.
Disclaimer: I am the brother of the author of this article
> I did not find a language that I was not able to parse with [ANTLR], so far.
I have plenty. Publish contact info on your HN profile and I can send some.
Re:Why not to use (f)lex, yacc or bison
by ftomassetti on Friday March 06, 2020 @09:55AM
(#22503998)
you can contact me at federico -> tomassetti.me