From: ceriel Date: Wed, 29 Oct 1986 11:27:47 +0000 (+0000) Subject: Added nflag, that allows the LLmessage(-1) call, to indicate garbage X-Git-Tag: release-5-5~5174 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ee27adc926b8d3fbc3522cdbed9c2f6ef1bea015;p=ack.git Added nflag, that allows the LLmessage(-1) call, to indicate garbage at end of program. --- 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");