summaryrefslogtreecommitdiffstats
path: root/tools/xmlGenerator/misc/generatorpfwscript.lang
blob: df641dfe93d214edb4083848720b1da89216b312 (plain)
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
97
98
99
100
101
102
103
104
<?xml version="1.0"?>
<!--

 copy to /usr/share/gtksourceview-2.0/language-specs/
 restart gedit
 and select View/Highlight Mode/Markup/GeneratorPFWscript

-->
<language id="generatorpfwscript" _name="GeneratorPFWscript" version="2.0" _section="Markup">
  <metadata>
    <property name="mimetypes">text/plain</property>
    <property name="globs">.pfw</property>
    <property name="line-comment-start">#</property>
  </metadata>

  <styles>
    <style id="entry-type" _name="Field" map-to="def:identifier"/>
     <style id="keyword" _name="Keyword" map-to="def:keyword"/>
    <style id="comment" _name="Comment" map-to="def:comment"/>
    <style id="boolean" _name="Boolean Value" map-to="def:boolean"/>
    <style id="decimal" _name="Decimal number" map-to="def:decimal"/>
    <style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
    <style id="path"  _name="Data Type"           map-to="def:type"/>
    <style id="char"  _name="Character"           map-to="def:character"/>
  </styles>

  <!--default-regex-options case-sensitive="True"/-->

  <definitions>

    <context id="entry-type" style-ref="entry-type" >
      <suffix>:</suffix>

      <keyword>supDomain</keyword>
      <keyword>domain</keyword>
      <keyword>rule</keyword>
      <keyword>supConf</keyword>
      <keyword>conf</keyword>
      <keyword>rule</keyword>
      <keyword>component</keyword>
    </context>

    <context id="keywords" style-ref="keyword">
      <keyword>Is</keyword>
      <keyword>IsNot</keyword>
      <keyword>Includes</keyword>
      <keyword>Excludes</keyword>
      <keyword>ALL</keyword>
      <keyword>ANY</keyword>
      <keyword>sequenceAware</keyword>
    </context>

    <context id="path" style-ref="path">
        <match extended="true">
            \s*(/[^\s=]*)
        </match>
    </context>

    <context id="number" style-ref="decimal">
      <match extended="true">
      (?&lt;![\w\.])
      (([0-9]+)|([0-9]+\.[0-9]+([Ee][-]?[0-9]+)?))
      (?![\w\.])
      </match>
    </context>

    <context id="boolean" style-ref="boolean">
      <keyword>False</keyword>
      <keyword>True</keyword>
    </context>

    <context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
      <start>#</start>
      <include>
        <context ref="def:in-comment"/>
      </include>
    </context>

    <context id="hexadecimal" style-ref="hexadecimal">
      <match extended="true">
      (?&lt;![\w\.])
      \$[0-9a-fA-F]*
      (?![\w\.])
      </match>
    </context>

    <context id="char" style-ref="keyword">
        <match >([=])</match>
    </context>

    <context id="generatorpfwscript">
      <include>
        <context ref="entry-type"/>
        <context ref="path"/>
        <context ref="keywords"/>
        <context ref="line-comment"/>
        <context ref="boolean"/>
        <context ref="number"/>
        <context ref="hexadecimal"/>
        <context ref="char"/>
      </include>
    </context>
  </definitions>
</language>