[m-rev.] diff: support "." module qualifier in mtags

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 26 19:02:22 AEDT 2003


Estimated hours taken: 0.5
Branches: main

scripts/mtags:
	Allow the use of "." as a module qualifier.
	Also, output tags for both "." and "__" forms.

Workspace: /home/ceres/fjh/mercury
Index: scripts/mtags
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mtags,v
retrieving revision 1.29
diff -u -d -r1.29 mtags
--- scripts/mtags	31 Oct 2001 14:57:12 -0000	1.29
+++ scripts/mtags	25 Mar 2003 05:57:26 -0000
@@ -241,6 +241,7 @@
 	$match_line = $_;
 	$match_line =~ s|\\|\\\\|g;   # replace `\' with `\\'
 	$match_line =~ s|/|\\/|g;     # replace `/' with `\/'
+	$match_line =~ s|\.|__|g;     # replace `.' module qualifiers with `__'
 
 	# $src_name holds the name as it was in the original source
 	$src_name = $name;
@@ -261,6 +262,19 @@
 }
 
 sub output_single_name() {
+	# Output tag using `__' as module qualifier.
+	do output_single_tag();
+
+	# Output tag using `.' as module qualifier.
+	if ($name =~ /__/) {
+		$save_name = $name;
+		$name =~ s/__/./g;
+		do output_single_tag();
+		$name = $save_name;
+	}
+}
+
+sub output_single_tag() {
 	if (!$emacs && !$keep_dups && $seen{$name}) {
 	    if ($warnings &&
 		$file ne $prev_file{$name} &&

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list