logoalt Hacker News

brooke2klast Tuesday at 4:04 PM2 repliesview on HN

Not sure about GCC, but in general there has been a big move away from using parser generators like flex/bison/ANTLR/etc, and towards using handwritten recursive descent parsers. Clang (which is the C/C++ frontend for LLVM) does this, and so does rustc.


Replies

afdbcreidlast Tuesday at 6:46 PM

I don't know a single mainstream language that uses parser generators. Python used to, and even they have moved.

AFAIK the reason is solely error messages: the customization available with handwritten parsers is just way better for the user.

show 2 replies
gpderettalast Tuesday at 4:07 PM

I believe that GCC also moved to a handwritten parser, at least for c++, a couple of decades ago.