

       From:  Jeff Wabik
              { umn-cs!shamash!jwabik }
              December, 1987




The Table sizes needed for YACC are as follows:

95/6000 terminals, 238/600 nonterminals
459/1000 grammar rules, 859/1250 states
0 shift/reduce, 0 reduce/reduce conflicts reported
238/700 working sets used
memory: states,etc. 4122/24000, parser 3113/12000
599/1200 distinct lookahead sets
946 extra closures
1234 shift entries, 65 exceptions
570 goto entries
1413 entries saved by goto default
Optimizer space used: input 3372/24000, output 1146/12000
1146 table entries, 0 zero
maximum spread: 333, maximum offset: 856


If your YACC isn't big enough and you DO have the sources, dig around
in /usr/src/usr.bin/yacc and play with the "dextern" file.  As you can
see, my YACC has been converted to a Super-YACC.

There is a missing routine called "yyerror".  yyerror should look something
like this:

       yyerror(string)
       char *string;
       {

                extern int yylineno;

                fprintf(stderr,"Syntax error at line %d near %s.\n",
                        yylineno,yytext);
                if (dABORT)
                   exit(dSYN_ERROR);
                else
                   return(0);

       }

Take a CLOSE look at memory management in the LEX (i.e.  There is none.)  Each
returned IDENTIFIER makes a call to calloc() that is never ever cfree()'ed.
How you're going to feed memory to the "$$" and "$?" specs in YACC is up
to you, but be warned that if you dont have a virtual machine, this version
will never free up allocated memory.

If you have questions about what more I did to this, or how my routines
work, please feel free to contact  me:

       Jeff Wabik
       Control Data Corporation
       2800 E. Old Shakopee Road
       Bloominton, MN  55420
       (612) 853-6811

       { umn-cs \
UUCP:             !shamash!jwabik }
       { meccts /


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Official Disclaimer:

Control Data Corporation is not responsible in any way for the contents of
this Ada Language specification, nor does CDC make a commitment to the
support of this Public Domain grammar.  What you see is what you get.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Hope my mods can be helpful to others.  Happy hacking!

                       -Jeff

