diff options
| author | Gerd Moellmann | 2000-07-03 07:50:42 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-07-03 07:50:42 +0000 |
| commit | 2faf048a41e463385a5d7202d3aa7707fbacb525 (patch) | |
| tree | 4c5f22624ec2d305a910b8754ec75114631c56cd /lib-src | |
| parent | bd38a99868eadd096847536ae8ba3016f14463e0 (diff) | |
| download | emacs-2faf048a41e463385a5d7202d3aa7707fbacb525.tar.gz emacs-2faf048a41e463385a5d7202d3aa7707fbacb525.zip | |
(token_string): Add missing tokens.
(parm_list): Handle case of qualified pointers.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ebrowse.c | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 0099641d2f5..8ebe5ff8991 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c | |||
| @@ -2075,13 +2075,33 @@ token_string (t) | |||
| 2075 | case VOID: return "void"; | 2075 | case VOID: return "void"; |
| 2076 | case VOLATILE: return "volatile"; | 2076 | case VOLATILE: return "volatile"; |
| 2077 | case WHILE: return "while"; | 2077 | case WHILE: return "while"; |
| 2078 | case MUTABLE: return "mutable"; | ||
| 2079 | case BOOL: return "bool"; | ||
| 2080 | case TRUE: return "true"; | ||
| 2081 | case FALSE: return "false"; | ||
| 2082 | case SIGNATURE: return "signature"; | ||
| 2083 | case NAMESPACE: return "namespace"; | ||
| 2084 | case EXPLICIT: return "explicit"; | ||
| 2085 | case TYPENAME: return "typename"; | ||
| 2086 | case CONST_CAST: return "const_cast"; | ||
| 2087 | case DYNAMIC_CAST: return "dynamic_cast"; | ||
| 2088 | case REINTERPRET_CAST: return "reinterpret_cast"; | ||
| 2089 | case STATIC_CAST: return "static_cast"; | ||
| 2090 | case TYPEID: return "typeid"; | ||
| 2091 | case USING: return "using"; | ||
| 2092 | case WCHAR: return "wchar_t"; | ||
| 2078 | case YYEOF: return "EOF"; | 2093 | case YYEOF: return "EOF"; |
| 2079 | } | ||
| 2080 | 2094 | ||
| 2081 | assert (t < 255); | 2095 | default: |
| 2082 | b[0] = t; | 2096 | if (t < 255) |
| 2083 | b[1] = '\0'; | 2097 | { |
| 2084 | return b; | 2098 | b[0] = t; |
| 2099 | b[1] = '\0'; | ||
| 2100 | return b; | ||
| 2101 | } | ||
| 2102 | else | ||
| 2103 | return "???"; | ||
| 2104 | } | ||
| 2085 | } | 2105 | } |
| 2086 | 2106 | ||
| 2087 | 2107 | ||
| @@ -2375,14 +2395,18 @@ parm_list (flags) | |||
| 2375 | case IDENT: | 2395 | case IDENT: |
| 2376 | if (!type_seen) | 2396 | if (!type_seen) |
| 2377 | { | 2397 | { |
| 2378 | char *s; | 2398 | char *last_id; |
| 2379 | unsigned ident_type_hash = 0; | 2399 | unsigned ident_type_hash = 0; |
| 2380 | 2400 | ||
| 2381 | parse_qualified_param_ident_or_type (&s); | 2401 | parse_qualified_param_ident_or_type (&last_id); |
| 2382 | for (; *s; ++s) | 2402 | if (last_id) |
| 2383 | ident_type_hash = (ident_type_hash << 1) ^ *s; | 2403 | { |
| 2384 | hash = (hash << 1) ^ ident_type_hash; | 2404 | /* LAST_ID null means something like `X::*'. */ |
| 2385 | type_seen = 1; | 2405 | for (; *last_id; ++last_id) |
| 2406 | ident_type_hash = (ident_type_hash << 1) ^ *last_id; | ||
| 2407 | hash = (hash << 1) ^ ident_type_hash; | ||
| 2408 | type_seen = 1; | ||
| 2409 | } | ||
| 2386 | } | 2410 | } |
| 2387 | else | 2411 | else |
| 2388 | MATCH (); | 2412 | MATCH (); |
| @@ -2904,7 +2928,7 @@ parse_qualified_param_ident_or_type (last_id) | |||
| 2904 | struct sym *cls = NULL; | 2928 | struct sym *cls = NULL; |
| 2905 | static char *id = NULL; | 2929 | static char *id = NULL; |
| 2906 | static int id_size = 0; | 2930 | static int id_size = 0; |
| 2907 | 2931 | ||
| 2908 | while (LOOKING_AT (IDENT)) | 2932 | while (LOOKING_AT (IDENT)) |
| 2909 | { | 2933 | { |
| 2910 | int len = strlen (yytext) + 1; | 2934 | int len = strlen (yytext) + 1; |