From ee27adc926b8d3fbc3522cdbed9c2f6ef1bea015 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 29 Oct 1986 11:27:47 +0000 Subject: [PATCH] Added nflag, that allows the LLmessage(-1) call, to indicate garbage at end of program. --- util/LLgen/src/gencode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/LLgen/src/gencode.c b/util/LLgen/src/gencode.c index 528777e53..9dc373771 100644 --- a/util/LLgen/src/gencode.c +++ b/util/LLgen/src/gencode.c @@ -178,7 +178,7 @@ genrecovery() { for (st = start; st; st = st->ff_next) { fputs(st->ff_name, f); p = &nonterms[st->ff_nont]; - fputs("() {\n\tunsigned int s[LL_NTERMINALS+LL_NSETS+1];\n\tLLnewlevel(s);\n\tLLread();\n", f); + fputs("() {\n\tunsigned int s[LL_NTERMINALS+LL_NSETS+2];\n\tLLnewlevel(s);\n\tLLread();\n", f); if (g_gettype(p->n_rule) == ALTERNATION) { genpush(findindex(p->n_contains)); } @@ -206,6 +206,7 @@ genrecovery() { } fputs(c_arrend, f); free((p_mem) index); + if (nflag) fputs("#define LL_NEWMESS\n", f); copyfile(rec_file); if (ferror(f) != 0) { fatal(0,"write error on temporary");