• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0"?>
2<!--
3
4 copy to /usr/share/gtksourceview-2.0/language-specs/
5 restart gedit
6 and select View/Highlight Mode/Markup/GeneratorPFWscript
7
8-->
9<language id="generatorpfwscript" _name="GeneratorPFWscript" version="2.0" _section="Markup">
10  <metadata>
11    <property name="mimetypes">text/plain</property>
12    <property name="globs">.pfw</property>
13    <property name="line-comment-start">#</property>
14  </metadata>
15
16  <styles>
17    <style id="entry-type" _name="Field" map-to="def:identifier"/>
18    <style id="keyword" _name="Keyword" map-to="def:keyword"/>
19    <style id="comment" _name="Comment" map-to="def:comment"/>
20    <style id="boolean" _name="Boolean Value" map-to="def:boolean"/>
21    <style id="decimal" _name="Decimal number" map-to="def:decimal"/>
22    <style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
23    <style id="path"  _name="Data Type"           map-to="def:type"/>
24    <style id="char"  _name="Character"           map-to="def:character"/>
25  </styles>
26
27  <!--default-regex-options case-sensitive="True"/-->
28
29  <definitions>
30
31    <context id="entry-type" style-ref="entry-type" >
32      <suffix>:</suffix>
33
34      <keyword>supDomain</keyword>
35      <keyword>domainGroup</keyword>
36      <keyword>domain</keyword>
37      <keyword>rule</keyword>
38      <keyword>supConf</keyword>
39      <keyword>confGroup</keyword>
40      <keyword>confType</keyword>
41      <keyword>conf</keyword>
42      <keyword>rule</keyword>
43      <keyword>component</keyword>
44    </context>
45
46    <context id="keywords" style-ref="keyword">
47      <keyword>Is</keyword>
48      <keyword>IsNot</keyword>
49      <keyword>Includes</keyword>
50      <keyword>Excludes</keyword>
51      <keyword>ALL</keyword>
52      <keyword>ANY</keyword>
53      <keyword>sequenceAware</keyword>
54    </context>
55
56    <context id="path" style-ref="path">
57        <match extended="true">
58            \s*(/[^\s=]*)
59        </match>
60    </context>
61
62    <context id="number" style-ref="decimal">
63      <match extended="true">
64      (?&lt;![\w\.])
65      (([0-9]+)|([0-9]+\.[0-9]+([Ee][-]?[0-9]+)?))
66      (?![\w\.])
67      </match>
68    </context>
69
70    <context id="boolean" style-ref="boolean">
71      <keyword>False</keyword>
72      <keyword>True</keyword>
73    </context>
74
75    <context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
76      <start>#</start>
77      <include>
78        <context ref="def:in-comment"/>
79      </include>
80    </context>
81
82    <context id="hexadecimal" style-ref="hexadecimal">
83      <match extended="true">
84      (?&lt;![\w\.])
85      \$[0-9a-fA-F]*
86      (?![\w\.])
87      </match>
88    </context>
89
90    <context id="char" style-ref="keyword">
91        <match >([=])</match>
92    </context>
93
94    <context id="generatorpfwscript">
95      <include>
96        <context ref="entry-type"/>
97        <context ref="path"/>
98        <context ref="keywords"/>
99        <context ref="line-comment"/>
100        <context ref="boolean"/>
101        <context ref="number"/>
102        <context ref="hexadecimal"/>
103        <context ref="char"/>
104      </include>
105    </context>
106  </definitions>
107</language>
108