File: m_ldsgml.fte

package info (click to toggle)
efte 1.1-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,904 kB
  • sloc: cpp: 43,587; ansic: 1,228; makefile: 271; objc: 92; sh: 40
file content (96 lines) | stat: -rw-r--r-- 2,395 bytes parent folder | download | duplicates (4)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# linuxdoc-sgml

colorize LDSGML {
    SyntaxParser = 'SIMPLE';
    
    color {
        { 'Normal',     'Editor_Default' },
        { 'String',     'Lang_String' },
        { 'Comment',    'Lang_Comment' },
        { 'Command',    'Markup_Default' },
        { 'Symbol',     'Markup_Symbol' },
        { 'Tag',        'Markup_Tag' },
        { 'Special',    'Markup_Special' },
    };

    keyword "Editor_Keywords" { # should be HTML 3.2 complete
        "doctype",
        "article",
        "title", "author", "date",
        "abstract",
        "toc",
        "sect","sect1", "sect2", "sect3", "sect4",

        "label", "ref",

        "url", "htmlurl",

        "tt", "bf", "em",

        "itemize", "enum", "descrip",
        "item", "tag",

        "p",
        
        "code", "verb", "tscreen",
            
    };
    keyword "Editor_Keywords2" {
        "id", "url", "name",
    };

    h_state 0 { 'Normal' }
    h_trans { 5, '<', '<!--', 'Comment' }
    h_trans { 7, '<', '</', 'Command' }
    h_trans { 1, '<', '<', 'Command' }
    h_trans { 2, '<', '&', 'Symbol' }

    h_state 1 { 'Command' }
    h_trans { 0, '>', '>', 'Command' }
    h_trans { 3, '<', '\'', 'String' }
    h_trans { 4, '<', '"', 'String' }
    h_trans { 8, '>', '/', 'Command' }
    h_wtype { -1, -1, -1, 'i', 'a-zA-Z0-9_\-' }

    h_state 2 { 'Symbol' }
    h_trans { 0, '>', ';', 'Symbol' }
    h_trans { 0, '-S', '#a-zA-Z0-9', 'Symbol' }

    h_state 3 { 'String' }
    h_trans { 1, '>', '\'', 'String' }

    h_state 4 { 'String' }
    h_trans { 1, '>', '"', 'String' }

    h_state 5 { 'Comment' }
    h_trans { 6, '>', '--', 'Comment' }

    h_state 6 { 'Special' }
    h_trans { 5, '>', '--', 'Comment' }
    h_trans { 0, '>', '>', 'Comment' }

    h_state 7 { 'Command' }
    h_trans { 0, '>', '>', 'Command' }
    h_trans { 3, '<', '\'', 'String' }
    h_trans { 4, '<', '"', 'String' }
    h_wtype { -1, -1, -1, 'i', 'a-zA-Z0-9_\-' }

    h_state 8 { 'Tag' }
    h_trans { 0, '>', '/', 'Command' }
}

mode LDSGML: MARKUP {
    FileNameRx          = /\.\c{SGML?}$/;
    HilitOn             = 1;
    Colorizer           = "LDSGML";
    MultiLineHilit      = 1;
    AutoHilitParen      = 1;

    RoutineRegexp       = /\c\<sect\d?\>/;

    SaveFolds           = 2;      # save fold info at end of line
    CommentStart        = " <!--";
    CommentEnd          = "-->";
}

oinclude 'mym_ldsgml.fte';