ETAGS.EBNF 1.29 KB
Newer Older
1 2
EBNF (Extended Backus Normal Form) description of the format of the tags
file created by etags.c and interpreted by etags.el
Francesco Potortì's avatar
Francesco Potortì committed
3 4

Productions created from current behaviour to aid extensions
5 6 7
Francesco Potorti` <pot@gnu.org> 2002
================================================================

Francesco Potortì's avatar
Francesco Potortì committed
8
FF ::= #x0c				   /* tag section starter */
9

Francesco Potortì's avatar
Francesco Potortì committed
10
LF ::= #x0a				   /* line terminator */
11

Francesco Potortì's avatar
Francesco Potortì committed
12
DEL ::= #x7f				   /* pattern terminator */
13

Francesco Potortì's avatar
Francesco Potortì committed
14
SOH ::= #x01				   /* name terminator */
15

Francesco Potortì's avatar
Francesco Potortì committed
16
regchar ::= [^#x0a#x0c#x7f]		   /* regular character */
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

regstring ::= { regchar }		   /* regular string */

unsint ::= [0-9] { [0-9] }		   /* non-negative integer */



tagfile ::= { tagsection }		   /* a tags file */

tagsection ::= FF LF ( includesec | regularsec ) LF

includesec ::= filename ",include" [ LF fileprop ]

regularsec ::= filename "," [ unsint ] [ LF fileprop ] { LF tag }

filename ::= regchar regstring		   /* a file name */

Francesco Potortì's avatar
Francesco Potortì committed
34
fileprop ::= "(" regstring ")"		   /* an elisp alist */
35 36 37

tag ::= directtag | patterntag

Francesco Potortì's avatar
Francesco Potortì committed
38
directtag ::= DEL realposition		   /* no pattern */
39

Francesco Potortì's avatar
Francesco Potortì committed
40
patterntag ::= pattern DEL [ tagname SOH ] position
41 42 43 44 45

pattern ::= regstring			   /* a tag pattern */

tagname ::= regchar regstring		   /* a tag name */

Francesco Potortì's avatar
Francesco Potortì committed
46
position ::= realposition | "," 	   /* charpos,linepos */
47 48

realposition ::= "," unsint | unsint "," | unsint "," unsint