mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
(Option Cross Key): Likewise. * src/print-xml.c (print_core): Don't print a reduction's lookahead set next to an item whose dot is not at the end of the RHS even if it happens to be associated with the same rule. * src/print.c (print_core): Likewise. * tests/conflicts.at (Unresolved SR Conflicts): Update output. (Resolved SR Conflicts): Update output. * tests/regression.at (Extra lookahead sets in report): New test case.
This commit is contained in:
@@ -212,7 +212,7 @@ state 4
|
||||
|
||||
state 5
|
||||
|
||||
1 exp: exp . OP exp [$end, OP]
|
||||
1 exp: exp . OP exp
|
||||
1 | exp OP exp . [$end, OP]
|
||||
|
||||
OP shift, and go to state 4
|
||||
@@ -315,7 +315,7 @@ state 4
|
||||
|
||||
state 5
|
||||
|
||||
1 exp: exp . OP exp [$end, OP]
|
||||
1 exp: exp . OP exp
|
||||
1 | exp OP exp . [$end, OP]
|
||||
|
||||
$default reduce using rule 1 (exp)
|
||||
|
||||
@@ -1140,3 +1140,43 @@ start: 'a' "A" 'b';
|
||||
AT_CHECK([bison -t -o input.c input.y])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
|
||||
## -------------------------------- ##
|
||||
## Extra lookahead sets in report. ##
|
||||
## -------------------------------- ##
|
||||
|
||||
AT_SETUP([[Extra lookahead sets in report]])
|
||||
|
||||
# Within a single state, Bison used to print a reduction's lookahead set next
|
||||
# to all items of the associated rule. Instead, it should only print it next
|
||||
# to the item that is of the associated rule and whose dot is at the end of the
|
||||
# RHS. Printing it next to items whose dot is not at the end of the RHS is
|
||||
# sometimes redundant and, as in this test case, is sometimes incorrect.
|
||||
|
||||
AT_DATA([[input.y]],
|
||||
[[%%
|
||||
start: a | 'a' a 'a' ;
|
||||
a: 'a' ;
|
||||
]])
|
||||
|
||||
AT_CHECK([[bison --report=all input.y]])
|
||||
AT_CHECK([[sed -n '/^state 1$/,/^state 2$/p' input.output]], [[0]],
|
||||
[[state 1
|
||||
|
||||
2 start: 'a' . a 'a'
|
||||
3 a: . 'a'
|
||||
3 | 'a' . [$end]
|
||||
|
||||
'a' shift, and go to state 4
|
||||
|
||||
$default reduce using rule 3 (a)
|
||||
|
||||
a go to state 5
|
||||
|
||||
|
||||
state 2
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user