X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d87ea54cf6cc98d52356c138bd142d1b450bbc9a..6d58c632025cb6928a90e4176577982bfb9c3981:/tests/conflicts.at?ds=inline diff --git a/tests/conflicts.at b/tests/conflicts.at index 83ef1286..37c54050 100644 --- a/tests/conflicts.at +++ b/tests/conflicts.at @@ -117,10 +117,10 @@ AT_NONASSOC_AND_EOF_CHECK([], [[incorrect]]) # We must disable default reductions in inconsistent states in order to # have an explicit list of all expected tokens. -AT_NONASSOC_AND_EOF_CHECK([[-Dlr.default-reductions=consistent]], +AT_NONASSOC_AND_EOF_CHECK([[-Dlr.default-reduction=consistent]], [[correct]]) -# lr.default-reductions=consistent happens to work for this test case. +# lr.default-reduction=consistent happens to work for this test case. # However, for other grammars, lookahead sets can be merged for # different left contexts, so it is still possible to have an incorrect # expected list. Canonical LR is almost a general solution (that is, it @@ -310,12 +310,12 @@ AT_CONSISTENT_ERRORS_CHECK([[%define lr.type ielr # Even canonical LR doesn't foresee the error for 'a'! AT_CONSISTENT_ERRORS_CHECK([[%define lr.type ielr - %define lr.default-reductions consistent]], + %define lr.default-reduction consistent]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], [[$end]], [[ab]]) AT_CONSISTENT_ERRORS_CHECK([[%define lr.type ielr - %define lr.default-reductions accepting]], + %define lr.default-reduction accepting]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], [[$end]], [[ab]]) @@ -396,13 +396,13 @@ AT_CONSISTENT_ERRORS_CHECK([[%glr-parser]], [['b']], [[none]]) # No C++ or Java test because yychar cannot be manipulated by users. -AT_CONSISTENT_ERRORS_CHECK([[%define lr.default-reductions consistent]], +AT_CONSISTENT_ERRORS_CHECK([[%define lr.default-reduction consistent]], [AT_USER_ACTION_GRAMMAR], [AT_USER_ACTION_INPUT], [['b']], [[none]]) # Canonical LR doesn't foresee the error for 'a'! -AT_CONSISTENT_ERRORS_CHECK([[%define lr.default-reductions accepting]], +AT_CONSISTENT_ERRORS_CHECK([[%define lr.default-reduction accepting]], [AT_USER_ACTION_GRAMMAR], [AT_USER_ACTION_INPUT], [[$end]], [[a]]) @@ -416,7 +416,7 @@ AT_CONSISTENT_ERRORS_CHECK([[%define parse.lac full]], [AT_USER_ACTION_INPUT], [['b']], [[none]]) AT_CONSISTENT_ERRORS_CHECK([[%define parse.lac full - %define lr.default-reductions accepting]], + %define lr.default-reduction accepting]], [AT_USER_ACTION_GRAMMAR], [AT_USER_ACTION_INPUT], [[$end]], [[none]]) @@ -945,7 +945,7 @@ exp: exp OP exp | NUM; ]]) AT_BISON_CHECK([-o input.c input.y], 1, [], -[[input.y: shift/reduce conflicts: 1 found, 0 expected +[[input.y: error: shift/reduce conflicts: 1 found, 0 expected ]]) AT_CLEANUP @@ -981,7 +981,7 @@ exp: exp OP exp | NUM; ]]) AT_BISON_CHECK([-o input.c input.y], 1, [], -[[input.y: shift/reduce conflicts: 1 found, 2 expected +[[input.y: error: shift/reduce conflicts: 1 found, 2 expected ]]) AT_CLEANUP @@ -1000,7 +1000,7 @@ a: 'a'; ]]) AT_BISON_CHECK([-o input.c input.y], 1, [], -[[input.y: reduce/reduce conflicts: 1 found, 0 expected +[[input.y: error: reduce/reduce conflicts: 1 found, 0 expected ]]) AT_CLEANUP @@ -1293,7 +1293,7 @@ state 7 ]]) AT_DATA([[input-keep.y]], -[[%define lr.keep-unreachable-states +[[%define lr.keep-unreachable-state ]]) AT_CHECK([[cat input.y >> input-keep.y]]) @@ -1584,12 +1584,12 @@ for gram in sr-rr sr rr; do if test -z "$sr_exp_i" && test "$sr_count" -ne 0; then echo "warning: $sr_count shift/reduce conflicts" elif test "$sr_exp_i" -ne "$sr_count"; then - echo "shift/reduce conflicts: $sr_count found, $sr_exp_i expected" + echo "error: shift/reduce conflicts: $sr_count found, $sr_exp_i expected" fi if test -z "$rr_exp_i" && test "$rr_count" -ne 0; then echo "warning: $rr_count reduce/reduce conflicts" elif test "$rr_exp_i" -ne "$rr_count"; then - echo "reduce/reduce conflicts: $rr_count found, $rr_exp_i expected" + echo "error: reduce/reduce conflicts: $rr_count found, $rr_exp_i expected" fi } | sed -e "s/^/$file: /" > experr ]AT_BISON_CHECK([[-Wnone $file]], [[1]], [[]], [[experr]])[