generating TAGS files

Subject: generating TAGS files
From: Dave Love <d.love@xxxxxxxx>
Date: 13 Aug 1997 19:59:24 +0100
Lost in a twisty maze of little modular style files, all different?
Here's a shell script for generating Emacs TAGS files for DSSSL that
might help.  I doubt it's worth putting specific DSSSL support into
`etags'.

#! /bin/sh

# etags-dsssl: DSSSL TAGS generation.
# Dave Love <d.love@xxxxxxxx>.  Public domain.
# $Date: 1997/08/13 18:38:56 $

# The first regexp gets `(mode <foo>...)' and `(element <foo>...)',
# the second gets `(element (...<foo>))' and the third gets
# `(declare[<mumble>] <foo>)'.  --lang=scheme gets expression-language
# definitions.  We can't use Emacs syntax classes; note the regexps for
# whitespace including newlines.

if [ $# -lt 1 ]; then
    echo "Usage: `basename $0` [etags options] file ..." 1>&2
    exit 1
fi

if [ $1 = "--help" ] || [ $1 = "-h" ]; then
    echo "Usage: `basename $0` [etags options] file ...

"
    etags --help
fi

exec etags --lang=scheme --regex='/[ \t]*(\(mode\|element\)[ \t
]+\([^ \t(
]+\)/\2/' --regex='/[ \t]*(element[ \t
]*([^)]+[ \t
]+\([^)]+\)[ \t
]*)/\1/' --regex='/(declare[^ \t
]*[ \t
]+\([^ \t
]+\)/\1/' "$@"

 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread