Debian Codegraph @

texk/gregorio/gregorio-src/contrib/gabc.lang

raw
1 <?xml version="1.0"?>
2 <!--
3
4 Author: Elie Roux <[email protected]>
5 Copyright (C) 2008-2025 Elie Roux <[email protected]>
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 -->
21 <language id="gabc" _name="Gabc" version="2.0" _section="Sources">
22 <metadata>
23 <property name="globs">*.gabc</property>
24 </metadata>
25 <styles>
26 <style id="attribute-name" _name="Attribute Name" map-to="def:keyword"/>
27 <style id="text" _name="Text" map-to="def:keyword"/>
28 <style id="text-markups" _name="Text Markups" map-to="def:statement"/>
29 <style id="translation" _name="Translation" map-to="def:doc-comment-element"/>
30 <style id="comment" _name="Comment" map-to="def:doc-comment-element"/>
31 <style id="notes" _name="Notes"/>
32 <style id="notes-base" _name="Basic Notes" map-to="def:constant"/>
33 <style id="alterations" _name="Alterations" map-to="def:identifier"/>
34 <style id="spaces" _name="Spaces" map-to="def:special-char"/>
35 </styles>
36 <definitions>
37 <context id="gabc">
38 <include>
39 <context id="header">
40 <include>
41 <context id="attribute-name" style-ref="attribute-name">
42 <match>[^:]+:|;</match>
43 </context>
44 </include>
45 </context>
46 <context id="score">
47 <start>%%</start>
48 <end>%%</end>
49 <include>
50 <context id="text" style-ref="text">
51 <match>[^\(\[&lt;]+</match>
52 </context>
53 <context id="comment" style-ref="comment">
54 <!--<start>%</start>
55 <end>&#x0a;</end>-->
56 <match>\%[^%]\n</match>
57 </context>
58 <context id="translation" style-ref="translation">
59 <start>\[</start>
60 <end>\]</end>
61 </context>
62 <context id="specials-symbol" style-ref="text-markups">
63 <prefix>&lt;</prefix>
64 <suffix>&gt;</suffix>
65 <keyword>v</keyword>
66 <keyword>/v</keyword>
67 <keyword>i</keyword>
68 <keyword>/i</keyword>
69 <keyword>b</keyword>
70 <keyword>/b</keyword>
71 <keyword>tt</keyword>
72 <keyword>/tt</keyword>
73 <keyword>sp</keyword>
74 <keyword>/sp</keyword>
75 </context>
76 <context id="notes" style-ref="notes">
77 <start>\(</start>
78 <end>\)</end>
79 <include>
80 <context id="notes-normal" style-ref="notes-base">
81 <match>[a-mA-M]+</match>
82 </context>
83 <context id="alterations" style-ref="alterations">
84 <match>[&gt;&lt;\~xXyYvVoOwWqQ-Ss\._'1234]+</match>
85 </context>
86 <context id="spaces" style-ref="spaces">
87 <match>[`,;!: /zZ]+</match>
88 </context>
89 </include>
90 </context>
91 </include>
92 </context>
93 </include>
94 </context>
95 </definitions>
96 </language>