2 * Copyright (c) 2009, David Fishburn
4 * This source code is released for free distribution under the terms of the
5 * GNU General Public License version 2 or (at your option) any later version.
7 * This module contains functions for generating tags for DOS Batch language files.
13 #include "general.h" /* must always come first */
18 #include "selectors.h"
20 static tagRegexTable dosTagRegexTable
[] = {
21 {"^:([A-Za-z_0-9]+)", "\\1",
22 "l,label,labels", NULL
},
23 {"set[ \t]+([A-Za-z_0-9]+)[ \t]*=", "\\1",
24 "v,variable,variables", NULL
},
28 * FUNCTION DEFINITIONS
31 extern parserDefinition
* DosBatchParser (void)
33 static const char *const extensions
[] = { "bat", "cmd", NULL
};
34 parserDefinition
* const def
= parserNew ("DosBatch");
35 static selectLanguage selectors
[] = { selectByRexxCommentAndDosbatchLabelPrefix
,
38 def
->extensions
= extensions
;
39 def
->tagRegexTable
= dosTagRegexTable
;
40 def
->tagRegexCount
= ARRAY_SIZE (dosTagRegexTable
);
41 def
->method
= METHOD_NOT_CRAFTED
|METHOD_REGEX
;
42 def
->selectLanguage
= selectors
;