0
|
1 .\" Copyright (c) 1992 Free Software Foundation
|
|
2 .\" See section COPYING for conditions for redistribution
|
|
3 .TH etags 1 "19apr1994" "GNU Tools" "GNU Tools"
|
|
4 .de BP
|
|
5 .sp
|
|
6 .ti -.2i
|
|
7 \(**
|
|
8 ..
|
|
9
|
|
10 .SH NAME
|
70
|
11 etags, ctags \- generate tag file for Emacs, vi
|
0
|
12 .SH SYNOPSIS
|
|
13 .hy 0
|
|
14 .na
|
|
15 .B etags [\|\-aCDRSVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|] [\|\-i \fIregexp\fP\|] [\|\-o \fItagfile\fP\|]
|
|
16 .br
|
|
17 [\|\-\-c++\|] [\|\-\-no\-defines\|] [\|\-\-ignore\-indentation\|]
|
|
18 [\|\-\-language=\fIlanguage\fP\|] [\|\-\-regex=\fIregexp\fP\|]
|
|
19 [\|\-\-no\-regexp\|] [\|\-\-help\|] [\|\-\-version\|]
|
|
20 [\|\-\-include=\fIfile\fP\|] [\|\-\-output=\fItagfile\fP\|]
|
|
21 [\|\-\-append\|] \fIfile\fP .\|.\|.
|
|
22
|
|
23 .B ctags [\|\-aCdRSVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|]
|
|
24 .br
|
|
25 [\|\-i \fIregexp\fP\|] [\|\-o \fItagfile\fP\|]
|
|
26 [\|\-\-c++\|] [\|\-\-defines\|] [\|\-\-ignore\-indentation\|]
|
|
27 [\|\-\-no\-warn\|] [\|\-\-cxref\|] [\|\-\-backward\-search\|]
|
|
28 [\|\-\-forward\-search\|] [\|\-\-typedefs\|] [\|\-\-typedefs\-and\-c++\|]
|
|
29 [\|\-\-language=\fIlanguage\fP\|] [\|\-\-regex=\fIregexp\fP\|]
|
|
30 [\|\-\-help\|] [\|\-\-version\|]
|
|
31 .br
|
|
32 [\|\-\-output=\fItagfile\fP\|] [\|\-\-append\|] [\|\-\-update\|] \fIfile\fP .\|.\|.
|
355
|
33
|
|
34 .B ootags [\|\-aCDRSVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|] [\|\-i \fIregexp\fP\|] [\|\-o \fItagfile\fP\|]
|
|
35 .br
|
|
36 [\|\-\-c++\|] [\|\-\-no\-defines\|] [\|\-\-ignore\-indentation\|]
|
|
37 [\|\-\-language=\fIlanguage\fP\|] [\|\-\-regex=\fIregexp\fP\|]
|
|
38 [\|\-\-no\-regexp\|] [\|\-\-help\|] [\|\-\-version\|]
|
|
39 [\|\-\-include=\fIfile\fP\|] [\|\-\-output=\fItagfile\fP\|]
|
|
40 [\|\-\-append\|] \fIfile\fP .\|.\|.
|
|
41
|
0
|
42 .ad b
|
|
43 .hy 1
|
|
44 .SH DESCRIPTION
|
|
45 The `\|\fBetags\fP\|' program is used to create a tag table file, in a format
|
70
|
46 understood by
|
0
|
47 .BR emacs ( 1 )\c
|
|
48 \&; the `\|\fBctags\fP\|' program is used to create a similar table in a
|
|
49 format understood by
|
355
|
50 .BR vi ( 1 )\c; the `\|\fBootags\fP\|' program is used to create a
|
|
51 similar table used by the Altrasoft OO Browser (This manpage may be
|
|
52 innacurate in regards to ootags).
|
0
|
53 \&. Both forms of the program understand
|
155
|
54 the syntax of C, Objective C, C++, Java, Fortran, Pascal, Cobol,
|
|
55 LaTeX, Scheme, Emacs Lisp/Common Lisp, Postscript, Erlang, Prolog and
|
153
|
56 most assembler\-like syntaxes.
|
0
|
57 Both forms read the files specified on the command line, and write a tag
|
|
58 table (defaults: `\|TAGS\|' for \fBetags\fP, `\|tags\|' for
|
70
|
59 \fBctags\fP) in the current working directory.
|
|
60 Files specified with relative file names will be recorded in the tag
|
|
61 table with file names relative to the directory where the tag table
|
|
62 resides. Files specified with absolute file names will be recorded
|
|
63 with absolute file names.
|
0
|
64 The programs recognize the language used in an input file based on its
|
|
65 file name and contents. The --language switch can be used to force
|
|
66 parsing of the file names following the switch according to the given
|
|
67 language, overriding guesses based on filename extensions.
|
|
68 .SH OPTIONS
|
|
69 Some options make sense only for the \fBvi\fP style tag files produced
|
|
70 by ctags;
|
|
71 \fBetags\fP does not recognize them.
|
|
72 The programs accept unambiguous abbreviations for long option names.
|
|
73 .TP
|
|
74 .B \-a, \-\-append
|
|
75 Append to existing tag file. (For vi-format tag files, see also
|
|
76 \fB\-\-update\fP.)
|
|
77 .TP
|
|
78 .B \-B, \-\-backward\-search
|
|
79 Tag files written in the format expected by \fBvi\fP contain regular
|
|
80 expression search instructions; the \fB\-B\fP option writes them using
|
|
81 the delimiter `\|\fB?\fP\|', to search \fIbackwards\fP through files.
|
|
82 The default is to use the delimiter `\|\fB/\fP\|', to search \fIforwards\fP
|
|
83 through files.
|
|
84 Only \fBctags\fP accepts this option.
|
|
85 .TP
|
|
86 .B \-C, \-\-c++
|
|
87 Treat files with `\|.c\|' and `\|.h\|' extensions as C++ code, not C
|
|
88 code. Files with `\|.C\|', `\|.H\|', `\|.cxx\|', `\|.hxx\|', or
|
|
89 `\|.cc\|' extensions are always assumed to be C++ code.
|
|
90 .TP
|
|
91 .B \-d, \-\-defines
|
70
|
92 Create tag entries for C preprocessor constant definitions
|
|
93 and enum constants, too. This is the
|
0
|
94 default behavior for \fBetags\fP, so this option is only accepted
|
|
95 by \fBctags\fP.
|
|
96 .TP
|
|
97 .B \-D, \-\-no\-defines
|
70
|
98 Do not create tag entries for C preprocessor constant definitions
|
|
99 and enum constants.
|
0
|
100 This may make the tags file much smaller if many header files are tagged.
|
|
101 This is the default behavior for \fBctags\fP, so this option is only
|
|
102 accepted by \fBetags\fP.
|
|
103 .TP
|
|
104 \fB\-l\fP \fIlanguage\fP, \fB\-\-language=\fIlanguage\fP
|
|
105 Parse the following files according to the given language. More than
|
|
106 one such options may be intermixed with filenames. Use \fB\-\-help\fP
|
|
107 to get a list of the available languages and their default filename
|
|
108 extensions. The `auto' language can be used to restore automatic
|
|
109 detection of language based on filename extension. The `none'
|
|
110 language may be used to disable language parsing altogether; only
|
|
111 regexp matching is done in this case (see the \fB\-\-regex\fP option).
|
|
112 .TP
|
155
|
113 \fB\-\-no_globals\fP
|
|
114 Do not tag global variables in C, C++, Objective C, Java. Typically
|
|
115 this reduces the file size by one fourth.
|
|
116 .TP
|
|
117 \fB\-\-members\fP
|
|
118 Tag variables that are members of strucure-like constructs in C++,
|
|
119 Objective C, Java.
|
|
120 .TP
|
0
|
121 \fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP
|
|
122 Explicit name of file for tag table; overrides default `\|TAGS\|' or
|
|
123 `\|tags\|'. (But ignored with \fB\-v\fP or \fB\-x\fP.)
|
|
124 .TP
|
|
125 \fB\-r\fP \fIregexp\fP, \fB\-\-regex=\fIregexp\fP
|
|
126 Make tags based on regexp matching for each line of the files
|
|
127 following this option, in addition to the tags made with the standard
|
|
128 parsing based on language. May be freely intermixed with filenames
|
|
129 and the \fB\-R\fP option. The regexps are cumulative, i.e. each
|
|
130 option will add to the previous ones. The regexps are of the form:
|
70
|
131 .br
|
0
|
132
|
|
133 \fB/\fP\fItagregexp\fP[\fB/\fP\fInameregexp\fP]\fB/\fP
|
|
134 .br
|
|
135
|
|
136 where \fItagregexp\fP is used to match the lines that must be tagged.
|
|
137 It should not match useless characters. If the match is
|
|
138 such that more characters than needed are unavoidably matched by
|
|
139 \fItagregexp\fP, it may be useful to add a \fInameregexp\fP, to
|
70
|
140 narrow down the tag scope. \fBctags\fP ignores regexps without a
|
153
|
141 \fInameregexp\fP. The syntax of regexps is the same as in emacs,
|
|
142 augmented with intervals of the form \\{m,n\\}, as id ed or grep.
|
0
|
143 .br
|
|
144 Here are some examples. All the regexps are quoted to protect them
|
|
145 from shell interpretation.
|
|
146 .br
|
|
147
|
|
148 Tag the DEFVAR macros in the emacs source files:
|
|
149 .br
|
|
150 \fI\-\-regex\='/[ \\t]*DEFVAR_[A-Z_ \\t(]+"\\([^"]+\\)"\/'\fP
|
|
151 .br
|
|
152
|
|
153 Tag VHDL files (this example is a single long line, broken here for
|
|
154 formatting reasons):
|
|
155 .br
|
|
156 \fI\-\-language\=none\ \-\-regex='/[\ \\t]*\\(ARCHITECTURE\\|\\
|
|
157 CONFIGURATION\\)\ +[^\ ]*\ +OF/'\ \-\-regex\='/[\ \\t]*\\
|
|
158 \\(ATTRIBUTE\\|ENTITY\\|FUNCTION\\|PACKAGE\\(\ BODY\\)?\\
|
|
159 \\|PROCEDURE\\|PROCESS\\|TYPE\\)[\ \\t]+\\([^\ \\t(]+\\)/\\3/'\fP
|
|
160 .br
|
|
161
|
|
162 Tag TCL files (this last example shows the usage of a \fItagregexp\fP):
|
|
163 .br
|
|
164 \fI\-\-lang\=none \-\-regex\='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP
|
|
165
|
|
166 .TP
|
|
167 .B \-R, \-\-no\-regex
|
|
168 Don't do any more regexp matching on the following files. May be
|
|
169 freely intermixed with filenames and the \fB\-\-regex\fP option.
|
|
170 .TP
|
|
171 .B \-S, \-\-ignore\-indentation
|
|
172 Don't rely on indentation as much as we normally do. Currently, this
|
|
173 means not to assume that a closing brace in the first column is the
|
|
174 final brace of a function or structure definition in C and C++.
|
|
175 .TP
|
|
176 .B \-t, \-\-typedefs
|
|
177 Record typedefs in C code as tags. Since this is the default behaviour
|
|
178 of \fBetags\fP, only \fBctags\fP accepts this option.
|
|
179 .TP
|
|
180 .B \-T, \-\-typedefs\-and\-c++
|
|
181 Generate tag entries for typedefs, struct, enum, and union tags, and
|
|
182 C++ member functions. Since this is the default behaviour
|
|
183 of \fBetags\fP, only \fBctags\fP accepts this option.
|
|
184 .TP
|
|
185 .B \-u, \-\-update
|
|
186 Update tag entries for \fIfiles\fP specified on command line, leaving
|
|
187 tag entries for other files in place. Currently, this is implemented
|
|
188 by deleting the existing entries for the given files and then
|
|
189 rewriting the new entries at the end of the tags file. It is often
|
|
190 faster to simply rebuild the entire tag file than to use this.
|
|
191 Only \fBctags\fP accepts this option.
|
|
192 .TP
|
|
193 .B \-v, \-\-vgrind
|
|
194 Instead of generating a tag file, write index (in \fBvgrind\fP format)
|
|
195 to standard output. Only \fBctags\fP accepts this option.
|
|
196 .TP
|
|
197 .B \-w, \-\-no\-warn
|
|
198 Suppress warning messages about duplicate entries. The \fBetags\fP
|
|
199 program does not check for duplicate entries, so this option is not
|
|
200 allowed with it.
|
|
201 .TP
|
|
202 .B \-x, \-\-cxref
|
|
203 Instead of generating a tag file, write a cross reference (in
|
|
204 \fBcxref\fP format) to standard output. Only \fBctags\fP accepts this option.
|
|
205 .TP
|
|
206 .B \-H, \-\-help
|
|
207 Print usage information.
|
|
208 .TP
|
|
209 .B \-V, \-\-version
|
|
210 Print the current version of the program (same as the version of the
|
|
211 emacs \fBetags\fP is shipped with).
|
|
212
|
|
213 .SH "SEE ALSO"
|
|
214 `\|\fBemacs\fP\|' entry in \fBinfo\fP; \fIGNU Emacs Manual\fP, Richard
|
70
|
215 Stallman.
|
0
|
216 .br
|
|
217 .BR cxref ( 1 ),
|
|
218 .BR emacs ( 1 ),
|
|
219 .BR vgrind ( 1 ),
|
|
220 .BR vi ( 1 ).
|
|
221
|
|
222 .SH COPYING
|
|
223 Copyright (c) 1992 Free Software Foundation, Inc.
|
|
224 .PP
|
|
225 Permission is granted to make and distribute verbatim copies of
|
|
226 this manual provided the copyright notice and this permission notice
|
|
227 are preserved on all copies.
|
|
228 .PP
|
|
229 Permission is granted to copy and distribute modified versions of this
|
|
230 manual under the conditions for verbatim copying, provided that the
|
|
231 entire resulting derived work is distributed under the terms of a
|
|
232 permission notice identical to this one.
|
|
233 .PP
|
|
234 Permission is granted to copy and distribute translations of this
|
|
235 manual into another language, under the above conditions for modified
|
|
236 versions, except that this permission notice may be included in
|
|
237 translations approved by the Free Software Foundation instead of in
|
|
238 the original English.
|