3 ms·
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 recursiv
by brooke2k 10mo ago
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.
- gpderetta 10mo agoI believe that GCC also moved to a handwritten parser, at least for c++, a couple of decades ago.
- afdbcreid 10mo agoI 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.
- muvlon 10mo agoI'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.y https://github.com/NixOS/nix/blob/master/src/libexpr/parser.... https://github.com/NixOS/nix/blob/master/src/libexpr/lexer.l https://github.com/NixOS/nix/blob/master/src/libexpr/lexer.l
- nullpoint420 10mo agoIt shows, even as a Nix fan. The errors messages are abysmal
- sanxiyn 10mo agoRuby also used to use Bison, uses its own https://github.com/ruby/lrama https://github.com/ruby/lrama these days.