News for hackers. Stuff that matters.
Re:We Need to Know LR and Recursive Descent Parsing Techniques by jsmith45 on Tuesday January 17, 2023 @11:01AM (#34414122)
I will say it. Using LALR(1) is a bug.

Either use classic LR(1), or bison supports IELR(1), which supports all LR(1) grammars (i.e. will produce identical parses to classic LR(1)), but generates parse tables that nearly the same size as LALR(1).

I'm not sure about quality of IELR's error messages, but at least you don't get the new LALR introduced conflicts that are hard to wrap your head around.

See this nice analysis of it: https://news.ycombinator.com/item?id=24909161

There are no comments on this comment yet.