Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Optimization of parser tables for portable compilers
Dencker P., Dürre K., Heuft J. ACM Transactions on Programming Languages and Systems6 (4):546-572,1984.Type:Article
Date Reviewed: Aug 1 1985

This paper, drawn from the 1977 PhD thesis of the first author, surveys a variety of LR-parser table compression techniques. Results of applying these techniques to several grammars are presented. The paper is suitable for practitioners, as well as for an advanced course in compiler construction. I am not aware of any other easily accessible reference to the compression methods covered.

The authors describe the Graph Coloring Scheme (GCS), the Line Elimination Scheme (LES), the Row Displacement Scheme (RDS), the Significant Distance Scheme (SDS), the Row Column Scheme (RCS) and the Suppressed Zero Scheme (SZS). The latter two techniques result in data structures that require searching lists during parsing; the other four produce indexed structures.

Experiments were conducted with a variety of compression methods on grammars for ADA, AL, ALGOLW, ALGOL60, BALG, EULER, LEX, LIS, MINILEX, PASCAL, and XPL. The methods compared are GCS, LES, RDS, SDS, LES-GCS combined, LES-RDS combined, RCS and SZS, with two variants of GCS and LES-GCS differing by the coloring heuristic used. Table sizes, significant entry counts, and storage requirements are given for each method on each grammar. A summary table is given that compares the storage requirements. This table must be criticized for selecting the best results for each of the graph coloring heuristics on each grammar rather than consistently selecting values obtained via one method. In general, GCS appears to be the best of the methods described in terms of storage compaction. The authors recommend running the LES-GCS combination during development as it ran 10 times faster than GCS alone. The generation of the ADA tables on a SIEMENS 7.760 required 500 CPU seconds for GCS and 55 seconds for LES-GCS. The tables for LES-GCS were up to 10 percent larger than those obtained with GCS.

The chief weakness of this paper is the lack of sufficient illustrations. It would be an ideal survey paper for instruction were examples included for each technique. The issue of “portable compilers” in the title is not addressed well. The authors state that previous methods were not portable in that the table access could not be programmed in a high-level language, but they do not justify their position. On p. 551, I believe the authors meant to say “amax+1” rather than “smax” for all three occurrences. The PT vector in Figure 3 should have 0 instead of 2 for the first four entries. Figure 7 shows GCS producing 1401 and 3135 byte tables for EULER and PASCAL, respectively. According to Tables IV and V, these values should be 1614 and 3183.

Reviewer:  K. J. Ottenstein Review #: CR108915
Bookmark and Share
 
Parsing (D.3.4 ... )
 
 
Compilers (D.3.4 ... )
 
 
Graph Algorithms (G.2.2 ... )
 
 
Portability (D.2.7 ... )
 
 
Translator Writing Systems And Compiler Generators (D.3.4 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Parsing": Date
Syntax analysis and error recovery
Boullier P., Cambridge University Press, New York, NY, 1984. Type: Book (9780521268431)
Jun 1 1985
An efficient incremental LR parser for grammars with epsilon productions
Agrawal R., Detro K. Acta Informatica 19(4): 369-376, 1983. Type: Article
Jan 1 1986
A portable syntax analyzer for microcomputers
Zaki M., Gamal-Eldin S. Information Systems 10(2): 127-146, 1985. Type: Article
Jul 1 1986
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy