[svn] r7693: nemerle/trunk/misc/ctags: gentags.awk gentags.sh

Luntain svnadmin at nemerle.org
Sat Jun 2 14:46:05 CEST 2007


Log:
improve script for tags generating; now it tags (public|internal)(class|variant|module)

Author: Luntain
Date: Sat Jun  2 14:46:03 2007
New Revision: 7693

Modified:
   nemerle/trunk/misc/ctags/gentags.awk
   nemerle/trunk/misc/ctags/gentags.sh

Modified: nemerle/trunk/misc/ctags/gentags.awk
==============================================================================
--- nemerle/trunk/misc/ctags/gentags.awk	(original)
+++ nemerle/trunk/misc/ctags/gentags.awk	Sat Jun  2 14:46:03 2007
@@ -1,6 +1,6 @@
-# author: Kamil Dworakowski (@gmail)
+# author: Kamil Dworkakowski (@gmail)
 #
-# generates a half finished tags file in a basic format of ctags 
+# generates an tags file in a basic format of ctags that needs to be sorted
 # (not an exuberant ctags format)
 # the output needs to be sorted to be valid tags file
 BEGIN { 
@@ -8,9 +8,9 @@
     print ("!_TAG_FILE_SORTED\t1\t/0 - unsorted, 1 - sorted/") 
 }
 # \w 	alphanumeric character or '_'
-# [:space:] 	Space characters (such as space, TAB, ... ). 
-/.*public[[:space:]]+class[[:space:]]+\w+.*/ {
-    match($0, /.*(public[[:space:]]+class[[:space:]]+)(\w+).*/, arr )
-# Format: {tagname}	{TAB} {tagfile} {TAB} {tagaddress}
-    print( arr[2] "\t" FILENAME "\t" "/" arr[1] arr[2] "/" )
+# [:space:] 	whitespace characters
+/.*(public|internal)[[:space:]]+(class|variant|module)[[:space:]]+\w+.*/ {
+    match($0, /.*((class|variant|module)[[:space:]]+)(\w+).*/, arr )
+# Format is: {tagname}	{TAB} {tagfile} {TAB} {tagaddress}
+    print( arr[3] "\t" FILENAME "\t" "/" arr[1] arr[3] "/" )
 }

Modified: nemerle/trunk/misc/ctags/gentags.sh
==============================================================================
--- nemerle/trunk/misc/ctags/gentags.sh	(original)
+++ nemerle/trunk/misc/ctags/gentags.sh	Sat Jun  2 14:46:03 2007
@@ -2,7 +2,7 @@
 #
 # to generate a tags file for nemerle files writen in indentation based syntax
 # anyway, it works also with normal syntax
-# currently gentags.awk returns only tags for classes
+# currently gentags.awk returns only tags for (public|internal) (class|variant|module)
 # To make vim search tags in two tags files, add to local _vimrc:
 # set tags=tags,tags_i
 # Then if a tag is not found in tags file, it will be searched for in tags_i.



More information about the svn mailing list