mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
Classify symbols by type-name.
* src/uniqstr.h (UNIQSTR_CMP): New. * src/output.c (symbol_type_name_cmp, symbols_by_type_name) (type_names_output): New. (muscles_output): Use it. * data/lalr1.cc (b4_symbol_action_): Remove. (b4_symbol_case_, b4_type_action_): New. Adjust uses of b4_symbol_action_ to use b4_type_action_.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* Keeping a unique copy of strings.
|
||||
|
||||
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -32,6 +32,10 @@ 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 >. */
|
||||
#define UNIQSTR_CMP(USTR1, USTR2) ((USTR1) - (USTR2))
|
||||
|
||||
/*--------------------------------------.
|
||||
| Initializing, destroying, debugging. |
|
||||
`--------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user