[m-dev.] diff: mtags fix

David Overton dmo at cs.mu.OZ.AU
Sat Oct 7 00:26:38 AEDT 2000


`\b' in Perl doesn't seem to be doing what it is documented to do.
I've got no idea why, but here is a workaround.

Estimated hours taken: 0.5

scripts/mtags:
	Fix pattern matching code for `implementation' and `interface'
	declarations.

Index: mtags
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mtags,v
retrieving revision 1.20
diff -u -r1.20 mtags
--- mtags	1999/12/23 21:37:20	1.20
+++ mtags	2000/10/06 06:36:57
@@ -6,7 +6,7 @@
     if $running_under_some_shell;
 
 #---------------------------------------------------------------------------#
-# Copyright (C) 1994-1999 The University of Melbourne.
+# Copyright (C) 1994-2000 The University of Melbourne.
 # This file may only be copied under the terms of the GNU General
 # Public License - see the file COPYING in the Mercury distribution.
 #---------------------------------------------------------------------------#
@@ -294,7 +294,7 @@
 
 	# Is this an "interface" or "implementation" declaration?
 	# If so, change context.
-	if ($decl =~ "\binterface\b" || $decl =~ "\bimplementation\b") {
+	if ($decl =~ "interface" || $decl =~ "implementation") {
 		$context = $decl;
 	}
 
-- 
David Overton      Department of Computer Science & Software Engineering
PhD Student        The University of Melbourne, Victoria 3010, Australia
+61 3 8344 9159    http://www.cs.mu.oz.au/~dmo
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list