diff options
author | Manoj Srivastava <srivasta@debian.org> | 2016-01-22 13:51:30 -0800 |
---|---|---|
committer | Manoj Srivastava <srivasta@debian.org> | 2016-01-22 13:51:30 -0800 |
commit | f753f2b7b6d97014110dbe418861353a2f3f445d (patch) | |
tree | 7f248ce2f59fbb79cab24b4727955e37e9a5ab81 /tests | |
parent | 306163051847aaaabe7ae0f4cfc7d23f15923f3a (diff) | |
parent | a646b6cd438dc4bd957c6c6afd89b5e8e59468fe (diff) |
Merge branch 'upstream'
Signed-off-by: Manoj Srivastava <srivasta@debian.org>
# Conflicts:
# INSTALL
# Makefile.in
# aclocal.m4
# build-aux/compile
# build-aux/config.guess
# build-aux/config.sub
# build-aux/depcomp
# build-aux/install-sh
# build-aux/mdate-sh
# build-aux/texinfo.tex
# configure
# doc/Makefile.in
# doc/flex.1
# doc/flex.info
# doc/flex.info-1
# doc/flex.info-2
# doc/flex.pdf
# doc/stamp-vti
# doc/version.texi
# examples/Makefile.in
# examples/fastwc/Makefile.in
# examples/manual/Makefile.in
# src/config.h.in
# tests/Makefile.in
# tests/test-bison-nr/Makefile.am
# tests/test-bison-yylloc/Makefile.am
# tests/test-bison-yylval/Makefile.am
# tools/Makefile.in
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 581 | ||||
-rw-r--r-- | tests/README | 74 | ||||
-rw-r--r-- | tests/TEMPLATE/Makefile.am | 50 | ||||
-rw-r--r-- | tests/TEMPLATE/parser.y | 61 | ||||
-rw-r--r-- | tests/TEMPLATE/scanner.l | 54 | ||||
-rw-r--r-- | tests/alloc_extra.l (renamed from tests/test-alloc-extra/scanner.l) | 4 | ||||
-rw-r--r-- | tests/alloc_extra.txt (renamed from tests/test-alloc-extra/test.input) | 0 | ||||
-rw-r--r-- | tests/array_nr.l (renamed from tests/test-array-nr/scanner.l) | 4 | ||||
-rw-r--r-- | tests/array_nr.txt (renamed from tests/TEMPLATE/test.input) | 0 | ||||
-rw-r--r-- | tests/array_r.l (renamed from tests/test-array-r/scanner.l) | 4 | ||||
-rw-r--r-- | tests/array_r.txt (renamed from tests/test-array-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/basic_nr.l (renamed from tests/test-basic-nr/scanner.l) | 6 | ||||
-rw-r--r-- | tests/basic_nr.txt (renamed from tests/test-basic-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/basic_r.l (renamed from tests/test-basic-r/scanner.l) | 4 | ||||
-rw-r--r-- | tests/basic_r.txt (renamed from tests/test-basic-r/test.input) | 0 | ||||
-rw-r--r-- | tests/bison_nr.txt (renamed from tests/test-bison-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/bison_nr_main.c (renamed from tests/test-bison-nr/main.c) | 7 | ||||
-rw-r--r-- | tests/bison_nr_parser.y (renamed from tests/test-bison-nr/parser.y) | 6 | ||||
-rw-r--r-- | tests/bison_nr_scanner.l (renamed from tests/test-bison-nr/scanner.l) | 8 | ||||
-rw-r--r-- | tests/bison_yylloc.txt (renamed from tests/test-bison-yylloc/test.input) | 0 | ||||
-rw-r--r-- | tests/bison_yylloc_main.c (renamed from tests/test-bison-yylval/main.c) | 9 | ||||
-rw-r--r-- | tests/bison_yylloc_parser.y (renamed from tests/test-bison-yylloc/parser.y) | 12 | ||||
-rw-r--r-- | tests/bison_yylloc_scanner.l (renamed from tests/test-bison-yylloc/scanner.l) | 8 | ||||
-rw-r--r-- | tests/bison_yylval.txt (renamed from tests/test-bison-yylval/test.input) | 0 | ||||
-rw-r--r-- | tests/bison_yylval_main.c (renamed from tests/test-bison-yylloc/main.c) | 9 | ||||
-rw-r--r-- | tests/bison_yylval_parser.y (renamed from tests/test-bison-yylval/parser.y) | 6 | ||||
-rw-r--r-- | tests/bison_yylval_scanner.l (renamed from tests/test-bison-yylval/scanner.l) | 8 | ||||
-rw-r--r-- | tests/c_cxx_nr.lll (renamed from tests/test-c-cpp-nr/scanner.l) | 2 | ||||
-rw-r--r-- | tests/c_cxx_nr.txt (renamed from tests/test-array-r/test.input) | 0 | ||||
-rw-r--r-- | tests/c_cxx_r.lll (renamed from tests/test-c-cpp-r/scanner.l) | 2 | ||||
-rw-r--r-- | tests/c_cxx_r.txt (renamed from tests/test-c++-basic/test.input) | 0 | ||||
-rw-r--r-- | tests/ccl.l (renamed from tests/test-ccl/scanner.l) | 4 | ||||
-rw-r--r-- | tests/ccl.txt (renamed from tests/test-ccl/test.input) | 0 | ||||
-rwxr-xr-x | tests/create-test | 33 | ||||
-rw-r--r-- | tests/cxx_basic.ll (renamed from tests/test-c++-basic/scanner.l) | 5 | ||||
-rw-r--r-- | tests/cxx_basic.txt (renamed from tests/test-c++-yywrap/test.input) | 0 | ||||
-rw-r--r-- | tests/cxx_multiple_scanners.txt (renamed from tests/test-c++-multiple-scanners/test.input) | 0 | ||||
-rw-r--r-- | tests/cxx_multiple_scanners_1.ll (renamed from tests/test-c++-multiple-scanners/scanner-1.l) | 2 | ||||
-rw-r--r-- | tests/cxx_multiple_scanners_2.ll (renamed from tests/test-c++-multiple-scanners/scanner-2.l) | 2 | ||||
-rw-r--r-- | tests/cxx_multiple_scanners_main.cc (renamed from tests/test-c++-multiple-scanners/main.cpp) | 0 | ||||
-rw-r--r-- | tests/cxx_yywrap.ll (renamed from tests/test-c++-yywrap/scanner.l) | 2 | ||||
-rw-r--r-- | tests/cxx_yywrap.txt (renamed from tests/test-c-cpp-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/debug_nr.l (renamed from tests/test-debug-nr/scanner.l) | 4 | ||||
-rw-r--r-- | tests/debug_nr.txt (renamed from tests/test-debug-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/debug_r.l (renamed from tests/test-debug-r/scanner.l) | 4 | ||||
-rw-r--r-- | tests/debug_r.txt (renamed from tests/test-debug-r/test.input) | 0 | ||||
-rw-r--r-- | tests/extended.l (renamed from tests/test-extended/scanner.l) | 4 | ||||
-rw-r--r-- | tests/extended.txt (renamed from tests/test-extended/test.input) | 0 | ||||
-rw-r--r-- | tests/header_nr.txt (renamed from tests/test-header-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/header_nr_main.c (renamed from tests/test-header-nr/main.c) | 5 | ||||
-rw-r--r-- | tests/header_nr_scanner.l (renamed from tests/test-header-nr/scanner.l) | 4 | ||||
-rw-r--r-- | tests/header_r.txt (renamed from tests/test-header-r/test.input) | 0 | ||||
-rw-r--r-- | tests/header_r_main.c (renamed from tests/test-header-r/main.c) | 12 | ||||
-rw-r--r-- | tests/header_r_scanner.l (renamed from tests/test-header-r/scanner.l) | 4 | ||||
-rw-r--r-- | tests/include_by_buffer.direct.l (renamed from tests/test-include-by-buffer/scanner.l) | 8 | ||||
-rw-r--r-- | tests/include_by_buffer.direct.txt | 3 | ||||
-rw-r--r-- | tests/include_by_buffer.direct_2.txt | 3 | ||||
-rw-r--r-- | tests/include_by_buffer.direct_3.txt | 2 | ||||
-rw-r--r-- | tests/include_by_push.direct.l (renamed from tests/test-include-by-push/scanner.l) | 6 | ||||
-rw-r--r-- | tests/include_by_push.direct.txt | 3 | ||||
-rw-r--r-- | tests/include_by_push.direct_2.txt | 3 | ||||
-rw-r--r-- | tests/include_by_push.direct_3.txt | 2 | ||||
-rw-r--r-- | tests/include_by_reentrant.direct.l (renamed from tests/test-include-by-reentrant/scanner.l) | 6 | ||||
-rw-r--r-- | tests/include_by_reentrant.direct.txt | 3 | ||||
-rw-r--r-- | tests/include_by_reentrant.direct_2.txt | 3 | ||||
-rw-r--r-- | tests/include_by_reentrant.direct_3.txt | 2 | ||||
-rw-r--r-- | tests/lineno_nr.l (renamed from tests/test-lineno-nr/scanner.l) | 6 | ||||
-rw-r--r-- | tests/lineno_nr.one.txt (renamed from tests/test-lineno-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/lineno_r.l (renamed from tests/test-lineno-r/scanner.l) | 6 | ||||
-rw-r--r-- | tests/lineno_r.one.txt (renamed from tests/test-lineno-r/test.input) | 0 | ||||
-rw-r--r-- | tests/lineno_trailing.l (renamed from tests/test-lineno-trailing/scanner.l) | 6 | ||||
-rw-r--r-- | tests/lineno_trailing.one.txt (renamed from tests/test-lineno-trailing/test.input) | 0 | ||||
-rw-r--r-- | tests/mem_nr.l (renamed from tests/test-mem-nr/scanner.l) | 4 | ||||
-rw-r--r-- | tests/mem_nr.txt (renamed from tests/test-mem-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/mem_r.l (renamed from tests/test-mem-r/scanner.l) | 10 | ||||
-rw-r--r-- | tests/mem_r.txt (renamed from tests/test-mem-r/test.input) | 0 | ||||
-rw-r--r-- | tests/multiple_scanners_nr_1.l (renamed from tests/test-multiple-scanners-nr/scanner-1.l) | 6 | ||||
-rw-r--r-- | tests/multiple_scanners_nr_2.l (renamed from tests/test-multiple-scanners-nr/scanner-2.l) | 6 | ||||
-rw-r--r-- | tests/multiple_scanners_nr_main.c (renamed from tests/test-multiple-scanners-nr/main.c) | 10 | ||||
-rw-r--r-- | tests/multiple_scanners_r_1.l (renamed from tests/test-multiple-scanners-r/scanner-1.l) | 7 | ||||
-rw-r--r-- | tests/multiple_scanners_r_2.l (renamed from tests/test-multiple-scanners-r/scanner-2.l) | 7 | ||||
-rw-r--r-- | tests/multiple_scanners_r_main.c (renamed from tests/test-multiple-scanners-r/main.c) | 30 | ||||
-rw-r--r-- | tests/noansi_nr.l (renamed from tests/test-noansi-nr/scanner.l) | 4 | ||||
-rw-r--r-- | tests/noansi_nr.txt (renamed from tests/test-noansi-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/noansi_r.l (renamed from tests/test-noansi-r/scanner.l) | 4 | ||||
-rw-r--r-- | tests/noansi_r.txt (renamed from tests/test-noansi-r/test.input) | 0 | ||||
-rwxr-xr-x | tests/options.cn | 5 | ||||
-rw-r--r-- | tests/posix.l (renamed from tests/test-posix/scanner.l) | 4 | ||||
-rw-r--r-- | tests/posixly_correct.l (renamed from tests/test-posixly-correct/scanner.l) | 4 | ||||
-rw-r--r-- | tests/prefix_nr.l (renamed from tests/test-prefix-nr/scanner.l) | 4 | ||||
-rw-r--r-- | tests/prefix_nr.txt (renamed from tests/test-prefix-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/prefix_r.l (renamed from tests/test-prefix-r/scanner.l) | 4 | ||||
-rw-r--r-- | tests/prefix_r.txt (renamed from tests/test-prefix-r/test.input) | 0 | ||||
-rw-r--r-- | tests/pthread.l (renamed from tests/test-pthread/scanner.l) | 12 | ||||
-rw-r--r-- | tests/pthread_1.txt (renamed from tests/test-pthread/test-1.input) | 0 | ||||
-rw-r--r-- | tests/pthread_2.txt (renamed from tests/test-pthread/test-2.input) | 0 | ||||
-rw-r--r-- | tests/pthread_3.txt (renamed from tests/test-pthread/test-3.input) | 0 | ||||
-rw-r--r-- | tests/pthread_4.txt (renamed from tests/test-pthread/test-4.input) | 0 | ||||
-rw-r--r-- | tests/pthread_5.txt (renamed from tests/test-pthread/test-5.input) | 0 | ||||
-rw-r--r-- | tests/quotes.l (renamed from tests/test-quotes/scanner.l) | 4 | ||||
-rw-r--r-- | tests/quotes.txt (renamed from tests/test-c-cpp-r/test.input) | 0 | ||||
-rw-r--r-- | tests/reject.l4 (renamed from tests/test-reject/scanner.l) | 4 | ||||
-rw-r--r-- | tests/reject.txt (renamed from tests/test-quotes/test.input) | 0 | ||||
-rw-r--r-- | tests/rescan_nr.direct.l (renamed from tests/test-rescan-nr/scanner.l) | 6 | ||||
-rw-r--r-- | tests/rescan_nr.direct.txt (renamed from tests/test-reject/test.input) | 0 | ||||
-rw-r--r-- | tests/rescan_r.direct.l (renamed from tests/test-rescan-r/scanner.l) | 6 | ||||
-rw-r--r-- | tests/rescan_r.direct.txt (renamed from tests/test-rescan-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/string_nr.l (renamed from tests/test-string-nr/scanner.l) | 4 | ||||
-rw-r--r-- | tests/string_r.l (renamed from tests/test-string-r/scanner.l) | 4 | ||||
-rw-r--r-- | tests/tableopts.am | 333 | ||||
-rw-r--r-- | tests/tableopts.l4 (renamed from tests/test-table-opts/scanner.l) | 4 | ||||
-rwxr-xr-x | tests/tableopts.sh | 44 | ||||
-rw-r--r-- | tests/tableopts.txt (renamed from tests/test-table-opts/test.input) | 0 | ||||
-rw-r--r-- | tests/test-alloc-extra/Makefile.am | 49 | ||||
-rw-r--r-- | tests/test-array-nr/Makefile.am | 48 | ||||
-rw-r--r-- | tests/test-array-r/Makefile.am | 45 | ||||
-rw-r--r-- | tests/test-basic-nr/Makefile.am | 48 | ||||
-rw-r--r-- | tests/test-basic-r/Makefile.am | 48 | ||||
-rw-r--r-- | tests/test-bison-nr/Makefile.am | 55 | ||||
-rw-r--r-- | tests/test-bison-yylloc/Makefile.am | 55 | ||||
-rw-r--r-- | tests/test-bison-yylval/Makefile.am | 55 | ||||
-rw-r--r-- | tests/test-c++-basic/Makefile.am | 45 | ||||
-rw-r--r-- | tests/test-c++-multiple-scanners/Makefile.am | 53 | ||||
-rw-r--r-- | tests/test-c++-yywrap/Makefile.am | 45 | ||||
-rw-r--r-- | tests/test-c-cpp-nr/Makefile.am | 45 | ||||
-rw-r--r-- | tests/test-c-cpp-r/Makefile.am | 45 | ||||
-rw-r--r-- | tests/test-ccl/Makefile.am | 44 | ||||
-rw-r--r-- | tests/test-concatenated-options/Makefile.am | 33 | ||||
-rw-r--r-- | tests/test-debug-nr/Makefile.am | 44 | ||||
-rw-r--r-- | tests/test-debug-r/Makefile.am | 44 | ||||
-rw-r--r-- | tests/test-extended/Makefile.am | 44 | ||||
-rw-r--r-- | tests/test-header-nr/Makefile.am | 53 | ||||
-rw-r--r-- | tests/test-header-r/Makefile.am | 54 | ||||
-rw-r--r-- | tests/test-include-by-buffer/Makefile.am | 49 | ||||
-rw-r--r-- | tests/test-include-by-buffer/test-1.input | 3 | ||||
-rw-r--r-- | tests/test-include-by-buffer/test-2.input | 3 | ||||
-rw-r--r-- | tests/test-include-by-buffer/test-3.input | 2 | ||||
-rw-r--r-- | tests/test-include-by-push/Makefile.am | 49 | ||||
-rw-r--r-- | tests/test-include-by-push/test-1.input | 3 | ||||
-rw-r--r-- | tests/test-include-by-push/test-2.input | 3 | ||||
-rw-r--r-- | tests/test-include-by-push/test-3.input | 2 | ||||
-rw-r--r-- | tests/test-include-by-reentrant/Makefile.am | 49 | ||||
-rw-r--r-- | tests/test-include-by-reentrant/test-1.input | 3 | ||||
-rw-r--r-- | tests/test-include-by-reentrant/test-2.input | 3 | ||||
-rw-r--r-- | tests/test-include-by-reentrant/test-3.input | 2 | ||||
-rw-r--r-- | tests/test-linedir-r/Makefile.am | 56 | ||||
-rw-r--r-- | tests/test-linedir-r/check-lines.awk | 7 | ||||
-rw-r--r-- | tests/test-linedir-r/main.c | 58 | ||||
-rw-r--r-- | tests/test-linedir-r/scanner.l | 45 | ||||
-rw-r--r-- | tests/test-lineno-nr/Makefile.am | 45 | ||||
-rw-r--r-- | tests/test-lineno-r/Makefile.am | 45 | ||||
-rw-r--r-- | tests/test-lineno-trailing/Makefile.am | 45 | ||||
-rw-r--r-- | tests/test-lineno-trailing/Makefile.in | 458 | ||||
-rw-r--r-- | tests/test-mem-nr/Makefile.am | 44 | ||||
-rw-r--r-- | tests/test-mem-r/Makefile.am | 44 | ||||
-rw-r--r-- | tests/test-multiple-scanners-nr/Makefile.am | 54 | ||||
-rw-r--r-- | tests/test-multiple-scanners-r/Makefile.am | 56 | ||||
-rw-r--r-- | tests/test-noansi-nr/Makefile.am | 48 | ||||
-rw-r--r-- | tests/test-noansi-r/Makefile.am | 48 | ||||
-rw-r--r-- | tests/test-posix/Makefile.am | 45 | ||||
-rw-r--r-- | tests/test-posixly-correct/Makefile.am | 45 | ||||
-rw-r--r-- | tests/test-prefix-nr/Makefile.am | 49 | ||||
-rw-r--r-- | tests/test-prefix-nr/README | 2 | ||||
-rw-r--r-- | tests/test-prefix-r/Makefile.am | 49 | ||||
-rw-r--r-- | tests/test-prefix-r/README | 2 | ||||
-rw-r--r-- | tests/test-pthread/Makefile.am | 46 | ||||
-rw-r--r-- | tests/test-quotes/Makefile.am | 47 | ||||
-rw-r--r-- | tests/test-reject/Makefile.am | 80 | ||||
-rw-r--r-- | tests/test-rescan-nr/Makefile.am | 47 | ||||
-rw-r--r-- | tests/test-rescan-r/Makefile.am | 47 | ||||
-rw-r--r-- | tests/test-rescan-r/test.input | 2 | ||||
-rw-r--r-- | tests/test-string-nr/Makefile.am | 46 | ||||
-rw-r--r-- | tests/test-string-r/Makefile.am | 46 | ||||
-rw-r--r-- | tests/test-table-opts/Makefile.am | 132 | ||||
-rw-r--r-- | tests/test-top/Makefile.am | 54 | ||||
-rw-r--r-- | tests/test-top/test.input | 3 | ||||
-rw-r--r-- | tests/test-yyextra/Makefile.am | 49 | ||||
-rwxr-xr-x | tests/testwrapper.sh | 53 | ||||
-rw-r--r-- | tests/top.l (renamed from tests/test-top/scanner.l) | 4 | ||||
-rw-r--r-- | tests/top.txt (renamed from tests/test-linedir-r/test.input) | 0 | ||||
-rw-r--r-- | tests/top_main.c (renamed from tests/test-top/main.c) | 12 | ||||
-rw-r--r-- | tests/yyextra.l (renamed from tests/test-yyextra/scanner.l) | 4 | ||||
-rw-r--r-- | tests/yyextra.txt (renamed from tests/test-yyextra/test.input) | 0 |
183 files changed, 1140 insertions, 3496 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 25d8b0c..4ac3c17 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -19,129 +19,464 @@ # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE. +TESTS = $(check_PROGRAMS) options.cn + +# The script testwrapper.sh will run most tests as is. A couple tests +# in the suite end in .reject, .table and the like so that we can pass +# different arguments to the test runner. We list those extensions so +# automake knows how to distinguish between the various kinds of tests +# we have. + +TEST_EXTENSIONS = .reject .table .direct .cn .i3 .pthread .one .opt .ser .ver + +LOG_COMPILER = $(srcdir)/testwrapper.sh +AM_LOG_FLAGS = -d $(srcdir) -r + +REJECT_LOG_COMPILER = $(srcdir)/testwrapper.sh +AM_REJECT_LOG_FLAGS = -d $(srcdir) -i reject.txt -r + +TABLE_LOG_COMPILER = $(srcdir)/testwrapper.sh +AM_TABLE_LOG_FLAGS = -d $(builddir) -i $(srcdir)/reject.txt -t + +DIRECT_LOG_COMPILER=$(srcdir)/testwrapper.sh +AM_DIRECT_LOG_FLAGS = -d $(srcdir) + +CN_LOG_COMPILER=$(srcdir)/options.cn +AM_CN_LOG_FLAGS=$(FLEX) + +I3_LOG_COMPILER=$(srcdir)/testwrapper.sh +AM_I3_LOG_FLAGS=-i $(srcdir)/cxx_yywrap.txt -i $(srcdir)/cxx_yywrap.txt -i $(srcdir)/cxx_yywrap.txt + +PTHREAD_LOG_COMPILER=$(srcdir)/testwrapper.sh +AM_PTHREAD_LOG_FLAGS=-i $(srcdir)/pthread_1.txt -i $(srcdir)/pthread_2.txt -i $(srcdir)/pthread_3.txt -i $(srcdir)/pthread_4.txt -i $(srcdir)/pthread_5.txt + +ONE_LOG_COMPILER = $(srcdir)/testwrapper.sh +AM_ONE_LOG_FLAGS = -1 -d $(srcdir) + +AM_YFLAGS = -d -p test + +check_PROGRAMS = $(simple_tests) $(reject_tests) $(TABLE_TESTS) $(DIRECT_TESTS) $(I3_TESTS) $(PTHREAD_TESTS) $(ONE_TESTS) $(TABLEOPTS_TESTS) + +simple_tests = \ + alloc_extra \ + array_nr \ + array_r \ + basic_nr \ + basic_r \ + bison_nr \ + bison_yylloc \ + bison_yylval \ + c_cxx_nr \ + c_cxx_r \ + ccl \ + cxx_basic \ + cxx_multiple_scanners \ + debug_nr \ + debug_r \ + extended \ + header_nr \ + header_r \ + mem_nr \ + mem_r \ + multiple_scanners_nr \ + multiple_scanners_r \ + noansi_nr \ + noansi_r \ + posix \ + posixly_correct \ + prefix_nr \ + prefix_r \ + quotes \ + string_nr \ + string_r \ + top \ + yyextra + +reject_tests = \ + reject_nr.reject \ + reject_r.reject + +TABLE_TESTS = \ + reject_ver.table \ + reject_ser.table + +DIRECT_TESTS = \ + include_by_buffer.direct \ + include_by_push.direct \ + include_by_reentrant.direct \ + rescan_nr.direct \ + rescan_r.direct + +I3_TESTS = \ + cxx_yywrap.i3 + +if want_pthread +PTHREAD_TESTS = \ + pthread.pthread +endif + +ONE_TESTS = \ + lineno_nr.one \ + lineno_r.one \ + lineno_trailing.one + +alloc_extra_SOURCES = alloc_extra.l +array_nr_SOURCES = array_nr.l +array_r_SOURCES = array_r.l +basic_nr_SOURCES = basic_nr.l +basic_r_SOURCES = basic_r.l +bison_nr_SOURCES = bison_nr_scanner.l bison_nr_parser.y bison_nr_main.c +bison_yylloc_SOURCES = bison_yylloc_scanner.l bison_yylloc_parser.y bison_yylloc_main.c +bison_yylval_SOURCES = bison_yylval_scanner.l bison_yylval_parser.y bison_yylval_main.c +c_cxx_nr_SOURCES = c_cxx_nr.lll +c_cxx_r_SOURCES = c_cxx_r.lll +ccl_SOURCES = ccl.l +cxx_basic_SOURCES = cxx_basic.ll +cxx_multiple_scanners_SOURCES = cxx_multiple_scanners_main.cc cxx_multiple_scanners_1.ll cxx_multiple_scanners_2.ll +cxx_yywrap_i3_SOURCES = cxx_yywrap.ll +debug_nr_SOURCES = debug_nr.l +debug_r_SOURCES = debug_r.l +extended_SOURCES = extended.l +header_nr_SOURCES = header_nr_scanner.l header_nr_main.c +header_r_SOURCES = header_r_scanner.l header_r_main.c +include_by_buffer_direct_SOURCES = include_by_buffer.direct.l +include_by_push_direct_SOURCES = include_by_push.direct.l +include_by_reentrant_direct_SOURCES = include_by_reentrant.direct.l +lineno_nr_one_SOURCES = lineno_nr.l +lineno_r_one_SOURCES = lineno_r.l +lineno_trailing_one_SOURCES = lineno_trailing.l +mem_nr_SOURCES = mem_nr.l +mem_r_SOURCES = mem_r.l +multiple_scanners_nr_SOURCES = multiple_scanners_nr_main.c multiple_scanners_nr_1.l multiple_scanners_nr_2.l +multiple_scanners_r_SOURCES = multiple_scanners_r_main.c multiple_scanners_r_1.l multiple_scanners_r_2.l +noansi_nr_SOURCES = noansi_nr.l +noansi_r_SOURCES = noansi_r.l +posix_SOURCES = posix.l +posixly_correct_SOURCES = posixly_correct.l +prefix_nr_SOURCES = prefix_nr.l +prefix_r_SOURCES = prefix_r.l +pthread_pthread_SOURCES = pthread.l +quotes_SOURCES = quotes.l +reject_nr_reject_SOURCES = reject.l4 +reject_r_reject_SOURCES = reject.l4 +reject_ver_table_SOURCES = reject.l4 +reject_ser_table_SOURCES = reject.l4 +rescan_nr_direct_SOURCES = rescan_nr.direct.l +rescan_r_direct_SOURCES = rescan_r.direct.l +string_nr_SOURCES = string_nr.l +string_r_SOURCES = string_r.l +top_SOURCES = top.l top_main.c +yyextra_SOURCES = yyextra.l + +BUILT_SOURCES = \ + bison_nr_parser.h \ + bison_nr_scanner.h \ + bison_yylloc_parser.h \ + bison_yylloc_scanner.h \ + bison_yylval_parser.h \ + bison_yylval_scanner.h \ + header_nr_scanner.h \ + header_r_scanner.h \ + multiple_scanners_nr_1.h \ + multiple_scanners_nr_2.h \ + multiple_scanners_r_1.h \ + multiple_scanners_r_2.h \ + top.h + +# Normally, automake would distribute files built by flex. Since the +# point of the test suite is to test the files that flex builds, and +# since anyone who has the flex distribution can build a flex binary +# without having a flex binary, we want to not distribute the files +# built by flex in the test suite. The dist-hook target accomplishes +# this goal. It's also handy to have the list of files to clean since +# automake doesn't know about the whacky ways in which we're abusing +# it. + +CLEANFILES = \ + array_nr.c \ + array_r.c \ + basic_nr.c \ + basic_r.c \ + bison_nr_parser.c \ + bison_nr_parser.h \ + bison_nr_scanner.c \ + bison_nr_scanner.h \ + bison_yylloc_parser.c \ + bison_yylloc_parser.h \ + bison_yylloc_scanner.c \ + bison_yylloc_scanner.h \ + bison_yylval_parser.c \ + bison_yylval_parser.h \ + bison_yylval_scanner.c \ + bison_yylval_scanner.h \ + c_cxx_nr.cc \ + c_cxx_r.cc \ + ccl.c \ + cxx_basic.cc \ + cxx_multiple_scanners_1.cc \ + cxx_multiple_scanners_2.cc \ + cxx_yywrap.cc \ + debug_nr.c \ + debug_r.c \ + extended.c \ + header_nr_scanner.c \ + header_nr_scanner.h \ + header_r_scanner.c \ + header_r_scanner.h \ + include_by_buffer.direct.c \ + include_by_push.direct.c \ + include_by_reentrant.direct.c \ + lineno_nr.c \ + lineno_r.c \ + lineno_trailing.c \ + mem_nr.c \ + mem_r.c \ + multiple_scanners_nr_1.c \ + multiple_scanners_nr_1.h \ + multiple_scanners_nr_2.c \ + multiple_scanners_nr_2.h \ + multiple_scanners_r_1.c \ + multiple_scanners_r_1.h \ + multiple_scanners_r_2.c \ + multiple_scanners_r_2.h \ + noansi_nr.c \ + noansi_r.c \ + posix.c \ + posixly_correct.c \ + prefix_nr.c \ + prefix_r.c \ + pthread.c \ + quotes.c \ + reject_nr.reject.c \ + reject_r.reject.c \ + reject_ser.table.c \ + reject_ser.table.tables \ + reject_ver.table.c \ + reject_ver.table.tables \ + rescan_nr.direct.c \ + rescan_r.direct.c \ + string_nr.c \ + string_r.c \ + top.c \ + top.h \ + yyextra.c \ +alloc_extra.c \ + $(tableopts_c) \ + $(tableopts_tables) + +dist-hook: + for file in $(CLEANFILES) ; do \ + rm -f $(distdir)/$$file \ + ; done + EXTRA_DIST = \ - README + README \ + alloc_extra.txt \ + array_nr.txt \ + array_r.txt \ + basic_nr.txt \ + basic_r.txt \ + bison_nr.txt \ + bison_yylloc.txt \ + bison_yylval.txt \ + c_cxx_nr.txt \ + c_cxx_r.txt \ + ccl.txt \ + cxx_basic.txt \ + cxx_multiple_scanners.txt \ + cxx_yywrap.txt \ + debug_nr.txt \ + debug_r.txt \ + extended.txt \ + header_nr.txt \ + header_r.txt \ + include_by_buffer.direct.txt \ + include_by_buffer.direct_2.txt \ + include_by_buffer.direct_3.txt \ + include_by_push.direct.txt \ + include_by_push.direct_2.txt \ + include_by_push.direct_3.txt \ + include_by_reentrant.direct.txt \ + include_by_reentrant.direct_2.txt \ + include_by_reentrant.direct_3.txt \ + lineno_nr.one.txt \ + lineno_r.one.txt \ + lineno_trailing.one.txt \ + mem_nr.txt \ + mem_r.txt \ + noansi_nr.txt \ + noansi_r.txt \ + prefix_nr.txt \ + prefix_r.txt \ + pthread_1.txt \ + pthread_2.txt \ + pthread_3.txt \ + pthread_4.txt \ + pthread_5.txt \ + reject.txt \ + rescan_nr.direct.txt \ + rescan_r.direct.txt \ + quotes.txt \ + top.txt \ + yyextra.txt \ + tableopts.txt dist_noinst_SCRIPTS = \ - create-test - -DIST_SUBDIRS = \ - test-concatenated-options \ - test-c++-yywrap \ - test-extended \ - test-ccl \ - test-quotes \ - test-rescan-r \ - test-rescan-nr \ - test-basic-nr \ - test-basic-r \ - test-bison-yylloc \ - test-bison-yylval \ - test-bison-nr \ - test-multiple-scanners-nr \ - test-multiple-scanners-r \ - test-header-nr \ - test-header-r \ - test-reject \ - test-c++-multiple-scanners \ - test-c++-basic \ - test-posixly-correct \ - test-posix \ - test-mem-r \ - test-mem-nr \ - test-debug-nr \ - test-debug-r \ - test-lineno-r \ - test-lineno-nr \ - test-lineno-trailing \ - test-linedir-r \ - TEMPLATE \ - test-top \ - test-array-nr \ - test-array-r \ - test-c-cpp-nr \ - test-c-cpp-r \ - test-include-by-buffer \ - test-include-by-push \ - test-include-by-reentrant \ - test-prefix-nr \ - test-prefix-r \ - test-pthread \ - test-string-nr \ - test-string-r \ - test-yyextra \ - test-alloc-extra \ - test-noansi-nr \ - test-noansi-r \ - test-table-opts - -SUBDIRS = \ - test-concatenated-options \ - test-c++-yywrap \ - test-extended \ - test-ccl \ - test-quotes \ - test-rescan-r \ - test-rescan-nr \ - test-basic-nr \ - test-basic-r \ - test-bison-yylloc \ - test-bison-yylval \ - test-bison-nr \ - test-multiple-scanners-nr \ - test-multiple-scanners-r \ - test-header-nr \ - test-header-r \ - test-reject \ - test-c++-multiple-scanners \ - test-c++-basic \ - test-posixly-correct \ - test-posix \ - test-mem-r \ - test-mem-nr \ - test-debug-nr \ - test-debug-r \ - test-lineno-r \ - test-lineno-nr \ - test-lineno-trailing \ - test-linedir-r \ - test-array-nr \ - test-array-r \ - test-c-cpp-nr \ - test-c-cpp-r \ - test-include-by-buffer \ - test-include-by-push \ - test-include-by-reentrant \ - test-prefix-nr \ - test-prefix-r \ - test-pthread \ - test-string-nr \ - test-string-r \ - test-yyextra \ - test-alloc-extra \ - test-noansi-nr \ - test-noansi-r \ - test-top \ - test-table-opts - -# clean up before running the test suite so we dont test old builds of test code - -check-local: clean - NOK=;\ - NFAIL=;\ - for dir in $(SUBDIRS) ; do \ - echo Executing test "$$dir" ; \ - ( cd "$$dir" && $(MAKE) test > OUTPUT 2>&1 ) ; \ - case $$? in \ - 0 ) echo Test "$$dir" succeeded.; \ - NOK=0$$NOK;\ - ;; \ - * ) echo Test "$$dir" FAILED. See "$$dir"/OUTPUT for details. ; \ - NFAIL=0$$NFAIL; \ - ;; \ - esac; \ - done ; \ - echo Results: ; \ - echo Tests succeeded: `echo @ECHO_N@ "$$NOK@ECHO_C@"|wc -c`; \ - echo Tests FAILED: `echo @ECHO_N@ "$$NFAIL@ECHO_C@"|wc -c` ; \ - test "$$NFAIL" = "" + tableopts.sh + +dist_check_SCRIPTS = \ + options.cn \ + testwrapper.sh + +pthread_pthread_LDADD = -lpthread + +# specify how to process .l files in order to test the flex built by make all + +FLEX = $(top_builddir)/src/flex + +.l.c: $(FLEX) + $(FLEX) -o $@ $< + +.ll.cc: $(FLEX) + $(FLEX) -+ -o $@ $< + +bison_nr_main.($OBJEXT): bison_nr_parser.h bison_nr_scanner.h +bison_nr_scanner.h: bison_nr_scanner.c + +bison_yylloc_main.$(OBJEXT): bison_yylloc_parser.h bison_yylloc_scanner.h +bison_yylloc_scanner.h: bison_yylloc_scanner.c + +bison_yylval_main.$(OBJEXT): bison_yylval_parser.h bison_yylval_scanner.h +bison_yylval_scanner.h: bison_yylval_scanner.c + +# automake does not support compiling flex scanners output in C as C++ +# so we explicitly sayhow, using the .lll suffix for the lex input file + +.lll.cc: $(FLEX) + $(FLEX) -o $@ $< + +header_nr_main.$(OBJEXT): header_nr_scanner.h +header_nr_scanner.h: header_nr_scanner.c + +header_r_main.$(OBJEXT): header_r_scanner.h +header_r_scanner.h: header_r_scanner.c + +include_by_buffer.direct$(EXE): include_by_buffer.direct.txt include_by_buffer.direct_2.txt include_by_buffer.direct_3.txt + +include_by_push.direct$(EXE): include_by_push.direct.txt include_by_push.direct_2.txt include_by_push.direct_3.txt + +include_by_reentrant.direct$(EXE): include_by_reentrant.direct.txt include_by_reentrant.direct_2.txt include_by_reentrant.direct_3.txt + +multiple_scanners_nr_main.$(OBJEXT): multiple_scanners_nr_1.h multiple_scanners_nr_2.h +multiple_scanners_nr_1.h: multiple_scanners_nr_1.c +multiple_scanners_nr_2.h: multiple_scanners_nr_2.c + +multiple_scanners_r_main.$(OBJEXT): multiple_scanners_r_1.h multiple_scanners_r_2.h +multiple_scanners_r_1.h: multiple_scanners_r_1.c +multiple_scanners_r_2.h: multiple_scanners_r_2.c + +posixly_correct.c: posixly_correct.l $(FLEX) + POSIXLY_CORRECT=1 $(FLEX) -o $@ $< + +reject_nr.reject.c: reject.l4 $(FLEX) + $(FLEX) -o $@ $< + +reject_nr.reject$(EXEEXT): reject_nr.reject.$(OBJEXT) + $(LINK) $^ + +reject_r.reject.c: reject.l4 $(FLEX) + $(FLEX) --reentrant -o $@ $< + +reject_r.reject.$(OBJEXT): reject_r.reject.c + $(COMPILE) -DTEST_IS_REENTRANT -c -o $@ $< + +reject_r.reject$(EXEEXT): reject_r.reject.$(OBJEXT) + $(LINK) $^ + +reject_ver.table.c: reject.l4 $(FLEX) + $(FLEX) -o $@ --tables-verify --tables-file=$(basename $@).tables $< + +reject_ver.table.$(OBJEXT): reject_ver.table.c + $(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -c -o $@ $< + +reject_ver.table$(EXEEXT): reject_ver.table.$(OBJEXT) + $(LINK) $^ + +reject_ser.table.c: reject.l4 $(FLEX) + $(FLEX) -o $@ --tables-file=$(basename $@).tables $< + +reject_ser.table.$(OBJEXT): reject_ser.table.c + $(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -c -o $@ $< + +reject_ser.table$(EXEEXT): reject_ser.table.$(OBJEXT) + $(LINK) $^ + +top_main.$(OBJEXT): top.h +top.h: top.c + +# We separate out the tableopts _SOURCES variables and the linking +# rules for those programs because automake has no way to specify such +# things with a loop in a variable (even though make can do such +# things) and the resultant list is both long an unenlightening. And +# it can be / is generated by a shell script, tableopts.sh. + +tableopts.am: tableopts.sh + $(srcdir)/tableopts.sh > $(srcdir)/tableopts.am + +include $(srcdir)/tableopts.am + +tableopts := -Ca -Ce -Cf -CF -Cm -Cem -Cae -Caef -CaeF -Cam -Caem +tableopts_opt_tests := $(foreach opt,$(tableopts), tableopts_opt_nr$(opt) tableopts_opt_r$(opt)) +tableopts_sertests := $(foreach opt,$(tableopts), tableopts_ser_nr$(opt) tableopts_ser_r$(opt)) +tableopts_vertests := $(foreach opt,$(tableopts), tableopts_ver_nr$(opt) tableopts_ver_r$(opt)) +tableopts_tests := $(tableopts_opttests) $(tableopts_vertests) $(tableopts_sertests) + +tableopts_c := $(addsuffix .c,$(tableopts_tests)) + +OPT_LOG_COMPILER = $(srcdir)/testwrapper.sh +AM_OPT_LOG_FLAGS = -d $(srcdir) -i tableopts.txt -r + +tableopts_opt_nr%.c: tableopts.l4 $(FLEX) + $(FLEX) -P $(subst -,_,$(basename $(*F))) $* -o $@ $< + +tableopts_opt_nr%.$(OBJEXT): tableopts_opt_nr%.c + $(COMPILE) -c -o $@ $< + +tableopts_opt_r%.c: tableopts.l4 $(FLEX) + $(FLEX) -P $(subst -,_,$(basename $(*F))) --reentrant $* -o $@ $< + +tableopts_opt_r%.$(OBJEXT): tableopts_opt_r%.c + $(COMPILE) -DTEST_IS_REENTRANT -c -o $@ $< + +SER_LOG_COMPILER = $(srcdir)/testwrapper.sh +AM_SER_LOG_FLAGS = -d $(builddir) -i $(srcdir)/tableopts.txt -r -t + +tableopts_ser_nr%.c: tableopts.l4 $(FLEX) + $(FLEX) -P $(subst -,_,$(basename $(*F))) --tables-file="tableopts_ser_nr$*.ser.tables" $* -o $@ $< + +tableopts_ser_nr%.$(OBJEXT): tableopts_ser_nr%.c + $(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -c -o $@ $< + +tableopts_ser_r%.c: tableopts.l4 $(FLEX) + $(FLEX) -P $(subst -,_,$(basename $(*F))) -R --tables-file="tableopts_ser_r$*.ser.tables" $* -o $@ $< + +tableopts_ser_r%.$(OBJEXT): tableopts_ser_r%.c + $(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -DTEST_IS_REENTRANT -c -o $@ $< + +VER_LOG_COMPILER = $(srcdir)/testwrapper.sh +AM_VER_LOG_FLAGS = -d $(builddir) -i $(srcdir)/tableopts.txt -r -t + +tableopts_ver_nr%.c: tableopts.l4 $(FLEX) + $(FLEX) -P $(subst -,_,$(basename $(*F))) --tables-file="tableopts_ver_nr$*.ver.tables" --tables-verify $* -o $@ $< + +tableopts_ver_nr%.$(OBJEXT): tableopts_ver_nr%.c + $(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -c -o $@ $< + +tableopts_ver_nr%.ver$(EXEEXT): tableopts_ver_nr%.$(OBJEXT) + $(LINK) -o $@ $^ + +tableopts_ver_r%.c: tableopts.l4 $(FLEX) + $(FLEX) -P $(subst -,_,$(basename $(*F))) -R --tables-file="tableopts_ver_r$*.ver.tables" --tables-verify $* -o $@ $< + +tableopts_ver_r%.$(OBJEXT): tableopts_ver_r%.c + $(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -DTEST_IS_REENTRANT -c -o $@ $< diff --git a/tests/README b/tests/README index f948eaf..43387f4 100644 --- a/tests/README +++ b/tests/README @@ -8,14 +8,14 @@ this directory and its contents. * STRUCTURE OF THE TEST SUITE -The test suite consists of several directories, each containing a -scanner known to work with the most recent version of flex. In +The testsuite consists of several tests. Each test is centered around +a scanner known to work with the most recent version of flex. In general, after you modify your copy of the flex distribution, you -should re-run the test suite. Some of the tests may require certain tools -to be available (e.g., bison, diff). If any test returns an error or -generates an error message, then your modifications *may* have broken -a feature of flex. At a minimum, you'll want to investigate the -failure and determine if it's truly significant. +should re-run the test suite. Some of the tests may require certain +tools to be available (e.g., bison, diff). If any test returns an +error or generates an error message, then your modifications *may* +have broken a feature of flex. At a minimum, you'll want to +investigate the failure and determine if it's truly significant. * HOW TO RUN THE TEST SUITE @@ -26,52 +26,32 @@ To build and execute all tests from the top level of the flex source tree: To build and execute a single test: $ cd tests/ # from the top level of the flex tree. - $ cd test-pthread-nr # for example - $ make test + $ make testname.log -* HOW TO ADD A NEW TEST TO THE TEST SUITE + where "testname" is the name of the test. This is an automake-ism + that will create (or re-create, if need be), a log of the particular + test run that you're working on. -**- RUN the script `create-test` found in this directory with a single -argument of the name of the test you want to create. If it fails with -a message about a non-existent file `config.status', then run the -configure script in the top-level directory and everything will be -fine. If it fails to work for you other than this, report it as a -bug. +* HOW TO ADD A NEW TEST TO THE TEST SUITE -** Modify the files in the newly created directory so that they test -whatever feature of flex you are interested in. +** List your test in the TESTS variable in Makefile.am in this + directory. Note that due to the large number of tests, we use + variables to group similar tests together. This also helps with + handling the automake test suite requirements. Hopefully your test + can be listed in SIMPLE_TESTS. You'll need to add the appropriate + automake _SOURCES variable as well. If you're unsure, then consult + the automake manual, paying attention to the parallel test harness + section. ** On success, your test should return zero. ** On error, your test should return 1 (one) and print a message to -stderr, which will have been redirected to the file named, "OUTPUT", -in your test's directory. +stderr, which will have been redirected to the log file created by the +automake test suite harness. ** If your test is skipped (e.g., because bison was not found), then - the test should return 2 (two). See "test-bison-nr/Makefile.am" for - an example. - -** You must modify the last few lines of the top-level configure.in by - adding the Makefile for your test directory. (This step is - done automatically by `create-test`.) - -** You must add the name of your test to the SUBDIRS variable in - tests/Makefile.am. (This is also done automatically for you by `create-test'.) - -** Add a description of your new test to the end of the file - `descriptions'. Remember to keep the description as brief as - possible, preferably to one line. - -** You will have to run the autogen.sh script in the top-level - directory as well as run the configure script in that - directory. (Note that running config.status may prove easier or - quicker.) - -** The easiest way for you to submit your new test to the flex - maintainers is by generating a patch. The flex maintainers only - need to have the Makefile.am, the flex input file, the test input - file (if there is one) and any other files necessary to compile the - test. You do not need to submit files generated by autoconf, - automake, configure etc. It would be helpful to include the file - .cvsignore which you will find in your test directory if you used - the `create-test' script. + the test should return 2 (two). + +** Once your work is done, submit a patch via the flex development + mailing list, the github pull request mechanism or some other + suitable means. diff --git a/tests/TEMPLATE/Makefile.am b/tests/TEMPLATE/Makefile.am deleted file mode 100644 index 531d931..0000000 --- a/tests/TEMPLATE/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l parser.y test.input -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = TEMPLATE - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/TEMPLATE/parser.y b/tests/TEMPLATE/parser.y deleted file mode 100644 index 54c428b..0000000 --- a/tests/TEMPLATE/parser.y +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file is part of flex. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE. - */ - -/* A dummy template parser to build "parser.c" and "parser.h". - How to compile: - bison --defines --output-file="parser.c" --name-prefix="test" parser.y - */ -%{ -#include <stdio.h> -#include <stdlib.h> -#include "config.h" - -#define YYERROR_VERBOSE 1 /* For debugging. */ -/* #define YYPARSE_PARAM scanner */ /* For pure bison parser. */ -/* #define YYLEX_PARAM scanner */ /* For reentrant flex. */ - - -int yyerror(char* msg); -extern int testlex(); - -%} - -%% - -rule: ; - -%% - -int yyerror(char* msg) { - fprintf(stderr,"%s\n",msg); - return 0; -} - -/* -int -main ( int argc, char** argv ) -{ - yyparse (); - return 0; -} -*/ diff --git a/tests/TEMPLATE/scanner.l b/tests/TEMPLATE/scanner.l deleted file mode 100644 index c41a778..0000000 --- a/tests/TEMPLATE/scanner.l +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of flex. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE. - */ - -%{ -/* A template scanner file to build "scanner.c". */ -#include <stdio.h> -#include <stdlib.h> -#include "config.h" -/*#include "parser.h" */ - -%} - -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap -%option warn - - -%% - -. { } - -%% - -int main(void); - -int -main () -{ - yyin = stdin; - yyout = stdout; - yylex(); - printf("TEST RETURNING OK.\n"); - return 0; -} diff --git a/tests/test-alloc-extra/scanner.l b/tests/alloc_extra.l index bedd43b..2c582a8 100644 --- a/tests/test-alloc-extra/scanner.l +++ b/tests/alloc_extra.l @@ -48,8 +48,8 @@ void *yyalloc ( size_t size, yyscan_t scanner ); %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap nodefault +%option 8bit prefix="test" +%option nounput nomain noyywrap nodefault noinput %option warn %option extra-type="struct Check *" %option reentrant diff --git a/tests/test-alloc-extra/test.input b/tests/alloc_extra.txt index 243df29..243df29 100644 --- a/tests/test-alloc-extra/test.input +++ b/tests/alloc_extra.txt diff --git a/tests/test-array-nr/scanner.l b/tests/array_nr.l index 068c674..52e0753 100644 --- a/tests/test-array-nr/scanner.l +++ b/tests/array_nr.l @@ -30,8 +30,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn array diff --git a/tests/TEMPLATE/test.input b/tests/array_nr.txt index 7288a40..7288a40 100644 --- a/tests/TEMPLATE/test.input +++ b/tests/array_nr.txt diff --git a/tests/test-array-r/scanner.l b/tests/array_r.l index 2d4c1b1..556d26f 100644 --- a/tests/test-array-r/scanner.l +++ b/tests/array_r.l @@ -30,8 +30,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn array reentrant diff --git a/tests/test-array-nr/test.input b/tests/array_r.txt index 7288a40..7288a40 100644 --- a/tests/test-array-nr/test.input +++ b/tests/array_r.txt diff --git a/tests/test-basic-nr/scanner.l b/tests/basic_nr.l index c284884..3c29757 100644 --- a/tests/test-basic-nr/scanner.l +++ b/tests/basic_nr.l @@ -23,7 +23,6 @@ /* TEST scanner. Basic non-reentrant scanner. - Compile with: flex scanner.l Sample Input: # this is a comment @@ -35,8 +34,8 @@ #include "config.h" %} -%option prefix="test" outfile="scanner.c" -%option nounput noyywrap noyylineno warn nodefault +%option prefix="test" +%option nounput noyywrap noyylineno warn nodefault noinput IDENT [[:alnum:]_-] WS [[:blank:]] @@ -63,4 +62,3 @@ int main () printf("TEST RETURNING OK.\n"); return 0; } - diff --git a/tests/test-basic-nr/test.input b/tests/basic_nr.txt index 642e0fb..642e0fb 100644 --- a/tests/test-basic-nr/test.input +++ b/tests/basic_nr.txt diff --git a/tests/test-basic-r/scanner.l b/tests/basic_r.l index 6e3510f..e9ff59f 100644 --- a/tests/test-basic-r/scanner.l +++ b/tests/basic_r.l @@ -33,8 +33,8 @@ #include "config.h" %} -%option prefix="test" outfile="scanner.c" -%option nounput noyywrap noyylineno warn nodefault +%option prefix="test" +%option nounput noyywrap noyylineno warn nodefault noinput %option reentrant IDENT [[:alnum:]_-] diff --git a/tests/test-basic-r/test.input b/tests/basic_r.txt index 2160628..2160628 100644 --- a/tests/test-basic-r/test.input +++ b/tests/basic_r.txt diff --git a/tests/test-bison-nr/test.input b/tests/bison_nr.txt index 94adcb2..94adcb2 100644 --- a/tests/test-bison-nr/test.input +++ b/tests/bison_nr.txt diff --git a/tests/test-bison-nr/main.c b/tests/bison_nr_main.c index 49dde7c..f5dd98a 100644 --- a/tests/test-bison-nr/main.c +++ b/tests/bison_nr_main.c @@ -21,13 +21,16 @@ * PURPOSE. */ -#include "parser.h" -#include "scanner.h" +#include "bison_nr_parser.h" +#include "bison_nr_scanner.h" extern int testparse(void); int main ( int argc, char** argv ) { + (void)argc; + (void)argv; + /*yydebug =1;*/ testin = stdin; testparse ( ); diff --git a/tests/test-bison-nr/parser.y b/tests/bison_nr_parser.y index 2cbf9aa..3021048 100644 --- a/tests/test-bison-nr/parser.y +++ b/tests/bison_nr_parser.y @@ -30,12 +30,14 @@ #include <stdlib.h> #include <string.h> #include "config.h" +#include "bison_nr_parser.h" +#include "bison_nr_scanner.h" #define YYERROR_VERBOSE 1 /* #define YYPARSE_PARAM scanner */ /* #define YYLEX_PARAM scanner */ -int yyerror(char* msg); +int yyerror(const char* msg); extern int testget_lineno(void); @@ -89,7 +91,7 @@ line: %% -int yyerror(char* msg) { +int yyerror(const char* msg) { fprintf(stderr,"%s\n",msg); return 0; } diff --git a/tests/test-bison-nr/scanner.l b/tests/bison_nr_scanner.l index 2510de6..4378e5a 100644 --- a/tests/test-bison-nr/scanner.l +++ b/tests/bison_nr_scanner.l @@ -25,16 +25,16 @@ /* The scanner expects to link to bison yylval . */ #include <stdio.h> #include <stdlib.h> -#include "parser.h" +#include "bison_nr_parser.h" #include "config.h" static char* STRDUP(char* s1); #define YY_EXTRA_TYPE int %} -%option 8bit outfile="scanner.c" prefix="test" +%option 8bit prefix="test" %option bison-locations yylineno -%option nomain nounput noyy_top_state noyywrap nodefault warn -%option prefix="test" header="scanner.h" yylineno +%option prefix="test" header="bison_nr_scanner.h" yylineno +%option nomain nounput noyy_top_state noyywrap nodefault noinput warn %% diff --git a/tests/test-bison-yylloc/test.input b/tests/bison_yylloc.txt index 94adcb2..94adcb2 100644 --- a/tests/test-bison-yylloc/test.input +++ b/tests/bison_yylloc.txt diff --git a/tests/test-bison-yylval/main.c b/tests/bison_yylloc_main.c index 30c4314..0274d39 100644 --- a/tests/test-bison-yylval/main.c +++ b/tests/bison_yylloc_main.c @@ -21,12 +21,16 @@ * PURPOSE. */ -#include "parser.h" -#include "scanner.h" +#include "bison_yylloc_parser.h" +#include "bison_yylloc_scanner.h" int main ( int argc, char** argv ) { yyscan_t scanner; + + (void)argc; + (void)argv; + /*yydebug =1;*/ testlex_init ( &scanner ); testset_in(stdin,scanner); @@ -36,4 +40,5 @@ int main ( int argc, char** argv ) } + /* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */ diff --git a/tests/test-bison-yylloc/parser.y b/tests/bison_yylloc_parser.y index 224d252..8737291 100644 --- a/tests/test-bison-yylloc/parser.y +++ b/tests/bison_yylloc_parser.y @@ -26,13 +26,17 @@ /* How to compile: - bison --defines --output-file="parser.c" --name-prefix="test" parser.y + bison --defines --output-file="bison_yylloc_parser.c" --name-prefix="test" parser.y */ %{ #include <stdio.h> #include <stdlib.h> #include <string.h> #include "config.h" +#include "bison_yylloc_parser.h" +#include "bison_yylloc_scanner.h" + +int yyerror(YYLTYPE *location, void* scanner, const char* msg); #define YYERROR_VERBOSE 1 @@ -78,7 +82,7 @@ line: /* Check lineno. */ if( $1 != @1.first_line || $1 != testget_lineno(scanner)) { - yyerror("Parse failed: Line numbers do not match."); + yyerror(0, 0, "Parse failed: Line numbers do not match."); YYABORT; } @@ -89,7 +93,9 @@ line: %% -int yyerror(void* scanner, char* msg) { +int yyerror(YYLTYPE *location, void* scanner, const char* msg) { + (void)location; + (void)scanner; fprintf(stderr,"%s\n",msg); return 0; } diff --git a/tests/test-bison-yylloc/scanner.l b/tests/bison_yylloc_scanner.l index aaf6fd7..3708237 100644 --- a/tests/test-bison-yylloc/scanner.l +++ b/tests/bison_yylloc_scanner.l @@ -25,16 +25,16 @@ /* The scanner expects to link to bison yylval . */ #include <stdio.h> #include <stdlib.h> -#include "parser.h" +#include "bison_yylloc_parser.h" #include "config.h" static char* STRDUP(char* s1); #define YY_EXTRA_TYPE int %} -%option 8bit outfile="scanner.c" prefix="test" +%option 8bit prefix="test" %option reentrant bison-bridge bison-locations yylineno -%option nomain nounput noyy_top_state noyywrap nodefault warn -%option prefix="test" header="scanner.h" +%option header="bison_yylloc_scanner.h" +%option nomain nounput noyy_top_state noyywrap nodefault noinput warn %% diff --git a/tests/test-bison-yylval/test.input b/tests/bison_yylval.txt index 846f206..846f206 100644 --- a/tests/test-bison-yylval/test.input +++ b/tests/bison_yylval.txt diff --git a/tests/test-bison-yylloc/main.c b/tests/bison_yylval_main.c index 24568a9..fb04538 100644 --- a/tests/test-bison-yylloc/main.c +++ b/tests/bison_yylval_main.c @@ -21,12 +21,16 @@ * PURPOSE. */ -#include "parser.h" -#include "scanner.h" +#include "bison_yylval_parser.h" +#include "bison_yylval_scanner.h" int main ( int argc, char** argv ) { yyscan_t scanner; + + (void)argc; + (void)argv; + /*yydebug =1;*/ testlex_init ( &scanner ); testset_in(stdin,scanner); @@ -36,5 +40,4 @@ int main ( int argc, char** argv ) } - /* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */ diff --git a/tests/test-bison-yylval/parser.y b/tests/bison_yylval_parser.y index 626c5e7..4159d7b 100644 --- a/tests/test-bison-yylval/parser.y +++ b/tests/bison_yylval_parser.y @@ -32,9 +32,12 @@ #include <stdlib.h> #include <string.h> #include "config.h" +#include "bison_yylval_parser.h" +#include "bison_yylval_scanner.h" #define YYERROR_VERBOSE 1 +int yyerror(void* scanner, const char* msg); /* A dummy function. A check against seg-faults in yylval->str. */ int process_text(char* s) { @@ -74,7 +77,8 @@ starttag: LT TAGNAME GT { process_text($2); free($2);} ; endtag: LTSLASH TAGNAME GT { process_text($2);free($2);} ; %% -int yyerror(void* scanner, char* msg) { +int yyerror(void* scanner, const char* msg) { + (void)scanner; fprintf(stderr,"%s\n",msg); return 0; } diff --git a/tests/test-bison-yylval/scanner.l b/tests/bison_yylval_scanner.l index 7e902f7..db99fa0 100644 --- a/tests/test-bison-yylval/scanner.l +++ b/tests/bison_yylval_scanner.l @@ -25,7 +25,7 @@ /* The scanner expects to link to bison yylval . */ #include <stdio.h> #include <stdlib.h> -#include "parser.h" +#include "bison_yylval_parser.h" #include "config.h" static char* STRDUP(char* s1); @@ -33,10 +33,10 @@ enum yesno_t { no=0, yes=1 }; #define YY_EXTRA_TYPE enum yesno_t %} -%option 8bit outfile="scanner.c" prefix="test" +%option 8bit prefix="test" %option reentrant bison-bridge -%option noyywrap nomain nounput noyy_top_state noyywrap nodefault warn -%option prefix="test" header="scanner.h" +%option header="bison_yylval_scanner.h" +%option noyywrap nomain nounput noyy_top_state noyywrap nodefault noinput warn %option stack diff --git a/tests/test-c-cpp-nr/scanner.l b/tests/c_cxx_nr.lll index e184008..c9e0fb6 100644 --- a/tests/test-c-cpp-nr/scanner.l +++ b/tests/c_cxx_nr.lll @@ -32,7 +32,7 @@ %} -%option 8bit outfile="scanner.cpp" prefix="test" +%option 8bit prefix="test" %option nounput nomain noyywrap %option warn diff --git a/tests/test-array-r/test.input b/tests/c_cxx_nr.txt index 7288a40..7288a40 100644 --- a/tests/test-array-r/test.input +++ b/tests/c_cxx_nr.txt diff --git a/tests/test-c-cpp-r/scanner.l b/tests/c_cxx_r.lll index 3182d1b..83a39d7 100644 --- a/tests/test-c-cpp-r/scanner.l +++ b/tests/c_cxx_r.lll @@ -32,7 +32,7 @@ %} -%option 8bit outfile="scanner.cpp" prefix="test" +%option 8bit prefix="test" %option nounput nomain noyywrap %option warn reentrant diff --git a/tests/test-c++-basic/test.input b/tests/c_cxx_r.txt index 7288a40..7288a40 100644 --- a/tests/test-c++-basic/test.input +++ b/tests/c_cxx_r.txt diff --git a/tests/test-ccl/scanner.l b/tests/ccl.l index 330278a..c244892 100644 --- a/tests/test-ccl/scanner.l +++ b/tests/ccl.l @@ -32,8 +32,8 @@ #define a_ok() do{printf("OK: flex line %d. input line %d.\n", __LINE__, yylineno); return 1;}while(0) %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn diff --git a/tests/test-ccl/test.input b/tests/ccl.txt index b318fe6..b318fe6 100644 --- a/tests/test-ccl/test.input +++ b/tests/ccl.txt diff --git a/tests/create-test b/tests/create-test deleted file mode 100755 index 05e6864..0000000 --- a/tests/create-test +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -TESTFILES="Makefile.am scanner.l parser.y .cvsignore test.input" - -if [ ! $# -eq 1 ] ; then - echo 1>&2 Usage: $0 test-name - exit 1 -fi - -if test -e "$1" ; then - echo 1>&2 "$1 exists already" - exit 1 -fi - -mkdir $1 -if test "$?" -ne 0 ; then - echo 1>&2 "mkdir $1 failed" - exit 1 -fi - -for i in $TESTFILES ; do - cp TEMPLATE/$i $1/$i -done - -echo "$1" >> "$1"/.cvsignore - -sed -i '/--new-test-here--/i\ -tests/'"$1"'/Makefile' ../configure.in - -sed -i '/^\(DIST_\)\?SUBDIRS/a\ - '"$1"' \\' Makefile.am - -sed -i "s:TEMPLATE:$1:g" "$1"/Makefile.am diff --git a/tests/test-c++-basic/scanner.l b/tests/cxx_basic.ll index 48baf00..6ffa39c 100644 --- a/tests/test-c++-basic/scanner.l +++ b/tests/cxx_basic.ll @@ -27,10 +27,9 @@ %} -%option 8bit outfile="scanner.cpp" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" %option warn c++ - +%option nounput nomain noinput noyywrap %% diff --git a/tests/test-c++-yywrap/test.input b/tests/cxx_basic.txt index 7288a40..7288a40 100644 --- a/tests/test-c++-yywrap/test.input +++ b/tests/cxx_basic.txt diff --git a/tests/test-c++-multiple-scanners/test.input b/tests/cxx_multiple_scanners.txt index 08498fa..08498fa 100644 --- a/tests/test-c++-multiple-scanners/test.input +++ b/tests/cxx_multiple_scanners.txt diff --git a/tests/test-c++-multiple-scanners/scanner-1.l b/tests/cxx_multiple_scanners_1.ll index 38cc5d7..f4adb9d 100644 --- a/tests/test-c++-multiple-scanners/scanner-1.l +++ b/tests/cxx_multiple_scanners_1.ll @@ -24,7 +24,7 @@ %} -%option 8bit outfile="scanner-1.cpp" prefix="S1_" +%option 8bit prefix="S1_" %option nounput nomain noyywrap %option warn stack noyy_top_state diff --git a/tests/test-c++-multiple-scanners/scanner-2.l b/tests/cxx_multiple_scanners_2.ll index 15faf26..d84c530 100644 --- a/tests/test-c++-multiple-scanners/scanner-2.l +++ b/tests/cxx_multiple_scanners_2.ll @@ -24,7 +24,7 @@ %} -%option 8bit outfile="scanner-2.cpp" prefix="S2_" +%option 8bit prefix="S2_" %option nounput nomain %option warn stack noyy_top_state diff --git a/tests/test-c++-multiple-scanners/main.cpp b/tests/cxx_multiple_scanners_main.cc index 08fe2c1..08fe2c1 100644 --- a/tests/test-c++-multiple-scanners/main.cpp +++ b/tests/cxx_multiple_scanners_main.cc diff --git a/tests/test-c++-yywrap/scanner.l b/tests/cxx_yywrap.ll index 433ad08..0947cec 100644 --- a/tests/test-c++-yywrap/scanner.l +++ b/tests/cxx_yywrap.ll @@ -28,7 +28,7 @@ %} -%option 8bit outfile="scanner.cpp" prefix="test" +%option 8bit prefix="test" %option nounput nomain %option warn c++ diff --git a/tests/test-c-cpp-nr/test.input b/tests/cxx_yywrap.txt index 7288a40..7288a40 100644 --- a/tests/test-c-cpp-nr/test.input +++ b/tests/cxx_yywrap.txt diff --git a/tests/test-debug-nr/scanner.l b/tests/debug_nr.l index 13d11d6..0596dce 100644 --- a/tests/test-debug-nr/scanner.l +++ b/tests/debug_nr.l @@ -29,8 +29,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn debug %% diff --git a/tests/test-debug-nr/test.input b/tests/debug_nr.txt index 8d6476c..8d6476c 100644 --- a/tests/test-debug-nr/test.input +++ b/tests/debug_nr.txt diff --git a/tests/test-debug-r/scanner.l b/tests/debug_r.l index 14a335e..0d40e0e 100644 --- a/tests/test-debug-r/scanner.l +++ b/tests/debug_r.l @@ -29,8 +29,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn debug reentrant %% diff --git a/tests/test-debug-r/test.input b/tests/debug_r.txt index 8d6476c..8d6476c 100644 --- a/tests/test-debug-r/test.input +++ b/tests/debug_r.txt diff --git a/tests/test-extended/scanner.l b/tests/extended.l index 222c7dd..a113fac 100644 --- a/tests/test-extended/scanner.l +++ b/tests/extended.l @@ -30,8 +30,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn diff --git a/tests/test-extended/test.input b/tests/extended.txt index 829e23d..829e23d 100644 --- a/tests/test-extended/test.input +++ b/tests/extended.txt diff --git a/tests/test-header-nr/test.input b/tests/header_nr.txt index 2ce5001..2ce5001 100644 --- a/tests/test-header-nr/test.input +++ b/tests/header_nr.txt diff --git a/tests/test-header-nr/main.c b/tests/header_nr_main.c index b03fe30..bb14749 100644 --- a/tests/test-header-nr/main.c +++ b/tests/header_nr_main.c @@ -21,11 +21,14 @@ * PURPOSE. */ -#include "scanner.h" +#include "header_nr_scanner.h" int main ( int argc, char** argv ) { + (void)argc; + (void)argv; + testin = stdin; testout = stdout; testlex(); diff --git a/tests/test-header-nr/scanner.l b/tests/header_nr_scanner.l index a768f72..b429a6c 100644 --- a/tests/test-header-nr/scanner.l +++ b/tests/header_nr_scanner.l @@ -29,8 +29,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" header="scanner.h" -%option nounput nomain noyywrap +%option 8bit prefix="test" header="header_nr_scanner.h" +%option nounput nomain noyywrap noinput %option warn diff --git a/tests/test-header-r/test.input b/tests/header_r.txt index 2ce5001..2ce5001 100644 --- a/tests/test-header-r/test.input +++ b/tests/header_r.txt diff --git a/tests/test-header-r/main.c b/tests/header_r_main.c index 353a63e..22b397d 100644 --- a/tests/test-header-r/main.c +++ b/tests/header_r_main.c @@ -21,7 +21,9 @@ * PURPOSE. */ -#include "scanner.h" +#include <assert.h> + +#include "header_r_scanner.h" /* The scanner itself is not important here. * We simply try to use all the functions that are exported in the @@ -30,6 +32,9 @@ int main ( int argc, char** argv ) { + (void)argc; + (void)argv; + yyscan_t scanner; FILE *fp; char * extra = "EXTRA"; @@ -40,7 +45,9 @@ main ( int argc, char** argv ) testset_extra(extra,scanner); fp = testget_in(scanner); + assert(fp == stdin); fp = testget_out(scanner); + assert(fp == stdout); while(testlex(scanner)) { char * text; @@ -58,6 +65,3 @@ main ( int argc, char** argv ) printf("TEST RETURNING OK.\n"); return 0; } - - -/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */ diff --git a/tests/test-header-r/scanner.l b/tests/header_r_scanner.l index 9f565c9..bfad8ba 100644 --- a/tests/test-header-r/scanner.l +++ b/tests/header_r_scanner.l @@ -33,8 +33,8 @@ %} %option reentrant -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" header="header_r_scanner.h" +%option nounput nomain noyywrap noinput %option warn diff --git a/tests/test-include-by-buffer/scanner.l b/tests/include_by_buffer.direct.l index 3224543..f3b2d2a 100644 --- a/tests/test-include-by-buffer/scanner.l +++ b/tests/include_by_buffer.direct.l @@ -3,7 +3,7 @@ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions - * are met: +f * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. @@ -31,8 +31,8 @@ #include "config.h" %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn %x GET_FILENAME @@ -87,7 +87,7 @@ main ( int argc, char** argv ) { FILE * fp; if( argc != 2 ) { - fprintf(stderr,"*** Error: Must specifiy one filename.\n"); + fprintf(stderr,"*** Error: Must specify one filename.\n"); exit(-1); } if((fp=fopen(argv[1],"r"))==NULL) { diff --git a/tests/include_by_buffer.direct.txt b/tests/include_by_buffer.direct.txt new file mode 100644 index 0000000..56f1ed2 --- /dev/null +++ b/tests/include_by_buffer.direct.txt @@ -0,0 +1,3 @@ +Beginning of "include_by_buffer.direct.txt" +#include <include_by_buffer.direct_2.txt> +End of "include_by_buffer.direct.txt" diff --git a/tests/include_by_buffer.direct_2.txt b/tests/include_by_buffer.direct_2.txt new file mode 100644 index 0000000..52e61ea --- /dev/null +++ b/tests/include_by_buffer.direct_2.txt @@ -0,0 +1,3 @@ +Beginning of "include_by_buffer.direct_2.txt" +#include <include_by_buffer.direct_3.txt> +End of "include_by_buffer.direct_2.txt" diff --git a/tests/include_by_buffer.direct_3.txt b/tests/include_by_buffer.direct_3.txt new file mode 100644 index 0000000..3cfdd0f --- /dev/null +++ b/tests/include_by_buffer.direct_3.txt @@ -0,0 +1,2 @@ +Beginning of "include_by_buffer.direct_3.txt" +End of "include_by_buffer.direct_3.txt" diff --git a/tests/test-include-by-push/scanner.l b/tests/include_by_push.direct.l index 8556152..6b7a5fa 100644 --- a/tests/test-include-by-push/scanner.l +++ b/tests/include_by_push.direct.l @@ -31,8 +31,8 @@ #include "config.h" %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn %x GET_FILENAME @@ -77,7 +77,7 @@ main ( int argc, char** argv ) { FILE * fp; if( argc != 2 ) { - fprintf(stderr,"*** Error: Must specifiy one filename.\n"); + fprintf(stderr,"*** Error: Must specify one filename.\n"); exit(-1); } if((fp=fopen(argv[1],"r"))==NULL) { diff --git a/tests/include_by_push.direct.txt b/tests/include_by_push.direct.txt new file mode 100644 index 0000000..93136f6 --- /dev/null +++ b/tests/include_by_push.direct.txt @@ -0,0 +1,3 @@ +Beginning of "include_by_push.direct.txt" +#include <include_by_push.direct_2.txt> +End of "include_by_push.direct.txt" diff --git a/tests/include_by_push.direct_2.txt b/tests/include_by_push.direct_2.txt new file mode 100644 index 0000000..8b378e8 --- /dev/null +++ b/tests/include_by_push.direct_2.txt @@ -0,0 +1,3 @@ +Beginning of "include_by_push.direct_2.txt" +#include <include_by_push.direct_3.txt> +End of "include_by_push.direct_2.txt" diff --git a/tests/include_by_push.direct_3.txt b/tests/include_by_push.direct_3.txt new file mode 100644 index 0000000..8b8f9a5 --- /dev/null +++ b/tests/include_by_push.direct_3.txt @@ -0,0 +1,2 @@ +Beginning of "include_by_push.direct_3.txt" +End of "include_by_push.direct_3.txt" diff --git a/tests/test-include-by-reentrant/scanner.l b/tests/include_by_reentrant.direct.l index 8d23681..8cd4900 100644 --- a/tests/test-include-by-reentrant/scanner.l +++ b/tests/include_by_reentrant.direct.l @@ -31,8 +31,8 @@ #include "config.h" %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option reentrant %option warn @@ -84,7 +84,7 @@ main ( argc, argv ) FILE * fp; yyscan_t scanner; if( argc != 2 ) { - fprintf(stderr,"*** Error: Must specifiy one filename.\n"); + fprintf(stderr,"*** Error: Must specify one filename.\n"); exit(-1); } if((fp=fopen(argv[1],"r"))==NULL) { diff --git a/tests/include_by_reentrant.direct.txt b/tests/include_by_reentrant.direct.txt new file mode 100644 index 0000000..190a600 --- /dev/null +++ b/tests/include_by_reentrant.direct.txt @@ -0,0 +1,3 @@ +Beginning of "include_by_reentrant.direct.txt". +#include <include_by_reentrant.direct_2.txt> +End of "include_by_reentrant.direct.txt". diff --git a/tests/include_by_reentrant.direct_2.txt b/tests/include_by_reentrant.direct_2.txt new file mode 100644 index 0000000..84a647b --- /dev/null +++ b/tests/include_by_reentrant.direct_2.txt @@ -0,0 +1,3 @@ +Beginning of "include_by_reentrant.direct_2.txt". +#include <include_by_reentrant.direct_3.txt> +End of "include_by_reentrant.direct_2.txt". diff --git a/tests/include_by_reentrant.direct_3.txt b/tests/include_by_reentrant.direct_3.txt new file mode 100644 index 0000000..b0fba64 --- /dev/null +++ b/tests/include_by_reentrant.direct_3.txt @@ -0,0 +1,2 @@ +Beginning of "include_by_reentrant.direct_3.txt". +End of "include_by_reentrant.direct_3.txt". diff --git a/tests/test-lineno-nr/scanner.l b/tests/lineno_nr.l index 4341335..8e35fc1 100644 --- a/tests/test-lineno-nr/scanner.l +++ b/tests/lineno_nr.l @@ -34,8 +34,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap yylineno +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput yylineno %option warn WORD [[:alpha:]]+ @@ -82,6 +82,8 @@ main ( argc, argv ) int argc; char** argv; { + (void)argv; + if( argc > 1 ) printf("%d\n", count_newlines(stdin)); diff --git a/tests/test-lineno-nr/test.input b/tests/lineno_nr.one.txt index c1eb961..c1eb961 100644 --- a/tests/test-lineno-nr/test.input +++ b/tests/lineno_nr.one.txt diff --git a/tests/test-lineno-r/scanner.l b/tests/lineno_r.l index 8933f5f..e6207c6 100644 --- a/tests/test-lineno-r/scanner.l +++ b/tests/lineno_r.l @@ -34,8 +34,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap yylineno reentrant +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput yylineno reentrant %option warn WORD [[:alpha:]]+ @@ -82,6 +82,8 @@ main (argc, argv) int argc; char ** argv; { + (void)argv; + if( argc > 1 ) printf("%d\n", count_newlines(stdin)); diff --git a/tests/test-lineno-r/test.input b/tests/lineno_r.one.txt index c1eb961..c1eb961 100644 --- a/tests/test-lineno-r/test.input +++ b/tests/lineno_r.one.txt diff --git a/tests/test-lineno-trailing/scanner.l b/tests/lineno_trailing.l index 20d3c8a..3a8a683 100644 --- a/tests/test-lineno-trailing/scanner.l +++ b/tests/lineno_trailing.l @@ -34,8 +34,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap yylineno +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput yylineno %option warn WORD [[:alpha:]]+ @@ -75,6 +75,8 @@ main ( argc, argv ) int argc; char** argv; { + (void)argv; + if( argc > 1 ) printf("%d\n", count_newlines(stdin)); diff --git a/tests/test-lineno-trailing/test.input b/tests/lineno_trailing.one.txt index 201164d..201164d 100644 --- a/tests/test-lineno-trailing/test.input +++ b/tests/lineno_trailing.one.txt diff --git a/tests/test-mem-nr/scanner.l b/tests/mem_nr.l index d03996a..c7a6ce0 100644 --- a/tests/test-mem-nr/scanner.l +++ b/tests/mem_nr.l @@ -39,8 +39,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput noyy_top_state %option warn stack nodefault %option noyyalloc noyyrealloc noyyfree diff --git a/tests/test-mem-nr/test.input b/tests/mem_nr.txt index 79aa16a..79aa16a 100644 --- a/tests/test-mem-nr/test.input +++ b/tests/mem_nr.txt diff --git a/tests/test-mem-r/scanner.l b/tests/mem_r.l index ba6e0b5..cbfe08c 100644 --- a/tests/test-mem-r/scanner.l +++ b/tests/mem_r.l @@ -39,8 +39,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput noyy_top_state %option warn stack nodefault reentrant %option noyyalloc noyyrealloc noyyfree @@ -87,6 +87,8 @@ static void dump_mem(FILE* fp){ void * yyalloc(yy_size_t n , void* yyscanner) { + (void)yyscanner; + void * p; int i; @@ -116,6 +118,8 @@ void * yyalloc(yy_size_t n , void* yyscanner) void * yyrealloc(void* p, yy_size_t n , void* yyscanner) { + (void)yyscanner; + int i; for (i=0; i < arrsz; i++) if ( ptrs[i].p == p){ @@ -137,6 +141,8 @@ void * yyrealloc(void* p, yy_size_t n , void* yyscanner) void yyfree(void* p , void* yyscanner) { + (void)yyscanner; + int i; for (i=0; i < arrsz; i++) if ( ptrs[i].p == p){ diff --git a/tests/test-mem-r/test.input b/tests/mem_r.txt index 79aa16a..79aa16a 100644 --- a/tests/test-mem-r/test.input +++ b/tests/mem_r.txt diff --git a/tests/test-multiple-scanners-nr/scanner-1.l b/tests/multiple_scanners_nr_1.l index 0d520b1..fcba194 100644 --- a/tests/test-multiple-scanners-nr/scanner-1.l +++ b/tests/multiple_scanners_nr_1.l @@ -29,9 +29,9 @@ %} -%option header="scanner-1.h" -%option 8bit outfile="scanner-1.c" prefix="S1_" -%option nounput nomain noyywrap +%option header="multiple_scanners_nr_1.h" +%option 8bit prefix="S1_" +%option nounput nomain noyywrap noinput %option warn stack noyy_top_state %x ON diff --git a/tests/test-multiple-scanners-nr/scanner-2.l b/tests/multiple_scanners_nr_2.l index 88bd799..fff2e88 100644 --- a/tests/test-multiple-scanners-nr/scanner-2.l +++ b/tests/multiple_scanners_nr_2.l @@ -29,9 +29,9 @@ %} -%option header="scanner-2.h" -%option 8bit outfile="scanner-2.c" prefix="S2_" -%option nounput nomain noyywrap +%option header="multiple_scanners_nr_2.h" +%option 8bit prefix="S2_" +%option nounput nomain noyywrap noinput %option warn stack noyy_top_state %x OFF diff --git a/tests/test-multiple-scanners-nr/main.c b/tests/multiple_scanners_nr_main.c index a83bec6..497bd9f 100644 --- a/tests/test-multiple-scanners-nr/main.c +++ b/tests/multiple_scanners_nr_main.c @@ -21,12 +21,15 @@ * PURPOSE. */ -#include "scanner-1.h" -#include "scanner-2.h" +#include "multiple_scanners_nr_1.h" +#include "multiple_scanners_nr_2.h" int main ( int argc, char** argv ) { + (void)argc; + (void)argv; + int S1_ok=1, S2_ok=1; YY_BUFFER_STATE buff1, buff2; S1_out = S2_out = stdout; @@ -46,6 +49,3 @@ main ( int argc, char** argv ) printf("TEST RETURNING OK.\n"); return 0; } - - -/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */ diff --git a/tests/test-multiple-scanners-r/scanner-1.l b/tests/multiple_scanners_r_1.l index 84f8719..75ef179 100644 --- a/tests/test-multiple-scanners-r/scanner-1.l +++ b/tests/multiple_scanners_r_1.l @@ -29,11 +29,10 @@ %} -%option header="scanner-1.h" -%option 8bit outfile="scanner-1.c" prefix="S1_" -%option nounput nomain noyywrap noyy_top_state +%option header="multiple_scanners_r_1.h" +%option 8bit prefix="S1_" +%option nounput nomain noyywrap noinput noyy_top_state %option warn stack reentrant -%option tables-file="scanner-1.tables" %x ON %x OFF diff --git a/tests/test-multiple-scanners-r/scanner-2.l b/tests/multiple_scanners_r_2.l index f0d5c2d..a10d63d 100644 --- a/tests/test-multiple-scanners-r/scanner-2.l +++ b/tests/multiple_scanners_r_2.l @@ -29,11 +29,10 @@ %} -%option header="scanner-2.h" -%option 8bit outfile="scanner-2.c" prefix="S2_" -%option nounput nomain noyywrap +%option header="multiple_scanners_r_2.h" +%option 8bit prefix="S2_" +%option nounput nomain noyywrap noinput %option warn stack reentrant noyy_top_state -%option tables-file="scanner-2.tables" %x OFF %x ON diff --git a/tests/test-multiple-scanners-r/main.c b/tests/multiple_scanners_r_main.c index 3c07266..ea73806 100644 --- a/tests/test-multiple-scanners-r/main.c +++ b/tests/multiple_scanners_r_main.c @@ -21,12 +21,15 @@ * PURPOSE. */ -#include "scanner-1.h" -#include "scanner-2.h" +#include "multiple_scanners_r_1.h" +#include "multiple_scanners_r_2.h" int main ( int argc, char** argv ) { + (void)argc; + (void)argv; + int S1_ok=1, S2_ok=1; FILE * fp; YY_BUFFER_STATE buff1, buff2; @@ -35,26 +38,6 @@ main ( int argc, char** argv ) S1_lex_init(&scan1); S2_lex_init(&scan2); - if((fp = fopen("scanner-1.tables","r")) == 0){ - fprintf(stderr,"Could not open scanner-1.tables.\n"); - exit(1); - } - if(S1_tables_fload(fp,scan1) != 0){ - fprintf(stderr,"Could not load scanner-1.tables.\n"); - exit(1); - } - fclose(fp); - - if((fp = fopen("scanner-2.tables","r")) == 0){ - fprintf(stderr,"Could not open scanner-2.tables.\n"); - exit(1); - } - if(S2_tables_fload(fp,scan2) != 0){ - fprintf(stderr,"Could not load scanner-2.tables.\n"); - exit(1); - } - fclose(fp); - S1_set_out(stdout,scan1); S2_set_out(S1_get_out(scan1),scan2); @@ -72,9 +55,6 @@ main ( int argc, char** argv ) S1__delete_buffer(buff1, scan1); S2__delete_buffer(buff2, scan2); - S1_tables_destroy(scan1); - S2_tables_destroy(scan2); - S1_lex_destroy(scan1); S2_lex_destroy(scan2); printf("TEST RETURNING OK.\n"); diff --git a/tests/test-noansi-nr/scanner.l b/tests/noansi_nr.l index 4afc8c2..db075a4 100644 --- a/tests/test-noansi-nr/scanner.l +++ b/tests/noansi_nr.l @@ -35,8 +35,8 @@ #include "config.h" %} -%option prefix="test" outfile="scanner.c" -%option nounput noyywrap noyylineno warn nodefault +%option prefix="test" +%option nounput noyywrap noyylineno warn nodefault noinput %option noansi-prototypes noansi-definitions IDENT [[:alnum:]_-] diff --git a/tests/test-noansi-nr/test.input b/tests/noansi_nr.txt index 642e0fb..642e0fb 100644 --- a/tests/test-noansi-nr/test.input +++ b/tests/noansi_nr.txt diff --git a/tests/test-noansi-r/scanner.l b/tests/noansi_r.l index e0b3ffb..5a3b778 100644 --- a/tests/test-noansi-r/scanner.l +++ b/tests/noansi_r.l @@ -33,8 +33,8 @@ #include "config.h" %} -%option prefix="test" outfile="scanner.c" -%option nounput noyywrap noyylineno warn nodefault +%option prefix="test" +%option nounput noyywrap noyylineno warn nodefault noinput %option reentrant %option noansi-definitions noansi-prototypes diff --git a/tests/test-noansi-r/test.input b/tests/noansi_r.txt index 2160628..2160628 100644 --- a/tests/test-noansi-r/test.input +++ b/tests/noansi_r.txt diff --git a/tests/options.cn b/tests/options.cn new file mode 100755 index 0000000..2f592e9 --- /dev/null +++ b/tests/options.cn @@ -0,0 +1,5 @@ +#!/bin/bash + +# Test that flex handles the grouped noop options -c and -n properly. + +echo %% | $1 -cn -o /dev/null diff --git a/tests/test-posix/scanner.l b/tests/posix.l index c6c0b51..38e8d3b 100644 --- a/tests/test-posix/scanner.l +++ b/tests/posix.l @@ -40,8 +40,8 @@ int tests_ok[NUM_TESTS] = { 0 }; %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn posix-compat diff --git a/tests/test-posixly-correct/scanner.l b/tests/posixly_correct.l index 20912df..aff9cbd 100644 --- a/tests/test-posixly-correct/scanner.l +++ b/tests/posixly_correct.l @@ -40,8 +40,8 @@ int tests_ok[NUM_TESTS] = { 0 }; %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn diff --git a/tests/test-prefix-nr/scanner.l b/tests/prefix_nr.l index 4497aa1..c1665df 100644 --- a/tests/test-prefix-nr/scanner.l +++ b/tests/prefix_nr.l @@ -30,8 +30,8 @@ %} -%option 8bit outfile="scanner.c" prefix="FOO" -%option nounput nomain noyywrap +%option 8bit prefix="FOO" +%option nounput nomain noyywrap noinput %option warn diff --git a/tests/test-prefix-nr/test.input b/tests/prefix_nr.txt index 0e6c88f..0e6c88f 100644 --- a/tests/test-prefix-nr/test.input +++ b/tests/prefix_nr.txt diff --git a/tests/test-prefix-r/scanner.l b/tests/prefix_r.l index 4c25982..a2d4c1a 100644 --- a/tests/test-prefix-r/scanner.l +++ b/tests/prefix_r.l @@ -30,8 +30,8 @@ %} %option reentrant -%option 8bit outfile="scanner.c" prefix="FOO" -%option nounput nomain noyywrap +%option 8bit prefix="FOO" +%option nounput nomain noyywrap noinput %option warn diff --git a/tests/test-prefix-r/test.input b/tests/prefix_r.txt index 0e6c88f..0e6c88f 100644 --- a/tests/test-prefix-r/test.input +++ b/tests/prefix_r.txt diff --git a/tests/test-pthread/scanner.l b/tests/pthread.l index 8603873..38080c1 100644 --- a/tests/test-pthread/scanner.l +++ b/tests/pthread.l @@ -46,8 +46,8 @@ static int process_text(char* s, yyscan_t scanner); %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain nodefault +%option 8bit prefix="test" +%option nounput nomain nodefault noinput %option yywrap %option reentrant %option warn @@ -78,9 +78,13 @@ static int process_text(char* s, yyscan_t scanner); <INITIAL,STATE_1,STATE_2>[[:space:]\r\n]+ { } %% -int yywrap( yyscan_t scanner) { return 1; } +int yywrap( yyscan_t scanner) { + (void)scanner; + return 1; +} static int process_text(char* s, yyscan_t scanner) { + (void)scanner; return (int)(*s) + (int) *(s + yyget_leng(scanner)-1); } @@ -114,6 +118,8 @@ void * thread_func ( void* arg ) { int i; + (void)arg; + /* Wait for go-ahead. */ pthread_mutex_lock( &go_ahead); pthread_mutex_unlock(&go_ahead); diff --git a/tests/test-pthread/test-1.input b/tests/pthread_1.txt index 234774b..234774b 100644 --- a/tests/test-pthread/test-1.input +++ b/tests/pthread_1.txt diff --git a/tests/test-pthread/test-2.input b/tests/pthread_2.txt index 234774b..234774b 100644 --- a/tests/test-pthread/test-2.input +++ b/tests/pthread_2.txt diff --git a/tests/test-pthread/test-3.input b/tests/pthread_3.txt index 234774b..234774b 100644 --- a/tests/test-pthread/test-3.input +++ b/tests/pthread_3.txt diff --git a/tests/test-pthread/test-4.input b/tests/pthread_4.txt index 234774b..234774b 100644 --- a/tests/test-pthread/test-4.input +++ b/tests/pthread_4.txt diff --git a/tests/test-pthread/test-5.input b/tests/pthread_5.txt index 234774b..234774b 100644 --- a/tests/test-pthread/test-5.input +++ b/tests/pthread_5.txt diff --git a/tests/test-quotes/scanner.l b/tests/quotes.l index 0c7c482..c1386c3 100644 --- a/tests/test-quotes/scanner.l +++ b/tests/quotes.l @@ -55,8 +55,8 @@ static int foo (int i){ } %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn diff --git a/tests/test-c-cpp-r/test.input b/tests/quotes.txt index 7288a40..7288a40 100644 --- a/tests/test-c-cpp-r/test.input +++ b/tests/quotes.txt diff --git a/tests/test-reject/scanner.l b/tests/reject.l4 index 5e5208e..27982b1 100644 --- a/tests/test-reject/scanner.l +++ b/tests/reject.l4 @@ -29,7 +29,7 @@ %} %option 8bit prefix="test" -%option nounput nomain noyywrap +%option nounput nomain noyywrap noinput %option warn reject @@ -48,6 +48,8 @@ int main ( int argc, char** argv ) #ifdef TEST_IS_REENTRANT yylex_init(&yyscanner); +#else + (void)yyscanner; #endif #ifdef TEST_HAS_TABLES_EXTERNAL diff --git a/tests/test-quotes/test.input b/tests/reject.txt index 7288a40..7288a40 100644 --- a/tests/test-quotes/test.input +++ b/tests/reject.txt diff --git a/tests/test-rescan-nr/scanner.l b/tests/rescan_nr.direct.l index a4ac521..86103aa 100644 --- a/tests/test-rescan-nr/scanner.l +++ b/tests/rescan_nr.direct.l @@ -27,8 +27,8 @@ #include <stdlib.h> %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput %option warn stack never-interactive %x STATE_1 @@ -51,6 +51,8 @@ main (int argc, char* const argv[]) FILE* fp; int i; + (void)argc; + if ((fp = fopen(argv[1],"r")) == NULL){ perror("Failed to open input file."); return 1; diff --git a/tests/test-reject/test.input b/tests/rescan_nr.direct.txt index 7288a40..7288a40 100644 --- a/tests/test-reject/test.input +++ b/tests/rescan_nr.direct.txt diff --git a/tests/test-rescan-r/scanner.l b/tests/rescan_r.direct.l index 3357ce8..2255ee2 100644 --- a/tests/test-rescan-r/scanner.l +++ b/tests/rescan_r.direct.l @@ -27,8 +27,8 @@ #include <stdlib.h> %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap reentrant +%option 8bit prefix="test" +%option nounput nomain noyywrap noinput reentrant %option warn stack never-interactive %x STATE_1 @@ -52,6 +52,8 @@ main (int argc, char* const argv[]) int i; yyscan_t yyscanner; + (void)argc; + if ((fp = fopen(argv[1],"r")) == NULL){ perror("Failed to open input file."); return 1; diff --git a/tests/test-rescan-nr/test.input b/tests/rescan_r.direct.txt index 7288a40..7288a40 100644 --- a/tests/test-rescan-nr/test.input +++ b/tests/rescan_r.direct.txt diff --git a/tests/test-string-nr/scanner.l b/tests/string_nr.l index 6ab5b54..3dd752a 100644 --- a/tests/test-string-nr/scanner.l +++ b/tests/string_nr.l @@ -32,8 +32,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain nodefault noyywrap +%option 8bit prefix="test" +%option nounput nomain nodefault noyywrap noinput %option warn diff --git a/tests/test-string-r/scanner.l b/tests/string_r.l index 6b594d7..d98c98a 100644 --- a/tests/test-string-r/scanner.l +++ b/tests/string_r.l @@ -32,8 +32,8 @@ %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain nodefault noyywrap +%option 8bit prefix="test" +%option nounput nomain nodefault noyywrap noinput %option warn reentrant diff --git a/tests/tableopts.am b/tests/tableopts.am new file mode 100644 index 0000000..bbb20d0 --- /dev/null +++ b/tests/tableopts.am @@ -0,0 +1,333 @@ +tableopts_opt_nr_Ca_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-Ca.opt$(EXEEXT): tableopts_opt_nr-Ca.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_nr_Ce_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-Ce.opt$(EXEEXT): tableopts_opt_nr-Ce.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_nr_Cf_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-Cf.opt$(EXEEXT): tableopts_opt_nr-Cf.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_nr_CF_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-CF.opt$(EXEEXT): tableopts_opt_nr-CF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_nr_Cm_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-Cm.opt$(EXEEXT): tableopts_opt_nr-Cm.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_nr_Cem_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-Cem.opt$(EXEEXT): tableopts_opt_nr-Cem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_nr_Cae_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-Cae.opt$(EXEEXT): tableopts_opt_nr-Cae.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_nr_Caef_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-Caef.opt$(EXEEXT): tableopts_opt_nr-Caef.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_nr_CaeF_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-CaeF.opt$(EXEEXT): tableopts_opt_nr-CaeF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_nr_Cam_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-Cam.opt$(EXEEXT): tableopts_opt_nr-Cam.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_nr_Caem_opt_SOURCES = tableopts.l4 + +tableopts_opt_nr-Caem.opt$(EXEEXT): tableopts_opt_nr-Caem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_Ca_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-Ca.opt$(EXEEXT): tableopts_opt_r-Ca.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_Ce_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-Ce.opt$(EXEEXT): tableopts_opt_r-Ce.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_Cf_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-Cf.opt$(EXEEXT): tableopts_opt_r-Cf.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_CF_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-CF.opt$(EXEEXT): tableopts_opt_r-CF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_Cm_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-Cm.opt$(EXEEXT): tableopts_opt_r-Cm.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_Cem_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-Cem.opt$(EXEEXT): tableopts_opt_r-Cem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_Cae_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-Cae.opt$(EXEEXT): tableopts_opt_r-Cae.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_Caef_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-Caef.opt$(EXEEXT): tableopts_opt_r-Caef.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_CaeF_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-CaeF.opt$(EXEEXT): tableopts_opt_r-CaeF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_Cam_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-Cam.opt$(EXEEXT): tableopts_opt_r-Cam.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_opt_r_Caem_opt_SOURCES = tableopts.l4 + +tableopts_opt_r-Caem.opt$(EXEEXT): tableopts_opt_r-Caem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_Ca_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-Ca.ser$(EXEEXT): tableopts_ser_nr-Ca.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_Ce_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-Ce.ser$(EXEEXT): tableopts_ser_nr-Ce.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_Cf_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-Cf.ser$(EXEEXT): tableopts_ser_nr-Cf.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_CF_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-CF.ser$(EXEEXT): tableopts_ser_nr-CF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_Cm_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-Cm.ser$(EXEEXT): tableopts_ser_nr-Cm.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_Cem_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-Cem.ser$(EXEEXT): tableopts_ser_nr-Cem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_Cae_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-Cae.ser$(EXEEXT): tableopts_ser_nr-Cae.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_Caef_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-Caef.ser$(EXEEXT): tableopts_ser_nr-Caef.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_CaeF_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-CaeF.ser$(EXEEXT): tableopts_ser_nr-CaeF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_Cam_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-Cam.ser$(EXEEXT): tableopts_ser_nr-Cam.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_nr_Caem_ser_SOURCES = tableopts.l4 + +tableopts_ser_nr-Caem.ser$(EXEEXT): tableopts_ser_nr-Caem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_Ca_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-Ca.ser$(EXEEXT): tableopts_ser_r-Ca.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_Ce_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-Ce.ser$(EXEEXT): tableopts_ser_r-Ce.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_Cf_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-Cf.ser$(EXEEXT): tableopts_ser_r-Cf.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_CF_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-CF.ser$(EXEEXT): tableopts_ser_r-CF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_Cm_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-Cm.ser$(EXEEXT): tableopts_ser_r-Cm.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_Cem_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-Cem.ser$(EXEEXT): tableopts_ser_r-Cem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_Cae_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-Cae.ser$(EXEEXT): tableopts_ser_r-Cae.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_Caef_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-Caef.ser$(EXEEXT): tableopts_ser_r-Caef.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_CaeF_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-CaeF.ser$(EXEEXT): tableopts_ser_r-CaeF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_Cam_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-Cam.ser$(EXEEXT): tableopts_ser_r-Cam.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ser_r_Caem_ser_SOURCES = tableopts.l4 + +tableopts_ser_r-Caem.ser$(EXEEXT): tableopts_ser_r-Caem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_Ca_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-Ca.ver$(EXEEXT): tableopts_ver_nr-Ca.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_Ce_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-Ce.ver$(EXEEXT): tableopts_ver_nr-Ce.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_Cf_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-Cf.ver$(EXEEXT): tableopts_ver_nr-Cf.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_CF_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-CF.ver$(EXEEXT): tableopts_ver_nr-CF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_Cm_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-Cm.ver$(EXEEXT): tableopts_ver_nr-Cm.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_Cem_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-Cem.ver$(EXEEXT): tableopts_ver_nr-Cem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_Cae_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-Cae.ver$(EXEEXT): tableopts_ver_nr-Cae.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_Caef_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-Caef.ver$(EXEEXT): tableopts_ver_nr-Caef.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_CaeF_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-CaeF.ver$(EXEEXT): tableopts_ver_nr-CaeF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_Cam_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-Cam.ver$(EXEEXT): tableopts_ver_nr-Cam.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_nr_Caem_ver_SOURCES = tableopts.l4 + +tableopts_ver_nr-Caem.ver$(EXEEXT): tableopts_ver_nr-Caem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_Ca_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-Ca.ver$(EXEEXT): tableopts_ver_r-Ca.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_Ce_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-Ce.ver$(EXEEXT): tableopts_ver_r-Ce.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_Cf_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-Cf.ver$(EXEEXT): tableopts_ver_r-Cf.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_CF_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-CF.ver$(EXEEXT): tableopts_ver_r-CF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_Cm_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-Cm.ver$(EXEEXT): tableopts_ver_r-Cm.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_Cem_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-Cem.ver$(EXEEXT): tableopts_ver_r-Cem.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_Cae_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-Cae.ver$(EXEEXT): tableopts_ver_r-Cae.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_Caef_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-Caef.ver$(EXEEXT): tableopts_ver_r-Caef.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_CaeF_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-CaeF.ver$(EXEEXT): tableopts_ver_r-CaeF.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_Cam_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-Cam.ver$(EXEEXT): tableopts_ver_r-Cam.$(OBJEXT) + $(LINK) -o $@ $< + +tableopts_ver_r_Caem_ver_SOURCES = tableopts.l4 + +tableopts_ver_r-Caem.ver$(EXEEXT): tableopts_ver_r-Caem.$(OBJEXT) + $(LINK) -o $@ $< + +TABLEOPTS_TESTS = tableopts_opt_nr-Ca.opt tableopts_opt_nr-Ce.opt tableopts_opt_nr-Cf.opt tableopts_opt_nr-CF.opt tableopts_opt_nr-Cm.opt tableopts_opt_nr-Cem.opt tableopts_opt_nr-Cae.opt tableopts_opt_nr-Caef.opt tableopts_opt_nr-CaeF.opt tableopts_opt_nr-Cam.opt tableopts_opt_nr-Caem.opt tableopts_opt_r-Ca.opt tableopts_opt_r-Ce.opt tableopts_opt_r-Cf.opt tableopts_opt_r-CF.opt tableopts_opt_r-Cm.opt tableopts_opt_r-Cem.opt tableopts_opt_r-Cae.opt tableopts_opt_r-Caef.opt tableopts_opt_r-CaeF.opt tableopts_opt_r-Cam.opt tableopts_opt_r-Caem.opt tableopts_ser_nr-Ca.ser tableopts_ser_nr-Ce.ser tableopts_ser_nr-Cf.ser tableopts_ser_nr-CF.ser tableopts_ser_nr-Cm.ser tableopts_ser_nr-Cem.ser tableopts_ser_nr-Cae.ser tableopts_ser_nr-Caef.ser tableopts_ser_nr-CaeF.ser tableopts_ser_nr-Cam.ser tableopts_ser_nr-Caem.ser tableopts_ser_r-Ca.ser tableopts_ser_r-Ce.ser tableopts_ser_r-Cf.ser tableopts_ser_r-CF.ser tableopts_ser_r-Cm.ser tableopts_ser_r-Cem.ser tableopts_ser_r-Cae.ser tableopts_ser_r-Caef.ser tableopts_ser_r-CaeF.ser tableopts_ser_r-Cam.ser tableopts_ser_r-Caem.ser tableopts_ver_nr-Ca.ver tableopts_ver_nr-Ce.ver tableopts_ver_nr-Cf.ver tableopts_ver_nr-CF.ver tableopts_ver_nr-Cm.ver tableopts_ver_nr-Cem.ver tableopts_ver_nr-Cae.ver tableopts_ver_nr-Caef.ver tableopts_ver_nr-CaeF.ver tableopts_ver_nr-Cam.ver tableopts_ver_nr-Caem.ver tableopts_ver_r-Ca.ver tableopts_ver_r-Ce.ver tableopts_ver_r-Cf.ver tableopts_ver_r-CF.ver tableopts_ver_r-Cm.ver tableopts_ver_r-Cem.ver tableopts_ver_r-Cae.ver tableopts_ver_r-Caef.ver tableopts_ver_r-CaeF.ver tableopts_ver_r-Cam.ver tableopts_ver_r-Caem.ver + +tableopts_tables = tableopts_ser_nr-Ca.ser.tables tableopts_ser_nr-Ce.ser.tables tableopts_ser_nr-Cf.ser.tables tableopts_ser_nr-CF.ser.tables tableopts_ser_nr-Cm.ser.tables tableopts_ser_nr-Cem.ser.tables tableopts_ser_nr-Cae.ser.tables tableopts_ser_nr-Caef.ser.tables tableopts_ser_nr-CaeF.ser.tables tableopts_ser_nr-Cam.ser.tables tableopts_ser_nr-Caem.ser.tables tableopts_ser_r-Ca.ser.tables tableopts_ser_r-Ce.ser.tables tableopts_ser_r-Cf.ser.tables tableopts_ser_r-CF.ser.tables tableopts_ser_r-Cm.ser.tables tableopts_ser_r-Cem.ser.tables tableopts_ser_r-Cae.ser.tables tableopts_ser_r-Caef.ser.tables tableopts_ser_r-CaeF.ser.tables tableopts_ser_r-Cam.ser.tables tableopts_ser_r-Caem.ser.tables tableopts_ver_nr-Ca.ver.tables tableopts_ver_nr-Ce.ver.tables tableopts_ver_nr-Cf.ver.tables tableopts_ver_nr-CF.ver.tables tableopts_ver_nr-Cm.ver.tables tableopts_ver_nr-Cem.ver.tables tableopts_ver_nr-Cae.ver.tables tableopts_ver_nr-Caef.ver.tables tableopts_ver_nr-CaeF.ver.tables tableopts_ver_nr-Cam.ver.tables tableopts_ver_nr-Caem.ver.tables tableopts_ver_r-Ca.ver.tables tableopts_ver_r-Ce.ver.tables tableopts_ver_r-Cf.ver.tables tableopts_ver_r-CF.ver.tables tableopts_ver_r-Cm.ver.tables tableopts_ver_r-Cem.ver.tables tableopts_ver_r-Cae.ver.tables tableopts_ver_r-Caef.ver.tables tableopts_ver_r-CaeF.ver.tables tableopts_ver_r-Cam.ver.tables tableopts_ver_r-Caem.ver.tables diff --git a/tests/test-table-opts/scanner.l b/tests/tableopts.l4 index 3ad6199..bb79407 100644 --- a/tests/test-table-opts/scanner.l +++ b/tests/tableopts.l4 @@ -29,7 +29,7 @@ %} %option 8bit -%option nounput nomain noyywrap +%option nounput nomain noyywrap noinput %option warn yylineno @@ -50,6 +50,8 @@ int main ( int argc, char** argv ) #ifdef TEST_IS_REENTRANT yylex_init(&yyscanner); +#else + (void)yyscanner; #endif #ifdef TEST_HAS_TABLES_EXTERNAL diff --git a/tests/tableopts.sh b/tests/tableopts.sh new file mode 100755 index 0000000..63a36d3 --- /dev/null +++ b/tests/tableopts.sh @@ -0,0 +1,44 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +# This script is present to generate the automake _SOURCES variables +# for the tableopts_* tests. It also generates the linking rules for +# each test since automake isn't able to handle the pattern rules that +# would be natural to use. Output is written to standard output for +# inclusion in a Makefile.am, typically by redirecting the output and then an automake include directive. + +TABLEOPTS_TESTS="" +tableopts_tables="" + +for kind in opt ser ver ; do + for threading in nr r ; do + for opt in -Ca -Ce -Cf -CF -Cm -Cem -Cae -Caef -CaeF -Cam -Caem ; do + testname=tableopts_${kind}_${threading}${opt}.${kind} + if [ "${TABLEOPTS_TESTS}" = "" ] ;then + TABLEOPTS_TESTS=${testname} + if [ "$kind" = "ser" -o "$kind" = "ver" ] ; then + tableopts_tables=${testname}.tables + fi + else + TABLEOPTS_TESTS="${TABLEOPTS_TESTS} ${testname}" + if [ "$kind" = "ser" -o "$kind" = "ver" ] ; then + tableopts_tables="${tableopts_tables} ${testname}.tables" + fi + fi + + bare_opt=${opt#-} + cat << EOF +tableopts_${kind}_${threading}_${bare_opt}_${kind}_SOURCES = tableopts.l4 + +${testname}\$(EXEEXT): tableopts_${kind}_${threading}${opt}.\$(OBJEXT) + \$(LINK) -o \$@ \$< + +EOF + done + done +done + +echo TABLEOPTS_TESTS = ${TABLEOPTS_TESTS} +echo +echo tableopts_tables = ${tableopts_tables} diff --git a/tests/test-table-opts/test.input b/tests/tableopts.txt index aec9276..aec9276 100644 --- a/tests/test-table-opts/test.input +++ b/tests/tableopts.txt diff --git a/tests/test-alloc-extra/Makefile.am b/tests/test-alloc-extra/Makefile.am deleted file mode 100644 index 04509b6..0000000 --- a/tests/test-alloc-extra/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-alloc-extra - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-array-nr/Makefile.am b/tests/test-array-nr/Makefile.am deleted file mode 100644 index a54e3fc..0000000 --- a/tests/test-array-nr/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-array-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-array-r/Makefile.am b/tests/test-array-r/Makefile.am deleted file mode 100644 index b60c917..0000000 --- a/tests/test-array-r/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-array-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-basic-nr/Makefile.am b/tests/test-basic-nr/Makefile.am deleted file mode 100644 index 956b068..0000000 --- a/tests/test-basic-nr/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-basic-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-basic-r/Makefile.am b/tests/test-basic-r/Makefile.am deleted file mode 100644 index beca2e7..0000000 --- a/tests/test-basic-r/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-basic-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-bison-nr/Makefile.am b/tests/test-bison-nr/Makefile.am deleted file mode 100644 index f6e6de9..0000000 --- a/tests/test-bison-nr/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l parser.y test.input main.c -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) $(OBJS) OUTPUT -OBJS = scanner.o parser.o main.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -YFLAGS = --defines --output=parser.c --name-prefix="test" - -testname = test-bison-nr - -scanner.c scanner.h: $(srcdir)/scanner.l - $(FLEX) $< -scanner.h: scanner.c -scanner.o: parser.h - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< -parser.h: parser.c - -main.o: scanner.h parser.h - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-bison-yylloc/Makefile.am b/tests/test-bison-yylloc/Makefile.am deleted file mode 100644 index 0070991..0000000 --- a/tests/test-bison-yylloc/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l parser.y test.input main.c -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) $(OBJS) OUTPUT -OBJS = scanner.o parser.o main.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -YFLAGS = --defines --output=parser.c --name-prefix="test" - -testname = test-bison-yylloc - -scanner.c scanner.h: $(srcdir)/scanner.l - $(FLEX) $< -scanner.h: scanner.c -scanner.o: parser.h - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< -parser.h: parser.c - -main.o: scanner.h parser.h - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-bison-yylval/Makefile.am b/tests/test-bison-yylval/Makefile.am deleted file mode 100644 index 1937b34..0000000 --- a/tests/test-bison-yylval/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l parser.y test.input main.c -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) $(OBJS) OUTPUT -OBJS = parser.o scanner.o main.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -YFLAGS = --defines --output=parser.c --name-prefix="test" - -testname = test-bison-yylval - -scanner.c scanner.h: $(srcdir)/scanner.l - $(FLEX) $< -scanner.h: scanner.c -scanner.o: parser.h - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< -parser.h: parser.c - -main.o: scanner.h parser.h - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-c++-basic/Makefile.am b/tests/test-c++-basic/Makefile.am deleted file mode 100644 index ccfc884..0000000 --- a/tests/test-c++-basic/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.cpp scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -LFLAGS = -+ -#LDFLAGS = - -testname = test-c++-basic - -scanner.cpp: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.cpp.o: - $(CXX) $(CXXFLAGS) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $< diff --git a/tests/test-c++-multiple-scanners/Makefile.am b/tests/test-c++-multiple-scanners/Makefile.am deleted file mode 100644 index 9bcc9f8..0000000 --- a/tests/test-c++-multiple-scanners/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex -builddir = @builddir@ - -EXTRA_DIST = scanner-1.l scanner-2.l main.cpp test.input -CLEANFILES = scanner-1.cpp $(testname)$(EXEEXT) OUTPUT $(OBJS) scanner-2.cpp -OBJS = scanner-1.o scanner-2.o main.o - -AM_CXXFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-c++-multiple-scanners - -scanner-1.cpp: $(srcdir)/scanner-1.l - $(FLEX) -+ $(LFLAGS) $< - -scanner-2.cpp: $(srcdir)/scanner-2.l - $(FLEX) -+ $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - $(builddir)/$(testname)$(EXEEXT) < $(srcdir)/test.input - -.cpp.o: - $(CXX) -c -o $@ $(AM_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< - -main.o: scanner-1.h scanner-2.h -scanner-1.h: scanner-1.cpp -scanner-2.h: scanner-2.cpp diff --git a/tests/test-c++-yywrap/Makefile.am b/tests/test-c++-yywrap/Makefile.am deleted file mode 100644 index 014452b..0000000 --- a/tests/test-c++-yywrap/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.cpp scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -LFLAGS = -+ -#LDFLAGS = - -testname = test-c++-yywrap - -scanner.cpp: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) $(srcdir)/test.input $(srcdir)/test.input $(srcdir)/test.input - -.cpp.o: - $(CXX) $(CXXFLAGS) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $< diff --git a/tests/test-c-cpp-nr/Makefile.am b/tests/test-c-cpp-nr/Makefile.am deleted file mode 100644 index 9aec3b2..0000000 --- a/tests/test-c-cpp-nr/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.cpp $(testname)$(EXEEXT) $(OBJS) OUTPUT -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-c-cpp-nr - -scanner.cpp: $(srcdir)/scanner.l - $(FLEX) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.cpp.o: - $(CXX) $(CXXFLAGS) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $< diff --git a/tests/test-c-cpp-r/Makefile.am b/tests/test-c-cpp-r/Makefile.am deleted file mode 100644 index 1c9c23e..0000000 --- a/tests/test-c-cpp-r/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.cpp $(testname)$(EXEEXT) $(OBJS) OUTPUT -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-c-cpp-r - -scanner.cpp: $(srcdir)/scanner.l - $(FLEX) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.cpp.o: - $(CXX) $(CXXFLAGS) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $< diff --git a/tests/test-ccl/Makefile.am b/tests/test-ccl/Makefile.am deleted file mode 100644 index 0a92bb2..0000000 --- a/tests/test-ccl/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir) - -testname = test-ccl - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-concatenated-options/Makefile.am b/tests/test-concatenated-options/Makefile.am deleted file mode 100644 index e392073..0000000 --- a/tests/test-concatenated-options/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - -FLEX = $(top_builddir)/flex$(EXEEXT) - -CLEANFILES = OUTPUT - -# The test below just wants to know if flex can process multiple -# concatenated options. The -c and -n options both do nothing, so we -# group them together to see if flex will still function. We write the -# output to /dev/null since we don't really care what flex produces, -# just that it runs successfully. - -test: - echo %% | $(FLEX) -cn -o /dev/null diff --git a/tests/test-debug-nr/Makefile.am b/tests/test-debug-nr/Makefile.am deleted file mode 100644 index 8e4ae82..0000000 --- a/tests/test-debug-nr/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a - -testname = test-debug-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-debug-r/Makefile.am b/tests/test-debug-r/Makefile.am deleted file mode 100644 index 6496892..0000000 --- a/tests/test-debug-r/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a - -testname = test-debug-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-extended/Makefile.am b/tests/test-extended/Makefile.am deleted file mode 100644 index 190e95e..0000000 --- a/tests/test-extended/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir) - -testname = test-extended - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input | cmp -s $(srcdir)/test.input - - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-header-nr/Makefile.am b/tests/test-header-nr/Makefile.am deleted file mode 100644 index 11b6ff4..0000000 --- a/tests/test-header-nr/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l test.input main.c -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) $(OBJS) OUTPUT -OBJS = scanner.o main.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-header-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< - -scanner.h: scanner.c -main.o: scanner.h diff --git a/tests/test-header-r/Makefile.am b/tests/test-header-r/Makefile.am deleted file mode 100644 index abd22a2..0000000 --- a/tests/test-header-r/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l test.input main.c -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o main.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-header-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< - -scanner.h: scanner.c -main.o: scanner.h diff --git a/tests/test-include-by-buffer/Makefile.am b/tests/test-include-by-buffer/Makefile.am deleted file mode 100644 index 78e43af..0000000 --- a/tests/test-include-by-buffer/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test-1.input test-2.input test-3.input -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-include-by-buffer - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) $(srcdir)/test-1.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-include-by-buffer/test-1.input b/tests/test-include-by-buffer/test-1.input deleted file mode 100644 index 355beaa..0000000 --- a/tests/test-include-by-buffer/test-1.input +++ /dev/null @@ -1,3 +0,0 @@ -Beginning of "test-1.input". -#include <test-2.input> -End of "test-1.input". diff --git a/tests/test-include-by-buffer/test-2.input b/tests/test-include-by-buffer/test-2.input deleted file mode 100644 index 45f11f9..0000000 --- a/tests/test-include-by-buffer/test-2.input +++ /dev/null @@ -1,3 +0,0 @@ -Beginning of "test-2.input". -#include <test-3.input> -End of "test-2.input". diff --git a/tests/test-include-by-buffer/test-3.input b/tests/test-include-by-buffer/test-3.input deleted file mode 100644 index 6a2d055..0000000 --- a/tests/test-include-by-buffer/test-3.input +++ /dev/null @@ -1,2 +0,0 @@ -Beginning of "test-3.input". -End of "test-3.input". diff --git a/tests/test-include-by-push/Makefile.am b/tests/test-include-by-push/Makefile.am deleted file mode 100644 index fac4a0e..0000000 --- a/tests/test-include-by-push/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test-1.input test-2.input test-3.input -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-include-by-push - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) $(srcdir)/test-1.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-include-by-push/test-1.input b/tests/test-include-by-push/test-1.input deleted file mode 100644 index 355beaa..0000000 --- a/tests/test-include-by-push/test-1.input +++ /dev/null @@ -1,3 +0,0 @@ -Beginning of "test-1.input". -#include <test-2.input> -End of "test-1.input". diff --git a/tests/test-include-by-push/test-2.input b/tests/test-include-by-push/test-2.input deleted file mode 100644 index 45f11f9..0000000 --- a/tests/test-include-by-push/test-2.input +++ /dev/null @@ -1,3 +0,0 @@ -Beginning of "test-2.input". -#include <test-3.input> -End of "test-2.input". diff --git a/tests/test-include-by-push/test-3.input b/tests/test-include-by-push/test-3.input deleted file mode 100644 index 6a2d055..0000000 --- a/tests/test-include-by-push/test-3.input +++ /dev/null @@ -1,2 +0,0 @@ -Beginning of "test-3.input". -End of "test-3.input". diff --git a/tests/test-include-by-reentrant/Makefile.am b/tests/test-include-by-reentrant/Makefile.am deleted file mode 100644 index 3f4d1d5..0000000 --- a/tests/test-include-by-reentrant/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test-1.input test-2.input test-3.input -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-include-by-reentrant - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname) $(srcdir)/test-1.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-include-by-reentrant/test-1.input b/tests/test-include-by-reentrant/test-1.input deleted file mode 100644 index 355beaa..0000000 --- a/tests/test-include-by-reentrant/test-1.input +++ /dev/null @@ -1,3 +0,0 @@ -Beginning of "test-1.input". -#include <test-2.input> -End of "test-1.input". diff --git a/tests/test-include-by-reentrant/test-2.input b/tests/test-include-by-reentrant/test-2.input deleted file mode 100644 index 45f11f9..0000000 --- a/tests/test-include-by-reentrant/test-2.input +++ /dev/null @@ -1,3 +0,0 @@ -Beginning of "test-2.input". -#include <test-3.input> -End of "test-2.input". diff --git a/tests/test-include-by-reentrant/test-3.input b/tests/test-include-by-reentrant/test-3.input deleted file mode 100644 index 6a2d055..0000000 --- a/tests/test-include-by-reentrant/test-3.input +++ /dev/null @@ -1,2 +0,0 @@ -Beginning of "test-3.input". -End of "test-3.input". diff --git a/tests/test-linedir-r/Makefile.am b/tests/test-linedir-r/Makefile.am deleted file mode 100644 index d7f3bf7..0000000 --- a/tests/test-linedir-r/Makefile.am +++ /dev/null @@ -1,56 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l test.input main.c check-lines.awk -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o main.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-linedir-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - cat -n scanner.c | grep '#line' | grep scanner.c | $(AWK) -f $(srcdir)/check-lines.awk - cat -n scanner.h | grep '#line' | grep scanner.h | $(AWK) -f $(srcdir)/check-lines.awk - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< - -scanner.h: scanner.c -main.o: scanner.h diff --git a/tests/test-linedir-r/check-lines.awk b/tests/test-linedir-r/check-lines.awk deleted file mode 100644 index 6a1e5ec..0000000 --- a/tests/test-linedir-r/check-lines.awk +++ /dev/null @@ -1,7 +0,0 @@ -{ - if( /#line/ && $1 != ($3 - 1)) { - printf "Line directive mismatch at line %d: %s\n", NR, $0; - exit 1; - } -} - diff --git a/tests/test-linedir-r/main.c b/tests/test-linedir-r/main.c deleted file mode 100644 index 6ba9808..0000000 --- a/tests/test-linedir-r/main.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of flex. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE. - */ - -#include "scanner.h" - -int -main ( int argc, char** argv ) -{ - yyscan_t scanner; - FILE *fp; - char * extra = "EXTRA"; - - testlex_init(&scanner); - testset_in(stdin,scanner); - testset_out(stdout,scanner); - testset_extra(extra,scanner); - - fp = testget_in(scanner); - fp = testget_out(scanner); - - while(testlex(scanner)) { - char * text; - int line; - line = testget_lineno(scanner); - text = testget_text(scanner); - - if( (char*)testget_extra(scanner) != extra) - break; - - if ( !text || line < 0) - continue; - } - testlex_destroy(scanner); - return 0; -} - - -/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */ diff --git a/tests/test-linedir-r/scanner.l b/tests/test-linedir-r/scanner.l deleted file mode 100644 index e87cc60..0000000 --- a/tests/test-linedir-r/scanner.l +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of flex. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE. - */ - -%{ -/* Build "scanner.c". - The scanner is not important. - This test is really about getting the line directives correct. -*/ -#include <stdio.h> -#include <stdlib.h> -#include "config.h" - -%} - -%option reentrant -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap -%option warn - -%% - -.|\n { } - -%% - diff --git a/tests/test-lineno-nr/Makefile.am b/tests/test-lineno-nr/Makefile.am deleted file mode 100644 index 2db8e64..0000000 --- a/tests/test-lineno-nr/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) - -testname = test-lineno-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - test `./$(testname)$(EXEEXT) < $(srcdir)/test.input` -eq \ - `./$(testname)$(EXEEXT) 1 < $(srcdir)/test.input` || exit 1 - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-lineno-r/Makefile.am b/tests/test-lineno-r/Makefile.am deleted file mode 100644 index 8ded4b3..0000000 --- a/tests/test-lineno-r/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) - -testname = test-lineno-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - test `./$(testname)$(EXEEXT) < $(srcdir)/test.input` -eq \ - `./$(testname)$(EXEEXT) 1 < $(srcdir)/test.input` || exit 1 - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-lineno-trailing/Makefile.am b/tests/test-lineno-trailing/Makefile.am deleted file mode 100644 index bb303c3..0000000 --- a/tests/test-lineno-trailing/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) - -testname = test-lineno-trailing - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - test `./$(testname)$(EXEEXT) < $(srcdir)/test.input` -eq \ - `./$(testname)$(EXEEXT) 1 < $(srcdir)/test.input` || exit 1 - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-lineno-trailing/Makefile.in b/tests/test-lineno-trailing/Makefile.in deleted file mode 100644 index f5d06ca..0000000 --- a/tests/test-lineno-trailing/Makefile.in +++ /dev/null @@ -1,458 +0,0 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. -VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests/test-lineno-trailing -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BISON = @BISON@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GREP = @GREP@ -HELP2MAN = @HELP2MAN@ -INDENT = @INDENT@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -M4 = @M4@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -POSUB = @POSUB@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ -SHELL = @SHELL@ -STRIP = @STRIP@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -FLEX = $(top_builddir)/flex -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -testname = test-lineno-trailing -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .o -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/test-lineno-trailing/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/test-lineno-trailing/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - test `./$(testname)$(EXEEXT) < $(srcdir)/test.input` -eq \ - `./$(testname)$(EXEEXT) 1 < $(srcdir)/test.input` || exit 1 - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/tests/test-mem-nr/Makefile.am b/tests/test-mem-nr/Makefile.am deleted file mode 100644 index 4ad450d..0000000 --- a/tests/test-mem-nr/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a - -testname = test-mem-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-mem-r/Makefile.am b/tests/test-mem-r/Makefile.am deleted file mode 100644 index ae06bd2..0000000 --- a/tests/test-mem-r/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a - -testname = test-mem-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-multiple-scanners-nr/Makefile.am b/tests/test-multiple-scanners-nr/Makefile.am deleted file mode 100644 index 950dd23..0000000 --- a/tests/test-multiple-scanners-nr/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner-1.l scanner-2.l main.c -CLEANFILES = scanner-1.c scanner-1.h $(testname)$(EXEEXT) OUTPUT $(OBJS) scanner-2.c scanner-2.h -OBJS = scanner-1.o scanner-2.o main.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-multiple-scanners-nr - -scanner-1.c: $(srcdir)/scanner-1.l - $(FLEX) $(LFLAGS) --header=scanner-1.h $< - -scanner-2.c: $(srcdir)/scanner-2.l - $(FLEX) $(LFLAGS) --header=scanner-2.h $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< - -main.o: scanner-1.h scanner-2.h -scanner-1.h: scanner-1.c -scanner-2.h: scanner-2.c diff --git a/tests/test-multiple-scanners-r/Makefile.am b/tests/test-multiple-scanners-r/Makefile.am deleted file mode 100644 index 5f0df8c..0000000 --- a/tests/test-multiple-scanners-r/Makefile.am +++ /dev/null @@ -1,56 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner-1.l scanner-2.l main.c -CLEANFILES = scanner-1.c scanner-1.h $(testname)$(EXEEXT) OUTPUT\ - $(OBJS) scanner-2.c scanner-2.h scanner-1.tables \ - scanner-2.tables -OBJS = scanner-1.o scanner-2.o main.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-multiple-scanners-r - -scanner-1.c: $(srcdir)/scanner-1.l - $(FLEX) $(LFLAGS) --header=scanner-1.h $< - -scanner-2.c: $(srcdir)/scanner-2.l - $(FLEX) $(LFLAGS) --header=scanner-2.h $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< - -main.o: scanner-1.h scanner-2.h -scanner-1.h: scanner-1.c -scanner-2.h: scanner-2.c diff --git a/tests/test-noansi-nr/Makefile.am b/tests/test-noansi-nr/Makefile.am deleted file mode 100644 index a2a327e..0000000 --- a/tests/test-noansi-nr/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-noansi-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-noansi-r/Makefile.am b/tests/test-noansi-r/Makefile.am deleted file mode 100644 index ec123fe..0000000 --- a/tests/test-noansi-r/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#YFLAGS = --defines --output=parser.c - -testname = test-noansi-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-posix/Makefile.am b/tests/test-posix/Makefile.am deleted file mode 100644 index 2fd3271..0000000 --- a/tests/test-posix/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" - -testname = test-posix - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-posixly-correct/Makefile.am b/tests/test-posixly-correct/Makefile.am deleted file mode 100644 index 6821cf7..0000000 --- a/tests/test-posixly-correct/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" - -testname = test-posixly-correct - -scanner.c: $(srcdir)/scanner.l - POSIXLY_CORRECT=1 $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-prefix-nr/Makefile.am b/tests/test-prefix-nr/Makefile.am deleted file mode 100644 index 712ce3f..0000000 --- a/tests/test-prefix-nr/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-prefix-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-prefix-nr/README b/tests/test-prefix-nr/README deleted file mode 100644 index 91f75c9..0000000 --- a/tests/test-prefix-nr/README +++ /dev/null @@ -1,2 +0,0 @@ -This check is to make sure the prefix "yy" is substituted where it should be. - diff --git a/tests/test-prefix-r/Makefile.am b/tests/test-prefix-r/Makefile.am deleted file mode 100644 index 1021029..0000000 --- a/tests/test-prefix-r/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-prefix-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-prefix-r/README b/tests/test-prefix-r/README deleted file mode 100644 index 91f75c9..0000000 --- a/tests/test-prefix-r/README +++ /dev/null @@ -1,2 +0,0 @@ -This check is to make sure the prefix "yy" is substituted where it should be. - diff --git a/tests/test-pthread/Makefile.am b/tests/test-pthread/Makefile.am deleted file mode 100644 index fe5d545..0000000 --- a/tests/test-pthread/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test-1.input test-2.input test-3.input test-4.input test-5.input -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -LIBS = -lpthread -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-pthread - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname) $(srcdir)/test-*.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-quotes/Makefile.am b/tests/test-quotes/Makefile.am deleted file mode 100644 index 70676ef..0000000 --- a/tests/test-quotes/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l test.input -CLEANFILES = l.out c.out scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir) - -testname = test-quotes - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - grep TEST_XXX < $(srcdir)/scanner.l | sed 's/^ *//' > l.out - grep TEST_XXX < scanner.c | sed 's/^ *//' > c.out - cmp -s l.out c.out - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-reject/Makefile.am b/tests/test-reject/Makefile.am deleted file mode 100644 index 902d7be..0000000 --- a/tests/test-reject/Makefile.am +++ /dev/null @@ -1,80 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c $(testname)$(EXEEXT)-* OUTPUT $(OBJS) -OBJS = test-reject-nr.o test-reject-r.o test-reject-ver.o \ - test-reject-ser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) - -tests = test-reject-nr$(EXEEXT) test-reject-r$(EXEEXT) \ - test-reject-ser$(EXEEXT) test-reject-ver$(EXEEXT) -testname = test-reject - -test-reject-nr.c: $(srcdir)/scanner.l - $(FLEX) -o $@ $(LFLAGS) $< - -test-reject-ver.c: $(srcdir)/scanner.l - $(FLEX) -o $@ --tables-verify --tables-file=`basename $@ .c`.tables $(LFLAGS) $< - -test-reject-ser.c: $(srcdir)/scanner.l - $(FLEX) -o $@ --tables-file=`basename $@ .c`.tables $(LFLAGS) $< - -test-reject-r.c: $(srcdir)/scanner.l - $(FLEX) --reentrant -o $@ $(LFLAGS) $< - -test-reject-nr$(EXEEXT): test-reject-nr.o - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES) - -test-reject-ver$(EXEEXT): test-reject-ver.o - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES) - -test-reject-ser$(EXEEXT): test-reject-ser.o - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES) - -test-reject-r$(EXEEXT): test-reject-r.o - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES) - -$(testname)$(EXEEXT): $(OBJS) - -test: $(tests) - ./$(testname)-nr$(EXEEXT) < $(srcdir)/test.input - ./$(testname)-r$(EXEEXT) < $(srcdir)/test.input - ./$(testname)-ver$(EXEEXT) $(testname)-ver.tables < $(srcdir)/test.input - ./$(testname)-ser$(EXEEXT) $(testname)-ser.tables < $(srcdir)/test.input - -test-reject-nr.o: test-reject-nr.c - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< - -test-reject-ver.o: test-reject-ver.c - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $< - -test-reject-ser.o: test-reject-ser.c - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $< - -test-reject-r.o: test-reject-r.c - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_IS_REENTRANT $(CFLAGS) $< - - diff --git a/tests/test-rescan-nr/Makefile.am b/tests/test-rescan-nr/Makefile.am deleted file mode 100644 index 3d23a55..0000000 --- a/tests/test-rescan-nr/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-rescan-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-rescan-r/Makefile.am b/tests/test-rescan-r/Makefile.am deleted file mode 100644 index b24a152..0000000 --- a/tests/test-rescan-r/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(builddir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-rescan-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-rescan-r/test.input b/tests/test-rescan-r/test.input deleted file mode 100644 index 7288a40..0000000 --- a/tests/test-rescan-r/test.input +++ /dev/null @@ -1,2 +0,0 @@ -0000 foo 1111 foo 0000 bar -0000 foo 1111 foo 0000 bar diff --git a/tests/test-string-nr/Makefile.am b/tests/test-string-nr/Makefile.am deleted file mode 100644 index 1b06765..0000000 --- a/tests/test-string-nr/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-string-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-string-r/Makefile.am b/tests/test-string-r/Makefile.am deleted file mode 100644 index ec3d4da..0000000 --- a/tests/test-string-r/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-string-r - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/test-table-opts/Makefile.am b/tests/test-table-opts/Makefile.am deleted file mode 100644 index 235e6c8..0000000 --- a/tests/test-table-opts/Makefile.am +++ /dev/null @@ -1,132 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - -# ------------------------------------------------ -# This test is really a set of tests, one for -# each compression flag. -Ca, -Cem, etc.. -# 'test-opt' builds non-serialized scanners with various table options. -# 'test-ver' verifies that the serialized tables match the in-code tables. -# 'test-ser' deserializes the tables at runtime. -# 'test-mul' checks that we can store multiple tables in a single file. -# ------------------------------------------------ - -FLEX = $(top_builddir)/flex - -testname := test-table-opts -allopts := -Ca -Ce -Cf -CF -Cm -Cem -Cae -Caef -CaeF -Cam -Caem - -# the test names themselves -opttests := $(foreach opt,$(allopts), test-opt-nr$(opt) test-opt-r$(opt)) -sertests := $(foreach opt,$(allopts), test-ser-nr$(opt) test-ser-r$(opt)) -vertests := $(foreach opt,$(allopts), test-ver-nr$(opt) test-ver-r$(opt)) -alltests := $(opttests) $(vertests) $(sertests) test-mul - -# the executables to build -optexe := $(addsuffix $(EXEEXT),$(opttests)) -verexe := $(addsuffix $(EXEEXT),$(vertests)) -serexe := $(addsuffix $(EXEEXT),$(sertests)) -allexe := $(optexe) $(verexe) $(serexe) - -# the .c files -optsrc := $(addsuffix .c,$(opttests)) -versrc := $(addsuffix .c,$(vertests)) -sersrc := $(addsuffix .c,$(sertests)) -allsrc := $(optsrc) $(versrc) $(sersrc) - -# the .o files -optobj := $(addsuffix .o,$(opttests)) -verobj := $(addsuffix .o,$(vertests)) -serobj := $(addsuffix .o,$(sertests)) -allobj := $(optobj) $(verobj) $(serobj) - -# the .tables files -sertables := $(addsuffix .tables,$(sertests)) -alltables := $(addsuffix .tables,$(alltests)) - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c OUTPUT $(allobj) $(allsrc) $(alltables) \ - all-ser.tables $(allexe) -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) - -test: test-opt test-ser test-ver test-mul - -test-opt-r%.c: $(srcdir)/scanner.l - $(FLEX) -L -P $(subst -,_,$(basename $(@F))) --reentrant $* -o $@ $< - -test-opt-nr%.c: $(srcdir)/scanner.l - $(FLEX) -L -P $(subst -,_,$(basename $(@F))) $* -o $@ $< - -test-ser-r%.c: $(srcdir)/scanner.l - $(FLEX) -L -P $(subst -,_,$(basename $(@F))) -R --tables-file="test-ser-r$*.tables" $* -o $@ $< - -test-ser-nr%.c: $(srcdir)/scanner.l - $(FLEX) -L -P $(subst -,_,$(basename $(@F))) --tables-file="test-ser-nr$*.tables" $* -o $@ $< - -test-ver-r%.c: $(srcdir)/scanner.l - $(FLEX) -L -P $(subst -,_,$(basename $(@F))) -R --tables-file="test-ver-r$*.tables" --tables-verify $* -o $@ $< - -test-ver-nr%.c: $(srcdir)/scanner.l - $(FLEX) -L -P $(subst -,_,$(basename $(@F))) --tables-file="test-ver-nr$*.tables" --tables-verify $* -o $@ $< - -test-opt%$(EXEEXT): test-opt%.o - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES) - -test-ser%$(EXEEXT): test-ser%.o - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES) - -test-ver%$(EXEEXT): test-ver%.o - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $(LOADLIBES) - -test-opt: $(optexe) - for t in $(optexe) ; do \ - ./$$t `basename $$t $(EXEEXT)`.tables < $(srcdir)/test.input \ - || { echo $t FAILED ; exit 1 ; } ; \ - done - -test-ver: $(verexe) - for t in $(verexe) ; do \ - ./$$t `basename $$t $(EXEEXT)`.tables < $(srcdir)/test.input \ - || { echo $t FAILED ; exit 1 ; } ; \ - done - -test-ser: $(serexe) - for t in $(serexe) ; do \ - ./$$t `basename $$t $(EXEEXT)`.tables < $(srcdir)/test.input \ - || { echo $t FAILED ; exit 1 ; } ; \ - done - -test-mul: $(serexe) - $(RM) all-ser.tables - cat $(sertables) > all-ser.tables - for t in $(serexe) ; do \ - ./$$t all-ser.tables < $(srcdir)/test.input || { echo $$t FAILED; exit 1; } ; \ - done - -test-opt-nr-%.o: test-opt-nr-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< -test-ser-nr-%.o: test-ser-nr-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $< -test-ver-nr-%.o: test-ver-nr-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $< - -test-opt-r-%.o: test-opt-r-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_IS_REENTRANT $(CFLAGS) $< -test-ser-r-%.o: test-ser-r-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL -DTEST_IS_REENTRANT $(CFLAGS) $< -test-ver-r-%.o: test-ver-r-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL -DTEST_IS_REENTRANT $(CFLAGS) $< - -.PHONY: test test-opt test-ser test-ver test-mul -.SECONDARY: $(allobj) $(allsrc) diff --git a/tests/test-top/Makefile.am b/tests/test-top/Makefile.am deleted file mode 100644 index 681cadb..0000000 --- a/tests/test-top/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -builddir = @builddir@ - -EXTRA_DIST = scanner.l test.input main.c -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o main.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-top - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< - -scanner.h: scanner.c -main.o: scanner.h diff --git a/tests/test-top/test.input b/tests/test-top/test.input deleted file mode 100644 index 2ce5001..0000000 --- a/tests/test-top/test.input +++ /dev/null @@ -1,3 +0,0 @@ -Any input is ok for this scanner. -We only care if it links. - diff --git a/tests/test-yyextra/Makefile.am b/tests/test-yyextra/Makefile.am deleted file mode 100644 index d55f74e..0000000 --- a/tests/test-yyextra/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# This file is part of flex. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: - -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# Neither the name of the University nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - - -FLEX = $(top_builddir)/flex - -EXTRA_DIST = scanner.l test.input -CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o # parser.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" -#YFLAGS = --defines --output=parser.c - -testname = test-yyextra - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(testname)$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) - -test: $(testname)$(EXEEXT) - ./$(testname)$(EXEEXT) < $(srcdir)/test.input - -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< diff --git a/tests/testwrapper.sh b/tests/testwrapper.sh new file mode 100755 index 0000000..30127b5 --- /dev/null +++ b/tests/testwrapper.sh @@ -0,0 +1,53 @@ +#!/bin/bash -vx +set -euo pipefail + +# testwrapper.sh: run a flex test, typically called by a Makefile + +# Each test will exercise some feature or aspect of flex. Run the test with any input it may need. + +INPUT_DIRECTORY="" +INPUT_NAME="" +INPUT_COUNT=0 +USE_REDIRECT=0 +DO_COMPARISON=0 + +while getopts :d:i:rt1 OPTION ; do + case $OPTION in + d) INPUT_DIRECTORY=$OPTARG ;; + i) + if [ "$INPUT_NAME" == "" ] ; then + INPUT_NAME="$OPTARG" + else + INPUT_NAME="$INPUT_NAME $OPTARG" + fi + INPUT_COUNT=$(($INPUT_COUNT+1)) + ;; + r) USE_REDIRECT=1 ;; + t) USE_TABLES=1 ;; + 1) DO_COMPARISON=1 ;; + esac + done + +TESTNAME="${!OPTIND}" + +INPUT_NAME=${INPUT_NAME:-`basename $TESTNAME`.txt} + +if [ "$DO_COMPARISON" -eq "1" ] ; then + test `$TESTNAME 1 < $INPUT_DIRECTORY/$INPUT_NAME` -eq `$TESTNAME < $INPUT_DIRECTORY/$INPUT_NAME` + exit $? + fi + +if [ $INPUT_COUNT -gt 1 ] ; then + $TESTNAME ${USE_TABLES:+${INPUT_DIRECTORY}/${TESTNAME}.tables} ${INPUT_NAME} + exit $? + fi + +if [ -f ${INPUT_DIRECTORY}/${INPUT_NAME} ] ; then + if [ $USE_REDIRECT == 1 ] ; then + $TESTNAME ${USE_TABLES:+${INPUT_DIRECTORY}/${TESTNAME}.tables} < $INPUT_DIRECTORY/$INPUT_NAME + else + $TESTNAME ${USE_TABLES:+${INPUT_DIRECTORY}/${TESTNAME}.tables} $INPUT_DIRECTORY/$INPUT_NAME + fi +else + $TESTNAME +fi diff --git a/tests/test-top/scanner.l b/tests/top.l index be329b0..25f4773 100644 --- a/tests/test-top/scanner.l +++ b/tests/top.l @@ -40,8 +40,8 @@ } %option reentrant -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option 8bit header="top.h" prefix="test" +%option nounput nomain noyywrap noinput %option warn diff --git a/tests/test-linedir-r/test.input b/tests/top.txt index 2ce5001..2ce5001 100644 --- a/tests/test-linedir-r/test.input +++ b/tests/top.txt diff --git a/tests/test-top/main.c b/tests/top_main.c index 353a63e..b273214 100644 --- a/tests/test-top/main.c +++ b/tests/top_main.c @@ -21,7 +21,9 @@ * PURPOSE. */ -#include "scanner.h" +#include <assert.h> + +#include "top.h" /* The scanner itself is not important here. * We simply try to use all the functions that are exported in the @@ -30,6 +32,9 @@ int main ( int argc, char** argv ) { + (void)argc; + (void)argv; + yyscan_t scanner; FILE *fp; char * extra = "EXTRA"; @@ -40,7 +45,9 @@ main ( int argc, char** argv ) testset_extra(extra,scanner); fp = testget_in(scanner); + assert(fp == stdin); fp = testget_out(scanner); + assert(fp == stdout); while(testlex(scanner)) { char * text; @@ -58,6 +65,3 @@ main ( int argc, char** argv ) printf("TEST RETURNING OK.\n"); return 0; } - - -/* vim:set tabstop=8 softtabstop=4 shiftwidth=4: */ diff --git a/tests/test-yyextra/scanner.l b/tests/yyextra.l index baba52b..37e8821 100644 --- a/tests/test-yyextra/scanner.l +++ b/tests/yyextra.l @@ -47,8 +47,8 @@ static void append_char (char c, yyscan_t scanner ); %} -%option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap nodefault +%option 8bit prefix="test" +%option nounput nomain noyywrap nodefault noinput %option warn %option reentrant diff --git a/tests/test-yyextra/test.input b/tests/yyextra.txt index 243df29..243df29 100644 --- a/tests/test-yyextra/test.input +++ b/tests/yyextra.txt |