2 Bugs item #823000, was opened at 2003-10-13 21:56
3 Message generated for change (Tracker Item Submitted) made by Item Submitter
4 You can respond by visiting:
5 https://sourceforge.net/tracker/?func=detail&atid=106556&aid=823000&group_id=6556
12 Submitted By: Jozsef Nagy (brutal)
13 Assigned to: Nobody/Anonymous (nobody)
14 Summary: PL/SQL functions and procedures
17 I've tried to use ctags (version 5.5.2) to navigate
18 PL/SQL source codes in vim but jumping to
19 function/procedure definitions worked not properly. I
20 figured out that the problem was that I've defined
21 these functions/procedures in multiline format, for
26 CREATE OR REPLACE PACKAGE TEST IS
51 ctags creates a regexp type pattern for my
52 functions/procedures but unfortunately the pattern was
53 /^IS$/ for each function/procedure, that's why the
54 jumping method worked really crappy. (see the output of
55 ctags 5.5.2 on this example code below)
57 ctags -f - --language-force=sql test.pkb
58 TEST test.pkb /^CREATE OR REPLACE PACKAGE
60 TestFunc1 test.pkb /^IS$/;" p
61 TestFunc2 test.pkb /^IS$/;" p
63 I've looked into the ctags source code and I saw that
64 in parseSubProgram() in sql.c called makeSqlTag() only
65 when KEYWORD_is reached. I have modified this function
66 so that makeSqlTag() is called immediately after a
67 function/procedure keyword and name is read (I have
68 attached the output of diff sql.c.5.5.2 sql.c). I don't
69 know much of ctags internals so I am not sure if this
70 is the best solution but it worked for me. (see the
71 output of my modified ctags below)
73 ctags -f - --language-force=sql test.pkb
74 TEST test.pkb /^CREATE OR REPLACE PACKAGE
76 TestFunc1 test.pkb /^PROCEDURE
78 TestFunc2 test.pkb /^PROCEDURE