~ubuntu-branches/ubuntu/maverick/codelite/maverick

« back to all changes in this revision

Viewing changes to sdk/ctags/html.c

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-02-10 02:27:55 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090210022755-m5692nfc1t5uf1w9
Tags: 1.0.2759+dfsg-0ubuntu1
* New upstream release (LP: #327216).
* debian/patches/series, debian/patches/00_fix-ia64-build.patch:
  + Dropped, applied upstream already.
* debian/patches/02_fix-desktop.patch,
  debian/patches/03_fix-sh.patch:
  + Refreshed to patch cleanly.
* debian/rules:
  + Make get-orig-source honour UPSTREAM_VERSION if set.
* debian/ctags-le.1,
  debian/codelite_indexer.1,
  debian/codelite.manpages:
  + Dropped ctags-le manpage, since ctags-le was replaced by
    codelite_indexer.
  + Added codelite_indexer manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
*   $Id: html.c,v 1.2 2006/05/30 04:37:12 darren Exp $
3
 
*
4
 
*   Copyright (c) 2003, Darren Hiebert
5
 
*
6
 
*   This source code is released for free distribution under the terms of the
7
 
*   GNU General Public License.
8
 
*
9
 
*   This module contains functions for generating tags for HTML language
10
 
*   files.
11
 
*/
12
 
 
13
 
/*
14
 
*   INCLUDE FILES
15
 
*/
16
 
#include "general.h"  /* must always come first */
17
 
#include "parse.h"
18
 
 
19
 
/*
20
 
*   FUNCTION DEFINITIONS
21
 
*/
22
 
 
23
 
static void installHtmlRegex (const langType language)
24
 
{
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");
33
 
 
34
 
        addTagRegex (language, "^[ \t]*function[ \t]*([A-Za-z0-9_]+)[ \t]*\\(",
35
 
                "\\1", "f,function,JavaScript functions", NULL);
36
 
}
37
 
 
38
 
/* Create parser definition stucture */
39
 
extern parserDefinition* HtmlParser (void)
40
 
{
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;
47
 
}
48
 
 
49
 
/* vi:set tabstop=4 shiftwidth=4: */