1<?xml version="1.0" encoding="UTF-8"?> 2<!-- 3 4 This file is part of GtkSourceView 5 6 Author: Gustavo Giráldez <gustavo.giraldez@gmx.net> 7 Copyright (C) 2003 Gustavo Giráldez <gustavo.giraldez@gmx.net> 8 Copyright (C) 2003 Michael Terry <mike@mterry.name> 9 Copyright (C) 2004 Benoît Dejean <tazforever@dlfp.org> 10 11 GtkSourceView is free software; you can redistribute it and/or 12 modify it under the terms of the GNU Lesser General Public 13 License as published by the Free Software Foundation; either 14 version 2.1 of the License, or (at your option) any later version. 15 16 GtkSourceView is distributed in the hope that it will be useful, 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 Lesser General Public License for more details. 20 21 You should have received a copy of the GNU Lesser General Public License 22 along with this library; if not, see <http://www.gnu.org/licenses/>. 23 24--> 25<language id="ada" name="Ada" version="2.0" _section="Source"> 26 <metadata> 27 <property name="mimetypes">text/x-ada;text/x-adasrc</property> 28 <property name="globs">*.adb;*.ads</property> 29 <property name="line-comment-start">--</property> 30 </metadata> 31 32 <styles> 33 <style id="comment" name="Comment" map-to="def:comment"/> 34 <style id="string" name="String" map-to="def:string"/> 35 <style id="keyword" name="Keyword" map-to="def:keyword"/> 36 <style id="decimal" name="Decimal number" map-to="def:decimal"/> 37 <style id="boolean" name="Boolean value" map-to="def:boolean"/> 38 <style id="storage-class" name="Storage Class" map-to="def:type"/> 39 <style id="type" name="Data Type" map-to="def:type"/> 40 <style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/> 41 <style id="base-n-number" name="Arbitrary base number" map-to="def:base-n-integer"/> 42 <style id="real" name="Real number" map-to="def:floating-point"/> 43 <style id="escaped-character" name="Escaped Character" map-to="def:special-char"/> 44 </styles> 45 46 <default-regex-options case-sensitive="false"/> 47 48 <definitions> 49 50 <context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check"> 51 <start>--</start> 52 <include> 53 <context ref="def:in-line-comment"/> 54 </include> 55 </context> 56 57 <context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check"> 58 <start>"</start> 59 <end>"</end> 60 <!-- no escapes possible except for "" = literal " --> 61 <include> 62 <context id="string-esc" style-ref="escaped-character" extend-parent="true"> 63 <match>""</match> 64 </context> 65 </include> 66 </context> 67 68 <context id="character-constant" style-ref="string"> 69 <match>'.'</match> 70 </context> 71 72 <context id="preprocessor-keyword" style-ref="preprocessor"> 73 <keyword>package</keyword> 74 <keyword>pragma</keyword> 75 <keyword>use</keyword> 76 <keyword>with</keyword> 77 </context> 78 79 <context id="function" style-ref="keyword"> 80 <keyword>function</keyword> 81 <keyword>procedure</keyword> 82 <keyword>return</keyword> 83 </context> 84 85 <context id="keyword" style-ref="keyword"> 86 <keyword>abort</keyword> 87 <keyword>abs</keyword> 88 <keyword>accept</keyword> 89 <keyword>all</keyword> 90 <keyword>and</keyword> 91 <keyword>begin</keyword> 92 <keyword>body</keyword> 93 <keyword>case</keyword> 94 <keyword>declare</keyword> 95 <keyword>delay</keyword> 96 <keyword>do</keyword> 97 <keyword>else</keyword> 98 <keyword>elsif</keyword> 99 <keyword>end</keyword> 100 <keyword>entry</keyword> 101 <keyword>exception</keyword> 102 <keyword>exit</keyword> 103 <keyword>for</keyword> 104 <keyword>generic</keyword> 105 <keyword>goto</keyword> 106 <keyword>if</keyword> 107 <keyword>in</keyword> 108 <keyword>is</keyword> 109 <keyword>loop</keyword> 110 <keyword>mod</keyword> 111 <keyword>new</keyword> 112 <keyword>not</keyword> 113 <keyword>null</keyword> 114 <keyword>or</keyword> 115 <keyword>others</keyword> 116 <keyword>out</keyword> 117 <keyword>protected</keyword> 118 <keyword>raise</keyword> 119 <keyword>record</keyword> 120 <keyword>rem</keyword> 121 <keyword>renames</keyword> 122 <keyword>requeue</keyword> 123 <keyword>reverse</keyword> 124 <keyword>select</keyword> 125 <keyword>separate</keyword> 126 <keyword>subtype</keyword> 127 <keyword>task</keyword> 128 <keyword>terminate</keyword> 129 <keyword>then</keyword> 130 <keyword>type</keyword> 131 <keyword>until</keyword> 132 <keyword>when</keyword> 133 <keyword>while</keyword> 134 <keyword>xor</keyword> 135 </context> 136 137 <context id="storage-class" style-ref="storage-class"> 138 <keyword>abstract</keyword> 139 <keyword>access</keyword> 140 <keyword>aliased</keyword> 141 <keyword>array</keyword> 142 <keyword>at</keyword> 143 <keyword>constant</keyword> 144 <keyword>delta</keyword> 145 <keyword>digits</keyword> 146 <keyword>interface</keyword> 147 <keyword>limited</keyword> 148 <keyword>of</keyword> 149 <keyword>private</keyword> 150 <keyword>range</keyword> 151 <keyword>tagged</keyword> 152 <keyword>synchronized</keyword> 153 </context> 154 155 <context id="type" style-ref="type"> 156 <keyword>boolean</keyword> 157 <keyword>character</keyword> 158 <keyword>count</keyword> 159 <keyword>duration</keyword> 160 <keyword>float</keyword> 161 <keyword>integer</keyword> 162 <keyword>long_float</keyword> 163 <keyword>long_integer</keyword> 164 <keyword>priority</keyword> 165 <keyword>short_float</keyword> 166 <keyword>short_integer</keyword> 167 <keyword>string</keyword> 168 </context> 169 170 <define-regex id="hexnum">[0-9a-f][0-9a-f_]*</define-regex> 171 <define-regex id="exponent">[Ee][+-]?[0-9][0-9_]*</define-regex> 172 173 <context id="based-numeral" style-ref="base-n-number"> 174 <match extended="true"> 175 (?<![\w\.]) 176 [0-9][0-9_]*\#\%{hexnum}(\.\%{hexnum})?\#\%{exponent}? 177 (?![\w\.]) 178 </match> 179 </context> 180 181 <context id="real" style-ref="real"> 182 <match extended="true"> 183 (?<![\w\.]) 184 [0-9][0-9_]*\.[0-9][0-9_]*\%{exponent}? 185 (?![\w\.]) 186 </match> 187 </context> 188 189 <context id="number" style-ref="decimal"> 190 <match extended="true"> 191 (?<![\w\.]) 192 [0-9][0-9_]*(E[+]?[0-9][0-9_]*)? 193 (?![\w\.]) 194 </match> 195 </context> 196 197 <context id="boolean" style-ref="boolean"> 198 <keyword>true</keyword> 199 <keyword>false</keyword> 200 </context> 201 202 <context id="ada" class="no-spell-check"> 203 <include> 204 <context ref="line-comment"/> 205 <context ref="string"/> 206 <context ref="character-constant"/> 207 <context ref="preprocessor-keyword"/> 208 <context ref="function"/> 209 <context ref="keyword"/> 210 <context ref="storage-class"/> 211 <context ref="type"/> 212 <context ref="based-numeral"/> 213 <context ref="real"/> 214 <context ref="number"/> 215 <context ref="boolean"/> 216 </include> 217 </context> 218 219 </definitions> 220</language> 221