[BACK]Return to output.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / yacc

Diff for /src/usr.bin/yacc/output.c between version 1.4 and 1.5

version 1.4, 1996/12/06 12:07:13 version 1.5, 2001/02/26 00:03:32
Line 936 
Line 936 
     symnam[0] = "end-of-file";      symnam[0] = "end-of-file";
   
     if (!rflag) ++outline;      if (!rflag) ++outline;
     fprintf(output_file, "#if YYDEBUG\nchar *%sname[] = {", symbol_prefix);      fprintf(output_file, "#if YYDEBUG\n#if defined(__cplusplus) || __STDC__\nconst char * const %sname[] =\n#else\nchar *%sname[] =\n#endif\n\t{", symbol_prefix, symbol_prefix);
     j = 80;      j = 80;
     for (i = 0; i <= max; ++i)      for (i = 0; i <= max; ++i)
     {      {
Line 1062 
Line 1062 
     FREE(symnam);      FREE(symnam);
   
     if (!rflag) ++outline;      if (!rflag) ++outline;
     fprintf(output_file, "char *%srule[] = {\n", symbol_prefix);      fprintf(output_file, "#if defined(__cplusplus) || __STDC__\nconst char * const %srule[] =\n#else\nchar *%srule[] =\n#endif\n\t{", symbol_prefix, symbol_prefix);
     for (i = 2; i < nrules; ++i)      for (i = 2; i < nrules; ++i)
     {      {
         fprintf(output_file, "\"%s :", symbol_name[rlhs[i]]);          fprintf(output_file, "\"%s :", symbol_name[rlhs[i]]);

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5