1 /*
2 * Generated by ./misc/optlib2c from optlib/iPythonCell.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 #include "subparser.h"
10
11
initializeIPythonCellParser(const langType language CTAGS_ATTR_UNUSED)12 static void initializeIPythonCellParser (const langType language CTAGS_ATTR_UNUSED)
13 {
14 }
15
IPythonCellParser(void)16 extern parserDefinition* IPythonCellParser (void)
17 {
18 static const char *const extensions [] = {
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 IPythonCellKindTable [] = {
31 {
32 true, 'c', "cell", "cells",
33 },
34 };
35 static xtagDefinition IPythonCellXtagTable [] = {
36 {
37 .enabled = false,
38 .name = "doubleSharps",
39 .description = "Include cells starting from ##",
40 },
41 };
42 static tagRegexTable IPythonCellTagRegexTable [] = {
43 {"^[ \t]*(# ?%%|# <codecell>)[ \t]*(.*[^ \t])$", "\\2",
44 "c", "{exclusive}", NULL, false},
45 {"^[ \t]*##[ \t]*(.*[^ \t])$", "\\1",
46 "c", "{_extra=doubleSharps}{exclusive}", NULL, false},
47 };
48
49 static subparser IPythonCellSubparser = {
50 .direction = SUBPARSER_BASE_RUNS_SUB,
51 };
52 static parserDependency IPythonCellDependencies [] = {
53 [0] = { DEPTYPE_SUBPARSER, "Python", &IPythonCellSubparser },
54 };
55
56 parserDefinition* const def = parserNew ("IPythonCell");
57
58 def->enabled = true;
59 def->extensions = extensions;
60 def->patterns = patterns;
61 def->aliases = aliases;
62 def->method = METHOD_NOT_CRAFTED|METHOD_REGEX;
63 def->kindTable = IPythonCellKindTable;
64 def->kindCount = ARRAY_SIZE(IPythonCellKindTable);
65 def->xtagTable = IPythonCellXtagTable;
66 def->xtagCount = ARRAY_SIZE(IPythonCellXtagTable);
67 def->tagRegexTable = IPythonCellTagRegexTable;
68 def->tagRegexCount = ARRAY_SIZE(IPythonCellTagRegexTable);
69 def->dependencies = IPythonCellDependencies;
70 def->dependencyCount = ARRAY_SIZE(IPythonCellDependencies);
71 def->initialize = initializeIPythonCellParser;
72
73 return def;
74 }
75