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.

39 lines
1.5 KiB

  1. // Copyright (c) 1993-1999 Microsoft Corporation
  2. #include "y1.h"
  3. void
  4. summary( void )
  5. {
  6. /* output the summary on the tty */
  7. if( foutput!=NULL )
  8. {
  9. fprintf( foutput, "\n%d/%d terminals, %d/%d nonterminals\n", ntokens, NTERMS,
  10. nnonter, NNONTERM );
  11. fprintf( foutput, "%d/%d grammar rules, %d/%d states\n", nprod, NPROD, nstate, NSTATES );
  12. fprintf( foutput, "%d shift/reduce, %d reduce/reduce conflicts reported\n", zzsrconf, zzrrconf );
  13. fprintf( foutput, "%d/%d working sets used\n", zzcwp-wsets, WSETSIZE );
  14. fprintf( foutput, "memory: states,etc. %d/%d, parser %d/%d\n", zzmemsz-mem0, MEMSIZE,
  15. memp-amem, ACTSIZE );
  16. fprintf( foutput, "%d/%d distinct lookahead sets\n", nlset, LSETSIZE );
  17. fprintf( foutput, "%d extra closures\n", zzclose - 2*nstate );
  18. fprintf( foutput, "%d shift entries, %d exceptions\n", zzacent, zzexcp );
  19. fprintf( foutput, "%d goto entries\n", zzgoent );
  20. fprintf( foutput, "%d entries saved by goto default\n", zzgobest );
  21. }
  22. if( zzsrconf!=0 || zzrrconf!=0 )
  23. {
  24. fprintf( stdout,"\nconflicts: ");
  25. if( zzsrconf )fprintf( stdout, "%d shift/reduce" , zzsrconf );
  26. if( zzsrconf && zzrrconf )fprintf( stdout, ", " );
  27. if( zzrrconf )fprintf( stdout, "%d reduce/reduce" , zzrrconf );
  28. fprintf( stdout, "\n" );
  29. }
  30. if (ftemp) {
  31. fclose( ftemp );
  32. }
  33. if( fdefine != NULL ) fclose( fdefine );
  34. }