Debian Codegraph @

data/syntax/bitbake.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language
3 [
4 <!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#&#37;${}@-]*">
5 <!ENTITY parens "\(\s*\)">
6 <!ENTITY eos "(?=$|\s)"> <!-- eol or space following -->
7 ]>
8 <!--
9 ====================================================================
10 Bitbake syntax highlighting file for the Kate and QtCreator
11 ====================================================================
12
13 Author: Ivan Koveshnikov
14 Changes by Mark Nauwelaerts
15 -->
16
17 <language name="Bitbake" section="Sources"
18 version="12" kateversion="5.79"
19 extensions="*.bb;*.bbappend;*.bbclass;*.inc"
20 license="GPL" author="Ivan Koveshnikov">
21
22 <highlighting>
23
24 <list name="keywords">
25 <item>after</item>
26 <item>before</item>
27 <item>python</item>
28 <item>branch</item>
29 <item>bareclone</item>
30 <item>protocol</item>
31 <item>name</item>
32 <item>if</item>
33 <item>fi</item>
34 <item>then</item>
35 <item>rm</item>
36 <item>ln</item>
37 <item>cp</item>
38 <item>for</item>
39 <item>done</item>
40 <item>cat</item>
41 </list>
42
43 <list name="oe_functions">
44 <item>do_build</item>
45 <item>do_compile</item>
46 <item>do_compile_append</item>
47 <item>do_compile_prepend</item>
48 <item>do_compile_ptest_base</item>
49 <item>do_configure</item>
50 <item>do_configure_append</item>
51 <item>do_configure_prepend</item>
52 <item>do_configure_ptest_base</item>
53 <item>do_deploy</item>
54 <item>do_fetch</item>
55 <item>do_install</item>
56 <item>do_install_append</item>
57 <item>do_install_prepend</item>
58 <item>do_install_ptest_base</item>
59 <item>do_package</item>
60 <item>do_package_qa</item>
61 <item>do_package_write_deb</item>
62 <item>do_package_write_ipk</item>
63 <item>do_package_write_rpm</item>
64 <item>do_package_write_tar</item>
65 <item>do_packagedata</item>
66 <item>do_patch</item>
67 <item>do_populate_lic</item>
68 <item>do_populate_sdk</item>
69 <item>do_populate_sysroot</item>
70 <item>do_rm_work</item>
71 <item>do_rm_work_all</item>
72 <item>do_unpack</item>
73 <item>do_checkuri</item>
74 <item>do_checkuriall</item>
75 <item>do_clean</item>
76 <item>do_cleanall</item>
77 <item>do_cleansstate</item>
78 <item>do_devshell</item>
79 <item>do_fetchall</item>
80 <item>do_listtasks</item>
81 <item>do_package_index</item>
82 <item>do_bootimg</item>
83 <item>do_bundle_initramfs</item>
84 <item>do_rootfs</item>
85 <item>do_testimage</item>
86 <item>do_testimage_auto</item>
87 <item>do_vmdkimg</item>
88 <item>do_compile_kernelmodules</item>
89 <item>do_diffconfig</item>
90 <item>do_kernel_checkout</item>
91 <item>do_kernel_configcheck</item>
92 <item>do_kernel_configme</item>
93 <item>do_kernel_link_vmlinux</item>
94 <item>do_menuconfig</item>
95 <item>do_savedefconfig</item>
96 <item>do_sizecheck</item>
97 <item>do_strip</item>
98 <item>do_uboot_mkimage</item>
99 <item>do_validate_branches</item>
100 <item>do_generate_qt_config_file</item>
101 <item>do_spdx</item>
102 <item>oe_runmake</item>
103 <item>export</item>
104 <item>install</item>
105 <item>kernel_configme</item>
106 <item>validate_branches</item>
107
108 </list>
109
110 <list name="dependencies">
111 <item>inherit</item>
112 <item>include</item>
113 <item>require</item>
114 <item>addtask</item>
115 <item>deltask</item>
116 <item>addhandler</item>
117 <item>EXPORT_FUNCTIONS</item>
118 </list>
119
120 <contexts>
121
122 <context name="Normal Text" attribute="Normal Text" lineEndContext="#pop" >
123 <DetectSpaces/>
124 <DetectChar context="bbComment" char="#" />
125 <!-- detect sub-context before marked as keyword -->
126 <RegExpr context="pbfunction" String="^\s*python\s+&funcname;\s*&parens;" lookAhead="true" column="0" />
127 <RegExpr context="pfunction" String="^def\s+&funcname;\s*\(.*\)\s*:&eos;" lookAhead="true" column="0" minimal="true" />
128 <RegExpr context="function" String="^\s*&funcname;\s*&parens;" lookAhead="true" column="0" />
129 <IncludeRules context="keywords" />
130 <DetectChar attribute="String" context="bbString" char="&quot;" />
131 <RegExpr attribute="Variable" context="#stay" String="\$\{[A-Za-z0-9_-]+\}" />
132 <RegExpr attribute="Keyword" context="#stay" String="(?:[A-Z]+)[0-9_]*" />
133 </context>
134
135 <!-- used for include -->
136 <context name="keywords" attribute="Normal Text" lineEndContext="#stay">
137 <keyword attribute="Keyword" context="#stay" String="keywords" />
138 <keyword attribute="OEFunction" context="#stay" String="oe_functions" />
139 <keyword attribute="Dependency" context="#stay" String="dependencies" />
140 </context>
141
142 <!-- bitbake shell function -->
143 <context name="function" attribute="Normal Text" lineEndContext="#stay">
144 <IncludeRules context="keywords" />
145 <RegExpr attribute="Function" context="#stay" String="&funcname;\s*&parens;" />
146 <DetectChar char="{" context="bash" beginRegion="function" />
147 </context>
148
149 <context name="bash" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="Command##Bash">
150 <DetectChar attribute="Keyword" char="}" context="#pop#pop" endRegion="function" />
151 <IncludeRules context="##Bash" />
152 </context>
153
154 <!-- bitbake python function -->
155 <context name="pbfunction" attribute="Normal Text" lineEndContext="#stay">
156 <IncludeRules context="keywords" />
157 <RegExpr attribute="Function" context="#stay" String="&funcname;\s*&parens;" />
158 <DetectChar char="{" context="python" beginRegion="function" />
159 </context>
160
161 <!-- (internal) python function -->
162 <context name="pfunction" attribute="Normal Text" lineEndContext="python">
163 <WordDetect attribute="Keyword" String="def" />
164 <Detect2Chars char=")" char1=":" context="python" beginRegion="function" />
165 </context>
166
167 <context name="python" attribute="Normal Text" lineEndContext="#stay">
168 <DetectChar attribute="Keyword" char="}" context="#pop#pop" endRegion="function" />
169 <RegExpr String="^\w" column="0" context="#pop#pop" endRegion="function" lookAhead="true" />
170 <IncludeRules context="##Python" />
171 </context>
172
173 <context name="bbString" attribute="String" lineEndContext="bbError" >
174 <keyword attribute="Keyword" context="#stay" String="keywords" />
175 <DetectChar attribute="String" context="#pop" char="&quot;" />
176 <LineContinue attribute="Escape" context="#stay" />
177 <AnyChar attribute="Normal Text" context="#stay" String="=|;," />
178 <RegExpr attribute="BBFunction" context="#stay" String="\$\{@[a-zA-Z0-9._\-\(\), &quot;/]+\}" />
179 <RegExpr attribute="Variable" context="#stay" String="\$\{[A-Za-z0-9_-]+\}" />
180 </context>
181
182 <context name="bbComment" attribute="Comment" lineEndContext="#pop">
183 <IncludeRules context="##Comments" />
184 </context>
185
186 <context name="bbError" attribute="Error" lineEndContext="#stay" >
187 <DetectChar attribute="Error" context="#pop" char="&quot;" />
188 </context>
189
190 </contexts>
191
192 <itemDatas>
193 <!--
194 dsNormal, used for normal text.
195 dsKeyword, used for keywords.
196 dsDataType, used for data types.
197 dsDecVal, used for decimal values.
198 dsBaseN, used for values with a base other than 10.
199 dsFloat, used for float values.
200 dsChar, used for a character.
201 dsString, used for strings.
202 dsComment, used for comments.
203 dsOthers, used for ‘other’ things.
204 dsAlert, used for warning messages.
205 dsFunction, used for function calls.
206 dsRegionMarker, used for region markers.
207 dsError, used for error highlighting and wrong syntax.
208 -->
209 <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" />
210 <itemData name="String" defStyleNum="dsString" spellChecking="true" />
211 <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" />
212 <itemData name="Variable" defStyleNum="dsOthers" spellChecking="false" color="darkred" />
213 <itemData name="Comment" defStyleNum="dsComment" spellChecking="true" />
214 <itemData name="Dependency" defStyleNum="dsDataType" spellChecking="false"/>
215 <itemData name="BBFunction" defStyleNum="dsOthers" spellChecking="false" color="darkblue" />
216 <itemData name="OEFunction" defStyleNum="dsBaseN" spellChecking="false" />
217 <itemData name="Function" defStyleNum="dsFunction" spellChecking="false" />
218 <itemData name="Escape" defStyleNum="dsOthers" spellChecking="false" color="grey" />
219 <itemData name="Error" defStyleNum="dsError" spellChecking="false" />
220
221 </itemDatas>
222
223 </highlighting>
224
225 <general>
226 <comments>
227 <comment name="singleLine" start="#"/>
228 </comments>
229 </general>
230
231 </language>
232 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->