X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d80fb37a26b24d8aa7a4428389a6004c7f2e93be..ce9447fc6aefc5da1f2c04a9a8061f08cb50cdf3:/tests/reduce.at diff --git a/tests/reduce.at b/tests/reduce.at index 9e5246af..5fe650a8 100644 --- a/tests/reduce.at +++ b/tests/reduce.at @@ -1,5 +1,5 @@ # Exercising Bison Grammar Reduction. -*- Autotest -*- -# Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2007, 2008 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 @@ -42,7 +42,7 @@ AT_DATA([[input.y]], exp: useful; ]]) -AT_CHECK([[bison input.y]]) +AT_BISON_CHECK([[input.y]]) AT_CHECK([[sed -n '/^Grammar/q;/^$/!p' input.output]], 0, [[Terminals unused in grammar @@ -86,7 +86,7 @@ AT_DATA([[input.y]], exp: useful; ]]) -AT_CHECK([[bison input.y]], 0, [], +AT_BISON_CHECK([[input.y]], 0, [], [[input.y: warning: 9 nonterminals useless in grammar input.y:4.8-15: warning: nonterminal useless in grammar: useless1 input.y:5.8-15: warning: nonterminal useless in grammar: useless2 @@ -141,8 +141,9 @@ useless8: '8'; useless9: '9'; ]]) -AT_CHECK([[bison input.y]], 0, [], -[[input.y: warning: 9 nonterminals and 9 rules useless in grammar +AT_BISON_CHECK([[input.y]], 0, [], +[[input.y: warning: 9 nonterminals useless in grammar +input.y: warning: 9 rules useless in grammar input.y:6.1-8: warning: nonterminal useless in grammar: useless1 input.y:7.1-8: warning: nonterminal useless in grammar: useless2 input.y:8.1-8: warning: nonterminal useless in grammar: useless3 @@ -236,8 +237,9 @@ non_productive: non_productive useless_token %% ]]) -AT_CHECK([[bison not-reduced.y]], 0, [], -[[not-reduced.y: warning: 2 nonterminals and 3 rules useless in grammar +AT_BISON_CHECK([[not-reduced.y]], 0, [], +[[not-reduced.y: warning: 2 nonterminals useless in grammar +not-reduced.y: warning: 3 rules useless in grammar not-reduced.y:14.1-13: warning: nonterminal useless in grammar: not_reachable not-reduced.y:11.6-19: warning: nonterminal useless in grammar: non_productive not-reduced.y:11.6-57: warning: rule useless in grammar: exp: non_productive @@ -282,7 +284,7 @@ exp: useful { /* A useful action. */ } %% ]]) -AT_CHECK([[bison reduced.y]]) +AT_BISON_CHECK([[reduced.y]]) # Comparing the parsers. cp reduced.c expout @@ -310,8 +312,9 @@ underivable: indirection; indirection: underivable; ]]) -AT_CHECK([[bison input.y]], 0, [], -[[input.y: warning: 2 nonterminals and 3 rules useless in grammar +AT_BISON_CHECK([[input.y]], 0, [], +[[input.y: warning: 2 nonterminals useless in grammar +input.y: warning: 3 rules useless in grammar input.y:5.15-25: warning: nonterminal useless in grammar: underivable input.y:6.14-24: warning: nonterminal useless in grammar: indirection input.y:5.15-25: warning: rule useless in grammar: exp: underivable @@ -345,8 +348,9 @@ AT_DATA([[input.y]], exp: exp; ]]) -AT_CHECK([[bison input.y]], 1, [], -[[input.y: warning: 2 nonterminals and 2 rules useless in grammar +AT_BISON_CHECK([[input.y]], 1, [], +[[input.y: warning: 2 nonterminals useless in grammar +input.y: warning: 2 rules useless in grammar input.y:3.1-3: fatal error: start symbol exp does not derive any sentence ]])