Oh wow, I didn’t know the state tables for pure LR(1) were that big. Cool, thanks! Any comment on the “Minimal LR(1) parser” algorithm mentioned at the end of that thread? That leads me to HYACC but I don’t find much else about it.

I implemented Pager’s algorithm – or, more accurately, a hybrid of Pager’s algorithm, Chen’s thesis, and some guesswork – in grmtools. As that suggests, Pager’s algorithm is a bit harder to implement than one would like!

The IELR paper (I wondered if ELR is a typo for IELR? But maybe there’s another state reduction algorithm I don’t know about!) makes a convincing case that Pager’s algorithm has flaws, and that IELR corrects those flaws. I haven’t implemented IELR, though if I was to revisit that part of grmtools/lrtable, I would start with IELR and not Pager.

wat. Shouldn’t this literally just be a state transition table and a token stack?

With LALR(1), sure (which I plan to add later). Check this out: https://stackoverflow.com/questions/24174458/lr1-parser-state-size-still-an-issue

Oh wow, I didn’t know the state tables for pure LR(1) were that big. Cool, thanks! Any comment on the “Minimal LR(1) parser” algorithm mentioned at the end of that thread? That leads me to HYACC but I don’t find much else about it.

You might look at Pager’s algorithm or ELR(1) if you’re interested in reducing the table size.

I implemented Pager’s algorithm – or, more accurately, a hybrid of Pager’s algorithm, Chen’s thesis, and some guesswork – in grmtools. As that suggests, Pager’s algorithm is a bit harder to implement than one would like!

The IELR paper (I wondered if ELR is a typo for IELR? But maybe there’s another state reduction algorithm I don’t know about!) makes a convincing case that Pager’s algorithm has flaws, and that IELR corrects those flaws. I haven’t implemented IELR, though if I was to revisit that part of grmtools/lrtable, I would start with IELR and not Pager.

There’s also Lemon parser generator (which is used by SQLite, from the same authors).

Lemon is LALR(1), so it’s completely different.