Here is my sql.c file.
/* INCLUDE FILES */
#include "general.h" /* always include first */
#include "parse.h" /* always include */
/* FUNCTION DEFINITIONS */
static void installSqlRegex (const langType language)
{
addTagRegex (language, "^def[ \t]*([a-zA-Z0-9_]+)", "\\1",
"d,definition", NULL);
//addTagRegex (language, "^[ \t]*create[ \t]+([a-zA-Z0-9_]+)",
"\\1", "t,table", NULL);
addTagRegex (language, "^[ \t]*create[ \t]+([a-zA-Z0-9
\t]*)?(table)[ \t]+([^.]+\.)?([a-zA-Z0-9_@...]+)", "\\4", "t,table",
NULL);
addTagRegex (language, "^[ \t]*create[ \t]+([a-zA-Z0-9
\t]*)?(procedure|package)[ \t]+([^.]+\.)?([a-zA-Z0-9_@...]+)", "\\4",
"p,procedure", NULL);
}
/* Create parser definition stucture */
extern parserDefinition* SqlParser (void)
{
static const char *const extensions [] = { "sql", NULL };
parserDefinition* def = parserNew ("Sql");
//parserDefinition* const def = parserNew ("Makefile");
//def->patterns = patterns;
def->extensions = extensions;
def->initialize = installSqlRegex;
def->regex = TRUE;
return def;
}
I updated parsers.h and added this entry between these others:
SlangParser, \
SqlParser, \
TclParser, \
I updated source.mak so that it would also compile the sql.c file.
When I run the make file in MVC, it does compile the sql.c and creates
the sql.obj.
But when I run ctags -V
7000 21:25:24 c:\vim\vim61\ctags53\src\ctags53>ctags -V
Installing parsers: Asm, Asp, Awk, BETA, C, C++, Cobol, Eiffel, Fortran,
Java, L
isp, Lua, Make, Pascal, Perl, PHP, Python, Ruby, Scheme, Sh, Tcl,
Verilog, Vim
Setting option defaults
Setting default header extensions: h, H, hh, hpp, hxx, h++, inc, def
Installing default language mappings:
Asm: (*.A51) (*.29[kK]) (*.[68][68][kKsSxX]) (*.[xX][68][68]) .asm
.ASM .s .
S
Asp: .asp .asa
Awk: .awk .gawk .mawk
BETA: .bet
C: .c
C++: .c++ .cc .cp .cpp .cxx .h .h++ .hh .hp .hpp .hxx
Cobol: .cob .COB
Eiffel: .e
Fortran: .f .for .ftn .f77 .f90 .f95
Java: .java
Lisp: .cl .clisp .el .l .lisp .lsp .ml
Lua: .lua
Make: ([Mm]akefile) .mak
Pascal: .p .pas
Perl: .pl .pm .perl
PHP: .php .php3 .phtml
Python: .py .python
Ruby: .rb
Scheme: .SCM .SM .sch .scheme .scm .sm
Sh: .sh .SH .bsh .bash .ksh .zsh
Tcl: .tcl .tk .wish
Verilog: .v
Vim: .vim
Installing default exclude patterns:
adding exclude pattern: EIFGEN
adding exclude pattern: SCCS
adding exclude pattern: RCS
adding exclude pattern: CVS
Considering option file /ctags.cnf: not found
Considering option file /etc/ctags.conf: not found
Considering option file /usr/local/etc/ctags.conf: not found
Considering option file C:\ctags.cnf: not found
Considering option file ctags.cnf: not found
Reading initial options from command line
ctags: No files specified. Try "ctags --help".
Any ideas?
Thanks,
Dave
-----Original Message-----
From: ctags-users-admin@...
[mailto:ctags-users-admin@...] On Behalf Of Darren
Hiebert
Sent: Sunday, August 18, 2002 5:51 PM
To: David Fishburn
Cc: ctags-users@...
Subject: Re: [Ctags] Adding a new language - compiling and miscellaneous
On Sat, 17 Aug 2002, David Fishburn wrote:
> Well, thanks to the suggestions from people on this list I have
> successfully added a new language to my ctags.cnf file (W2K).
>
> Now I would like to add it to the source as well and make it
> permanenantly part of ctags.
>
> I have found that slang.c is basically the same as my sql.c. So I
> copied it and make the changes. I am using Microsoft VS to compile, so
> I used the mk_mvc.mak file.
>
> I have updated source.mak to include the new module.
> I have updated parsers.h to include the new parser function.
>
> But when I run the new ctags.exe it says:
> ctags.exe -f - --format=2 --excmd=pattern --fields=nK --sort=no
> --language-force=sql --sql-types=p "dave.sql"
> ctags.exe: Uknown language specified in "language-force" option
>
> Can anyone tell me which file I have missed to add the new language.
There is only one source file from the ctags distribuition which must be
modified: parsers.h
What does ctags report when you run "ctags -V"? This should report the
initialization of each language.
--
Darren Hiebert <dhiebert@...> http://DarrenHiebert.com
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell
phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Ctags-users mailing list
Ctags-users@...
https://lists.sourceforge.net/lists/listinfo/ctags-users
|