2 ms·
I think Ruby does? IIRC its source code includes a 10,000+ line “parse.y” file which is converted to C code using Yacc.
by pansa2 2y ago
I think Ruby does? IIRC its source code includes a 10,000+ line “parse.y” file which is converted to C code using Yacc.
- runevault 2y agoInteresting, I'll have to look into this because I'd never heard that before and now I'm curious. A language with as much going on as Ruby was not one I would have picked as a candidate for yacc
- runevault 2y agoJust went and looked in the github repo. 16,000+ line .y file. I can't imagine that is pleasant to maintain.
- thomascountz 2y agoExcitingly, Ruby 3.3+ shipped with a new alternative parser called Prism[0]! See also: [1][2]. [0]: https://github.com/ruby/prism https://github.com/ruby/prism [1]: https://railsatscale.com/2023-06-12-rewriting-the-ruby-parser/ https://railsatscale.com/2023-06-12-rewriting-the-ruby-parse... [2]: https://railsatscale.com/2024-04-16-prism-in-2024/ https://railsatscale.com/2024-04-16-prism-in-2024/