GLR(2)

Elkhoundのpaperが一番参考になりそうだった。

Bison allows user-specified actions, and recent versions of Bison
include an extended parser that emulates GLR by copying the stack
instead of building graph, and executing user actions by traversing
the parse forest afterwards. Copying the stack leads to exponential
worst-case time, and tree traversal is expensive. It’s intended for
grammars with only minor deviations from LALR(1).

bisonのやり方は重いんでLALRと微妙に違う程度のものに限るそうな。
ま、それでもないよりはいいんじゃないかしら。

GSSを使うような本格的なGLRは、暗黙の閉路がどうとかいくつかややこしい問題があって、
そんなに簡単でもないらしい。

あとGLRがわかってきた&論文読んでたらElkhoundの意味もわかってきた。
評価低すぎたようだ。

まあ、GLRもLALRをベースに動くもののようだし、
まずはLALRの安定性確保が先決だな。