Fork me on GitHub

hey @aengelberg, how does instaparse work? i was looking at the source and it looks like it makes multiple passes until it's successfully consumed the whole input string, correct? and if a parse doesn't work, an "error node is embedded in the tree" so it knows not to try that parse again?


@sova this talk explains the internals pretty well


oh nice. thank you! i was very curious because it's very powerful and very fast and i don't remember things being so fast in compilers class 😄


glad to hear it's fast! Although what makes Instaparse really unique is that it works well with left-recursive and ambiguous grammars


something like

S = 'a' | S 'a'
usually doesn't work in normal parsers


leftwards-building strings... I see that is cool


I want to do some language processing stuff -- eventually reduce articles people write to synopses and relevant tags. i feel like that's very possible but i gotta think a bit more on the approach. like checking words against a dictionary to try and focus on nouns and verbs


aha, now i know why the file is called .gll 😄


"send me all your old magazine subscriptions before any new ones" is a good way to explain how it works briefly.

👍 1