diff options
author | Joel E. Denny <jdenny@clemson.edu> | 2011-05-01 21:53:35 -0400 |
---|---|---|
committer | Joel E. Denny <jdenny@clemson.edu> | 2011-05-01 22:20:15 -0400 |
commit | 9d6af153184eea964fef7f87d76a60fe29f715b5 (patch) | |
tree | bd361c3df2f04956a20c2410a46a1d702cf99ab3 /tests | |
parent | 441735026b38afedb296710e78f45af7e66a5fc8 (diff) | |
download | bison-9d6af153184eea964fef7f87d76a60fe29f715b5.tar.gz |
Fix precedence for end token.
Since Bison 2.3b, which restored the ability of precedence
directives to assign user token numbers, doing so for user token
number 0 has produced an assertion failure.
* NEWS (2.5): Document fix.
* src/symtab.c (symbol_user_token_number_set): In the case of the
end token, don't decrement ntokens if it was never incremented.
* tests/regression.at (Token number in precedence declaration):
Extend.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/regression.at | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/regression.at b/tests/regression.at index 68a41319..c07b7442 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -1205,12 +1205,15 @@ AT_DATA_GRAMMAR([input.y], %} %error-verbose +%right END 0 %left TK1 1 TK2 2 "tok alias" 3 %% -start: TK1 sr_conflict "tok alias" ; - +start: + TK1 sr_conflict "tok alias" + | start %prec END + ; sr_conflict: TK2 | TK2 "tok alias" @@ -1240,7 +1243,8 @@ main (void) ]]) AT_BISON_CHECK([[-o input.c input.y]], [[0]],, -[[input.y:24.5-19: warning: rule useless in parser due to conflicts: sr_conflict: TK2 "tok alias" +[[input.y:23.5-19: warning: rule useless in parser due to conflicts: start: start +input.y:27.5-19: warning: rule useless in parser due to conflicts: sr_conflict: TK2 "tok alias" ]]) AT_COMPILE([[input]]) AT_PARSER_CHECK([[./input]]) |