Mercurial > emacs
comparison etc/ETAGS.EBNF @ 46127:6225d6b17d2e
Back to the old explanation, which was more concise, with just the first
two lines changed.
author | Francesco Potortì <pot@gnu.org> |
---|---|
date | Tue, 02 Jul 2002 11:54:32 +0000 |
parents | 1d83bbd2ceec |
children | eeab5bdaffa2 |
comparison
equal
deleted
inserted
replaced
46126:1d83bbd2ceec | 46127:6225d6b17d2e |
---|---|
1 -*- indented-text -*- | |
2 | |
1 This file contains two sections: | 3 This file contains two sections: |
2 | 4 |
3 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 |
4 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 |
5 2) A discussion of tag names and implicit tag names | 7 2) A discussion of tag names and implicit tag names |
6 | 8 |
7 ======================= EBNF tag file description ======================= | 9 ======================= EBNF tag file description ======================= |
8 | 10 |
9 Productions created from current behaviour to aid extensions | 11 Productions created from current behaviour to aid extensions |
54 | 56 |
55 ==================== end of EBNF tag file description ==================== | 57 ==================== end of EBNF tag file description ==================== |
56 | 58 |
57 | 59 |
58 | 60 |
59 ======================== discussion on tag names ========================= | 61 ======================== discussion of tag names ========================= |
60 | 62 |
61 - What are tag names | 63 - What are tag names |
62 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 |
63 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 |
64 in the source file to find the tagged line. | 66 in the source file to find the tagged line. |
70 look for tags in the tags file, because when the tag name is present | 72 look for tags in the tags file, because when the tag name is present |
71 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 |
72 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". |
73 | 75 |
74 - Why implicit tag names are even better | 76 - Why implicit tag names are even better |
75 Often tag names are redundant; this happens when the name of a tag is an | 77 When a tag line has no name, but a name can be deduced from the pattern, |
76 easily guessable substring of the tag pattern. We define a set of rules | 78 we say that the tag line has an implicit tag name. etags.c uses |
77 to decide whether it is possible to deduce the tag name from the pattern, | 79 implicit tag names when possible, in order to reduce the number of |
78 and make an unnamed tag in those cases. The name deduced from the | 80 explicit tag names in a tags file, thus reducing the size of the tags |
79 pattern of an unnamed tag is the implicit name of that tag. The use of | 81 file. When the user looks for a tag, and Emacs founds no explicit tag |
80 implicit tag names reduces the size of the tags file. When the user | 82 names that match it, Emacs then tries to match the tag with an implicit |
81 looks for a tag, and Emacs founds no explicit tag names that match it, | 83 tag name. Such a match occurs when the tag matches a pattern, subject |
82 Emacs then tries to match the tag with an implicit tag name. Such a | 84 to the satisfaction of all the following four rules: |
83 match occurs when the tag matches a pattern, subject to the satisfaction | |
84 of all the following four rules: | |
85 | 85 |
86 NONAM=" \f\t\n\r()=,;"; | 86 NONAM=" \f\t\n\r()=,;"; |
87 1. the tag does not contain any of the characters in NONAM; | 87 1. the tag does not contain any of the characters in NONAM; |
88 2. the pattern contains the tag as either a rightmost, or rightmost | 88 2. the pattern contains the tag as either a rightmost, or rightmost |
89 but one character, substring; | 89 but one character, substring; |