[comp.compilers] What the "distinct lookahead set" means in Yacc?

cshen@CS.UCLA.EDU (Chien Chung Shen) (12/08/90)

I am working on a yacc code of an experimental language.  As the grammar
rules get more complex, the "distinct lookahead sets" gets larger. And now
it is over 600 and yacc aborts.

I am not that familiar with yacc so that I would like to know "how, when,
where, why" the "distinct lookahead sets" is increased to prevent tragedy
from happening.

----------------- from y.output -------------------------------
99/300 terminals, 217/300 nonterminals
408/600 grammar rules, 652/1000 states
2 shift/reduce, 0 reduce/reduce conflicts reported
217/350 working sets used
memory: states,etc. 3264/24000, parser 10440/12000
566/600 distinct lookahead sets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
853 extra closures
2830 shift entries, 47 exceptions
942 goto entries
3947 entries saved by goto default
Optimizer space used: input 7329/24000, output 2572/12000
2572 table entries, 995 zero
maximum spread: 329, maximum offset: 650
---------------------------------------------------------------

Any help is appreciated, and thanx in advance.

Chien-Chung
[In AT&T yacc, the table sizes are set when yacc is compiled; you can't
increase them unless you have the source.  Try using Bison or Berkeley yacc,
or else make your grammar less complicated. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.