From 5d6620728499064c0396be5da22fdf3547d96fee Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Tue, 14 Feb 2017 09:53:24 +0000 Subject: [PATCH] Moved tests to subdirectory. --- re2c/test/tags/ambiguity/alt1.i--tags.c | 20 +++++++++++++ .../alt1.i--tags.re} | 0 re2c/test/tags/ambiguity/alt2.i--tags.c | 21 ++++++++++++++ .../alt2.i--tags.re} | 0 .../cat1.i--tags.c} | 7 ----- .../cat1.i--tags.re} | 0 .../{nondet_cat3.i.c => ambiguity/cat3.i.c} | 0 .../{nondet_cat3.i.re => ambiguity/cat3.i.re} | 0 .../cat4.i--tags.c} | 7 ----- .../cat4.i--tags.re} | 0 .../iter.i--tags.c} | 15 ---------- .../iter.i--tags.re} | 0 re2c/test/tags/nondet_alt1.--tags.c | 27 ------------------ re2c/test/tags/nondet_alt2.--tags.c | 28 ------------------- 14 files changed, 41 insertions(+), 84 deletions(-) create mode 100644 re2c/test/tags/ambiguity/alt1.i--tags.c rename re2c/test/tags/{nondet_alt1.--tags.re => ambiguity/alt1.i--tags.re} (100%) create mode 100644 re2c/test/tags/ambiguity/alt2.i--tags.c rename re2c/test/tags/{nondet_alt2.--tags.re => ambiguity/alt2.i--tags.re} (100%) rename re2c/test/tags/{nondet_cat1.--tags.c => ambiguity/cat1.i--tags.c} (69%) rename re2c/test/tags/{nondet_cat1.--tags.re => ambiguity/cat1.i--tags.re} (100%) rename re2c/test/tags/{nondet_cat3.i.c => ambiguity/cat3.i.c} (100%) rename re2c/test/tags/{nondet_cat3.i.re => ambiguity/cat3.i.re} (100%) rename re2c/test/tags/{nondet_cat4.--tags.c => ambiguity/cat4.i--tags.c} (73%) rename re2c/test/tags/{nondet_cat4.--tags.re => ambiguity/cat4.i--tags.re} (100%) rename re2c/test/tags/{nondet_iter.--tags.c => ambiguity/iter.i--tags.c} (76%) rename re2c/test/tags/{nondet_iter.--tags.re => ambiguity/iter.i--tags.re} (100%) delete mode 100644 re2c/test/tags/nondet_alt1.--tags.c delete mode 100644 re2c/test/tags/nondet_alt2.--tags.c diff --git a/re2c/test/tags/ambiguity/alt1.i--tags.c b/re2c/test/tags/ambiguity/alt1.i--tags.c new file mode 100644 index 00000000..e47dcaef --- /dev/null +++ b/re2c/test/tags/ambiguity/alt1.i--tags.c @@ -0,0 +1,20 @@ +/* Generated by re2c */ + +{ + YYCTYPE yych; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch (yych) { + case 'a': goto yy4; + default: goto yy2; + } +yy2: + ++YYCURSOR; + {} +yy4: + ++YYCURSOR; + yyt1 = YYCURSOR; + p = yyt1; + { @p } +} + diff --git a/re2c/test/tags/nondet_alt1.--tags.re b/re2c/test/tags/ambiguity/alt1.i--tags.re similarity index 100% rename from re2c/test/tags/nondet_alt1.--tags.re rename to re2c/test/tags/ambiguity/alt1.i--tags.re diff --git a/re2c/test/tags/ambiguity/alt2.i--tags.c b/re2c/test/tags/ambiguity/alt2.i--tags.c new file mode 100644 index 00000000..1c80f58f --- /dev/null +++ b/re2c/test/tags/ambiguity/alt2.i--tags.c @@ -0,0 +1,21 @@ +/* Generated by re2c */ + +{ + YYCTYPE yych; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch (yych) { + case 'a': + yyt1 = YYCURSOR; + goto yy4; + default: goto yy2; + } +yy2: + ++YYCURSOR; + {} +yy4: + ++YYCURSOR; + p = yyt1; + { @p } +} + diff --git a/re2c/test/tags/nondet_alt2.--tags.re b/re2c/test/tags/ambiguity/alt2.i--tags.re similarity index 100% rename from re2c/test/tags/nondet_alt2.--tags.re rename to re2c/test/tags/ambiguity/alt2.i--tags.re diff --git a/re2c/test/tags/nondet_cat1.--tags.c b/re2c/test/tags/ambiguity/cat1.i--tags.c similarity index 69% rename from re2c/test/tags/nondet_cat1.--tags.c rename to re2c/test/tags/ambiguity/cat1.i--tags.c index f32ecd9c..cf775a71 100644 --- a/re2c/test/tags/nondet_cat1.--tags.c +++ b/re2c/test/tags/ambiguity/cat1.i--tags.c @@ -1,7 +1,5 @@ /* Generated by re2c */ -#line 1 "tags/nondet_cat1.--tags.re" -#line 5 "tags/nondet_cat1.--tags.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -13,9 +11,7 @@ yy2: ++YYCURSOR; yy3: -#line 3 "tags/nondet_cat1.--tags.re" {} -#line 19 "tags/nondet_cat1.--tags.c" yy4: yych = *++YYCURSOR; switch (yych) { @@ -36,10 +32,7 @@ yy5: } yy7: p = yyt1; -#line 2 "tags/nondet_cat1.--tags.re" { @p } -#line 42 "tags/nondet_cat1.--tags.c" } -#line 4 "tags/nondet_cat1.--tags.re" re2c: warning: line 2: tag 'p' is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags] diff --git a/re2c/test/tags/nondet_cat1.--tags.re b/re2c/test/tags/ambiguity/cat1.i--tags.re similarity index 100% rename from re2c/test/tags/nondet_cat1.--tags.re rename to re2c/test/tags/ambiguity/cat1.i--tags.re diff --git a/re2c/test/tags/nondet_cat3.i.c b/re2c/test/tags/ambiguity/cat3.i.c similarity index 100% rename from re2c/test/tags/nondet_cat3.i.c rename to re2c/test/tags/ambiguity/cat3.i.c diff --git a/re2c/test/tags/nondet_cat3.i.re b/re2c/test/tags/ambiguity/cat3.i.re similarity index 100% rename from re2c/test/tags/nondet_cat3.i.re rename to re2c/test/tags/ambiguity/cat3.i.re diff --git a/re2c/test/tags/nondet_cat4.--tags.c b/re2c/test/tags/ambiguity/cat4.i--tags.c similarity index 73% rename from re2c/test/tags/nondet_cat4.--tags.c rename to re2c/test/tags/ambiguity/cat4.i--tags.c index 8d175dad..8ffbc8c2 100644 --- a/re2c/test/tags/nondet_cat4.--tags.c +++ b/re2c/test/tags/ambiguity/cat4.i--tags.c @@ -1,9 +1,7 @@ /* Generated by re2c */ -#line 1 "tags/nondet_cat4.--tags.re" // Tag is nondeterministic: fixed length helps only in top-level -#line 7 "tags/nondet_cat4.--tags.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -16,9 +14,7 @@ yy2: ++YYCURSOR; yy3: -#line 5 "tags/nondet_cat4.--tags.re" {} -#line 22 "tags/nondet_cat4.--tags.c" yy4: yych = *++YYCURSOR; switch (yych) { @@ -32,9 +28,7 @@ yy5: yyt1 = NULL; yy6: p = yyt1; -#line 4 "tags/nondet_cat4.--tags.re" { @p } -#line 38 "tags/nondet_cat4.--tags.c" yy7: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -46,6 +40,5 @@ yy7: default: goto yy6; } } -#line 6 "tags/nondet_cat4.--tags.re" re2c: warning: line 4: tag 'p' is non-deterministic and induces 2 parallel instances [-Wnondeterministic-tags] diff --git a/re2c/test/tags/nondet_cat4.--tags.re b/re2c/test/tags/ambiguity/cat4.i--tags.re similarity index 100% rename from re2c/test/tags/nondet_cat4.--tags.re rename to re2c/test/tags/ambiguity/cat4.i--tags.re diff --git a/re2c/test/tags/nondet_iter.--tags.c b/re2c/test/tags/ambiguity/iter.i--tags.c similarity index 76% rename from re2c/test/tags/nondet_iter.--tags.c rename to re2c/test/tags/ambiguity/iter.i--tags.c index 615ed9f1..efc7495f 100644 --- a/re2c/test/tags/nondet_iter.--tags.c +++ b/re2c/test/tags/ambiguity/iter.i--tags.c @@ -1,7 +1,5 @@ /* Generated by re2c */ -#line 1 "tags/nondet_iter.--tags.re" -#line 5 "tags/nondet_iter.--tags.c" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -25,9 +23,7 @@ } yy2: a = yyt1; -#line 2 "tags/nondet_iter.--tags.re" { @a } -#line 31 "tags/nondet_iter.--tags.c" yy3: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -48,9 +44,7 @@ yy5: } yy7: b = yyt1; -#line 5 "tags/nondet_iter.--tags.re" { @b } -#line 54 "tags/nondet_iter.--tags.c" yy8: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -61,9 +55,7 @@ yy8: } yy10: c = yyt1; -#line 8 "tags/nondet_iter.--tags.re" { @c } -#line 67 "tags/nondet_iter.--tags.c" yy11: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -76,9 +68,7 @@ yy11: } yy13: d = yyt1; -#line 3 "tags/nondet_iter.--tags.re" { @d } -#line 82 "tags/nondet_iter.--tags.c" yy14: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -91,9 +81,7 @@ yy14: } yy16: e = yyt1; -#line 6 "tags/nondet_iter.--tags.re" { @e } -#line 97 "tags/nondet_iter.--tags.c" yy17: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -106,11 +94,8 @@ yy17: } yy19: f = yyt1; -#line 9 "tags/nondet_iter.--tags.re" { @f } -#line 112 "tags/nondet_iter.--tags.c" } -#line 10 "tags/nondet_iter.--tags.re" re2c: warning: line 2: rule matches empty string [-Wmatch-empty-string] re2c: warning: line 3: rule matches empty string [-Wmatch-empty-string] diff --git a/re2c/test/tags/nondet_iter.--tags.re b/re2c/test/tags/ambiguity/iter.i--tags.re similarity index 100% rename from re2c/test/tags/nondet_iter.--tags.re rename to re2c/test/tags/ambiguity/iter.i--tags.re diff --git a/re2c/test/tags/nondet_alt1.--tags.c b/re2c/test/tags/nondet_alt1.--tags.c deleted file mode 100644 index 03bedf27..00000000 --- a/re2c/test/tags/nondet_alt1.--tags.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated by re2c */ -#line 1 "tags/nondet_alt1.--tags.re" - -#line 5 "tags/nondet_alt1.--tags.c" -{ - YYCTYPE yych; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - switch (yych) { - case 'a': goto yy4; - default: goto yy2; - } -yy2: - ++YYCURSOR; -#line 3 "tags/nondet_alt1.--tags.re" - {} -#line 18 "tags/nondet_alt1.--tags.c" -yy4: - ++YYCURSOR; - yyt1 = YYCURSOR; - p = yyt1; -#line 2 "tags/nondet_alt1.--tags.re" - { @p } -#line 25 "tags/nondet_alt1.--tags.c" -} -#line 4 "tags/nondet_alt1.--tags.re" - diff --git a/re2c/test/tags/nondet_alt2.--tags.c b/re2c/test/tags/nondet_alt2.--tags.c deleted file mode 100644 index b229b864..00000000 --- a/re2c/test/tags/nondet_alt2.--tags.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated by re2c */ -#line 1 "tags/nondet_alt2.--tags.re" - -#line 5 "tags/nondet_alt2.--tags.c" -{ - YYCTYPE yych; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - switch (yych) { - case 'a': - yyt1 = YYCURSOR; - goto yy4; - default: goto yy2; - } -yy2: - ++YYCURSOR; -#line 3 "tags/nondet_alt2.--tags.re" - {} -#line 20 "tags/nondet_alt2.--tags.c" -yy4: - ++YYCURSOR; - p = yyt1; -#line 2 "tags/nondet_alt2.--tags.re" - { @p } -#line 26 "tags/nondet_alt2.--tags.c" -} -#line 4 "tags/nondet_alt2.--tags.re" - -- 2.49.0