From: Ulya Trofimovich Date: Sat, 22 Aug 2015 14:52:27 +0000 (+0100) Subject: Tests: simple tests for parsing inplace configurations. X-Git-Tag: 0.15~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33fe08f88dfcfc4defeed80d04aaa90c033e0bb5;p=re2c Tests: simple tests for parsing inplace configurations. Tests do not ensure that configurations are handled correctly or have any impact on re2c behaviour. They only ensure that these configuration names are recognized as valid. --- diff --git a/re2c/bootstrap/src/parse/scanner_lex.cc b/re2c/bootstrap/src/parse/scanner_lex.cc index 1a47d0ca..2c0a351b 100644 --- a/re2c/bootstrap/src/parse/scanner_lex.cc +++ b/re2c/bootstrap/src/parse/scanner_lex.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.14.3 on Sat Aug 22 14:19:15 2015 */ +/* Generated by re2c 0.14.3 on Sat Aug 22 15:45:34 2015 */ #line 1 "../src/parse/scanner_lex.re" #include #include diff --git a/re2c/test/config12.c b/re2c/test/config12.c new file mode 100644 index 00000000..fa7e35b9 --- /dev/null +++ b/re2c/test/config12.c @@ -0,0 +1,4 @@ +/* Generated by re2c */ +#line 1 "config12.re" +#line 65 "config12.re" + diff --git a/re2c/test/config12.re b/re2c/test/config12.re new file mode 100644 index 00000000..b729ad05 --- /dev/null +++ b/re2c/test/config12.re @@ -0,0 +1,65 @@ +/*!re2c + + re2c:define:YYBACKUP = ""; + re2c:define:YYBACKUPCTX = ""; + re2c:define:YYCONDTYPE = ""; + re2c:define:YYCTXMARKER = ""; + re2c:define:YYCTYPE = ""; + re2c:define:YYCURSOR = ""; + re2c:define:YYDEBUG = ""; + re2c:define:YYFILL = ""; + re2c:define:YYGETCONDITION = ""; + re2c:define:YYGETSTATE = ""; + re2c:define:YYLESSTHAN = ""; + re2c:define:YYLIMIT = ""; + re2c:define:YYMARKER = ""; + re2c:define:YYPEEK = ""; + re2c:define:YYRESTORE = ""; + re2c:define:YYRESTORECTX = ""; + re2c:define:YYSETCONDITION = ""; + re2c:define:YYSETSTATE = ""; + re2c:define:YYSKIP = ""; + + re2c:label:yyFillLabel = ""; + re2c:label:yyNext = ""; + + re2c:variable:yyaccept = ""; + re2c:variable:yybm = ""; + re2c:variable:yych = ""; + re2c:variable:yyctable = ""; + re2c:variable:yystable = ""; + re2c:variable:yytarget = ""; + + re2c:condprefix = ""; + re2c:condenumprefix = ""; + re2c:cond:divider = ""; + re2c:cond:divider@cond = ""; + re2c:cond:goto = ""; + re2c:cond:goto@cond = ""; + re2c:cgoto:threshold = 0; + re2c:define:YYFILL:naked = 0; + re2c:define:YYFILL@len = ""; + re2c:define:YYGETCONDITION:naked = 0; + re2c:define:YYGETSTATE:naked = 0; + re2c:define:YYSETCONDITION@cond = ""; + re2c:define:YYSETSTATE:naked = 0; + re2c:define:YYSETSTATE@state = ""; + re2c:flags:e = 0; + re2c:flags:w = 0; + re2c:flags:x = 0; + re2c:flags:u = 0; + re2c:flags:8 = 0; + re2c:indent:string = ""; + re2c:indent:top = 0; + re2c:labelprefix = ""; + re2c:startlabel = ""; + re2c:state:abort = 0; + re2c:state:nextlabel = 0; + re2c:yybm:hex = 0; + re2c:yych:conversion = 0; + re2c:yych:emit = 0; + re2c:yyfill:check = 0; + re2c:yyfill:enable = 0; + re2c:yyfill:parameter = 0; + +*/ diff --git a/re2c/test/config12_error1.c b/re2c/test/config12_error1.c new file mode 100644 index 00000000..af2a4f4c --- /dev/null +++ b/re2c/test/config12_error1.c @@ -0,0 +1 @@ +re2c: error: line 3, column 7: unrecognized configuration diff --git a/re2c/test/config12_error1.re b/re2c/test/config12_error1.re new file mode 100644 index 00000000..cb58509e --- /dev/null +++ b/re2c/test/config12_error1.re @@ -0,0 +1,5 @@ +/*!re2c + + re2c:define:YYBACKU = ""; + +*/ diff --git a/re2c/test/config12_error2.c b/re2c/test/config12_error2.c new file mode 100644 index 00000000..eb0224e2 --- /dev/null +++ b/re2c/test/config12_error2.c @@ -0,0 +1 @@ +re2c: error: line 4, column 27: configuration 'YYBACKUP' is already set and cannot be changed diff --git a/re2c/test/config12_error2.re b/re2c/test/config12_error2.re new file mode 100644 index 00000000..a9e4e27b --- /dev/null +++ b/re2c/test/config12_error2.re @@ -0,0 +1,6 @@ +/*!re2c + + re2c:define:YYBACKUP = ""; + re2c:define:YYBACKUP = ""; + +*/