mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
Normalize conflict related messages.
* src/complain.h, src/complain.c (warn, complain): New. * src/conflicts.c (conflicts_print): Use them. (conflict_report_yacc): New, extracted from... (conflicts_print): here. * tests/conflicts.at, tests/existing.at: Adjust.
This commit is contained in:
@@ -142,7 +142,7 @@ exp: exp OP exp | NUM;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c --report=all], 0, [],
|
||||
[input.y contains 1 shift/reduce conflict.
|
||||
[input.y: warning: 1 shift/reduce conflict
|
||||
])
|
||||
|
||||
# Check the contents of the report.
|
||||
@@ -371,7 +371,7 @@ id : '0';
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c --report=all], 0, [],
|
||||
[[input.y contains 1 reduce/reduce conflict.
|
||||
[[input.y: warning: 1 reduce/reduce conflict
|
||||
input.y:4.4-8: warning: rule never reduced because of conflicts: id: '0'
|
||||
]])
|
||||
|
||||
@@ -483,8 +483,8 @@ exp: exp OP exp | NUM;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c], 1, [],
|
||||
[input.y contains 1 shift/reduce conflict.
|
||||
expected 0 shift/reduce conflicts
|
||||
[input.y: warning: 1 shift/reduce conflict
|
||||
input.y: expected 0 shift/reduce conflicts
|
||||
])
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -520,7 +520,7 @@ exp: exp OP exp | NUM;
|
||||
]])
|
||||
|
||||
AT_CHECK([bison input.y -o input.c], 1, [],
|
||||
[input.y contains 1 shift/reduce conflict.
|
||||
expected 2 shift/reduce conflicts
|
||||
[input.y: warning: 1 shift/reduce conflict
|
||||
input.y: expected 2 shift/reduce conflicts
|
||||
])
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -1191,7 +1191,7 @@ ARGUMENT_LIST : EXPRESSION { mout(MENDSEP);
|
||||
# don't actually check the output. But SEGV is watching us, and
|
||||
# so might do dmalloc.
|
||||
AT_CHECK([[bison --verbose --defines input.y]], 0, [],
|
||||
[[input.y contains 78 shift/reduce conflicts and 10 reduce/reduce conflicts.
|
||||
[[input.y: warning: 78 shift/reduce conflicts and 10 reduce/reduce conflicts
|
||||
]])
|
||||
|
||||
AT_CHECK([[grep '^State.*contains' input.output]], 0,
|
||||
|
||||
Reference in New Issue
Block a user