X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/fec5f3c0cc2c50a779dafb928fda105c1782446b..0d40b36417759153678ed0ad125bc912884f602d:/tests/reduce.at diff --git a/tests/reduce.at b/tests/reduce.at index c5e4fda1..c28635eb 100644 --- a/tests/reduce.at +++ b/tests/reduce.at @@ -1,6 +1,6 @@ # Exercising Bison Grammar Reduction. -*- Autotest -*- -# Copyright (C) 2001-2002, 2007-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2002, 2007-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -933,7 +933,7 @@ S: 'a' A 'a' A: 'a' 'a' B ; B: 'a' - | %prec 'a' + | %empty %prec 'a' ; c: 'a' 'a' 'b' | A @@ -1057,7 +1057,7 @@ State 12 4 A: 'a' 'a' . B 5 B: . 'a' - 6 | . ]AT_COND_CASE([[LALR]], [[['a', 'b']]], [[['a']]])[ + 6 | . %empty ]AT_COND_CASE([[LALR]], [[['a', 'b']]], [[['a']]])[ ]AT_COND_CASE([[canonical LR]], [['a']], [[$default]])[ reduce using rule 6 (B) @@ -1087,7 +1087,7 @@ State 15 4 A: 'a' 'a' . B 5 B: . 'a' - 6 | . [$end] + 6 | . %empty [$end] 7 c: 'a' 'a' . 'b' 'a' shift, and go to state ]AT_COND_CASE([[canonical LR]], [[20]], @@ -1150,7 +1150,7 @@ State 22]])[ 4 A: 'a' 'a' . B 5 B: . 'a' - 6 | . ['b'] + 6 | . %empty ['b'] 'a' shift, and go to state ]AT_COND_CASE([[canonical LR]], [[23]], [[16]])[ @@ -1533,8 +1533,8 @@ a: 'a' ; and multiple reductions. The first reduction has more lookaheads than the second, so the first should always be preferred as the default reduction if enabled. The second reduction has one lookahead. */ -b: ; -c: ; +b: %empty; +c: %empty; ]], dnl Visit each state mentioned above. [['a', 'a']], @@ -1575,8 +1575,8 @@ State 3 1 start: a . b 2 | a . b 'a' 3 | a . c 'b' - 5 b: . [$end, 'a'] - 6 c: . ['b']]AT_COND_CASE([[most]], [[ + 5 b: . %empty [$end, 'a'] + 6 c: . %empty ['b']]AT_COND_CASE([[most]], [[ 'b' reduce using rule 6 (c) $default reduce using rule 5 (b)]], [[