X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/fa98bb3233f7f291d8efa2565288bc0597f92063..f038e56cdc211396f54f138e95693d0906d6fafa:/tests/existing.at?ds=inline diff --git a/tests/existing.at b/tests/existing.at index d5cb39d1..215993cb 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-2012 Free Software +# Copyright (C) 1989-1992, 2000-2005, 2007, 2009-2013 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,44 @@ dnl don't like even `print $!4;'. dnl BISON-STDERR [AT_COND_CASE([[canonical LR]], -[[input.y: warning: 265 shift/reduce conflicts [-Wconflicts-sr]]], -[[input.y: warning: 65 shift/reduce conflicts [-Wconflicts-sr]]])[ +[[input.y: warning: 265 shift/reduce conflicts [-Wconflicts-sr] +input.y:19.8-16: warning: useless associativity for FUNC_CALL, use %precedence [-Wprecedence] +input.y:21.8-14: warning: useless associativity for YNUMBER, use %precedence [-Wprecedence] +input.y:21.16-22: warning: useless associativity for YSTRING, use %precedence [-Wprecedence] +input.y:22.14-22: warning: useless precedence and associativity for APPEND_OP [-Wprecedence] +input.y:23.8-15: warning: useless associativity for ASSIGNOP, use %precedence [-Wprecedence] +input.y:23.33-41: warning: useless associativity for CONCAT_OP, use %precedence [-Wprecedence] +input.y:27.8-18: warning: useless precedence and associativity for LEX_GETLINE [-Wprecedence] +input.y:28.8-13: warning: useless associativity for LEX_IN, use %precedence [-Wprecedence] +input.y:29.23-31: warning: useless associativity for INCREMENT, use %precedence [-Wprecedence] +input.y:29.33-41: warning: useless associativity for DECREMENT, use %precedence [-Wprecedence] +input.y:30.8-18: warning: useless associativity for LEX_BUILTIN, use %precedence [-Wprecedence] +input.y:30.20-29: warning: useless associativity for LEX_LENGTH, use %precedence [-Wprecedence] +input.y:40.11-13: warning: useless precedence and associativity for ',' [-Wprecedence] +input.y:47.8-10: warning: useless associativity for '!', use %precedence [-Wprecedence] +input.y:47.12-16: warning: useless associativity for UNARY, use %precedence [-Wprecedence] +input.y:50.7-9: warning: useless associativity for '$', use %precedence [-Wprecedence] +input.y:51.7-9: warning: useless associativity for '(', use %precedence [-Wprecedence] +input.y:51.11-13: warning: useless precedence and associativity for ')' [-Wprecedence]]], +[[input.y: warning: 65 shift/reduce conflicts [-Wconflicts-sr] +input.y:19.8-16: warning: useless associativity for FUNC_CALL, use %precedence [-Wprecedence] +input.y:21.8-14: warning: useless associativity for YNUMBER, use %precedence [-Wprecedence] +input.y:21.16-22: warning: useless associativity for YSTRING, use %precedence [-Wprecedence] +input.y:22.14-22: warning: useless precedence and associativity for APPEND_OP [-Wprecedence] +input.y:23.8-15: warning: useless associativity for ASSIGNOP, use %precedence [-Wprecedence] +input.y:23.33-41: warning: useless associativity for CONCAT_OP, use %precedence [-Wprecedence] +input.y:27.8-18: warning: useless precedence and associativity for LEX_GETLINE [-Wprecedence] +input.y:28.8-13: warning: useless associativity for LEX_IN, use %precedence [-Wprecedence] +input.y:29.23-31: warning: useless associativity for INCREMENT, use %precedence [-Wprecedence] +input.y:29.33-41: warning: useless associativity for DECREMENT, use %precedence [-Wprecedence] +input.y:30.8-18: warning: useless associativity for LEX_BUILTIN, use %precedence [-Wprecedence] +input.y:30.20-29: warning: useless associativity for LEX_LENGTH, use %precedence [-Wprecedence] +input.y:40.11-13: warning: useless precedence and associativity for ',' [-Wprecedence] +input.y:47.8-10: warning: useless associativity for '!', use %precedence [-Wprecedence] +input.y:47.12-16: warning: useless associativity for UNARY, use %precedence [-Wprecedence] +input.y:50.7-9: warning: useless associativity for '$', use %precedence [-Wprecedence] +input.y:51.7-9: warning: useless associativity for '(', use %precedence [-Wprecedence] +input.y:51.11-13: warning: useless precedence and associativity for ')' [-Wprecedence]]])[ ]], dnl LAST-STATE @@ -486,7 +525,7 @@ dnl - 61 -> 328: reduce -> shift on '*', '/', and '%' $default reduce using rule 45 (statement) + + -+state 320 ++State 320 + + 139 non_post_simp_exp: . '!' simp_exp + 140 | . '(' exp r_paren @@ -524,7 +563,7 @@ dnl - 61 -> 328: reduce -> shift on '*', '/', and '%' + variable go to state 63 + + -+state 321 ++State 321 + + 146 non_post_simp_exp: INCREMENT . variable + 154 variable: . NAME @@ -537,7 +576,7 @@ dnl - 61 -> 328: reduce -> shift on '*', '/', and '%' + variable go to state 50 + + -+state 322 ++State 322 + + 147 non_post_simp_exp: DECREMENT . variable + 154 variable: . NAME @@ -550,7 +589,7 @@ dnl - 61 -> 328: reduce -> shift on '*', '/', and '%' + variable go to state 51 + + -+state 323 ++State 323 + + 130 simp_exp: . non_post_simp_exp + 131 | . simp_exp '^' simp_exp @@ -598,7 +637,7 @@ dnl - 61 -> 328: reduce -> shift on '*', '/', and '%' + variable go to state 57 + + -+state 324 ++State 324 + + 130 simp_exp: . non_post_simp_exp + 131 | . simp_exp '^' simp_exp @@ -646,7 +685,7 @@ dnl - 61 -> 328: reduce -> shift on '*', '/', and '%' + variable go to state 57 + + -+state 325 ++State 325 + + 130 simp_exp: . non_post_simp_exp + 131 | . simp_exp '^' simp_exp @@ -694,7 +733,7 @@ dnl - 61 -> 328: reduce -> shift on '*', '/', and '%' + variable go to state 57 + + -+state 326 ++State 326 + + 131 simp_exp: simp_exp . '^' simp_exp + 132 | simp_exp . '*' simp_exp @@ -715,7 +754,7 @@ dnl - 61 -> 328: reduce -> shift on '*', '/', and '%' + Conflict between rule 151 and token '-' resolved as reduce ('-' < UNARY). + + -+state 327 ++State 327 + + 131 simp_exp: simp_exp . '^' simp_exp + 132 | simp_exp . '*' simp_exp @@ -736,7 +775,7 @@ dnl - 61 -> 328: reduce -> shift on '*', '/', and '%' + Conflict between rule 150 and token '-' resolved as reduce ('-' < UNARY). + + -+state 328 ++State 328 + + 131 simp_exp: simp_exp . '^' simp_exp + 132 | simp_exp . '*' simp_exp @@ -1366,9 +1405,21 @@ dnl INPUT dnl BISON-STDERR [AT_COND_CASE([[canonical LR]], [[input.y: warning: 1876 shift/reduce conflicts [-Wconflicts-sr] -input.y: warning: 144 reduce/reduce conflicts [-Wconflicts-rr]]], +input.y: warning: 144 reduce/reduce conflicts [-Wconflicts-rr] +input.y:32.9-12: warning: useless associativity for HQUA, use %precedence [-Wprecedence] +input.y:53.8-14: warning: useless associativity for HASSIGN, use %precedence [-Wprecedence] +input.y:54.9-15: warning: useless associativity for HORELSE, use %precedence [-Wprecedence] +input.y:55.9-16: warning: useless associativity for HANDTHEN, use %precedence [-Wprecedence] +input.y:61.9-12: warning: useless associativity for HNOT, use %precedence [-Wprecedence] +input.y:68.7-11: warning: useless associativity for UNEAR, use %precedence [-Wprecedence]]], [[input.y: warning: 78 shift/reduce conflicts [-Wconflicts-sr] -input.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr]]])[ +input.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr] +input.y:32.9-12: warning: useless associativity for HQUA, use %precedence [-Wprecedence] +input.y:53.8-14: warning: useless associativity for HASSIGN, use %precedence [-Wprecedence] +input.y:54.9-15: warning: useless associativity for HORELSE, use %precedence [-Wprecedence] +input.y:55.9-16: warning: useless associativity for HANDTHEN, use %precedence [-Wprecedence] +input.y:61.9-12: warning: useless associativity for HNOT, use %precedence [-Wprecedence] +input.y:68.7-11: warning: useless associativity for UNEAR, use %precedence [-Wprecedence]]])[ ]], dnl LAST-STATE @@ -1950,7 +2001,88 @@ dnl without being followed by "of".) [[VARIABLE, '=', LABEL, LEFT, DOT_X]], dnl BISON-STDERR -[[input.y:470.11-48: warning: rule useless in parser due to conflicts: path: ORDINAL LAST object_type relative_path [-Wother] +[[input.y:471.11-48: warning: rule useless in parser due to conflicts: path: ORDINAL LAST object_type relative_path [-Wother] +input.y:19.8-12: warning: useless associativity for LABEL, use %precedence [-Wprecedence] +input.y:20.8-15: warning: useless associativity for VARIABLE, use %precedence [-Wprecedence] +input.y:21.8-13: warning: useless associativity for NUMBER, use %precedence [-Wprecedence] +input.y:22.8-11: warning: useless associativity for TEXT, use %precedence [-Wprecedence] +input.y:25.8-14: warning: useless associativity for ORDINAL, use %precedence [-Wprecedence] +input.y:30.8-11: warning: useless associativity for LAST, use %precedence [-Wprecedence] +input.y:31.8-9: warning: useless associativity for UP, use %precedence [-Wprecedence] +input.y:32.8-11: warning: useless associativity for DOWN, use %precedence [-Wprecedence] +input.y:35.8-10: warning: useless associativity for BOX, use %precedence [-Wprecedence] +input.y:36.8-13: warning: useless associativity for CIRCLE, use %precedence [-Wprecedence] +input.y:37.8-14: warning: useless associativity for ELLIPSE, use %precedence [-Wprecedence] +input.y:38.8-10: warning: useless associativity for ARC, use %precedence [-Wprecedence] +input.y:39.8-11: warning: useless associativity for LINE, use %precedence [-Wprecedence] +input.y:40.8-12: warning: useless associativity for ARROW, use %precedence [-Wprecedence] +input.y:42.8-13: warning: useless associativity for SPLINE, use %precedence [-Wprecedence] +input.y:43.8-13: warning: useless associativity for HEIGHT, use %precedence [-Wprecedence] +input.y:44.8-13: warning: useless associativity for RADIUS, use %precedence [-Wprecedence] +input.y:45.8-12: warning: useless associativity for WIDTH, use %precedence [-Wprecedence] +input.y:46.8-15: warning: useless associativity for DIAMETER, use %precedence [-Wprecedence] +input.y:47.8-11: warning: useless associativity for FROM, use %precedence [-Wprecedence] +input.y:48.8-9: warning: useless associativity for TO, use %precedence [-Wprecedence] +input.y:49.8-9: warning: useless associativity for AT, use %precedence [-Wprecedence] +input.y:53.8-12: warning: useless precedence and associativity for SOLID [-Wprecedence] +input.y:54.8-13: warning: useless associativity for DOTTED, use %precedence [-Wprecedence] +input.y:55.8-13: warning: useless associativity for DASHED, use %precedence [-Wprecedence] +input.y:56.8-11: warning: useless associativity for CHOP, use %precedence [-Wprecedence] +input.y:59.8-12: warning: useless precedence and associativity for LJUST [-Wprecedence] +input.y:60.8-12: warning: useless precedence and associativity for RJUST [-Wprecedence] +input.y:61.8-12: warning: useless precedence and associativity for ABOVE [-Wprecedence] +input.y:62.8-12: warning: useless precedence and associativity for BELOW [-Wprecedence] +input.y:63.8-9: warning: useless associativity for OF, use %precedence [-Wprecedence] +input.y:66.8-14: warning: useless associativity for BETWEEN, use %precedence [-Wprecedence] +input.y:67.8-10: warning: useless associativity for AND, use %precedence [-Wprecedence] +input.y:68.8-11: warning: useless associativity for HERE, use %precedence [-Wprecedence] +input.y:69.8-12: warning: useless associativity for DOT_N, use %precedence [-Wprecedence] +input.y:70.8-12: warning: useless associativity for DOT_E, use %precedence [-Wprecedence] +input.y:71.8-12: warning: useless associativity for DOT_W, use %precedence [-Wprecedence] +input.y:72.8-12: warning: useless associativity for DOT_S, use %precedence [-Wprecedence] +input.y:73.8-13: warning: useless associativity for DOT_NE, use %precedence [-Wprecedence] +input.y:74.8-13: warning: useless associativity for DOT_SE, use %precedence [-Wprecedence] +input.y:75.8-13: warning: useless associativity for DOT_NW, use %precedence [-Wprecedence] +input.y:76.8-13: warning: useless associativity for DOT_SW, use %precedence [-Wprecedence] +input.y:77.8-12: warning: useless associativity for DOT_C, use %precedence [-Wprecedence] +input.y:78.8-16: warning: useless associativity for DOT_START, use %precedence [-Wprecedence] +input.y:79.8-14: warning: useless associativity for DOT_END, use %precedence [-Wprecedence] +input.y:85.8-10: warning: useless associativity for SIN, use %precedence [-Wprecedence] +input.y:86.8-10: warning: useless associativity for COS, use %precedence [-Wprecedence] +input.y:87.8-12: warning: useless associativity for ATAN2, use %precedence [-Wprecedence] +input.y:88.8-10: warning: useless associativity for LOG, use %precedence [-Wprecedence] +input.y:89.8-10: warning: useless associativity for EXP, use %precedence [-Wprecedence] +input.y:90.8-11: warning: useless associativity for SQRT, use %precedence [-Wprecedence] +input.y:91.8-12: warning: useless associativity for K_MAX, use %precedence [-Wprecedence] +input.y:92.8-12: warning: useless associativity for K_MIN, use %precedence [-Wprecedence] +input.y:93.8-10: warning: useless associativity for INT, use %precedence [-Wprecedence] +input.y:94.8-11: warning: useless associativity for RAND, use %precedence [-Wprecedence] +input.y:95.8-12: warning: useless associativity for SRAND, use %precedence [-Wprecedence] +input.y:98.8-10: warning: useless associativity for TOP, use %precedence [-Wprecedence] +input.y:99.8-13: warning: useless associativity for BOTTOM, use %precedence [-Wprecedence] +input.y:100.8-12: warning: useless associativity for UPPER, use %precedence [-Wprecedence] +input.y:101.8-12: warning: useless associativity for LOWER, use %precedence [-Wprecedence] +input.y:116.8-18: warning: useless associativity for LEFT_CORNER, use %precedence [-Wprecedence] +input.y:117.8-19: warning: useless associativity for RIGHT_CORNER, use %precedence [-Wprecedence] +input.y:118.8-12: warning: useless associativity for NORTH, use %precedence [-Wprecedence] +input.y:119.8-12: warning: useless associativity for SOUTH, use %precedence [-Wprecedence] +input.y:120.8-11: warning: useless associativity for EAST, use %precedence [-Wprecedence] +input.y:121.8-11: warning: useless associativity for WEST, use %precedence [-Wprecedence] +input.y:122.8-13: warning: useless associativity for CENTER, use %precedence [-Wprecedence] +input.y:123.8-10: warning: useless associativity for END, use %precedence [-Wprecedence] +input.y:124.8-12: warning: useless associativity for START, use %precedence [-Wprecedence] +input.y:127.8-11: warning: useless associativity for PLOT, use %precedence [-Wprecedence] +input.y:128.8-16: warning: useless associativity for THICKNESS, use %precedence [-Wprecedence] +input.y:129.8-11: warning: useless associativity for FILL, use %precedence [-Wprecedence] +input.y:130.8-14: warning: useless precedence and associativity for COLORED [-Wprecedence] +input.y:131.8-15: warning: useless precedence and associativity for OUTLINED [-Wprecedence] +input.y:134.8-14: warning: useless associativity for SPRINTF, use %precedence [-Wprecedence] +input.y:137.7-9: warning: useless associativity for '.', use %precedence [-Wprecedence] +input.y:156.23-25: warning: useless associativity for '(', use %precedence [-Wprecedence] +input.y:157.20-22: warning: useless associativity for '`', use %precedence [-Wprecedence] +input.y:159.48-50: warning: useless associativity for '@<:@', use %precedence [-Wprecedence] +input.y:170.7-9: warning: useless associativity for ',', use %precedence [-Wprecedence] +input.y:181.8-10: warning: useless associativity for '!', use %precedence [-Wprecedence] ]], dnl LAST-STATE @@ -2039,7 +2171,7 @@ dnl - 383 -> 427 nth_primitive go to state 105 @@ -3256,7 +3256,7 @@ - state 102 + State 102 - 146 place: label . [$end, LABEL, VARIABLE, NUMBER, TEXT, ORDINAL, LEFT_ARROW_HEAD, RIGHT_ARROW_HEAD, DOUBLE_ARROW_HEAD, LAST, UP, DOWN, LEFT, RIGHT, HEIGHT, RADIUS, WIDTH, DIAMETER, FROM, TO, AT, WITH, BY, THEN, SOLID, DOTTED, DASHED, CHOP, SAME, INVISIBLE, LJUST, RJUST, ABOVE, BELOW, AND, HERE, DOT_X, DOT_Y, DOT_HT, DOT_WID, DOT_RAD, SIN, COS, ATAN2, LOG, EXP, SQRT, K_MAX, K_MIN, INT, RAND, SRAND, CW, CCW, THICKNESS, FILL, COLORED, OUTLINED, SHADED, ALIGNED, SPRINTF, '(', '`', ',', '>', '+', '-', '!', ';', '}', '@:>@', ')'] + 146 place: label . [$end, LABEL, VARIABLE, NUMBER, TEXT, ORDINAL, LEFT_ARROW_HEAD, RIGHT_ARROW_HEAD, DOUBLE_ARROW_HEAD, LAST, UP, DOWN, LEFT, RIGHT, HEIGHT, RADIUS, WIDTH, DIAMETER, FROM, TO, AT, WITH, BY, THEN, SOLID, DOTTED, DASHED, CHOP, SAME, INVISIBLE, LJUST, RJUST, ABOVE, BELOW, HERE, DOT_X, DOT_Y, DOT_HT, DOT_WID, DOT_RAD, SIN, COS, ATAN2, LOG, EXP, SQRT, K_MAX, K_MIN, INT, RAND, SRAND, CW, CCW, THICKNESS, FILL, COLORED, OUTLINED, SHADED, ALIGNED, SPRINTF, '(', '`', '+', '-', '!', ';', '}', '@:>@'] @@ -2204,7 +2336,7 @@ dnl - 383 -> 427 + expr go to state 424 - state 165 + State 165 @@ -7987,7 +7987,7 @@ text_expr go to state 112 text go to state 113 @@ -2321,7 +2453,7 @@ dnl - 383 -> 427 + between go to state 425 - state 193 + State 193 @@ -10152,7 +10152,7 @@ expr_pair go to state 317 @@ -2489,7 +2621,7 @@ dnl - 383 -> 427 + expr go to state 424 - state 238 + State 238 @@ -12937,7 +12937,7 @@ '!' shift, and go to state 94 @@ -2576,7 +2708,7 @@ dnl - 383 -> 427 + expr go to state 424 - state 315 + State 315 @@ -16124,7 +16124,7 @@ $default reduce using rule 239 (expr) @@ -2627,7 +2759,7 @@ dnl - 383 -> 427 + expr go to state 424 - state 383 + State 383 @@ -18071,7 +18071,7 @@ '!' shift, and go to state 94 @@ -2670,7 +2802,7 @@ dnl - 383 -> 427 $default reduce using rule 29 (placeless_element) + + -+state 423 ++State 423 + + 146 place: label . [$end, AND, DOT_X, DOT_Y, DOT_HT, DOT_WID, DOT_RAD, ',', '>', '+', '-', ';', '}', '@:>@', ')'] + 147 | label . corner @@ -2741,7 +2873,7 @@ dnl - 383 -> 427 + corner go to state 205 + + -+state 424 ++State 424 + + 140 position_not_place: expr . between position AND position + 141 | expr . '<' position ',' position '>' @@ -2784,7 +2916,7 @@ dnl - 383 -> 427 + between go to state 425 + + -+state 425 ++State 425 + + 134 position: . position_not_place + 135 | . place @@ -2940,7 +3072,7 @@ dnl - 383 -> 427 + expr go to state 424 + + -+state 426 ++State 426 + + 137 position_not_place: position . '+' expr_pair + 138 | position . '-' expr_pair @@ -2951,7 +3083,7 @@ dnl - 383 -> 427 + '-' shift, and go to state 198 + + -+state 427 ++State 427 + + 134 position: . position_not_place + 135 | . place