output.c (e477abf734cc777a55286bfbd6b80a6760c96acf) | output.c (5b91e83f530b59d5c1b5d180a4e6009caac8718c) |
---|---|
1/* $Id: output.c,v 1.44 2012/05/26 01:13:02 tom Exp $ */ | 1/* $Id: output.c,v 1.45 2013/03/05 00:29:17 tom Exp $ */ |
2 3#include "defs.h" 4 5#define StaticOrR (rflag ? "" : "static ") 6#define CountLine(fp) (!rflag || ((fp) == code_file)) 7 8static int nvectors; 9static int nentries; --- 846 unchanged lines hidden (view full) --- 856 ++outline; 857 if (fp != defines_file || iflag) 858 fprintf(fp, "#define YYERRCODE %d\n", symbol_value[1]); 859 860 if (fp == defines_file || (iflag && !dflag)) 861 { 862 if (unionized) 863 { | 2 3#include "defs.h" 4 5#define StaticOrR (rflag ? "" : "static ") 6#define CountLine(fp) (!rflag || ((fp) == code_file)) 7 8static int nvectors; 9static int nentries; --- 846 unchanged lines hidden (view full) --- 856 ++outline; 857 if (fp != defines_file || iflag) 858 fprintf(fp, "#define YYERRCODE %d\n", symbol_value[1]); 859 860 if (fp == defines_file || (iflag && !dflag)) 861 { 862 if (unionized) 863 { |
864 rewind(union_file); 865 while ((c = getc(union_file)) != EOF) 866 putc(c, fp); | 864 if (union_file != 0) 865 { 866 rewind(union_file); 867 while ((c = getc(union_file)) != EOF) 868 putc(c, fp); 869 } |
867 fprintf(fp, "extern YYSTYPE %slval;\n", symbol_prefix); 868 } 869 } 870} 871 872static void 873output_stored_text(FILE * fp) 874{ --- 566 unchanged lines hidden (view full) --- 1441 { 1442 output_externs(externs_file, global_vars); 1443 if (!pure_parser) 1444 output_externs(externs_file, impure_vars); 1445 } 1446 1447 if (iflag) 1448 { | 870 fprintf(fp, "extern YYSTYPE %slval;\n", symbol_prefix); 871 } 872 } 873} 874 875static void 876output_stored_text(FILE * fp) 877{ --- 566 unchanged lines hidden (view full) --- 1444 { 1445 output_externs(externs_file, global_vars); 1446 if (!pure_parser) 1447 output_externs(externs_file, impure_vars); 1448 } 1449 1450 if (iflag) 1451 { |
1449 ++outline; 1450 fprintf(code_file, "#include \"%s\"\n", defines_file_name); 1451 if (!dflag) | 1452 if (dflag) 1453 { 1454 ++outline; 1455 fprintf(code_file, "#include \"%s\"\n", defines_file_name); 1456 } 1457 else |
1452 output_defines(externs_file); 1453 } 1454 else 1455 { 1456 putc_code(code_file, '\n'); 1457 output_defines(code_file); 1458 } 1459 --- 48 unchanged lines hidden --- | 1458 output_defines(externs_file); 1459 } 1460 else 1461 { 1462 putc_code(code_file, '\n'); 1463 output_defines(code_file); 1464 } 1465 --- 48 unchanged lines hidden --- |