Remove duplicate NEWS item
[geany-mirror.git] / tagmanager / cobol.c
blobbb33155c34d33c98fa749b65809a85f524b653c2
1 /*
2 * Copyright (c) 2000-2003, Darren Hiebert
4 * This source code is released for free distribution under the terms of the
5 * GNU General Public License.
7 * This module contains functions for generating tags for COBOL language
8 * files.
9 */
12 * INCLUDE FILES
14 #include "general.h" /* must always come first */
15 #include "parse.h"
18 * FUNCTION DEFINITIONS
21 static void installCobolRegex (const langType language)
23 addTagRegex (language, "^[ \t]*[0-9]+[ \t]+([A-Z0-9][A-Z0-9-]*)[ \t]+(BLANK|OCCURS|IS|JUST|PIC|REDEFINES|RENAMES|SIGN|SYNC|USAGE|VALUE)",
24 "\\1", "d,variable,data items", "i");
25 addTagRegex (language, "^[ \t]*[FSR]D[ \t]+([A-Z0-9][A-Z0-9-]*)\\.",
26 "\\1", "f,function,file descriptions (FD, SD, RD)", "i");
27 addTagRegex (language, "^[ \t]*[0-9]+[ \t]+([A-Z0-9][A-Z0-9-]*)\\.",
28 "\\1", "g,struct,group items", "i");
29 addTagRegex (language, "^[ \t]*([A-Z0-9][A-Z0-9-]*)\\.",
30 "\\1", "p,macro,paragraphs", "i");
31 addTagRegex (language, "^[ \t]*PROGRAM-ID\\.[ \t]+([A-Z0-9][A-Z0-9-]*)\\.",
32 "\\1", "P,class,program ids", "i");
33 addTagRegex (language, "^[ \t]*([A-Z0-9][A-Z0-9-]*)[ \t]+SECTION\\.",
34 "\\1", "n,namespace,sections", "i");
37 extern parserDefinition* CobolParser ()
39 static const char *const extensions [] = {
40 "cbl", "cob", "cpy", "CBL", "COB", NULL };
41 parserDefinition* def = parserNew ("Cobol");
42 def->extensions = extensions;
43 def->initialize = installCobolRegex;
44 def->regex = TRUE;
45 return def;
48 /* vi:set tabstop=4 shiftwidth=4: */