From: helly Date: Mon, 1 May 2006 18:01:57 +0000 (+0000) Subject: - Change comment when num tables > 8 X-Git-Tag: 0.13.6~360 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30c5d190a323b8bd954ccf17a5552fe392172eda;p=re2c - Change comment when num tables > 8 --- diff --git a/code.cc b/code.cc index 2ca271a3..931a4490 100644 --- a/code.cc +++ b/code.cc @@ -221,7 +221,7 @@ void BitMap::gen(std::ostream &o, uint ind, uint lb, uint ub) uint *bm = new uint[n]; - for (uint i = 0, t = 0; b; i += n) + for (uint i = 0, t = 1; b; i += n, t += 8) { memset(bm, 0, n * sizeof(uint)); @@ -235,7 +235,7 @@ void BitMap::gen(std::ostream &o, uint ind, uint lb, uint ub) if (c > 8) { - o << "\n" << indent(ind+1) << "/* table " << ++t << ": " << i << " */"; + o << "\n" << indent(ind+1) << "/* table " << t << " .. " << std::min(c, t+7) << ": " << i << " */"; } for (uint j = 0; j < n; ++j) diff --git a/test/bug1479044.b.c b/test/bug1479044.b.c index bf825fe8..ebb2f587 100755 --- a/test/bug1479044.b.c +++ b/test/bug1479044.b.c @@ -15,7 +15,7 @@ char *scan281(char *p) start: { static unsigned char yybm[] = { - /* table 1: 0 */ + /* table 1 .. 8: 0 */ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, @@ -48,7 +48,7 @@ start: 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, - /* table 2: 256 */ + /* table 9 .. 10: 256 */ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,