Unger Parsing
buttondown.com·5d·
Discuss: Hacker News
📝PEG Parsing
Preview
Report Post

I am busy with holiday stuff so this post is a little bit half-baked. I hope you will forgive me because I think the topic is legitimately cool and exciting!

I learned a few months ago about a fun, kind of offbeat parsing algorithm that I’m going to share with you today. I learned about this from Parsing Techniques: A Practical Guide, which if you’re interested in goofy parsing algorithms I highly recommend (although I think for the most part, it’s not really "practical" these days to need to parse ambiguous grammars, which this book cares a lot about).

When we have a context-free grammar we want to parse, conceptually what we’re trying to do is to find a tree of productions from some root nonterminal symbol that would produce that string. There are two popular ways of doing t…

Similar Posts

Loading similar posts...