Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
777 B

  1. // Copyright (c) 1993-1999 Microsoft Corporation
  2. #include "y3.h"
  3. void
  4. hideprod( void )
  5. {
  6. /* in order to free up the mem and amem arrays for the optimizer,
  7. /* and still be able to output yyr1, etc., after the sizes of
  8. /* the action array is known, we hide the nonterminals
  9. /* derived by productions in levprd.
  10. */
  11. register i, j;
  12. j = 0;
  13. levprd[0] = 0;
  14. PLOOP(1,i)
  15. {
  16. if( !(levprd[i] & REDFLAG) )
  17. {
  18. ++j;
  19. if( foutput != NULL )
  20. {
  21. fprintf( foutput, "Rule not reduced: %s\n", writem( prdptr[i] ) );
  22. }
  23. }
  24. levprd[i] = *prdptr[i] - NTBASE;
  25. }
  26. if( j ) fprintf( stdout, "%d rules never reduced\n", j );
  27. }