xref: /Universal-ctags/optlib/ctags-optlib.c (revision 6b1a862e526d5017f9f212a321f59d67c859d521)
1 /*
2  * Generated by ./misc/optlib2c from optlib/ctags-optlib.ctags, Don't edit this manually.
3  */
4 #include "general.h"
5 #include "parse.h"
6 #include "routines.h"
7 #include "field.h"
8 #include "xtag.h"
9 
10 
initializeCtagsParser(const langType language CTAGS_ATTR_UNUSED)11 static void initializeCtagsParser (const langType language CTAGS_ATTR_UNUSED)
12 {
13 }
14 
CtagsParser(void)15 extern parserDefinition* CtagsParser (void)
16 {
17 	static const char *const extensions [] = {
18 		"ctags",
19 		NULL
20 	};
21 
22 	static const char *const aliases [] = {
23 		NULL
24 	};
25 
26 	static const char *const patterns [] = {
27 		NULL
28 	};
29 
30 	static kindDefinition CtagsKindTable [] = {
31 		{
32 		  true, 'l', "langdef", "language definitions",
33 		},
34 		{
35 		  true, 'k', "kind", "kind definitions",
36 		},
37 	};
38 	static tagRegexTable CtagsTagRegexTable [] = {
39 		{"^--langdef=([^ \t]+)$", "\\1",
40 		"l", "{scope=set}", NULL, false},
41 		{"^--regex-[^=]+=.*/.,(.+)/.*", "\\1",
42 		"k", "{scope=ref}", NULL, false},
43 		{"^--kinddef-[^=]+=.,([^,]+),.*", "\\1",
44 		"k", "{scope=ref}", NULL, false},
45 	};
46 
47 
48 	parserDefinition* const def = parserNew ("Ctags");
49 
50 	def->enabled       = true;
51 	def->extensions    = extensions;
52 	def->patterns      = patterns;
53 	def->aliases       = aliases;
54 	def->method        = METHOD_NOT_CRAFTED|METHOD_REGEX;
55 	def->useCork       = CORK_QUEUE;
56 	def->kindTable     = CtagsKindTable;
57 	def->kindCount     = ARRAY_SIZE(CtagsKindTable);
58 	def->tagRegexTable = CtagsTagRegexTable;
59 	def->tagRegexCount = ARRAY_SIZE(CtagsTagRegexTable);
60 	def->initialize    = initializeCtagsParser;
61 
62 	return def;
63 }
64