#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <assert.h>
#define YYERROR_VERBOSE 1
]AT_YYERROR_DEFINE[
yylex (void)
{
static size_t toknum;
- if (! (toknum <= strlen (input)))
- abort ();
+ assert (toknum <= strlen (input));
return input[toknum++];
}
%%
]AT_YYERROR_DEFINE[
-]AT_YYLEX_DEFINE([aaa])[
+]AT_YYLEX_DEFINE(["aaa"])[
int
main (void)
AT_BISON_CHECK([-o input.c input.y], 1, [],
[input.y: conflicts: 1 shift/reduce
-input.y: expected 0 shift/reduce conflicts
+input.y: error: expected 0 shift/reduce conflicts
])
AT_CLEANUP
AT_BISON_CHECK([-o input.c input.y], 1, [],
[input.y: conflicts: 1 shift/reduce
-input.y: expected 2 shift/reduce conflicts
+input.y: error: expected 2 shift/reduce conflicts
])
AT_CLEANUP
AT_BISON_CHECK([-o input.c input.y], 1, [],
[input.y: conflicts: 1 reduce/reduce
-input.y: expected 0 reduce/reduce conflicts
+input.y: error: expected 0 reduce/reduce conflicts
])
AT_CLEANUP
echo "$file: conflicts: $conflicts" > experr
if test $sr_count -ne $sr_exp; then
if test $sr_exp -ne 1; then s=s; else s= ; fi
- echo "$file: expected $sr_exp shift/reduce conflict$s" >> experr
+ echo "$file: error: expected $sr_exp shift/reduce conflict$s" >> experr
fi
if test $rr_count -ne $rr_exp; then
if test $rr_exp -ne 1; then s=s; else s= ; fi
- echo "$file: expected $rr_exp reduce/reduce conflict$s" >> experr
+ echo "$file: error: expected $rr_exp reduce/reduce conflict$s" >> experr
fi
]AT_BISON_CHECK([[-Wnone $file]], [[1]], [[]], [[experr]])[
]AT_BISON_CHECK([[-Werror $file]], [[1]], [[]], [[experr]])[