X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/bb1c50d88b1032fc5f4c338a4038b4c5e8fe0de6..32ea6125e32103c7f3f78d20723056801c752acc:/tests/regression.at diff --git a/tests/regression.at b/tests/regression.at index 02840bb3..d2cb7de2 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -1,6 +1,6 @@ # Bison Regressions. -*- Autotest -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -263,11 +263,11 @@ AT_CHECK([cat input.output], [], 0 $accept: expr $end - 1 $@1: /* empty */ + 1 $@1: %empty 2 expr: 'a' $@1 'b' - 3 $@2: /* empty */ + 3 $@2: %empty 4 expr: $@2 'c' @@ -373,11 +373,14 @@ AT_DATA([input.y], %token LE 134 "<=" %left OR "<=" %% -exp: ; +exp: %empty; %% ]]) -AT_BISON_CHECK([-v -o input.c input.y]) +AT_BISON_CHECK([-v -Wall -o input.c input.y], 0, [], +[[input.y:3.1-5: warning: useless precedence and associativity for "||" [-Wprecedence] +input.y:3.1-5: warning: useless precedence and associativity for "<=" [-Wprecedence] +]]) AT_CLEANUP @@ -570,7 +573,7 @@ AT_CHECK([cat input.output], 0, 2 CONST_DEC_LIST: CONST_DEC 3 | CONST_DEC_LIST CONST_DEC - 4 $@1: /* empty */ + 4 $@1: %empty 5 CONST_DEC: $@1 undef_id_tok '=' const_id_tok ';' @@ -718,7 +721,7 @@ AT_KEYWORDS([report]) AT_DATA([input.y], [[%% statement: struct_stat; -struct_stat: /* empty. */ | if else; +struct_stat: %empty | if else; if: "if" "const" "then" statement; else: "else" statement; %% @@ -767,7 +770,7 @@ static const yytype_uint8 yyrline[] = static const char *const yytname[] = { "$end", "error", "$undefined", "\"if\"", "\"const\"", "\"then\"", - "\"else\"", "$accept", "statement", "struct_stat", "if", "else", YY_NULL + "\"else\"", "$accept", "statement", "struct_stat", "if", "else", YY_NULLPTR }; static const yytype_uint16 yytoknum[] = { @@ -866,7 +869,7 @@ type: DATA | INVALID ; -body: /* empty */ +body: %empty | body member ; @@ -926,7 +929,7 @@ $1 %token B %% -program: /* empty */ +program: %empty | program e ';' | program error ';'; @@ -1142,14 +1145,15 @@ sr_conflict: ]AT_YYLEX_DEFINE([{ 1, 2, 3, 0 }])[ ]AT_MAIN_DEFINE[ ]]) -AT_BISON_OPTION_POPDEFS -AT_BISON_CHECK([[-o input.c input.y]], [[0]],, -[[input.y:24.5-19: warning: rule useless in parser due to conflicts: start: start [-Wother] -input.y:28.5-19: warning: rule useless in parser due to conflicts: sr_conflict: TK2 "tok alias" [-Wother] +AT_BISON_CHECK([[-Wall -o input.c input.y]], [[0]],, +[[input.y:24.5-19: warning: rule useless in parser due to conflicts [-Wother] +input.y:28.5-19: warning: rule useless in parser due to conflicts [-Wother] +input.y:18.1-5: warning: useless precedence and associativity for TK1 [-Wprecedence] ]]) AT_COMPILE([[input]]) AT_PARSER_CHECK([[./input]]) +AT_BISON_OPTION_POPDEFS AT_CLEANUP