From: Ulya Trofimovich Date: Wed, 6 Mar 2019 12:05:25 +0000 (+0000) Subject: Added test for newline conversion. X-Git-Tag: 1.2~111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f701e44e0e03594292786adf4d6aafcfc3242796;p=re2c Added test for newline conversion. --- diff --git a/re2c/test/newlines/nl_01.c b/re2c/test/newlines/nl_01.c new file mode 100644 index 00000000..81e6c824 --- /dev/null +++ b/re2c/test/newlines/nl_01.c @@ -0,0 +1,40 @@ +/* Generated by re2c */ +#line 1 "newlines/nl_01.re" + +#line 2 "newlines/nl_01.re" + +yyt1 + +#define YYMAXFILL 1 + + + +#line 13 "newlines/nl_01.c" +{ + YYCTYPE yych; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + yyt1 = YYCURSOR; + switch (yych) { + case 'a': goto yy3; + default: goto yy2; + } +yy2: + x = yyt1; +#line 7 "newlines/nl_01.re" + { + ; + } +#line 29 "newlines/nl_01.c" +yy3: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch (yych) { + case 'a': goto yy3; + default: goto yy2; + } +} +#line 10 "newlines/nl_01.re" + +newlines/nl_01.re:7:12: warning: rule matches empty string [-Wmatch-empty-string] diff --git a/re2c/test/newlines/nl_01.re b/re2c/test/newlines/nl_01.re new file mode 100644 index 00000000..74806a83 --- /dev/null +++ b/re2c/test/newlines/nl_01.re @@ -0,0 +1,10 @@ + +/*!re2c re2c:flags:T = 1; */ +/*!stags:re2c format = "@@\r\n"; */ +/*!max:re2c*/ + +/*!re2c + @x "a"* { + ; + } +*/