30 {
true,
'c',
"class",
"classes" },
31 {
true,
'm',
"method",
"methods" },
32 {
true,
'p',
"procedure",
"procedures" },
33 {
true,
'n',
"module",
"modules" }
41 const unsigned char *cp,
46 while ((
int) *cp !=
'\0' && ! isspace ((
int) *cp))
55static bool match (
const unsigned char *
line,
const char *word)
57 size_t len = strlen (word);
58 bool matched = (strncmp ((
const char*)
line, word, len) == 0);
64 matched = isspace (*(
line + len));
72 const unsigned char *
line;
76 const unsigned char *cp;
78 while (isspace (
line [0]))
81 if (
line [0] ==
'\0' ||
line [0] ==
'#')
85 for (cp =
line ; *cp !=
'\0' && ! isspace ((
int) *cp) ; ++cp)
87 if (! isspace ((
int) *cp))
89 while (isspace ((
int) *cp))
101 if (
match (cp,
"method"))
104 while (isspace ((
int) *cp))
114 if (
match (cp,
"create"))
117 while (isspace ((
int) *cp))
123 if (
match (cp,
"eval"))
126 while (isspace ((
int) *cp))
138 static const char *
const extensions [] = {
"tcl",
"tk",
"wish",
"itcl",
NULL };
static bool match(const unsigned char *line, const char *word)
static const unsigned char * makeTclTag(const unsigned char *cp, vString *const name, const tclKind kind)
parserDefinition * TclParser(void)
static kindDefinition TclKinds[]
static void findTclTags(void)
parserDefinition * parserNew(const char *name)
int makeSimpleTag(const vString *const name, const int kindIndex)
const unsigned char * readLineFromInputFile(void)
const char *const * extensions
kindDefinition * kindTable
vString * vStringNew(void)
void vStringDelete(vString *const string)
#define vStringClear(string)
static void vStringPut(vString *const string, const int c)