From: helly <helly@642ea486-5414-0410-9d7f-a0204ed87703> Date: Tue, 30 Jan 2007 20:38:22 +0000 (+0000) Subject: - Applied #1647875 add const to yybm vector X-Git-Tag: 0.13.6~245 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=090a549d2f22b82c5ff11e9fbcbf4dbbcbd15b59;p=re2c - Applied #1647875 add const to yybm vector --- diff --git a/re2c/CHANGELOG b/re2c/CHANGELOG index 3efd6f05..3fcf74ed 100644 --- a/re2c/CHANGELOG +++ b/re2c/CHANGELOG @@ -1,5 +1,6 @@ Version 0.11.1 (????-??-??) --------------------------- +- Applied #1647875 add const to yybm vector. Version 0.11.0 (2007-01-01) --------------------------- diff --git a/re2c/code.cc b/re2c/code.cc index e7c8afca..e3e51899 100644 --- a/re2c/code.cc +++ b/re2c/code.cc @@ -215,7 +215,7 @@ void BitMap::gen(std::ostream &o, uint ind, uint lb, uint ub) if (b && bLastPass) { - o << indent(ind) << "static unsigned char yybm[] = {"; + o << indent(ind) << "static const unsigned char yybm[] = {"; uint c = 1, n = ub - lb; diff --git a/re2c/lessons/001_upn_calculator/calc_007.b.c b/re2c/lessons/001_upn_calculator/calc_007.b.c index c60bfe29..b2b269a7 100755 --- a/re2c/lessons/001_upn_calculator/calc_007.b.c +++ b/re2c/lessons/001_upn_calculator/calc_007.b.c @@ -65,7 +65,7 @@ int scan(char *s) { t = p; { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/re2c/lessons/001_upn_calculator/windows/main.b.c b/re2c/lessons/001_upn_calculator/windows/main.b.c index 78d03fdb..24f3ec31 100755 --- a/re2c/lessons/001_upn_calculator/windows/main.b.c +++ b/re2c/lessons/001_upn_calculator/windows/main.b.c @@ -51,7 +51,7 @@ int ScanFullSpeed(char *pzStrToScan, size_t lenStrToScan) for(;;) { { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -180,7 +180,7 @@ int scan(char *pzStrToScan, size_t lenStrToScan) for(;;) { { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/re2c/test/bug1472770.b.c b/re2c/test/bug1472770.b.c index 8dd8f3d6..f733a827 100755 --- a/re2c/test/bug1472770.b.c +++ b/re2c/test/bug1472770.b.c @@ -19,7 +19,7 @@ int scan(char *p) printf("]--------------\n"); start: { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, diff --git a/re2c/test/bug1479044.b.c b/re2c/test/bug1479044.b.c index 41530d66..ab5e311f 100755 --- a/re2c/test/bug1479044.b.c +++ b/re2c/test/bug1479044.b.c @@ -14,7 +14,7 @@ char *scan281(char *p) char *q; start: { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { /* table 1 .. 8: 0 */ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 0, 170, 170, 170, 170, 170, diff --git a/re2c/test/ctx.b.c b/re2c/test/ctx.b.c index 414d8d29..b9aa787f 100755 --- a/re2c/test/ctx.b.c +++ b/re2c/test/ctx.b.c @@ -46,7 +46,7 @@ std: s.tok = cursor; { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/re2c/test/cvsignore.b.c b/re2c/test/cvsignore.b.c index e2e3537d..6fa5d3a0 100755 --- a/re2c/test/cvsignore.b.c +++ b/re2c/test/cvsignore.b.c @@ -39,7 +39,7 @@ void scan(YYCTYPE *pText, size_t *pSize, int *pbChanged) while(1) { loop: { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, diff --git a/re2c/test/cvsignore.wb.c b/re2c/test/cvsignore.wb.c index 66d0fd03..d51ee1c6 100755 --- a/re2c/test/cvsignore.wb.c +++ b/re2c/test/cvsignore.wb.c @@ -39,7 +39,7 @@ void scan(YYCTYPE *pText, size_t *pSize, int *pbChanged) while(1) { loop: { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, diff --git a/re2c/test/input11.b.c b/re2c/test/input11.b.c index a92a82ec..df7c09d8 100755 --- a/re2c/test/input11.b.c +++ b/re2c/test/input11.b.c @@ -1,7 +1,7 @@ /* Generated by re2c */ #line 1 "input11.b.re" { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/re2c/test/parse_date.b.c b/re2c/test/parse_date.b.c index 75d8a281..0e71770f 100755 --- a/re2c/test/parse_date.b.c +++ b/re2c/test/parse_date.b.c @@ -739,7 +739,7 @@ std: { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/re2c/test/parse_date.db.c b/re2c/test/parse_date.db.c index d4ebd26d..c92aedbe 100755 --- a/re2c/test/parse_date.db.c +++ b/re2c/test/parse_date.db.c @@ -759,7 +759,7 @@ std: { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/re2c/test/parse_date.g.c b/re2c/test/parse_date.g.c index f998433a..a67e523c 100755 --- a/re2c/test/parse_date.g.c +++ b/re2c/test/parse_date.g.c @@ -739,7 +739,7 @@ std: { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/re2c/test/push.fb.c b/re2c/test/push.fb.c index 80daf4a6..a16aa58e 100755 --- a/re2c/test/push.fb.c +++ b/re2c/test/push.fb.c @@ -229,7 +229,7 @@ public: start: { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/re2c/test/push.fg.c b/re2c/test/push.fg.c index eb5c4aee..4e809a39 100755 --- a/re2c/test/push.fg.c +++ b/re2c/test/push.fg.c @@ -229,7 +229,7 @@ public: start: { - static unsigned char yybm[] = { + static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,