--- /dev/null
+# Makefile.in for a single TEST.
+#
+# By default this Makefile will build the target "$(TESTNAME)"
+# from the sources "scanner.l" and "parser.y".
+#
+# $(TESTNAME) is supplied by the calling Makefile.
+# "parser.y" is not necessary. You may delete this file
+# if you do not require a parser.
+# "scanner.l" is necessary. It should build "scanner.c".
+#
+
+@SET_MAKE@
+
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@ -I. -I"@srcdir@" -I..
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+SHELL = /bin/sh
+srcdir = @srcdir@
+VPATH = @srcdir@
+LN_S = @LN_S@
+YACC = @YACC@
+CC = @CC@
+AR = ar
+RANLIB = @RANLIB@
+YACC = @YACC@
+
+# Edit these if necessary for your specific test.
+TESTNAME = test-array-r
+FLEX = ../../flex
+YFLAGS = --defines --output-file="parser.c" --name-prefix="test"
+OBJS = scanner.o # parser.o
+
+# Force YACC to be bison (autoconf generates 'bison -y')
+YACC = @BISON@
+
+all: $(TESTNAME)
+
+$(TESTNAME): $(OBJS)
+ $(CC) $(CFLAGS) -o $(TESTNAME) $(OBJS) $(LDFLAGS) $(LIBS)
+
+scanner.c: $(srcdir)/scanner.l
+ $(FLEX) $(srcdir)/scanner.l
+
+scanner.o: scanner.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c scanner.c
+
+test: check
+
+check: $(TESTNAME)
+ ./$(TESTNAME) < $(srcdir)/test.input
+
+distclean: clean
+ rm -f Makefile
+
+clean:
+ rm -f scanner.o scanner.c parser.o parser.c parser.h parser.h $(TESTNAME) OUTPUT
+
--- /dev/null
+%{
+/* 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 array reentrant
+
+
+%%
+
+.|\n { }
+
+
+%%
+
+int
+main ( int argc, char** argv )
+{
+ yyscan_t lexer;
+
+ yylex_init(&lexer);
+ yyset_in(stdin, lexer);
+ yyset_out(stdout, lexer);
+
+ yylex( lexer );
+
+ yylex_destroy( lexer);
+ printf("TEST RETURNING OK.\n");
+
+ return 0;
+}