Closed JoshuaGrams closed 6 years ago
Ooops. Added tests.
I just realised you're the guy who wrote Pint-sized Earley Parser :D I really liked that article, wrote a couple of (unshared) parsers based on your ideas, and indeed I'm slowly trying to work them into Nearley... :-)
Heh. Thanks. Not my ideas, though. That's almost straight out of Elizabeth Scott's paper. Loup Vaillant (Earley Parsing Explained) said that he "completely failed to understand" her paper. He presents a more complicated (and slower?) algorithm to construct the parse trees. We had a conversation on the FoNC mailing list and were just talking past each other, so I wrote an implementation to demonstrate how simple it actually is once you strip away all the obfuscating formalisms. Still not sure I actually addressed his objections, but I had fun writing it. :-)
Thanks for spotting this!
Please can you add a test for this? :-)