home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
oct93
/
develop
/
yacc.lha
/
Yacc
/
src
/
output.c.diff
< prev
next >
Wrap
Text File
|
1993-07-11
|
1KB
|
41 lines
*** output.c.orig Fri Jul 09 15:13:56 1993
--- output.c Sun Jul 11 19:44:28 1993
***************
*** 812,826 ****
++outline;
fprintf(code_file, "#define YYERRCODE %d\n", symbol_value[1]);
! if (dflag && unionized)
{
fclose(union_file);
union_file = fopen(union_file_name, "r");
if (union_file == NULL) open_error(union_file_name);
while ((c = getc(union_file)) != EOF)
putc(c, defines_file);
! fprintf(defines_file, " YYSTYPE;\nextern YYSTYPE %slval;\n",
! symbol_prefix);
}
}
--- 812,831 ----
++outline;
fprintf(code_file, "#define YYERRCODE %d\n", symbol_value[1]);
! if (dflag)
{
+ if (unionized)
+ {
fclose(union_file);
union_file = fopen(union_file_name, "r");
if (union_file == NULL) open_error(union_file_name);
while ((c = getc(union_file)) != EOF)
putc(c, defines_file);
! fprintf(defines_file, " YYSTYPE;\n");
! }
! else
! fprintf(defines_file, "#ifndef YYSTYPE\ntypedef int YYSTYPE;\n#endif\n");
! fprintf(defines_file, "extern YYSTYPE %slval;\n", symbol_prefix);
}
}