File: ant.c

package info (click to toggle)
exuberant-ctags 1%3A5.9~svn20110310-4%2Bdeb7u1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,488 kB
  • sloc: ansic: 35,517; makefile: 122; sh: 36
file content (42 lines) | stat: -rw-r--r-- 976 bytes parent folder | download | duplicates (17)
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
42
/*
*   $Id$
*
*   Copyright (c) 2008, David Fishburn
*
*   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 Ant language files.
*/

/*
*   INCLUDE FILES
*/
#include "general.h"  /* must always come first */

#include <string.h>
#include "parse.h"

/*
*   FUNCTION DEFINITIONS
*/

static void installAntRegex (const langType language)
{
	addTagRegex (language,
		"^[ \t]*<[ \t]*project[^>]+name=\"([^\"]+)\".*", "\\1", "p,project,projects", NULL);
	addTagRegex (language,
		"^[ \t]*<[ \t]*target[^>]+name=\"([^\"]+)\".*", "\\1", "t,target,targets", NULL);
}

extern parserDefinition* AntParser ()
{
	static const char *const extensions [] = { "build.xml", NULL };
	parserDefinition* const def = parserNew ("Ant");
	def->extensions = extensions;
	def->initialize = installAntRegex;
	def->regex      = TRUE;
	return def;
}

/* vi:set tabstop=4 shiftwidth=4: */