logoalt Hacker News

afdbcreidlast Tuesday at 6:46 PM2 repliesview on HN

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.


Replies

muvlonlast Tuesday at 11:12 PM

I'll let you decide whether it counts as "mainstream", but the principal implementation of Nix has a very old school setup using bison and flex:

https://github.com/NixOS/nix/blob/master/src/libexpr/parser....

https://github.com/NixOS/nix/blob/master/src/libexpr/lexer.l

show 1 reply
sanxiynyesterday at 12:30 AM

Ruby also used to use Bison, uses its own https://github.com/ruby/lrama these days.