Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Upper bounds on the size of LR(k) parsers
Ukkonen E. Information Processing Letters20 (2):99-103,1985.Type:Article
Date Reviewed: Nov 1 1985

This short note shows that in many cases the trivial upper bound 2 | G | k+1 on the number of states of an LR( k )-parser for a grammar G is too conservative. (The size of G is the sum of the lengths of the productions.) In case of a right-linear G, the bound is 2 | G | only in the case of a left-linear G can the authors prove a polynomial bound, namely | G | + 1. The most general case the authors discuss is the class of grammars without right-recursive symbols. In this case, the canonical LR-parser has at most | G | k | G | &dundot; 2 | G | states. The authors don’t know whether this bound is strict. The fastest growth of states they can present is in a family of grammars Gnk with size 17n + k + 6; it can be shown that the LR-parsers of this family have more than 2 ( k - 1 ) n states.

All proofs in this note are based on a lemma which gives a relation between sets of LR-items and on discussing properties of the GOTO-function. They are easily understandable.

Reviewer:  H. J. Schneider Review #: CR109622
Bookmark and Share
  Featured Reviewer  
 
Parsing (F.4.2 ... )
 
 
Syntax (D.3.1 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Parsing": Date
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)
Oct 1 1991
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