What the "distinct lookahead set" means in Yacc?

cshen@CS.UCLA.EDU (Chien Chung Shen)
Fri, 7 Dec 90 22:58:45 GMT

          From comp.compilers

Related articles
What the "distinct lookahead set" means in Yacc? cshen@CS.UCLA.EDU (1990-12-07)
| List of all articles for this month |

Newsgroups: comp.compilers
From: cshen@CS.UCLA.EDU (Chien Chung Shen)
Originator: cshen@maui.cs.ucla.edu
Keywords: yacc, question
Organization: UCLA Computer Science Department
Distribution: usa
Date: Fri, 7 Dec 90 22:58:45 GMT

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.

[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]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.