diff options
| author | Francesco Potortì | 1996-07-01 15:17:24 +0000 |
|---|---|---|
| committer | Francesco Potortì | 1996-07-01 15:17:24 +0000 |
| commit | 901b219d7b84c2f7b9ff22571e00a61c1af03269 (patch) | |
| tree | 340f64f26e1bded4f7e52b93361839b4c34e498f /lib-src | |
| parent | 20626291f6e7f622ed279fccce7db6b49b013261 (diff) | |
| download | emacs-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.c | 132 |
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 | ||
| 34 | char pot_etags_version[] = "@(#) pot revision number is 11.63"; | 34 | char 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 | %[ |
| 1503 | struct C_stab_entry { char *name; int c_ext; enum sym_type type; } | 1503 | struct 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 |
| 1509 | class, C_PLPL, st_C_struct | 1509 | class, C_PLPL, st_C_struct |
| 1510 | namespace, C_PLPL, st_C_struct | ||
| 1510 | domain, C_STAR, st_C_struct | 1511 | domain, C_STAR, st_C_struct |
| 1511 | union, 0, st_C_struct | 1512 | union, 0, st_C_struct |
| 1512 | struct, 0, st_C_struct | 1513 | struct, 0, st_C_struct |
| 1513 | enum, 0, st_C_enum | 1514 | enum, 0, st_C_enum |
| 1514 | typedef, 0, st_C_typedef | 1515 | typedef, 0, st_C_typedef |
| 1515 | define, 0, st_C_define | 1516 | define, 0, st_C_define |
| 1517 | bool, C_PLPL, st_C_typespec | ||
| 1516 | long, 0, st_C_typespec | 1518 | long, 0, st_C_typespec |
| 1517 | short, 0, st_C_typespec | 1519 | short, 0, st_C_typespec |
| 1518 | int, 0, st_C_typespec | 1520 | int, 0, st_C_typespec |
| @@ -1527,6 +1529,9 @@ extern, 0, st_C_typespec | |||
| 1527 | static, 0, st_C_typespec | 1529 | static, 0, st_C_typespec |
| 1528 | const, 0, st_C_typespec | 1530 | const, 0, st_C_typespec |
| 1529 | volatile, 0, st_C_typespec | 1531 | volatile, 0, st_C_typespec |
| 1532 | explicit, C_PLPL, st_C_typespec | ||
| 1533 | mutable, C_PLPL, st_C_typespec | ||
| 1534 | typename, 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). |
| 1531 | DEFUN, 0, st_C_gnumacro | 1536 | DEFUN, 0, st_C_gnumacro |
| 1532 | SYSCALL, 0, st_C_gnumacro | 1537 | SYSCALL, 0, st_C_gnumacro |
| @@ -1539,94 +1544,107 @@ PSEUDO, 0, st_C_gnumacro | |||
| 1539 | %] | 1544 | %] |
| 1540 | and replace lines between %< and %> with its output. */ | 1545 | and 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 | ||
| 1546 | struct C_stab_entry { char *name; int c_ext; enum sym_type type; }; | 1551 | struct 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 | ||
| 1557 | static int | 1562 | static int |
| 1558 | hash (str, len) | 1563 | hash (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 | ||
| 1581 | struct C_stab_entry * | 1586 | struct C_stab_entry * |
| 1582 | in_word_set (str, len) | 1587 | in_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) |