Updated Spanish translation
[anjuta-git-plugin.git] / tagmanager / html.c
blobb5dbb43df8a47bd120f7d9019b93ce4f3b3757fd
1 /*
2 * $Id$
4 * Copyright (c) 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 HTML language
10 * files.
14 * INCLUDE FILES
16 #include "general.h" /* must always come first */
17 #include "parse.h"
20 * FUNCTION DEFINITIONS
23 static void installHtmlRegex (const langType language)
25 #define POSSIBLE_ATTRIBUTES "([ \t]+[a-z]+=\"?[^>\"]*\"?)*"
26 addTagRegex (language,
27 "<a"
28 POSSIBLE_ATTRIBUTES
29 "[ \t]+name=\"?([^>\"]+)\"?"
30 POSSIBLE_ATTRIBUTES
31 "[ \t]*>",
32 "\\2", "a,anchor,named anchors", "i");
34 addTagRegex (language, "^[ \t]*function[ \t]*([A-Za-z0-9_]+)[ \t]*\\(",
35 "\\1", "f,function,JavaScript functions", NULL);
38 /* Create parser definition stucture */
39 extern parserDefinition* HtmlParser (void)
41 static const char *const extensions [] = { "htm", "html", NULL };
42 parserDefinition *const def = parserNew ("HTML");
43 def->extensions = extensions;
44 def->initialize = installHtmlRegex;
45 def->regex = TRUE;
46 return def;
49 /* vi:set tabstop=4 shiftwidth=4: */