Yet another generation of LALR parsers for regular right part grammars

Citation
S. Morimoto et M. Sassa, Yet another generation of LALR parsers for regular right part grammars, ACT INFORM, 37(9), 2001, pp. 671-697
Citations number
13
Categorie Soggetti
Information Tecnology & Communication Systems
Journal title
ACTA INFORMATICA
ISSN journal
00015903 → ACNP
Volume
37
Issue
9
Year of publication
2001
Pages
671 - 697
Database
ISI
SICI code
0001-5903(200106)37:9<671:YAGOLP>2.0.ZU;2-7
Abstract
In this paper we introduce two methods for building LALR parsers for regula r right part grammars (RRPGs). Both methods build a parser directly from a grammar, require no extra state or data structure, and can deal with all LA LR RRPCs. The first method is quite simple. For almost all LALR RRPGs, including the majority of grammars with stacking conflicts, parsing actions: are similar to those of LALR parsers for usual context free grammars. No extra action i s required to recognize a handle in this case. For other LALR RRPGs, the ri ght hand side of a production is checked to recognize a handle. The second method does not require checking of the right hand side of a pro duction to recognize a handle. Instead, it records the number of conflicts in LR items and in the stack. Unlike previous methods, our method needs no extra data structure.