diff options
| author | Francesco Potortì | 2002-08-27 16:13:12 +0000 |
|---|---|---|
| committer | Francesco Potortì | 2002-08-27 16:13:12 +0000 |
| commit | d62c4c32169da9f5ff2d5ae0e90bf2da38e61cf4 (patch) | |
| tree | 43e4aca72a864c05291924a33a0162a9e68c792e | |
| parent | 63b833de37ac71a351ce9b0b9ec610eb7af4332d (diff) | |
| download | emacs-d62c4c32169da9f5ff2d5ae0e90bf2da38e61cf4.tar.gz emacs-d62c4c32169da9f5ff2d5ae0e90bf2da38e61cf4.zip | |
Clarified per rms request.
| -rw-r--r-- | etc/ETAGS.EBNF | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/etc/ETAGS.EBNF b/etc/ETAGS.EBNF index 58a9e5196c6..f9bd0bbcf52 100644 --- a/etc/ETAGS.EBNF +++ b/etc/ETAGS.EBNF | |||
| @@ -3,10 +3,10 @@ | |||
| 3 | This file contains two sections: | 3 | This file contains two sections: |
| 4 | 4 | ||
| 5 | 1) An EBNF (Extended Backus Normal Form) description of the format of | 5 | 1) An EBNF (Extended Backus Normal Form) description of the format of |
| 6 | the tags file created by etags.c and interpreted by etags.el | 6 | the tags file created by etags.c and interpreted by etags.el; |
| 7 | 2) A discussion of tag names and implicit tag names | 7 | 2) A discussion of tag names and implicit tag names. |
| 8 | 8 | ||
| 9 | ======================= EBNF tag file description ======================= | 9 | ====================== 1) EBNF tag file description ===================== |
| 10 | 10 | ||
| 11 | Productions created from current behavior to aid extensions | 11 | Productions created from current behavior to aid extensions |
| 12 | Francesco Potorti` <pot@gnu.org> 2002 | 12 | Francesco Potorti` <pot@gnu.org> 2002 |
| @@ -58,14 +58,14 @@ realposition ::= "," unsint | unsint "," | unsint "," unsint | |||
| 58 | 58 | ||
| 59 | 59 | ||
| 60 | 60 | ||
| 61 | ======================== discussion of tag names ========================= | 61 | ======================= 2) discussion of tag names ======================= |
| 62 | 62 | ||
| 63 | - What are tag names | 63 | - WHAT ARE TAG NAMES |
| 64 | Tag lines in a tags file are usually made from the above defined pattern | 64 | Tag lines in a tags file are usually made from the above defined pattern |
| 65 | and by an optional tag name. The pattern is a string that is searched | 65 | and by an optional tag name. The pattern is a string that is searched |
| 66 | in the source file to find the tagged line. | 66 | in the source file to find the tagged line. |
| 67 | 67 | ||
| 68 | - Why tag names are good | 68 | - WHY TAG NAMES ARE GOOD |
| 69 | When a user looks for a tag, Emacs first compares the tag with the tag | 69 | When a user looks for a tag, Emacs first compares the tag with the tag |
| 70 | names contained in the tags file. If no match is found, Emacs compares | 70 | names contained in the tags file. If no match is found, Emacs compares |
| 71 | the tag with the patterns. The tag name is then the preferred way to | 71 | the tag with the patterns. The tag name is then the preferred way to |
| @@ -73,23 +73,18 @@ look for tags in the tags file, because when the tag name is present | |||
| 73 | Emacs can find a tag faster and more accurately. These tag names are | 73 | Emacs can find a tag faster and more accurately. These tag names are |
| 74 | part of tag lines in the tags file, so we call them "explicit". | 74 | part of tag lines in the tags file, so we call them "explicit". |
| 75 | 75 | ||
| 76 | - Why implicit tag names are even better | 76 | - WHY IMPLICIT TAG NAMES ARE EVEN BETTER |
| 77 | When a tag line has no name, but a name can be deduced from the pattern, | 77 | When a tag line has no name, but a name can be deduced from the pattern, |
| 78 | we say that the tag line has an implicit tag name. etags.c uses | 78 | we say that the tag line has an implicit tag name. Often tag names are |
| 79 | implicit tag names when possible, in order to reduce the number of | 79 | redundant; this happens when the name of a tag is an easily guessable |
| 80 | explicit tag names in a tags file, thus reducing the size of the tags | 80 | substring of the tag pattern. We define a set of rules to decide |
| 81 | file. When the user looks for a tag, and Emacs founds no explicit tag | 81 | whether it is possible to deduce the tag name from the pattern, and make |
| 82 | names that match it, Emacs then tries to match the tag with an implicit | 82 | an unnamed tag in those cases. The name deduced from the pattern of an |
| 83 | tag name. Such a match occurs when the tag matches a pattern, subject | 83 | unnamed tag is the implicit name of that tag. etags.c uses implicit tag |
| 84 | to the satisfaction of all the following four rules: | 84 | names when possible, in order to reduce the size of the tags file. |
| 85 | 85 | An implicit tag name is deduced from the pattern by discarding the | |
| 86 | NONAM=" \f\t\n\r()=,;"; | 86 | last character if it is one of ` \f\t\n\r()=,;', then taking all the |
| 87 | 1. the tag does not contain any of the characters in NONAM; | 87 | rightmost consecutive characters in the pattern which are not one of |
| 88 | 2. the pattern contains the tag as either a rightmost, or rightmost | 88 | those. |
| 89 | but one character, substring; | 89 | |
| 90 | 3. the character, if any, immediately before the tag in the pattern | 90 | ===================== end of discussion of tag names ===================== |
| 91 | must be a character in NONAM; | ||
| 92 | 4. the character, if any, immediately after the tag in the pattern | ||
| 93 | must also be a character in NONAM. | ||
| 94 | |||
| 95 | ===================== end of discussion on tag names ===================== | ||