xref: /Universal-ctags/optlib/qemuhx.c (revision 741a40ef2d94b5f032d5be3db709e40a45a78a9e)
1 /*
2  * Generated by ./misc/optlib2c from optlib/qemuhx.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 
initializeQemuHXParser(const langType language CTAGS_ATTR_UNUSED)11 static void initializeQemuHXParser (const langType language CTAGS_ATTR_UNUSED)
12 {
13 }
14 
QemuHXParser(void)15 extern parserDefinition* QemuHXParser (void)
16 {
17 	static const char *const extensions [] = {
18 		"hx",
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 QemuHXKindTable [] = {
31 		{
32 		  true, 'q', "qmp", "QEMU Management Protocol dispatch table entries",
33 		},
34 		{
35 		  true, 'i', "infoitem", "item in texinfo doc",
36 		},
37 	};
38 	static xtagDefinition QemuHXXtagTable [] = {
39 		{
40 		  .enabled     = true,
41 		  .name        = "funcmap",
42 		  .description = "Include mapping SQMP to C function name",
43 		},
44 	};
45 	static tagRegexTable QemuHXTagRegexTable [] = {
46 		{"^SQMP[[:space:]]([-a-z_0-9A-Z]+)[[:space:]]---", "\\1",
47 		"q", "{mgroup=1}", NULL, true},
48 		{"^SQMP[[:space:]]([-a-z_0-9A-Z]+)[[:space:]]---", "qmp_\\1",
49 		"q", "{mgroup=1}{_extra=funcmap}"
50 		"{{\n"
51 		"    . :name dup (-_) _tr!\n"
52 		"    . exch name:\n"
53 		"}}", NULL, true},
54 		{"^@item[[:space:]]{1,}([-.a-z_0-9A-Z]{1,})", "\\1",
55 		"i", NULL, NULL, false},
56 	};
57 
58 
59 	parserDefinition* const def = parserNew ("QemuHX");
60 
61 	def->enabled       = true;
62 	def->extensions    = extensions;
63 	def->patterns      = patterns;
64 	def->aliases       = aliases;
65 	def->method        = METHOD_NOT_CRAFTED|METHOD_REGEX;
66 	def->useCork       = CORK_QUEUE;
67 	def->kindTable     = QemuHXKindTable;
68 	def->kindCount     = ARRAY_SIZE(QemuHXKindTable);
69 	def->xtagTable     = QemuHXXtagTable;
70 	def->xtagCount     = ARRAY_SIZE(QemuHXXtagTable);
71 	def->tagRegexTable = QemuHXTagRegexTable;
72 	def->tagRegexCount = ARRAY_SIZE(QemuHXTagRegexTable);
73 	def->initialize    = initializeQemuHXParser;
74 
75 	return def;
76 }
77