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.