Tomita devised a method of generalized LR GLR parsing to parse ambiguous grammars e ciently. A GLR parser uses linear-time LR parsing techniques as long as possible, falling back on more expensive general techniques when necessary. Much research has addressed speeding up LR parsers. However, we argue that this previous work is not transferable to GLR parsers. Instead, we speed up LR parsers by building larger pushdown automata, trading space for time. A variant of the GLR algorithm then incorporates our faster LR parsers. Our timings show that our new method for GLR parsing can parse highly ambiguous grammars signi cantly faster than a standard GLR parser.
John Aycock, R. Nigel Horspool