Description of the tags file format.
[bpt/emacs.git] / etc / ETAGS.EBNF
CommitLineData
717a0a0d
FP
1EBNF (Extended Backus Normal Form) description of the format of the tags
2file created by etags.c and interpreted by etags.el
3Francesco Potorti` <pot@gnu.org> 2002
4================================================================
5
6FF ::= #x0c /* form feed */
7
8LF ::= #x0a /* line feed */
9
10PATTERM ::= #x80 /* pattern terminator */
11
12NAMTERM ::= #x01 /* name terminator */
13
14regchar ::= [^#x0a#x0c#x80] /* regular character */
15
16regstring ::= { regchar } /* regular string */
17
18unsint ::= [0-9] { [0-9] } /* non-negative integer */
19
20
21
22tagfile ::= { tagsection } /* a tags file */
23
24tagsection ::= FF LF ( includesec | regularsec ) LF
25
26includesec ::= filename ",include" [ LF fileprop ]
27
28regularsec ::= filename "," [ unsint ] [ LF fileprop ] { LF tag }
29
30filename ::= regchar regstring /* a file name */
31
32fileprop ::= PATTERM "(" regstring ")"
33
34tag ::= directtag | patterntag
35
36directtag ::= PATTERM realposition
37
38patterntag ::= pattern PATTERM [ tagname NAMTERM ] position
39
40pattern ::= regstring /* a tag pattern */
41
42tagname ::= regchar regstring /* a tag name */
43
44position ::= realposition | ","
45
46realposition ::= "," unsint | unsint "," | unsint "," unsint