more than 126 tokens in YACC ?

David R. Mayne david at wmms.UUCP
Sat Jun 8 05:59:40 AEST 1991


In article <1214 at wzlr.UUCP>, jms at wzlr.UUCP (Jack Stephens) writes:
> 
> 
> I went to begin the grammar that is supposed to be driven by this thing
> and decided to start slow. Nothing more than a list of "%token KEYWORD"
> pairs and a trailing "%%".  Issued a "yacc -d grammar.y" to make sure that
> y.tab.h would agree with the hand tooled version I had been using and I
> get:
> 
>  fatal error: too many terminals, limit 127, line 125
> 
>  Will some kind soul tell me this is all a bad dream ?  Failing that,
>  how 'bout a work around ?

This question pops up from time to time.

The work around is to get byacc (Berkeley yacc).
Having the source code allows you to set the number of symbols
availible in the symbol table, and simply recompile, if
necessary. No changes are needed to compile this package on the 3b1.
As a bonus, byacc operates faster than the stock yacc.

You can get byacc at some of the archive sites around; 
one source is skeeve.

Best of luck,

David
-- 
David R. Mayne         1364 Normandy Dr. NE             Atlanta, GA 30306
david at wmms             (404) 876-0943        ...!gatech!bagend!wmms!david



More information about the Comp.sys.3b1 mailing list