xref: /Universal-ctags/parsers/rexx.c (revision 1f9cdae041442312d8953a2354c9b1ff206d981a)
1 /*
2 *   Copyright (c) 2001-2003, Darren Hiebert
3 *
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.
6 *
7 *   This module contains functions for generating tags for the REXX language
8 *   (http://www.rexxla.org, http://www2.hursley.ibm.com/rexx).
9 */
10 
11 /*
12 *   INCLUDE FILES
13 */
14 #include "general.h"  /* always include first */
15 #include "parse.h"    /* always include */
16 #include "routines.h"
17 #include "selectors.h"
18 
19 static tagRegexTable rexxTagRegexTable [] = {
20 	{"^([A-Za-z0-9@#$\\.!?_]+)[ \t]*:", "\\1",
21 	 "s,subroutine,subroutines", NULL},
22 };
23 
24 /*
25 *   FUNCTION DEFINITIONS
26 */
27 
RexxParser(void)28 extern parserDefinition* RexxParser (void)
29 {
30 	static const char *const extensions [] = { "cmd", "rexx", "rx", NULL };
31 	parserDefinition* const def = parserNew ("REXX");
32 	static selectLanguage selectors[] = { selectByRexxCommentAndDosbatchLabelPrefix,
33 					      NULL };
34 	def->extensions = extensions;
35 	def->tagRegexTable = rexxTagRegexTable;
36 	def->tagRegexCount = ARRAY_SIZE (rexxTagRegexTable);
37 	def->method     = METHOD_NOT_CRAFTED|METHOD_REGEX;
38 	def->selectLanguage = selectors;
39 	return def;
40 }
41