mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
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:
@@ -1,6 +1,6 @@
|
||||
/* Keeping a unique copy of strings.
|
||||
|
||||
Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003, 2008, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -32,8 +32,8 @@ uniqstr uniqstr_new (char const *str);
|
||||
/* Two uniqstr values have the same value iff they are the same. */
|
||||
#define UNIQSTR_EQ(USTR1, USTR2) ((USTR1) == (USTR2))
|
||||
|
||||
/* Compare two uniqstr a la strlen: negative for <, nul for =, and
|
||||
positive for >. */
|
||||
/* Compare two uniqstr a la strcmp: negative for <, nul for =, and
|
||||
positive for >. Undefined order, relies on addresses. */
|
||||
#define UNIQSTR_CMP(USTR1, USTR2) ((USTR1) - (USTR2))
|
||||
|
||||
/*--------------------------------------.
|
||||
|
||||
Reference in New Issue
Block a user