X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/3eb4f1a3e62807125a815dc572da9204b5b51865..d140056923f4942c645cf56e0f6940e28113cfdd:/tests/conflicts.at diff --git a/tests/conflicts.at b/tests/conflicts.at index c4515e8c..169509f2 100644 --- a/tests/conflicts.at +++ b/tests/conflicts.at @@ -1459,9 +1459,40 @@ state 1 AT_CLEANUP -## --------------------------------- ## -## -W versus %expect and %expect-rr ## -## --------------------------------- ## +## -------------------- ## +## %expect-rr non GLR. ## +## -------------------- ## + +AT_SETUP([[%expect-rr non GLR]]) + +AT_DATA([[1.y]], +[[%expect-rr 0 +%% +exp: 'a' +]]) + +AT_BISON_CHECK([[1.y]], [[0]], [], +[[1.y: warning: %expect-rr applies only to GLR parsers [-Wother] +]]) + +AT_DATA([[2.y]], +[[%expect-rr 1 +%% +exp: 'a' | 'a'; +]]) + +AT_BISON_CHECK([[2.y]], [[0]], [], +[[2.y: warning: %expect-rr applies only to GLR parsers [-Wother] +2.y: conflicts: 1 reduce/reduce +2.y:3.12-14: warning: rule useless in parser due to conflicts: exp: 'a' [-Wother] +]]) + +AT_CLEANUP + + +## ---------------------------------- ## +## -W versus %expect and %expect-rr. ## +## ---------------------------------- ## AT_SETUP([[-W versus %expect and %expect-rr]])