aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Potortì2002-08-27 16:13:12 +0000
committerFrancesco Potortì2002-08-27 16:13:12 +0000
commitd62c4c32169da9f5ff2d5ae0e90bf2da38e61cf4 (patch)
tree43e4aca72a864c05291924a33a0162a9e68c792e
parent63b833de37ac71a351ce9b0b9ec610eb7af4332d (diff)
downloademacs-d62c4c32169da9f5ff2d5ae0e90bf2da38e61cf4.tar.gz
emacs-d62c4c32169da9f5ff2d5ae0e90bf2da38e61cf4.zip
Clarified per rms request.
-rw-r--r--etc/ETAGS.EBNF45
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 @@
3This file contains two sections: 3This file contains two sections:
4 4
51) An EBNF (Extended Backus Normal Form) description of the format of 51) 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;
72) A discussion of tag names and implicit tag names 72) A discussion of tag names and implicit tag names.
8 8
9======================= EBNF tag file description ======================= 9====================== 1) EBNF tag file description =====================
10 10
11Productions created from current behavior to aid extensions 11Productions created from current behavior to aid extensions
12Francesco Potorti` <pot@gnu.org> 2002 12Francesco 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
64Tag lines in a tags file are usually made from the above defined pattern 64Tag lines in a tags file are usually made from the above defined pattern
65and by an optional tag name. The pattern is a string that is searched 65and by an optional tag name. The pattern is a string that is searched
66in the source file to find the tagged line. 66in the source file to find the tagged line.
67 67
68- Why tag names are good 68- WHY TAG NAMES ARE GOOD
69When a user looks for a tag, Emacs first compares the tag with the tag 69When a user looks for a tag, Emacs first compares the tag with the tag
70names contained in the tags file. If no match is found, Emacs compares 70names contained in the tags file. If no match is found, Emacs compares
71the tag with the patterns. The tag name is then the preferred way to 71the 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
73Emacs can find a tag faster and more accurately. These tag names are 73Emacs can find a tag faster and more accurately. These tag names are
74part of tag lines in the tags file, so we call them "explicit". 74part 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
77When a tag line has no name, but a name can be deduced from the pattern, 77When a tag line has no name, but a name can be deduced from the pattern,
78we say that the tag line has an implicit tag name. etags.c uses 78we say that the tag line has an implicit tag name. Often tag names are
79implicit tag names when possible, in order to reduce the number of 79redundant; this happens when the name of a tag is an easily guessable
80explicit tag names in a tags file, thus reducing the size of the tags 80substring of the tag pattern. We define a set of rules to decide
81file. When the user looks for a tag, and Emacs founds no explicit tag 81whether it is possible to deduce the tag name from the pattern, and make
82names that match it, Emacs then tries to match the tag with an implicit 82an unnamed tag in those cases. The name deduced from the pattern of an
83tag name. Such a match occurs when the tag matches a pattern, subject 83unnamed tag is the implicit name of that tag. etags.c uses implicit tag
84to the satisfaction of all the following four rules: 84names 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()=,;"; 86last 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; 87rightmost consecutive characters in the pattern which are not one of
88 2. the pattern contains the tag as either a rightmost, or rightmost 88those.
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 =====================