tstcnt=0;
for x in @top_srcdir@/test/*.re; do
tstcnt=$(($tstcnt+1))
- echo $x
- switches=`basename $x|sed -e 's/^.*\.\([^.]*\)\..*$/-\1/g' -e 's/^[^-].*//'g`
+ switches=`basename $x|sed -e 's/^[^.]*\.\(.*\)\.re$/-\1/g' -e 's/^[^-].*//g'`
+ genname=`echo $switches|sed -e 's,^.[^o].*$,,g' -e 's,^-o\([ -]*\),@builddir@/test/\1,g'`
+ switches=`echo $switches|sed -e 's,^-o\(.*\)$,-o@builddir@/test/\1,g'`
# don't use the -o flag, since it makes it harder to diff.
+ echo $x: $switches
outname=@builddir@/test/`basename ${x%.re}.temp`
difname=@builddir@/test/`basename ${x%.re}.diff`
@builddir@/re2c $switches $x 2>&1 | sed -e "s,$x,`basename $x`,g" -e "s,/\* Generated by re2c .*\*/,/\* Generated by re2c \*/,g" > $outname
+ if test -n "$genname"; then
+ cat $genname | sed -e 's,@builddir@/test/,,g' -e "s,/\* Generated by re2c .*\*/,/\* Generated by re2c \*/,g" > $outname
+ rm $genname
+ fi
# if diff -u -I '#line [0-9]*' ${x%.re}.c $outname > $difname; then
if diff -u ${x%.re}.c $outname > $difname; then
echo "Passed."
--- /dev/null
+/* Generated by re2c */
+#line 1 "input12.oinput12.c.re"
+
+#line 5 "input12.c"
+{
+ YYCTYPE yych;
+
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ switch(yych){
+ case 'a': goto yy3;
+ default: goto yy2;
+ }
+yy2:
+yy3:
+ ++YYCURSOR;
+ if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ yych = *YYCURSOR;
+ switch(yych){
+ case 'a': goto yy3;
+ case 'b': goto yy5;
+ default: goto yy2;
+ }
+yy5:
+ yych = *++YYCURSOR;
+ switch(yych){
+ case 'b': goto yy6;
+ default: goto yy2;
+ }
+yy6:
+ ++YYCURSOR;
+#line 3 "input12.oinput12.c.re"
+ { return 1; }
+#line 35 "input12.c"
+}
+#line 5 "input12.oinput12.c.re"
+