Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

False dilemma as there are parsing frameworks that use top down grammars (namely PEGs and their derivatives).

Grammars written in these languages very closely resemble the structure of hand written recursive descent parsers, unlike generative grammars, but also are amenable to automatic generation of efficient parsers (namely packrat parsers, but in practice even just one or two entries of memorization at each production is performant).

MRI's parser is a disaster. It makes sense given the context of when it was written, but the language would be free of some syntactic warts if they'd moved to something with more lookahead some time ago. The opaqueness of the parser grammar is repeatedly mentioned as a limit on useful contribution to the language.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: