Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!apple!bionet!agate!ucbvax!hplabs!hp-pcd!hpfcdc!mike From: mike@hpfcdc.HP.COM (Mike McNelly) Newsgroups: comp.unix.questions Subject: Re: yacc Message-ID: <5740033@hpfcdc.HP.COM> Date: 18 Nov 88 16:32:19 GMT References: <895@ncrcce.StPaul.NCR.COM> Organization: HP Ft. Collins, Co. Lines: 22 > 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@hplabs.hp.com