X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/e9690142325711b320ef444768fdd40a087d02f7..ed91d427fe80ea2c5991c8862b0145613b9a0650:/tests/existing.at diff --git a/tests/existing.at b/tests/existing.at index 71b01f33..20dbde82 100644 --- a/tests/existing.at +++ b/tests/existing.at @@ -1,6 +1,6 @@ # Exercising Bison on actual grammars. -*- Autotest -*- -# Copyright (C) 1989-1992, 2000-2005, 2007, 2009-2011 Free Software +# Copyright (C) 1989-1992, 2000-2005, 2007, 2009-2012 Free Software # Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -35,7 +35,10 @@ dnl time comes, just use sed to drop the line numbers. For now, as LR(1) dnl support is rapidly evolving, let's keep that information to be careful. dnl However, we don't do diffs for canonical LR(1) because the diff is huge. m4_pushdef([AT_LALR1_DIFF_CHECK], -[AT_CHECK([[sed 's/^%define lr.type .*$//' input.y > input-lalr.y]]) +[dnl We need diff -u, which is not portable. +AT_CHECK([diff -u /dev/null /dev/null || exit 77], [0], [ignore]) + +AT_CHECK([[sed 's/^%define lr.type .*$//' input.y > input-lalr.y]]) AT_BISON_CHECK([[--report=all input-lalr.y]], [[0]], [ignore], [ignore]) AT_CHECK([[diff -u input-lalr.output input.output \ | sed -n '/^@@/,$p' | sed 's/^ $//']], @@ -424,8 +427,8 @@ dnl don't like even `print $!4;'. dnl BISON-STDERR [AT_COND_CASE([[canonical LR]], -[[input.y: conflicts: 265 shift/reduce]], -[[input.y: conflicts: 65 shift/reduce]])[ +[[input.y: warning: 265 shift/reduce conflicts [-Wconflicts-sr]]], +[[input.y: warning: 65 shift/reduce conflicts [-Wconflicts-sr]]])[ ]], dnl LAST-STATE @@ -778,8 +781,7 @@ dnl In the case of the syntax error, the parser recovers, so it returns 0. # It reported 80 SR && 99 RR conflicts instead of 78/10!!! AT_TEST_EXISTING_GRAMMAR([[GNU Cim Grammar]], -[[%union {} - +[[ %token HACTIVATE HAFTER /*HAND*/ HARRAY HAT HBEFORE HBEGIN HBOOLEAN @@ -1366,8 +1368,10 @@ dnl INPUT dnl BISON-STDERR [AT_COND_CASE([[canonical LR]], -[[input.y: conflicts: 1876 shift/reduce, 144 reduce/reduce]], -[[input.y: conflicts: 78 shift/reduce, 10 reduce/reduce]])[ +[[input.y: warning: 1876 shift/reduce conflicts [-Wconflicts-sr] +input.y: warning: 144 reduce/reduce conflicts [-Wconflicts-rr]]], +[[input.y: warning: 78 shift/reduce conflicts [-Wconflicts-sr] +input.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr]]])[ ]], dnl LAST-STATE @@ -1400,7 +1404,6 @@ State 427 conflicts: 9 shift/reduce, 2 reduce/reduce AT_TEST_EXISTING_GRAMMAR([[GNU pic (Groff 1.18.1) Grammar]], [[%error-verbose -%union {} %token LABEL %token VARIABLE @@ -1480,7 +1483,7 @@ AT_TEST_EXISTING_GRAMMAR([[GNU pic (Groff 1.18.1) Grammar]], %token RAND %token SRAND %token COPY -%token THRU +%token THROUGH %token TOP %token BOTTOM %token UPPER @@ -1606,12 +1609,12 @@ placeless_element: {} DELIMITED | COPY TEXT - | COPY TEXT THRU + | COPY TEXT THROUGH {} DELIMITED {} until - | COPY THRU + | COPY THROUGH {} DELIMITED {} @@ -1950,7 +1953,7 @@ dnl without being followed by "of".) [[VARIABLE, '=', LABEL, LEFT, DOT_X]], dnl BISON-STDERR -[[input.y:471.11-48: warning: rule useless in parser due to conflicts: path: ORDINAL LAST object_type relative_path +[[input.y:470.11-48: warning: rule useless in parser due to conflicts: path: ORDINAL LAST object_type relative_path [-Wother] ]], dnl LAST-STATE