2
* $Id: html.c,v 1.2 2006/05/30 04:37:12 darren Exp $
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
16
#include "general.h" /* must always come first */
20
* FUNCTION DEFINITIONS
23
static void installHtmlRegex (const langType language)
25
#define POSSIBLE_ATTRIBUTES "([ \t]+[a-z]+=\"?[^>\"]*\"?)*"
26
addTagRegex (language,
29
"[ \t]+name=\"?([^>\"]+)\"?"
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;
49
/* vi:set tabstop=4 shiftwidth=4: */