4 ms·
Alan Kay's group used packrat parsing with a slight modification to handle left recursion in their STEPS project. It lives in as Ohm(1). At some point I tried
by fovc 7y ago
Alan Kay's group used packrat parsing with a slight modification to handle left recursion in their STEPS project. It lives in as Ohm(1).
At some point I tried to use a similar idea to build an incremental parser generator for Emacs (2). Currently abandonware, but think it has potential!
(1) https://ohmlang.github.io/ https://ohmlang.github.io/
(2) https://github.com/felipeochoa/mole https://github.com/felipeochoa/mole
- breatheoften 7y agoOhm is really a nice system — I’m using it to process text extracted from pdf documents. Lots of regular expressions were used before and without control of the documents (which change over time) this kind of code was just unmanageably difficult to maintain. Being able to use negative look ahead with lists of grammar symbols provides an incredibly large amount of power to resolve ambiguities and makes it relatively easy to arrive at an explainable grammar capable of handling “every sample we’ve seen so far drawn from an only partially observable language” ...