4 ms·
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 pars
by jsmith45 4y ago
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 https://news.ycombinator.com/item?id=24909161