Merge pull request #11 from esorton/bugfix/add-constexpr-keyword-to-arduino-ctags
[arduino-ctags.git] / html.c
blob6801d37a27fb6cc092cc432fe7d8dbf5bc93a8c5
1 /*
2 * $Id: html.c 443 2006-05-30 04:37:13Z darren $
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: */