From: ceriel Date: Thu, 19 Nov 1992 15:37:52 +0000 (+0000) Subject: Added LL_MAXTOKNO X-Git-Tag: release-5-5~380 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ca4461dc4c0afd9505aee48b0f8391c0b5d31e42;p=ack.git Added LL_MAXTOKNO --- diff --git a/util/LLgen/src/gencode.c b/util/LLgen/src/gencode.c index 70ec65f0b..23c700103 100644 --- a/util/LLgen/src/gencode.c +++ b/util/LLgen/src/gencode.c @@ -154,15 +154,19 @@ opentemp(str) string str; { STATIC geninclude() { register p_token p; + int maxno = 0; opentemp((string) 0); for (p = tokens; p < maxt; p++) { + if (p->t_tokno > maxno) maxno = p->t_tokno; if (p->t_tokno >= 0400) { - fprintf(fpars,"# define %s %d\n", + fprintf(fpars,"#define %s %d\n", p->t_string, p->t_tokno); } } + fprintf(fpars, "#define %s_MAXTOKNO %d\n", prefix ? prefix : "LL", + maxno); doclose(fpars); install(f_include, "."); }