cxx_basic.cc
cxx_multiple_scanners
cxx_multiple_scanners_[12].cc
+cxx_yywrap.i3
+cxx_yywrap.cc
debug_nr
debug_nr.c
debug_r
# automake knows how to distinguish between the various kinds of tests
# we have.
-TEST_EXTENSIONS = .reject .table .direct .cn
+TEST_EXTENSIONS = .reject .table .direct .cn .i3
LOG_COMPILER = $(srcdir)/testwrapper.sh
AM_LOG_FLAGS = -d $(srcdir) -r
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
+
AM_YFLAGS = -d -p test
-check_PROGRAMS = $(simple_tests) $(reject_tests) $(TABLE_TESTS) $(DIRECT_TESTS)
+check_PROGRAMS = $(simple_tests) $(reject_tests) $(TABLE_TESTS) $(DIRECT_TESTS) $(I3_TESTS)
simple_tests = \
alloc_extra \
rescan_nr.direct \
rescan_r.direct
+ I3_TESTS = \
+ cxx_yywrap.i3
+
alloc_extra_SOURCES = alloc_extra.l
array_nr_SOURCES = array_nr.l
array_r_SOURCES = array_r.l
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
ccl.txt \
cxx_basic.txt \
cxx_multiple_scanners.txt \
+ cxx_yywrap.txt \
debug_nr.txt \
debug_r.txt \
extended.txt \
%}
-%option 8bit outfile="scanner.cpp" prefix="test"
+%option 8bit prefix="test"
%option nounput nomain
%option warn c++
+++ /dev/null
-Makefile
-Makefile.in
-scanner.cpp
-OUTPUT
-.deps
-test-c++-yywrap
+++ /dev/null
-# 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) $<
INPUT_DIRECTORY=""
INPUT_NAME=""
+INPUT_COUNT=0
USE_REDIRECT=0
while getopts :d:i:rt OPTION ; do
case $OPTION in
d) INPUT_DIRECTORY=$OPTARG ;;
- i) INPUT_NAME="$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 ;;
esac
INPUT_NAME=${INPUT_NAME:-`basename $TESTNAME`.txt}
+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