* etags.c (C_stab_entry): New keywords for C++ namespace, bool,

explicit, mutable, typename.
This commit is contained in:
Francesco Potortì 1996-07-01 15:17:24 +00:00
parent 20626291f6
commit 901b219d7b

View file

@ -31,7 +31,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
* Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer. * Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer.
*/ */
char pot_etags_version[] = "@(#) pot revision number is 11.63"; char pot_etags_version[] = "@(#) pot revision number is 11.66";
#define TRUE 1 #define TRUE 1
#define FALSE 0 #define FALSE 0
@ -1498,7 +1498,7 @@ enum sym_type
}; };
/* Feed stuff between (but not including) %[ and %] lines to: /* Feed stuff between (but not including) %[ and %] lines to:
gperf -c -k1,3 -o -p -r -t gperf -c -k 1,3 -o -p -r -t
%[ %[
struct C_stab_entry { char *name; int c_ext; enum sym_type type; } struct C_stab_entry { char *name; int c_ext; enum sym_type type; }
%% %%
@ -1507,12 +1507,14 @@ struct C_stab_entry { char *name; int c_ext; enum sym_type type; }
@implementation,0, st_C_objimpl @implementation,0, st_C_objimpl
@end, 0, st_C_objend @end, 0, st_C_objend
class, C_PLPL, st_C_struct class, C_PLPL, st_C_struct
namespace, C_PLPL, st_C_struct
domain, C_STAR, st_C_struct domain, C_STAR, st_C_struct
union, 0, st_C_struct union, 0, st_C_struct
struct, 0, st_C_struct struct, 0, st_C_struct
enum, 0, st_C_enum enum, 0, st_C_enum
typedef, 0, st_C_typedef typedef, 0, st_C_typedef
define, 0, st_C_define define, 0, st_C_define
bool, C_PLPL, st_C_typespec
long, 0, st_C_typespec long, 0, st_C_typespec
short, 0, st_C_typespec short, 0, st_C_typespec
int, 0, st_C_typespec int, 0, st_C_typespec
@ -1527,6 +1529,9 @@ extern, 0, st_C_typespec
static, 0, st_C_typespec static, 0, st_C_typespec
const, 0, st_C_typespec const, 0, st_C_typespec
volatile, 0, st_C_typespec volatile, 0, st_C_typespec
explicit, C_PLPL, st_C_typespec
mutable, C_PLPL, st_C_typespec
typename, C_PLPL, st_C_typespec
# DEFUN used in emacs, the next three used in glibc (SYSCALL only for mach). # DEFUN used in emacs, the next three used in glibc (SYSCALL only for mach).
DEFUN, 0, st_C_gnumacro DEFUN, 0, st_C_gnumacro
SYSCALL, 0, st_C_gnumacro SYSCALL, 0, st_C_gnumacro
@ -1539,94 +1544,107 @@ PSEUDO, 0, st_C_gnumacro
%] %]
and replace lines between %< and %> with its output. */ and replace lines between %< and %> with its output. */
/*%<*/ /*%<*/
/* C code produced by gperf version 1.8.1 (K&R C version) */ /* C code produced by gperf version 2.1 (K&R C version) */
/* Command-line: gperf -c -k1,3 -o -p -r -t */ /* Command-line: gperf -c -k 1,3 -o -p -r -t */
struct C_stab_entry { char *name; int c_ext; enum sym_type type; }; struct C_stab_entry { char *name; int c_ext; enum sym_type type; };
#define MIN_WORD_LENGTH 3 #define MIN_WORD_LENGTH 3
#define MAX_WORD_LENGTH 15 #define MAX_WORD_LENGTH 15
#define MIN_HASH_VALUE 7 #define MIN_HASH_VALUE 34
#define MAX_HASH_VALUE 63 #define MAX_HASH_VALUE 121
/* /*
29 keywords 34 keywords
57 is the maximum key range 88 is the maximum key range
*/ */
static int static int
hash (str, len) hash (str, len)
register char *str; register char *str;
register int len; register unsigned int len;
{ {
static unsigned char hash_table[] = static unsigned char hash_table[] =
{ {
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
63, 63, 63, 63, 17, 63, 63, 63, 4, 14, 121, 121, 121, 121, 45, 121, 121, 121, 16, 19,
4, 63, 63, 63, 63, 63, 63, 63, 63, 63, 61, 121, 121, 121, 121, 121, 121, 121, 121, 121,
8, 63, 63, 0, 23, 63, 63, 63, 63, 63, 10, 121, 121, 20, 53, 121, 121, 121, 121, 121,
63, 63, 63, 63, 63, 63, 63, 28, 63, 28, 121, 121, 121, 121, 121, 121, 121, 41, 45, 22,
10, 31, 27, 18, 63, 6, 63, 63, 26, 1, 60, 47, 37, 28, 121, 55, 121, 121, 20, 14,
11, 2, 29, 63, 29, 16, 26, 13, 15, 63, 29, 30, 5, 121, 50, 59, 30, 54, 6, 121,
63, 63, 63, 63, 63, 63, 63, 63, 121, 121, 121, 121, 121, 121, 121, 121,
}; };
return len + hash_table[str[2]] + hash_table[str[0]]; return len + hash_table[str[2]] + hash_table[str[0]];
} }
struct C_stab_entry * struct C_stab_entry *
in_word_set (str, len) in_word_set (str, len)
register char *str; register char *str;
register int len; register unsigned int len;
{ {
static struct C_stab_entry wordlist[] = static struct C_stab_entry wordlist[] =
{ {
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"SYSCALL", 0, st_C_gnumacro}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"DEFUN", 0, st_C_gnumacro}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"",}, {"",}, {"",},
{"domain", C_STAR, st_C_struct},
{"",}, {"",}, {"",}, {"",}, {"",},
{"short", 0, st_C_typespec},
{"union", 0, st_C_struct},
{"void", 0, st_C_typespec},
{"",}, {"",},
{"PSEUDO", 0, st_C_gnumacro},
{"double", 0, st_C_typespec},
{"",}, {"",},
{"@end", 0, st_C_objend},
{"@implementation", 0, st_C_objimpl},
{"float", 0, st_C_typespec},
{"int", 0, st_C_typespec},
{"",},
{"unsigned", 0, st_C_typespec},
{"@interface", 0, st_C_objprot},
{"",},
{"signed", 0, st_C_typespec},
{"long", 0, st_C_typespec},
{"ENTRY", 0, st_C_gnumacro},
{"define", 0, st_C_define},
{"const", 0, st_C_typespec},
{"",}, {"",}, {"",},
{"enum", 0, st_C_enum},
{"volatile", 0, st_C_typespec}, {"volatile", 0, st_C_typespec},
{"static", 0, st_C_typespec}, {"PSEUDO", 0, st_C_gnumacro},
{"struct", 0, st_C_struct}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"",}, {"",}, {"",}, {"typedef", 0, st_C_typedef},
{"@protocol", 0, st_C_objprot}, {"typename", C_PLPL, st_C_typespec},
{"",}, {"",}, {"",}, {"",}, {"",},
{"auto", 0, st_C_typespec}, {"SYSCALL", 0, st_C_gnumacro},
{"",}, {"",}, {"",}, {"",},
{"mutable", C_PLPL, st_C_typespec},
{"namespace", C_PLPL, st_C_struct},
{"long", 0, st_C_typespec},
{"",}, {"",},
{"const", 0, st_C_typespec},
{"",}, {"",}, {"",},
{"explicit", C_PLPL, st_C_typespec},
{"",}, {"",}, {"",}, {"",},
{"void", 0, st_C_typespec},
{"",},
{"char", 0, st_C_typespec}, {"char", 0, st_C_typespec},
{"class", C_PLPL, st_C_struct}, {"class", C_PLPL, st_C_struct},
{"typedef", 0, st_C_typedef}, {"",}, {"",}, {"",},
{"float", 0, st_C_typespec},
{"",},
{"@implementation", 0, st_C_objimpl},
{"auto", 0, st_C_typespec},
{"",},
{"ENTRY", 0, st_C_gnumacro},
{"@end", 0, st_C_objend},
{"bool", C_PLPL, st_C_typespec},
{"domain", C_STAR, st_C_struct},
{"",},
{"DEFUN", 0, st_C_gnumacro},
{"extern", 0, st_C_typespec}, {"extern", 0, st_C_typespec},
{"@interface", 0, st_C_objprot},
{"",}, {"",}, {"",},
{"int", 0, st_C_typespec},
{"",}, {"",}, {"",}, {"",},
{"signed", 0, st_C_typespec},
{"short", 0, st_C_typespec},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"define", 0, st_C_define},
{"@protocol", 0, st_C_objprot},
{"enum", 0, st_C_enum},
{"static", 0, st_C_typespec},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"union", 0, st_C_struct},
{"struct", 0, st_C_struct},
{"",}, {"",}, {"",}, {"",},
{"double", 0, st_C_typespec},
{"unsigned", 0, st_C_typespec},
}; };
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)