Grammar partitioning and modular deterministic parsing

Citation
Sc. Reghizzi et G. Psaila, Grammar partitioning and modular deterministic parsing, COMPUT LANG, 24(4), 1998, pp. 197-227
Citations number
24
Categorie Soggetti
Computer Science & Engineering
Journal title
COMPUTER LANGUAGES
ISSN journal
00960551 → ACNP
Volume
24
Issue
4
Year of publication
1998
Pages
197 - 227
Database
ISI
SICI code
0096-0551(199812)24:4<197:GPAMDP>2.0.ZU;2-F
Abstract
Complex languages are often modularized into sublanguages and the compiler is accordingly organized as a set of separate modules. Modularization (call ed federalization) is beneficial for beating complexity, for maintenance, a nd for reuse. Focusing on syntax analysis, we consider the decomposition of a grammar into deterministic subgrammars. We study three conditions for de terminism in grammar partitioning: first using homogeneous modules of the L R(1) or LL(1) kind; then using heterogeneous modules (LR(1) or LL(1)). Fede ralization slightly decreases the generality of LR(1) parsers, but not of L L(1) ones, and it allows to handle some grammars which are not LALR(1). Exp erimental results show that LR(1) federal automata have fewer (up to 60%) s tates than monolithic LR(1) automata. Criteria for modularization, practica l experiences and hints to semantic decomposition issues conclude the paper . (C) 1999 Elsevier Science Ltd. All rights reserved.