Construction of Efficient Generalized LR Parsers

Miguel Angel Alonso Pardo
David Cabrero Souto
Manuel Vilares Ferro

in Proc. of Second International Workshop on Implementing Automata (WIA'97), pp. 131-140, London, Ontario, Canada, 1997.


Abstract

We show how LR parsers for the analysis of arbitrary context-free grammars can be derived from classical Earley's parsing algorithm. The result is a Generalized LR parsing algorithm working at complexity O(n3) in the worst case, which is achieved by the use of dynamic programming to represent the non-deterministic evolution of the stack instead of graph-structured stack representations, as has often been the case in previous approaches. The algorithm behave better in practical cases, achieving linear complexity on LR grammars. Experimental results show the performance of our proposal.

Keywords: LR automata, non deterministic context-free parsing, dynamic programming, natural language processing.


Miguel Angel Alonso Pardo / alonso@dc.fi.udc.es
David Cabrero Souto / cabrero@dc.fi.udc.es
Manuel Vilares Ferro / vilares@dc.fi.udc.es