xref: /Universal-ctags/optlib/rpmMacros.c (revision 29197a38632d1338f634b72a1c8f368d57352778)
1 /*
2  * Generated by ./misc/optlib2c from optlib/rpmMacros.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 
initializeRpmMacrosParser(const langType language)11 static void initializeRpmMacrosParser (const langType language)
12 {
13 
14 	addLanguageRegexTable (language, "main");
15 	addLanguageRegexTable (language, "contline");
16 
17 	addLanguageTagMultiTableRegex (language, "main",
18 	                               "^#[^\n]*\n?",
19 	                               "", "", "", NULL);
20 	addLanguageTagMultiTableRegex (language, "main",
21 	                               "^%([_a-zA-Z0-9]+)(\\([^)]*\\))*[^\n]*([^\n])\n?",
22 	                               "\\1", "m", ""
23 		"{{\n"
24 		"    \\2 false ne {\n"
25 		"       . \\2 signature:\n"
26 		"    } if\n"
27 		"    \\3 (\\\\) eq {\n"
28 		"       % push the current tag for attaching end: later\n"
29 		"       .\n"
30 		"       % Skip next line if \\ is at the enf of the current line.\n"
31 		"       /contline _tenter\n"
32 		"    } if\n"
33 		"}}", NULL);
34 	addLanguageTagMultiTableRegex (language, "main",
35 	                               "^.",
36 	                               "", "", "", NULL);
37 	addLanguageTagMultiTableRegex (language, "contline",
38 	                               "^(\n)",
39 	                               "", "", ""
40 		"{{\n"
41 		"   1 /start _matchloc end:\n"
42 		"   _tleave\n"
43 		"}}", NULL);
44 	addLanguageTagMultiTableRegex (language, "contline",
45 	                               "^[^\n]*([^\n])\n?",
46 	                               "", "", ""
47 		"{{\n"
48 		"    \\1 (\\\\) eq not {\n"
49 		"       1 /end _matchloc end:\n"
50 		"       _tleave\n"
51 		"    } if\n"
52 		"}}", NULL);
53 }
54 
RpmMacrosParser(void)55 extern parserDefinition* RpmMacrosParser (void)
56 {
57 	static const char *const extensions [] = {
58 		NULL
59 	};
60 
61 	static const char *const aliases [] = {
62 		NULL
63 	};
64 
65 	static const char *const patterns [] = {
66 		NULL
67 	};
68 
69 	static kindDefinition RpmMacrosKindTable [] = {
70 		{
71 		  true, 'm', "macro", "macros",
72 		},
73 	};
74 
75 	parserDefinition* const def = parserNew ("RpmMacros");
76 
77 	def->enabled       = true;
78 	def->extensions    = extensions;
79 	def->patterns      = patterns;
80 	def->aliases       = aliases;
81 	def->method        = METHOD_NOT_CRAFTED|METHOD_REGEX;
82 	def->useCork       = CORK_QUEUE;
83 	def->kindTable     = RpmMacrosKindTable;
84 	def->kindCount     = ARRAY_SIZE(RpmMacrosKindTable);
85 	def->initialize    = initializeRpmMacrosParser;
86 
87 	return def;
88 }
89