Making "inline" behave like an attribute. Fixes #1
[arduino-ctags.git] / cobol.c
blobe3cdb3ed7d53fe0233bb4b79f65514872b6ebd28
1 /*
2 * $Id: cobol.c 443 2006-05-30 04:37:13Z darren $
4 * Copyright (c) 2000-2003, Darren Hiebert
6 * This source code is released for free distribution under the terms of the
7 * GNU General Public License.
9 * This module contains functions for generating tags for COBOL language
10 * files.
14 * INCLUDE FILES
16 #include "general.h" /* must always come first */
17 #include "parse.h"
20 * FUNCTION DEFINITIONS
23 static void installCobolRegex (const langType language)
25 addTagRegex (language, "^[ \t]*[0-9]+[ \t]+([A-Z0-9][A-Z0-9-]*)[ \t]+(BLANK|OCCURS|IS|JUST|PIC|REDEFINES|RENAMES|SIGN|SYNC|USAGE|VALUE)",
26 "\\1", "d,data,data items", "i");
27 addTagRegex (language, "^[ \t]*[FSR]D[ \t]+([A-Z0-9][A-Z0-9-]*)\\.",
28 "\\1", "f,file,file descriptions (FD, SD, RD)", "i");
29 addTagRegex (language, "^[ \t]*[0-9]+[ \t]+([A-Z0-9][A-Z0-9-]*)\\.",
30 "\\1", "g,group,group items", "i");
31 addTagRegex (language, "^[ \t]*([A-Z0-9][A-Z0-9-]*)\\.",
32 "\\1", "p,paragraph,paragraphs", "i");
33 addTagRegex (language, "^[ \t]*PROGRAM-ID\\.[ \t]+([A-Z0-9][A-Z0-9-]*)\\.",
34 "\\1", "P,program,program ids", "i");
35 addTagRegex (language, "^[ \t]*([A-Z0-9][A-Z0-9-]*)[ \t]+SECTION\\.",
36 "\\1", "s,section,sections", "i");
39 extern parserDefinition* CobolParser ()
41 static const char *const extensions [] = {
42 "cbl", "cob", "CBL", "COB", NULL };
43 parserDefinition* def = parserNew ("Cobol");
44 def->extensions = extensions;
45 def->initialize = installCobolRegex;
46 def->regex = TRUE;
47 return def;
50 /* vi:set tabstop=4 shiftwidth=4: */