yacc

Mike McNelly mike at hpfcdc.HP.COM
Sat Nov 19 02:32:19 AEST 1988


> I am working on a C compiler that has a couple of yacc-generated
> parsers (one for the C input, one for the intermediate language).
> I recently made a change to one of the yacc grammar definitions (the
> .y file), and when I run yacc, I get a message saying, "fatal error:
> too many states."  When I run yacc with -v on a slightly simplified
> .y file, it tells me that it is defining 748 of 750 states.
> 
> My question is:  is there any way I can increase the number of states?
> If so, how do I do it?  The documentation I've been able to get my
> hands on says nothing about the number of states.

Unless you have access to the source code for yacc, the state limit is a
hard one.  Yacc does not have dymanically allocated arays for its
internal use so the only way to increase the number of allowable states
is to modify the source code and recompile.  That's a trivial process if
you have the source code.

The source can also be modified to make the internal arrays extensible.
Our customers kept running into the same problems so we made the mods.
Sorry, I can't release source code.

Mike McNelly	mike%hpfcla at hplabs.hp.com



More information about the Comp.unix.questions mailing list