Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Parsing theory volume 2: LR(K) and LL(K) parsing
Sippu S., Soisalon-Soininen E., Springer-Verlag New York, Inc., New York, NY, 1990. Type: Book (9780387517322)
Date Reviewed: Oct 1 1991

The second half of a 650-page monograph on the theory of parsing, this volume covers the theory, mathematics, construction, use, and practice of parsers built using LR(k) and LL(k) techniques. It assumes knowledge of the material in volume 1, both in terms of mathematics and in terms of notation. The book itself is attractively laid out and printed. The presentation of the material is consistent, and the authors make good use of the internal numbering scheme to reference material both backwards and forwards. The contents, index, bibliography, and bibliographic notes all meet a high standard. Figures are plentiful, clear, and helpful.

The first two chapters (half the book) concern themselves with LR(k) parsing. Chapter 6 (numbering runs on from volume 1) covers the theory of LR(k) and the common variants SLR(k) and LALR(k). Most of the chapter is taken up with the necessary proofs of parser and grammar properties, including those concerning the reduction of grammars with long lookahead to those with shorter lookahead or simpler construction. Chapter 7 describes the construction methods for the parsers and justifies the constructions in all necessary detail. The authors show how lookaheads can generally be computed as combinations of relations over grammar elements and parser states. In my experience, calculating in this way is fairly easy to program; the relations often give useful information about the grammar, language, and parser. Most other authors do not describe lookahead computation as clearly as the relation algebra allows. This chapter also gives methods for shrinking the space required by parser tables and for speeding up parser execution by the elimination of unit reductions. Chapter 8 repeats the exercise for LL(k) parsers while noting the explicit parallels and using them to shorten the exposition.

Chapter 9 considers the problem of error handling during parsing. Error location and correction methods are defined precisely, and the authors describe exactly what they would like to see as user-friendly output from a parser when an error has occurred. The techniques are designed to allow parsing to continue, but the book does not include much discussion of correction in situations where the analysis is supposed to lead to usable output. Finally, chapter 10 considers the algorithmic complexity of testing grammars for inclusion in particular grammar classes and recapitulates earlier results on the maximum size of generated parsers. Algorithms that test grammar membership without actually generating the full parser are an interesting idea, but my experience would suggest that they are not very valuable in practice. Every chapter includes a full set of sensible exercises; unfortunately, the authors give few hints and no solutions.

This book offers a variety of things to like. First, the presentation is direct and complete. The material marches carefully forward, covering each topic exhaustively and then moving to the next; no exercises left to the reader appear on the important paths. Second, the authors regularly give an informal overview of what is about to come next and how it connects to what came before and to practice; this overview is particularly important when the next five or ten pages are dense with symbols and proofs. Third, the notation is tidy, smoothly used, and not idiosyncratic. Fourth, fully worked out examples abound in the notation of the text--a boon to the scholar who is not quite sure of the workings of a particular proof or construction. Finally, the authors provide plenty of references and comments on the practical use of parsers, although no one would mistake this book for a compiler construction text. (I do wish, though, that the authors had emphasized more that practical parsers never become anything like as large as perverse examples can.)

I do have one small complaint, however. Several times notation and terminology from volume 1 are imported without comment, and I found myself wondering if I had missed something. This was particularly irksome because the material was always something that could have been briefly repeated in a sentence or two. On a more important note, this book confirms my belief that parsing theory is essentially a shallow area of mathematics. Theorems and proofs consist mostly of detailed symbol pushing; one seldom gains an insight that might be used on another class of problems. This aside, Sippu and Soisalon-Soininen have written a creditable book, suitable both as a reference and as a text for those who must dig into this relatively dusty area. It supersedes those that have gone before.

Reviewer:  C. S. Wetherell Review #: CR114982
Bookmark and Share
 
Parsing (F.4.2 ... )
 
 
Decision Problems (F.4.2 ... )
 
 
Grammar Types (F.4.2 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Parsing": Date
Upper bounds on the size of LR(k) parsers
Ukkonen E. Information Processing Letters 20(2): 99-103, 1985. Type: Article
Nov 1 1985
LR parsing: theory and practice
Chapman N., Cambridge University Press, New York, NY, 1987. Type: Book (9789780521304139)
Sep 1 1988
Parsing theory. Vol. 1: languages and parsing
Sippu S., Soisalon-Soininen E., Springer-Verlag New York, Inc., New York, NY, 1988. Type: Book (9789780387137209)
Jul 1 1989
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