4 ms·
So where does this lie on the antlr, Allen Short's parsley, PEG, spectrum? (very loosely speaking) And how does it relate to the issues discusseed in Haberman'
by fizixer 11y ago
So where does this lie on the antlr, Allen Short's parsley, PEG, spectrum? (very loosely speaking)
And how does it relate to the issues discusseed in Haberman's articles [0], [1], [2]? which can be considered a good survey of this field (although I'm open to other surveys if anyone can point out).
Also intersting (Terence Parr's talk, ANTLR creator) [3], Allen Short's talk [4].
[0] http://blog.reverberate.org/2013/07/ll-and-lr-parsing-demystified.html http://blog.reverberate.org/2013/07/ll-and-lr-parsing-demyst...
[1] http://blog.reverberate.org/2013/08/parsing-c-is-literally-undecidable.html http://blog.reverberate.org/2013/08/parsing-c-is-literally-u...
[2] http://blog.reverberate.org/2013/09/ll-and-lr-in-context-why-parsing-tools.html http://blog.reverberate.org/2013/09/ll-and-lr-in-context-why...
[3] https://www.youtube.com/watch?v=q8p1voEiu8Q https://www.youtube.com/watch?v=q8p1voEiu8Q
[4] https://www.youtube.com/watch?v=t5X3ljCOFSY https://www.youtube.com/watch?v=t5X3ljCOFSY
- SQLite 11y agoI wrote lemon in the late 1980's on a Sun4, while a graduate student. There was also a program called "lime" that generated an LL(1) parser, but I've long since lost that code. Lemon was intended as a yacc-replacement. The advantages of lemon over yacc are that lemon has a less error-prone syntax (it uses symbolic names rather than $1, $2, etc), and that lemon generates a reentrant and thread-safe parser. (At the time, yacc/bison parsers were neither reentrant nor thread-safe. I don't know if that has been fixed in the intervening decades.) Lemon has always been open source. But it languished with little attention for 10 years until I used it to generate the parser for SQLite. Then suddenly people started to notice and use it. Lemon does not have a separate version control system. The source code to Lemon (a single file of C plus a template file for the generated parser) are part of the SQLite source tree.
- code4life 11y agoYes, bison now is both, reentrant, thread-safe and supports push parsing. I helped implement the push parser support many years ago with the help of the Bison development team.
- arcticbull 11y agoHey! I've written a bunch of stuff with lemon over the last few years and at some point. Lemon has been my go-to parser generator for a long time. At some point, I: * collected some examples I'd found * split up the single .c file into constituent parts * improved error reporting and modernized some syntax * started working on adding Rust support as a learn-Rust project. * fixed 64-bit conversion warnings https://github.com/martinmroz/lemon https://github.com/martinmroz/lemon It's definitely not packaged up, but hopefully someone finds this stuff valuable. I'd love to see Lemon gain more widespread use. I want to help address the biggest issues I had getting started using it, which were lack of community, lack of documentation/examples, difficulty contributing and lack of a package/distribution medium.