/usr/share/gtksourceview-3.0/language-specs/modelica.lang is in libgtksourceview-3.0-common 3.10.2-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | <?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Jorn Baayen
Copyright (C) 2012 Jorn Baayen <jorn.baayen@moct7.com>
Based on modelica.xml from Kate, Copyright (C) 2008 Federico Zenith.
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<language id="modelica" _name="Modelica" version="2.0" _section="Scientific">
<metadata>
<property name="mimetypes">text/x-modelica</property>
<property name="globs">*.mo;*.mop</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="comment" _name="Comment" map-to="def:comment"/>
<style id="string" _name="String" map-to="def:string"/>
<style id="operator" _name="Operator" map-to="def:operator"/>
<style id="class-type" _name="Class type" map-to="def:type"/>
<style id="data-type" _name="Data type" map-to="def:type"/>
<style id="default-attribute" _name="Default Attribute" map-to="def:identifier"/>
<style id="boolean" _name="Boolean" map-to="def:boolean"/>
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
<style id="floating-point" _name="Floating Point" map-to="def:floating-point"/>
<style id="base-n-integer" _name="Base-N Integer" map-to="def:base-n-integer"/>
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
<style id="builtin" _name="Builtin" map-to="def:builtin"/>
</styles>
<definitions>
<context id="double-quoted-string" style-ref="string" end-at-line-end="false" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
</context>
<!--To see the list of operators, use the function __operators__-->
<context id="operator" style-ref="operator">
<match extended="true">
(\.)?\+{1,2}?(?!\+) | # arithmetic operators
(\.)?\-{1,2}?(?!\-) | # already counting
(\.)?\*{1,2}?(?!\*) | # with auto increment,
(\.)?\/(?!\^) | # element by element,
(\.)?\\(?!\^) | # left division
(\.)?\^(?!\^) | # and both exp
(?<=[0-9a-zA-Z_)\]}])(\.)?' | # transpose operator
<=? | >=? | != | ~= | == | <> | # comparison operators
&{1,2}?(?!&) | \|{1,2}?(?!\|) | ! | ~ | # boolean operators
= | # assignment operator
: | # range operator
</match>
</context>
<context id="class-type" style-ref="class-type">
<keyword>class</keyword>
<keyword>block</keyword>
<keyword>connector</keyword>
<keyword>function</keyword>
<keyword>model</keyword>
<keyword>package</keyword>
<keyword>record</keyword>
<keyword>type</keyword>
</context>
<context id="data-type" style-ref="data-type">
<keyword>Boolean</keyword>
<keyword>enumeration</keyword>
<keyword>ExternalObject</keyword>
<keyword>Integer</keyword>
<keyword>Real</keyword>
<keyword>StateSelect</keyword>
<keyword>String</keyword>
</context>
<context id="default-attribute" style-ref="default-attribute">
<keyword>display</keyword>
<keyword>fixed</keyword>
<keyword>max</keyword>
<keyword>min</keyword>
<keyword>nominal</keyword>
<keyword>quantity</keyword>
<keyword>start</keyword>
<keyword>stateSelect</keyword>
<keyword>unit</keyword>
<keyword>value</keyword>
</context>
<context id="boolean" style-ref="boolean">
<!-- falase and true can be used as functions too. Do not highlight as
boolean if followed by parentheses -->
<suffix>\b(?!(\s)*\()</suffix>
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<context id="decimal" style-ref="decimal">
<match>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</match>
</context>
<context id="floating-point-number" style-ref="floating-point">
<match>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</match>
</context>
<!--To see the list of keywords, use the function __keywords__-->
<context id="keyword" style-ref="keyword">
<keyword>algorithm</keyword>
<keyword>and</keyword>
<keyword>annotation</keyword>
<keyword>assert</keyword>
<keyword>break</keyword>
<keyword>connect</keyword>
<keyword>constant</keyword>
<keyword>constrainedby</keyword>
<keyword>discrete</keyword>
<keyword>else</keyword>
<keyword>elseif</keyword>
<keyword>elsewhen</keyword>
<keyword>encapsulated</keyword>
<keyword>end</keyword>
<keyword>equation</keyword>
<keyword>expandable</keyword>
<keyword>extends</keyword>
<keyword>external</keyword>
<keyword>false</keyword>
<keyword>final</keyword>
<keyword>flow</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>import</keyword>
<keyword>in</keyword>
<keyword>inner</keyword>
<keyword>input</keyword>
<keyword>loop</keyword>
<keyword>not</keyword>
<keyword>or</keyword>
<keyword>outer</keyword>
<keyword>output</keyword>
<keyword>parameter</keyword>
<keyword>partial</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>redeclare</keyword>
<keyword>replaceable</keyword>
<keyword>return</keyword>
<keyword>then</keyword>
<keyword>true</keyword>
<keyword>when</keyword>
<keyword>while</keyword>
<keyword>within</keyword>
</context>
<context id="builtin" style-ref="builtin">
<!-- NOTE this is more like a built-in variable, but as it changes
its value during the simulation it is more like a function
without the (), and has therefore been placed here.-->
<keyword>time</keyword>
<keyword>abs</keyword>
<keyword>ceil</keyword>
<keyword>div</keyword>
<keyword>floor</keyword>
<keyword>integer</keyword>
<keyword>mod</keyword>
<keyword>rem</keyword>
<keyword>sign</keyword>
<keyword>sqrt</keyword>
<keyword>sin</keyword>
<keyword>cos</keyword>
<keyword>tan</keyword>
<keyword>asin</keyword>
<keyword>acos</keyword>
<keyword>atan</keyword>
<keyword>atan2</keyword>
<keyword>sinh</keyword>
<keyword>cosh</keyword>
<keyword>tanh</keyword>
<keyword>exp</keyword>
<keyword>log</keyword>
<keyword>log10</keyword>
<keyword>analysisType</keyword>
<keyword>cardinality</keyword> <!-- NOTE deprecated in 3.0. -->
<keyword>change</keyword>
<keyword>delay</keyword>
<keyword>der</keyword>
<keyword>direction</keyword>
<keyword>edge</keyword>
<keyword>initial</keyword>
<keyword>isPresent</keyword>
<keyword>noEvent</keyword>
<keyword>pre</keyword>
<keyword>reinit</keyword>
<keyword>sample</keyword>
<keyword>semiLinear</keyword>
<keyword>smooth</keyword>
<keyword>terminal</keyword>
<keyword>terminate</keyword>
<keyword>ndims</keyword>
<keyword>size</keyword>
<keyword>scalar</keyword>
<keyword>vector</keyword>
<keyword>matrix</keyword>
<keyword>array</keyword>
<keyword>zeros</keyword>
<keyword>ones</keyword>
<keyword>fill</keyword>
<keyword>identity</keyword>
<keyword>diagonal</keyword>
<keyword>linspace</keyword>
<keyword>min</keyword>
<keyword>max</keyword>
<keyword>sum</keyword>
<keyword>product</keyword>
<keyword>transpose</keyword>
<keyword>outerProduct</keyword>
<keyword>symmetric</keyword>
<keyword>cross</keyword>
<keyword>skew</keyword>
<keyword>cat</keyword>
</context>
<context id="modelica" class="no-spell-check">
<include>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-comment-multiline"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="double-quoted-string"/>
<context ref="operator"/>
<context ref="class-type"/>
<context ref="data-type"/>
<context ref="default-attribute"/>
<context ref="boolean"/>
<context ref="decimal"/>
<context ref="floating-point-number"/>
<context ref="keyword"/>
<context ref="builtin"/>
</include>
</context>
</definitions>
</language>
|