]> granicus.if.org Git - re2c/commitdiff
Tests: simple tests for parsing inplace configurations.
authorUlya Trofimovich <skvadrik@gmail.com>
Sat, 22 Aug 2015 14:52:27 +0000 (15:52 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Sat, 22 Aug 2015 14:52:27 +0000 (15:52 +0100)
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.

re2c/bootstrap/src/parse/scanner_lex.cc
re2c/test/config12.c [new file with mode: 0644]
re2c/test/config12.re [new file with mode: 0644]
re2c/test/config12_error1.c [new file with mode: 0644]
re2c/test/config12_error1.re [new file with mode: 0644]
re2c/test/config12_error2.c [new file with mode: 0644]
re2c/test/config12_error2.re [new file with mode: 0644]

index 1a47d0cad41338b2b4c86e24da45d2a638f1e869..2c0a351b925e71215fbc8af1b06cac34ceabf0c5 100644 (file)
@@ -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 <stdlib.h>
 #include <string.h>
diff --git a/re2c/test/config12.c b/re2c/test/config12.c
new file mode 100644 (file)
index 0000000..fa7e35b
--- /dev/null
@@ -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 (file)
index 0000000..b729ad0
--- /dev/null
@@ -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 (file)
index 0000000..af2a4f4
--- /dev/null
@@ -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 (file)
index 0000000..cb58509
--- /dev/null
@@ -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 (file)
index 0000000..eb0224e
--- /dev/null
@@ -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 (file)
index 0000000..a9e4e27
--- /dev/null
@@ -0,0 +1,6 @@
+/*!re2c
+
+       re2c:define:YYBACKUP = "";
+       re2c:define:YYBACKUP = "";
+
+*/