Faster Tomita parsing
Date
1998
Authors
Aycock, John Daniel
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
Tomita's parsing method, or generalized LR parsing, was designed to parse ambiguous grammars efficiently. Tomita uses specific 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, in this thesis, we argue that this previous work is not transferable to Tomita parsers. To speed up LR parsers, we reduce LR parsing overhead two ways: grammar transformations unroll recursion, and larger finite automata in the parser trade space for time.
We have devised a variant of Tomita's algorithm which incorporates our low overhead LR parsers. Our timings show that our Tomita variant gives an order of magnitude improvement for the worst case ambiguous grammar on most inputs, several orders of magnitude improvement are seen on larger grammars.