summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-02 01:09:16 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-02 01:09:16 +0000
commit0c9e4c8cd72be908317908702a44bd83980d8d12 (patch)
tree3f2bb6106dd7ecf2078af738898d6d24b28f398b /emacs
parentbcdd1f73cf177f8c25176c85438d3cfa41e8d00f (diff)
downloadperl-0c9e4c8cd72be908317908702a44bd83980d8d12.tar.gz
updated ptags generator from Ilya Zakharevich
p4raw-id: //depot/perl@4275
Diffstat (limited to 'emacs')
-rwxr-xr-xemacs/ptags31
1 files changed, 29 insertions, 2 deletions
diff --git a/emacs/ptags b/emacs/ptags
index 7570220218..54770a0a14 100755
--- a/emacs/ptags
+++ b/emacs/ptags
@@ -21,7 +21,7 @@ if test ! -z "$OS2_SHELL"; then alias find=gnufind; fi
# Move autogenerated less-informative files to the end:
# Hard to do embed.h and embedvar.h in one sweep:
-topfiles="`echo ' ' *.y *.c *.h ' ' | sed 's/ \(embed\(var\|\)\.h\|obj\(pp\|XSUB\)\.h\|globals\.c\) \(\(embedvar\|objpp\).h \|\)/ /g'`"
+topfiles="`echo ' ' *.y *.c *.h ' ' | sed 's/ / /g' | sed 's/ embedvar\.h\|embed\.h\|obj\(pp\|XSUB\)\.h\|\(globals\|perlapi\)\.c / /g'`"
subdirs="`find ./* -maxdepth 0 -type d`"
subdirfiles="`find $subdirs -name '*.[cy]' -print | sort`"
subdirfiles1="`find $subdirs -name '*.[hH]' -print | sort`"
@@ -74,10 +74,37 @@ perl -w014pe 'if (s/^( .* PERLVAR A?I? # 1: TAG group
}' TAGS.tmp > TAGS.tm1 && mv TAGS.tm1 TAGS.tmp
+# Now remove these Perl_, add empty- and perl_-flavors:
+perl -w014pe 'if (s/^(Perl_ # 1: First group
+ (\w+) \( # 2: Stripped name
+ \x7F # End of description
+ ) # End of description
+ (\d+,\d+\n) # 3: TAGS Trail
+ /$1$3$1$2\x01$3$1perl_$2\x01$3/mgx) { # Repeat, add empty and perl_ flavors
+ $chars = chomp;
+ s/^((\n.+,)\d+)/ $2 . (length($_) - length($1) - 1) /e;
+ $_ .= ("\f" x $chars);
+ }' TAGS.tmp > TAGS.tm1 && mv TAGS.tm1 TAGS.tmp
+
+# Now remove these S_, add empty-flavor:
+perl -w014pe 'if (s/^(S_ # 1: First group
+ (\w+) \( # 2: Stripped name
+ \x7F # End of description
+ ) # End of description
+ (\d+,\d+\n) # 3: TAGS Trail
+ /$1$3$1$2\x01$3/mgx) { # Repeat, add empty_ flavor
+ $chars = chomp;
+ s/^((\n.+,)\d+)/ $2 . (length($_) - length($1) - 1) /e;
+ $_ .= ("\f" x $chars);
+ }' TAGS.tmp > TAGS.tm1 && mv TAGS.tm1 TAGS.tmp
etags -o TAGS.tmp -a -D -l none -r '/#define.*\t\(Perl_.*\)/\1/' embed.h
-etags -o TAGS.tmp -a globals.c embedvar.h objXSUB.h objpp.h
+etags -o TAGS.tmp -a globals.c embedvar.h objXSUB.h perlapi.c
+# The above processes created a lot of descriptions with an
+# an explicitly specified tag. Such descriptions have higher
+# precedence than descriptions without an explicitely specified tag.
+# To restore the justice, make all the descriptions explicit.
perl -w014pe 'if (s/^( [^\n\x7F\x01]*\b # 1: TAG group
(\w+) # 2: word
[^\w\x7F\x01\n]* # Most anything