aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorFrancesco Potortì1996-07-01 15:17:24 +0000
committerFrancesco Potortì1996-07-01 15:17:24 +0000
commit901b219d7b84c2f7b9ff22571e00a61c1af03269 (patch)
tree340f64f26e1bded4f7e52b93361839b4c34e498f /lib-src
parent20626291f6e7f622ed279fccce7db6b49b013261 (diff)
downloademacs-901b219d7b84c2f7b9ff22571e00a61c1af03269.tar.gz
emacs-901b219d7b84c2f7b9ff22571e00a61c1af03269.zip
* etags.c (C_stab_entry): New keywords for C++ namespace, bool,
explicit, mutable, typename.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c132
1 files changed, 75 insertions, 57 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index e2737a3e667..c9b5ddeb4d3 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -31,7 +31,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
31 * Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer. 31 * Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer.
32 */ 32 */
33 33
34char pot_etags_version[] = "@(#) pot revision number is 11.63"; 34char pot_etags_version[] = "@(#) pot revision number is 11.66";
35 35
36#define TRUE 1 36#define TRUE 1
37#define FALSE 0 37#define FALSE 0
@@ -1498,7 +1498,7 @@ enum sym_type
1498}; 1498};
1499 1499
1500/* Feed stuff between (but not including) %[ and %] lines to: 1500/* Feed stuff between (but not including) %[ and %] lines to:
1501 gperf -c -k1,3 -o -p -r -t 1501 gperf -c -k 1,3 -o -p -r -t
1502%[ 1502%[
1503struct C_stab_entry { char *name; int c_ext; enum sym_type type; } 1503struct C_stab_entry { char *name; int c_ext; enum sym_type type; }
1504%% 1504%%
@@ -1507,12 +1507,14 @@ struct C_stab_entry { char *name; int c_ext; enum sym_type type; }
1507@implementation,0, st_C_objimpl 1507@implementation,0, st_C_objimpl
1508@end, 0, st_C_objend 1508@end, 0, st_C_objend
1509class, C_PLPL, st_C_struct 1509class, C_PLPL, st_C_struct
1510namespace, C_PLPL, st_C_struct
1510domain, C_STAR, st_C_struct 1511domain, C_STAR, st_C_struct
1511union, 0, st_C_struct 1512union, 0, st_C_struct
1512struct, 0, st_C_struct 1513struct, 0, st_C_struct
1513enum, 0, st_C_enum 1514enum, 0, st_C_enum
1514typedef, 0, st_C_typedef 1515typedef, 0, st_C_typedef
1515define, 0, st_C_define 1516define, 0, st_C_define
1517bool, C_PLPL, st_C_typespec
1516long, 0, st_C_typespec 1518long, 0, st_C_typespec
1517short, 0, st_C_typespec 1519short, 0, st_C_typespec
1518int, 0, st_C_typespec 1520int, 0, st_C_typespec
@@ -1527,6 +1529,9 @@ extern, 0, st_C_typespec
1527static, 0, st_C_typespec 1529static, 0, st_C_typespec
1528const, 0, st_C_typespec 1530const, 0, st_C_typespec
1529volatile, 0, st_C_typespec 1531volatile, 0, st_C_typespec
1532explicit, C_PLPL, st_C_typespec
1533mutable, C_PLPL, st_C_typespec
1534typename, C_PLPL, st_C_typespec
1530# DEFUN used in emacs, the next three used in glibc (SYSCALL only for mach). 1535# DEFUN used in emacs, the next three used in glibc (SYSCALL only for mach).
1531DEFUN, 0, st_C_gnumacro 1536DEFUN, 0, st_C_gnumacro
1532SYSCALL, 0, st_C_gnumacro 1537SYSCALL, 0, st_C_gnumacro
@@ -1539,94 +1544,107 @@ PSEUDO, 0, st_C_gnumacro
1539%] 1544%]
1540and replace lines between %< and %> with its output. */ 1545and replace lines between %< and %> with its output. */
1541/*%<*/ 1546/*%<*/
1542/* C code produced by gperf version 1.8.1 (K&R C version) */ 1547/* C code produced by gperf version 2.1 (K&R C version) */
1543/* Command-line: gperf -c -k1,3 -o -p -r -t */ 1548/* Command-line: gperf -c -k 1,3 -o -p -r -t */
1544 1549
1545 1550
1546struct C_stab_entry { char *name; int c_ext; enum sym_type type; }; 1551struct C_stab_entry { char *name; int c_ext; enum sym_type type; };
1547 1552
1548#define MIN_WORD_LENGTH 3 1553#define MIN_WORD_LENGTH 3
1549#define MAX_WORD_LENGTH 15 1554#define MAX_WORD_LENGTH 15
1550#define MIN_HASH_VALUE 7 1555#define MIN_HASH_VALUE 34
1551#define MAX_HASH_VALUE 63 1556#define MAX_HASH_VALUE 121
1552/* 1557/*
1553 29 keywords 1558 34 keywords
1554 57 is the maximum key range 1559 88 is the maximum key range
1555*/ 1560*/
1556 1561
1557static int 1562static int
1558hash (str, len) 1563hash (str, len)
1559 register char *str; 1564 register char *str;
1560 register int len; 1565 register unsigned int len;
1561{ 1566{
1562 static unsigned char hash_table[] = 1567 static unsigned char hash_table[] =
1563 { 1568 {
1564 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 1569 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1565 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 1570 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1566 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 1571 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1567 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 1572 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1568 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 1573 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1569 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 1574 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1570 63, 63, 63, 63, 17, 63, 63, 63, 4, 14, 1575 121, 121, 121, 121, 45, 121, 121, 121, 16, 19,
1571 4, 63, 63, 63, 63, 63, 63, 63, 63, 63, 1576 61, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1572 8, 63, 63, 0, 23, 63, 63, 63, 63, 63, 1577 10, 121, 121, 20, 53, 121, 121, 121, 121, 121,
1573 63, 63, 63, 63, 63, 63, 63, 28, 63, 28, 1578 121, 121, 121, 121, 121, 121, 121, 41, 45, 22,
1574 10, 31, 27, 18, 63, 6, 63, 63, 26, 1, 1579 60, 47, 37, 28, 121, 55, 121, 121, 20, 14,
1575 11, 2, 29, 63, 29, 16, 26, 13, 15, 63, 1580 29, 30, 5, 121, 50, 59, 30, 54, 6, 121,
1576 63, 63, 63, 63, 63, 63, 63, 63, 1581 121, 121, 121, 121, 121, 121, 121, 121,
1577 }; 1582 };
1578 return len + hash_table[str[2]] + hash_table[str[0]]; 1583 return len + hash_table[str[2]] + hash_table[str[0]];
1579} 1584}
1580 1585
1581struct C_stab_entry * 1586struct C_stab_entry *
1582in_word_set (str, len) 1587in_word_set (str, len)
1583 register char *str; 1588 register char *str;
1584 register int len; 1589 register unsigned int len;
1585{ 1590{
1586 1591
1587 static struct C_stab_entry wordlist[] = 1592 static struct C_stab_entry wordlist[] =
1588 { 1593 {
1589 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 1594 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
1595 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
1596 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
1597 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
1598 {"volatile", 0, st_C_typespec},
1599 {"PSEUDO", 0, st_C_gnumacro},
1600 {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
1601 {"typedef", 0, st_C_typedef},
1602 {"typename", C_PLPL, st_C_typespec},
1603 {"",}, {"",}, {"",},
1590 {"SYSCALL", 0, st_C_gnumacro}, 1604 {"SYSCALL", 0, st_C_gnumacro},
1591 {"",}, {"",}, {"",}, {"",}, {"",}, 1605 {"",}, {"",}, {"",},
1592 {"DEFUN", 0, st_C_gnumacro}, 1606 {"mutable", C_PLPL, st_C_typespec},
1593 {"",}, {"",}, {"",}, 1607 {"namespace", C_PLPL, st_C_struct},
1594 {"domain", C_STAR, st_C_struct}, 1608 {"long", 0, st_C_typespec},
1595 {"",}, {"",}, {"",}, {"",}, {"",}, 1609 {"",}, {"",},
1596 {"short", 0, st_C_typespec}, 1610 {"const", 0, st_C_typespec},
1597 {"union", 0, st_C_struct}, 1611 {"",}, {"",}, {"",},
1612 {"explicit", C_PLPL, st_C_typespec},
1613 {"",}, {"",}, {"",}, {"",},
1598 {"void", 0, st_C_typespec}, 1614 {"void", 0, st_C_typespec},
1599 {"",}, {"",}, 1615 {"",},
1600 {"PSEUDO", 0, st_C_gnumacro}, 1616 {"char", 0, st_C_typespec},
1601 {"double", 0, st_C_typespec}, 1617 {"class", C_PLPL, st_C_struct},
1602 {"",}, {"",}, 1618 {"",}, {"",}, {"",},
1603 {"@end", 0, st_C_objend},
1604 {"@implementation", 0, st_C_objimpl},
1605 {"float", 0, st_C_typespec}, 1619 {"float", 0, st_C_typespec},
1606 {"int", 0, st_C_typespec}, 1620 {"",},
1607 {"",}, 1621 {"@implementation", 0, st_C_objimpl},
1608 {"unsigned", 0, st_C_typespec}, 1622 {"auto", 0, st_C_typespec},
1623 {"",},
1624 {"ENTRY", 0, st_C_gnumacro},
1625 {"@end", 0, st_C_objend},
1626 {"bool", C_PLPL, st_C_typespec},
1627 {"domain", C_STAR, st_C_struct},
1628 {"",},
1629 {"DEFUN", 0, st_C_gnumacro},
1630 {"extern", 0, st_C_typespec},
1609 {"@interface", 0, st_C_objprot}, 1631 {"@interface", 0, st_C_objprot},
1610 {"",}, 1632 {"",}, {"",}, {"",},
1633 {"int", 0, st_C_typespec},
1634 {"",}, {"",}, {"",}, {"",},
1611 {"signed", 0, st_C_typespec}, 1635 {"signed", 0, st_C_typespec},
1612 {"long", 0, st_C_typespec}, 1636 {"short", 0, st_C_typespec},
1613 {"ENTRY", 0, st_C_gnumacro}, 1637 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
1614 {"define", 0, st_C_define}, 1638 {"define", 0, st_C_define},
1615 {"const", 0, st_C_typespec}, 1639 {"@protocol", 0, st_C_objprot},
1616 {"",}, {"",}, {"",},
1617 {"enum", 0, st_C_enum}, 1640 {"enum", 0, st_C_enum},
1618 {"volatile", 0, st_C_typespec},
1619 {"static", 0, st_C_typespec}, 1641 {"static", 0, st_C_typespec},
1642 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
1643 {"union", 0, st_C_struct},
1620 {"struct", 0, st_C_struct}, 1644 {"struct", 0, st_C_struct},
1621 {"",}, {"",}, {"",}, 1645 {"",}, {"",}, {"",}, {"",},
1622 {"@protocol", 0, st_C_objprot}, 1646 {"double", 0, st_C_typespec},
1623 {"",}, {"",}, 1647 {"unsigned", 0, st_C_typespec},
1624 {"auto", 0, st_C_typespec},
1625 {"",},
1626 {"char", 0, st_C_typespec},
1627 {"class", C_PLPL, st_C_struct},
1628 {"typedef", 0, st_C_typedef},
1629 {"extern", 0, st_C_typespec},
1630 }; 1648 };
1631 1649
1632 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) 1650 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)