-
Notifications
You must be signed in to change notification settings - Fork 0
/
slang.c
41 lines (38 loc) · 1.07 KB
/
slang.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* $Id: slang.c 443 2006-05-30 04:37:13Z darren $
*
* Copyright (c) 2000-2001, Francesc Rocher
*
* Author: Francesc Rocher <[email protected]>.
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
*
* This module contains functions for generating tags for S-Lang files.
*/
/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include "parse.h"
/*
* FUNCTION DEFINITIONS
*/
static void installSlangRegex (const langType language)
{
addTagRegex (language,
"^.*define[ \t]+([A-Z_][A-Z0-9_]*)[^;]*$",
"\\1", "f,function,functions", "i");
addTagRegex (language,
"^[ \t]*implements[ \t]+\\([ \t]*\"([^\"]*)\"[ \t]*\\)[ \t]*;",
"\\1", "n,namespace,namespaces", NULL);
}
extern parserDefinition* SlangParser (void)
{
static const char *const extensions [] = { "sl", NULL };
parserDefinition* const def = parserNew ("SLang");
def->extensions = extensions;
def->initialize = installSlangRegex;
def->regex = TRUE;
return def;
}