deterministic user-token-number redeclaration errors.

Address nondeterminism reported by Joel E. Denny.
http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html

	* src/uniqstr.h: Comment changes.
	* src/location.h (boundary_cmp, location_cmp): New.
	* src/symtab.c (user_token_number_redeclaration): New.
	(symbol_translation): Use it.
	* tests/input.at (Numbered tokens): Adjust the expected output.
This commit is contained in:
Akim Demaille
2009-06-03 23:15:38 +02:00
parent ed15d907c5
commit 95d176ffd9
5 changed files with 69 additions and 7 deletions

View File

@@ -691,8 +691,10 @@ start: HEXADECIMAL_1 HEXADECIMAL_2
]])
AT_BISON_CHECK([input.y], [1], [],
[[input.y:12.12-20: tokens HEXADECIMAL_2 and DECIMAL_2 both assigned number 16702650
input.y:9.8-20: tokens DECIMAL_1 and HEXADECIMAL_1 both assigned number 11259375
[[input.y:10.12-20: user token number 11259375 redeclaration for DECIMAL_1
input.y:9.8-20: previous declaration for HEXADECIMAL_1
input.y:12.12-20: user token number 16702650 redeclaration for DECIMAL_2
input.y:11.8-20: previous declaration for HEXADECIMAL_2
]])
AT_DATA_GRAMMAR([input.y],