/[ascend]/trunk/pygtk/gnome/ascend.lang
ViewVC logotype

Contents of /trunk/pygtk/gnome/ascend.lang

Parent Directory Parent Directory | Revision Log Revision Log


Revision 822 - (show annotations) (download)
Thu Aug 17 14:54:26 2006 UTC (13 years, 11 months ago) by johnpye
File size: 12340 byte(s)
Added a sun position and extraterrestrial radiation model using the equations from Duffie and Beckman.
When combined with the new data reader, this will start to be useful for 'real' solar energy problems.
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3 Syntax definition file for ASCEND modelling language.
4 Put this file into /usr/share/gtksourceview-[VERSION]/language-specs/ascend.lang
5
6 John Pye (C) 2005
7 -->
8
9 <!-- gtksourceview ASCEND IV language specification -->
10
11 <!DOCTYPE language SYSTEM "language.dtd">
12 <language _name="ASCEND" version="1.0" _section="Sources" mimetypes="text/x-ascend">
13
14 <escape-char>\</escape-char>
15
16 <!-- notes -->
17
18 <block-comment _name = "Note" style= "Others 2" end-at-line-end = "FALSE">
19 <start-regex>^\s*NOTES</start-regex>
20 <end-regex>END\s+NOTES</end-regex>
21 </block-comment>
22
23 <block-comment _name = "Stop" style= "Comment" end-at-line-end = "FALSE">
24 <start-regex>STOP\s+\{</start-regex>
25 <end-regex>\}</end-regex>
26 </block-comment>
27
28 <!-- Literals -->
29
30 <string _name="Text" style="String" end-at-line-end="FALSE">
31 <start-regex>&quot;</start-regex>
32 <end-regex>&quot;</end-regex>
33 </string>
34
35 <string _name="String Constant" style="String" end-at-line-end="FALSE">
36 <start-regex>&apos;</start-regex>
37 <end-regex>&apos;</end-regex>
38 </string>
39
40 <pattern-item _name="Integer Literals" style="Decimal">
41 <regex>\b[0-9]+\b</regex>
42 </pattern-item>
43
44 <pattern-item _name="Number Literals" style="Floating Point">
45 <regex>(\b[-+]?[0-9]+(\.[0-9]+)?|\.[0-9]+)([Ee][\+-]?[0-9]+)?\b</regex>
46 </pattern-item>
47
48
49 <!-- Comments -->
50
51
52 <block-comment _name="Block Comment" style="Comment">
53 <start-regex>\(\*</start-regex>
54 <end-regex>\*\)</end-regex>
55 </block-comment>
56
57 <!-- punctuation -->
58
59 <!--
60 <pattern-item _name="Punctuation" style="Keyword">
61 <regex>(:=|[\+\*\/\-\|\^\(\)=;-])</regex>
62 </pattern-item>
63 -->
64
65 <!-- Reserved Words -->
66
67 <keyword-list _name="Keywords" style="Keyword" case-sensitive="TRUE">
68 <keyword>ADD</keyword>
69 <keyword>AND</keyword>
70 <keyword>ALIASES</keyword>
71 <keyword>ARE_ALIKE</keyword>
72 <keyword>ARE_THE_SAME</keyword>
73 <keyword>ARE_NOT_THE_SAME</keyword>
74 <keyword>ASSERT</keyword>
75 <keyword>ATOM</keyword>
76 <keyword>CALL</keyword>
77 <keyword>CASE</keyword>
78 <keyword>CARD</keyword>
79 <keyword>CHECK</keyword>
80 <keyword>CHOICE</keyword>
81 <keyword>CONSTANT</keyword>
82 <keyword>CONDITIONAL</keyword>
83 <keyword>CREATE</keyword>
84 <keyword>DATA</keyword>
85 <keyword>DEFAULT</keyword>
86 <keyword>DEFINITION</keyword>
87 <keyword>DO</keyword>
88 <keyword>ELSE</keyword>
89 <keyword>END</keyword>
90 <keyword>FIX</keyword>
91 <keyword>FOR</keyword>
92 <keyword>FREE</keyword>
93 <keyword>IF</keyword>
94 <keyword>IMPORT</keyword>
95 <keyword>IN</keyword>
96 <keyword>INPUT</keyword>
97 <keyword>INTERSECTION</keyword>
98 <keyword>IS_A</keyword>
99 <keyword>IS_REFINED_TO</keyword>
100 <keyword>MAX</keyword>
101 <keyword>MAXIMIZE</keyword>
102 <keyword>METHOD</keyword>
103 <keyword>METHODS</keyword>
104 <keyword>MIN</keyword>
105 <keyword>MINIMIZE</keyword>
106 <keyword>MODEL</keyword>
107 <keyword>NOTES</keyword>
108 <keyword>OF</keyword>
109 <keyword>OR</keyword>
110 <keyword>OTHERWISE</keyword>
111 <keyword>OUTPUT</keyword>
112 <keyword>PROVIDE</keyword>
113 <keyword>PROD</keyword>
114 <keyword>REPLACE</keyword>
115 <keyword>REQUIRE</keyword>
116 <keyword>REFINES</keyword>
117 <keyword>RUN</keyword>
118 <keyword>SATISFIED</keyword>
119 <keyword>SELECT</keyword>
120 <keyword>SELF</keyword>
121 <keyword>STUDY</keyword>
122 <keyword>SUCH_THAT</keyword>
123 <keyword>SUM</keyword>
124 <keyword>SWITCH</keyword>
125 <keyword>THEN</keyword>
126 <keyword>UNIVERSAL</keyword>
127 <keyword>UNION</keyword>
128 <keyword>USE</keyword>
129 <keyword>WHEN</keyword>
130 <keyword>WHERE</keyword>
131 <keyword>WITH_VALUE</keyword>
132 <keyword>WILL_BE</keyword>
133 <keyword>WILL_BE_THE_SAME</keyword>
134 <keyword>WILL_NOT_BE_THE_SAME</keyword>
135 </keyword-list>
136
137 <!-- units -->
138
139 <pattern-item _name="Units" style="Data Type">
140 <regex>\{[A-Za-z^0-9_/\*\?]+\}</regex>
141 </pattern-item>
142
143 <!-- dimension -->
144
145 <pattern-item _name="Dimension" style="Data Type">
146 <regex>\bDIMENSIONLESS|DIMENSION (1/)?(([MQTLCEPS]|TMP|LUM)(\^[0-9]+)?)([\*\/]([MQTLCEPS]|TMP|LUM)(\^[0-9]+)?)*\b</regex>
147 </pattern-item>
148
149 <!-- constant -->
150
151 <keyword-list _name="Builtin Constants" style="Preprocessor" case-sensitive="true">
152 <keyword>FALSE</keyword>
153 <keyword>TRUE</keyword>
154 <keyword>real_constant</keyword>
155 <keyword>boolean</keyword>
156 <keyword>symbol</keyword>
157 <keyword>integer</keyword>
158 <keyword>real</keyword>
159 <keyword>set</keyword>
160 </keyword-list>
161
162 <keyword-list _name="Standard Constants" style="Preprocessor" case-sensitive="true">
163 <keyword>constant</keyword>
164 <keyword>critical_compressibility</keyword>
165 <keyword>acentric_factor</keyword>
166 <keyword>UNIFAC_size</keyword>
167 <keyword>Wilson_constant</keyword>
168 <keyword>vapor_pressure_constant</keyword>
169 <keyword>factor_constant</keyword>
170 <keyword>molar_weight_constant</keyword>
171 <keyword>atomic_mass_constant</keyword>
172 <keyword>temperature_constant</keyword>
173 <keyword>boiling_temperature</keyword>
174 <keyword>critical_temperature</keyword>
175 <keyword>reference_temperature</keyword>
176 <keyword>UNIFAC_a</keyword>
177 <keyword>pressure_constant</keyword>
178 <keyword>critical_pressure</keyword>
179 <keyword>reference_pressure</keyword>
180 <keyword>molar_volume_constant</keyword>
181 <keyword>critical_volume</keyword>
182 <keyword>reference_molar_volume</keyword>
183 <keyword>reference_mass_density</keyword>
184 <keyword>molar_energy_constant</keyword>
185 <keyword>reference_molar_energy</keyword>
186 <keyword>enthalpy_of_formation_constant</keyword>
187 <keyword>enthalpy_of_formation_constant</keyword>
188 <keyword>heat_of_vaporization_constant</keyword>
189 <keyword>Wilson_energy_constant</keyword>
190 <keyword>molar_entropy_constant</keyword>
191 <keyword>reference_molar_entropy</keyword>
192 <keyword>heat_capacity_constant</keyword>
193 <keyword>heat_capacity_a_constant</keyword>
194 <keyword>heat_capacity_b_constant</keyword>
195 <keyword>heat_capacity_c_constant</keyword>
196 <keyword>heat_capacity_d_constant</keyword>
197 <keyword>gas_constant</keyword>
198 <keyword>gravity_constant</keyword>
199 <keyword>circle_constant</keyword>
200 <keyword>speed_of_light</keyword>
201 <keyword>planck_constant</keyword>
202 <keyword>avogadro_constant</keyword>
203 <keyword>permittivity_constant</keyword>
204 <keyword>permeability_constant</keyword>
205 <keyword>electron_charge</keyword>
206 <keyword>electron_mass</keyword>
207 <keyword>proton_mass</keyword>
208 <keyword>boolean_start_true</keyword>
209 <keyword>boolean_start_false</keyword>
210 <keyword>start_true</keyword>
211 <keyword>start_false</keyword>
212 <keyword>free_energy_of_formation_constant</keyword>
213 <keyword>permeability_constant</keyword>
214 <keyword>permeability_constant</keyword>
215 <keyword>permeability_constant</keyword>
216 <keyword>permeability_constant</keyword>
217 <keyword>permeability_constant</keyword>
218 <keyword>permeability_constant</keyword>
219 </keyword-list>
220
221 <!-- equation labels -->
222
223 <pattern-item _name="Equation Labels" style="String">
224 <regex>^\s*[a-zA-Z][a-zA-Z0-9_]*(\[[a-zA-Z][a-zA-Z0-9_]*\]|\[0-9]+\])?\:</regex>
225 </pattern-item>
226
227
228 <!-- Functions -->
229
230 <!-- Single-Row Functions -->
231
232 <keyword-list _name="Numerical Functions" style="Function" case-sensitive="TRUE">
233 <keyword>abs</keyword>
234 <keyword>(arc)?(cos|sin|tan)h?</keyword>
235 <keyword>erf</keyword>
236 <keyword>exp</keyword>
237 <keyword>lnm?</keyword>
238 <keyword>log10</keyword>
239 </keyword-list>
240
241 <!-- METHODS -->
242
243 <keyword-list _name="Standard model methods" style="Function" case-sensitive="TRUE">
244 <keyword>default_self</keyword>
245 <keyword>on_load</keyword>
246 <keyword>specify</keyword>
247 <keyword>values</keyword>
248 <keyword>self_test</keyword>
249 <keyword>ClearAll</keyword>
250 <keyword>bound_self</keyword>
251 <keyword>scale_self</keyword>
252 <keyword>reset</keyword>
253 </keyword-list>
254
255 <!-- Default measures -->
256
257 <keyword-list _name = "System Atoms" style="Data Type" case-sensitive="TRUE">
258 <keyword>relation</keyword>
259 <keyword>logic_relation</keyword>
260 <keyword>solver_var</keyword>
261 <keyword>lower_bound</keyword>
262 <keyword>upper_bound</keyword>
263 <keyword>nominal</keyword>
264 <keyword>included</keyword>
265 <keyword>message</keyword>
266 <keyword>fixed</keyword>
267 <keyword>boolean_var</keyword>
268 <keyword>generic_real</keyword>
269 <keyword>solver_int</keyword>
270 <keyword>relaxed</keyword>
271 <keyword>is_zero</keyword>
272 <keyword>solver_binary</keyword>
273 <keyword>solver_semi</keyword>
274 </keyword-list>
275
276 <keyword-list _name = "Standard Atoms" style="Data Type" case-sensitive="TRUE">
277 <keyword>bound_width</keyword>
278 <keyword>scaling_constant</keyword>
279 <keyword>ode_counter</keyword>
280 <keyword>obs_counter</keyword>
281 <keyword>real_parameter</keyword>
282 <keyword>length_parameter</keyword>
283 <keyword>positive_variable</keyword>
284 <keyword>variable</keyword>
285 <keyword>fraction</keyword>
286 <keyword>positive_factor</keyword>
287 <keyword>small_factor</keyword>
288 <keyword>small_positive_factor</keyword>
289 <keyword>reduced_pressure</keyword>
290 <keyword>exp_sub</keyword>
291 <keyword>power_sub</keyword>
292 <keyword>inverse_temperature</keyword>
293 <keyword>force</keyword>
294 <keyword>force_per_length</keyword>
295 <keyword>surface_tension</keyword>
296 <keyword>vapor_pressure</keyword>
297 <keyword>k_constant</keyword>
298 <keyword>molar_mass</keyword>
299 <keyword>molar_rate</keyword>
300 <keyword>mass</keyword>
301 <keyword>mole_scale</keyword>
302 <keyword>mole</keyword>
303 <keyword>mass_rate</keyword>
304 <keyword>mass_flux</keyword>
305 <keyword>molar_rate_scale</keyword>
306 <keyword>conc_rate</keyword>
307 <keyword>mole_fraction</keyword>
308 <keyword>mass_fraction</keyword>
309 <keyword>molar_volume</keyword>
310 <keyword>volume_scale</keyword>
311 <keyword>volume_rate_scale</keyword>
312 <keyword>volume_rate_square</keyword>
313 <keyword>volume_expansivity</keyword>
314 <keyword>molar_density</keyword>
315 <keyword>mass_density</keyword>
316 <keyword>molar_energy</keyword>
317 <keyword>energy_scale</keyword>
318 <keyword>energy_rate_scale</keyword>
319 <keyword>energy_rate</keyword>
320 <keyword>heat_capacity</keyword>
321 <keyword>heat_transfer_coefficient</keyword>
322 <keyword>molar_energy_rate</keyword>
323 <keyword>molar_heat_capacity</keyword>
324 <keyword>molar_entropy</keyword>
325 <keyword>relative_volatility</keyword>
326 <keyword>power_per_length</keyword>
327 <keyword>irradiance</keyword>
328 <keyword>irradiation</keyword>
329 <keyword>specific_energy</keyword>
330 <keyword>specific_enthalpy</keyword>
331 <keyword>specific_entropy</keyword>
332 <keyword>specific_heat_capacity</keyword>
333 <keyword>specific_volume</keyword>
334 <keyword>entropy</keyword>
335 <keyword>entropy_rate</keyword>
336 <keyword>conc_rate</keyword>
337 <keyword>partition_coefficient</keyword>
338 <keyword>monetary_unit</keyword>
339 <keyword>cost_per_volume</keyword>
340 <keyword>cost_per_mass</keyword>
341 <keyword>cost_per_time</keyword>
342 <keyword>cost_per_energy</keyword>
343 <keyword>inverse_area</keyword>
344 <keyword>angle</keyword>
345 <keyword>solid_angle</keyword>
346 <keyword>time</keyword>
347 <keyword>speed</keyword>
348 <keyword>acceleration</keyword>
349 <keyword>stiffness</keyword>
350 <keyword>viscosity</keyword>
351 <keyword>thermal_conductivity</keyword>
352 <keyword>diffusivity</keyword>
353 <keyword>voltage</keyword>
354 <keyword>resistance</keyword>
355 <keyword>current</keyword>
356 <keyword>capacitance</keyword>
357 <keyword>inductance</keyword>
358 <keyword>magnetic_field</keyword>
359 <keyword>electric_field</keyword>
360 <keyword>delta_distance</keyword>
361 <keyword>delta_temperature</keyword>
362 <keyword>delta_pressure</keyword>
363 <keyword>delta_mass</keyword>
364 <keyword>delta_mole</keyword>
365 <keyword>delta_mass_rate</keyword>
366 <keyword>delta_molar_rate</keyword>
367 <keyword>delta_volume_rate</keyword>
368 <keyword>delta_energy_rate</keyword>
369 <keyword>delta_molar_energy_rate</keyword>
370 <keyword>delta_entropy_rate</keyword>
371 <keyword>mass_sec</keyword>
372 <keyword>mole_sec</keyword>
373 </keyword-list>
374
375 <keyword-list _name = "Data Types" style = "Data Type" case-sensitive="TRUE">
376 <keyword>factor</keyword>
377 <keyword>distance</keyword>
378 <keyword>pressure</keyword>
379 <keyword>area</keyword>
380 <keyword>volume</keyword>
381 <keyword>temperature</keyword>
382 <keyword>energy</keyword>
383 <keyword>volume_rate</keyword>
384 <keyword>frequency</keyword>
385 <keyword>factor</keyword>
386 </keyword-list>
387
388 <!-- variables -->
389
390 <!--
391 <pattern-item _name="Variables" style="Variable">
392 <regex>[a-zA-Z_][a-zA-Z0-9_]*</regex>
393 </pattern-item>
394 -->
395
396 </language>

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22