diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-01 14:47:53 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-01 14:47:53 +0900 |
commit | 62b3121283f2b8883922c55079a1aef028578500 (patch) | |
tree | 98b84eab1af57131ce8a431773f562e2374cdf6b /output.c | |
parent | aab51b985946740e209b419e84d803b1e774f96f (diff) | |
download | byacc-62b3121283f2b8883922c55079a1aef028578500.tar.gz byacc-62b3121283f2b8883922c55079a1aef028578500.tar.bz2 byacc-62b3121283f2b8883922c55079a1aef028578500.zip |
Imported Upstream version 20170430upstream/20170430
Diffstat (limited to 'output.c')
-rw-r--r-- | output.c | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: output.c,v 1.79 2016/12/02 20:42:38 tom Exp $ */ +/* $Id: output.c,v 1.81 2017/04/30 23:23:32 tom Exp $ */ #include "defs.h" @@ -1584,6 +1584,19 @@ output_pure_parser(FILE * fp) putc_code(fp, '\n'); } +#if defined(YY_NO_LEAKS) +static void +output_no_leaks(FILE * fp) +{ + putc_code(fp, '\n'); + + if (fp == code_file) + ++outline; + fputs("#define YY_NO_LEAKS 1\n", fp); + putc_code(fp, '\n'); +} +#endif + static void output_trailing_text(void) { @@ -1985,6 +1998,9 @@ output(void) output_prefix(fp); output_pure_parser(fp); +#if defined(YY_NO_LEAKS) + output_no_leaks(fp); +#endif output_stored_text(fp); output_stype(fp); #if defined(YYBTYACC) @@ -2068,6 +2084,10 @@ output(void) write_section(code_file, body_vars); } write_section(code_file, body_2); + if (pure_parser) + { + write_section(code_file, init_vars); + } #if defined(YYBTYACC) if (initial_action) output_initial_action(); |