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:
Akim Demaille
2008-08-12 22:46:36 +02:00
parent d69c9694a7
commit 4c3cc7da5d
4 changed files with 97 additions and 12 deletions

View File

@@ -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. |
`--------------------------------------*/