4 ms·
For general-purpose languages, yes, but there are some exceptions. Ruby uses yacc, and Python uses a custom LL(1)-ish parser generator, which is in the process
by pansa2 7y ago
For general-purpose languages, yes, but there are some exceptions. Ruby uses yacc, and Python uses a custom LL(1)-ish parser generator, which is in the process of being replaced by a custom PEG parser generator [0].
[0] https://github.com/gvanrossum/pegen https://github.com/gvanrossum/pegen
- regularfry 7y agoRuby's yacc parser is my usual go-to for telling people how not to do it. That thing's terrifying.
- jknoepfler 7y agoTo be fair, ruby is not a fun language to machine-parse.
- regularfry 7y agoOh absolutely. As a user, I love the ruby syntax. As a potential contributor to the codebase? NOPENOPENOPE.
- chrisseaton 7y agoRuby doesn’t use yacc as intended though - it’s definitely not a good advert for yacc.