/[ascend]/trunk/tools/gedit/ascend.lang
ViewVC logotype

Annotation of /trunk/tools/gedit/ascend.lang

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2449 - (hide annotations) (download)
Mon Apr 4 23:57:04 2011 UTC (8 years, 8 months ago) by jpye
File size: 12787 byte(s)
Add 'angular_speed', which was missing.
1 johnpye 132 <?xml version="1.0" encoding="UTF-8"?>
2 johnpye 1270 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3 johnpye 132 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 johnpye 1270 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
8 johnpye 132
9     <!-- gtksourceview ASCEND IV language specification -->
10    
11     <!DOCTYPE language SYSTEM "language.dtd">
12 jpye 1527 <language _name="ASCEND" version="1.0" _section="Sources" mimetypes="text/x-ascend-model">
13 johnpye 132
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 johnpye 180 <keyword-list _name="Keywords" style="Keyword" case-sensitive="TRUE">
68 johnpye 132 <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 johnpye 211 <keyword>ASSERT</keyword>
75 johnpye 132 <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 johnpye 211 <keyword>FIX</keyword>
91 johnpye 132 <keyword>FOR</keyword>
92 johnpye 669 <keyword>FREE</keyword>
93 johnpye 132 <keyword>IF</keyword>
94 johnpye 694 <keyword>IMPORT</keyword>
95 johnpye 132 <keyword>IN</keyword>
96 johnpye 783 <keyword>INPUT</keyword>
97 johnpye 132 <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 johnpye 747 <keyword>OF</keyword>
109 johnpye 132 <keyword>OR</keyword>
110     <keyword>OTHERWISE</keyword>
111 johnpye 783 <keyword>OUTPUT</keyword>
112 johnpye 132 <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 jpye 1351 <keyword>UNITS</keyword>
129 johnpye 132 <keyword>USE</keyword>
130     <keyword>WHEN</keyword>
131     <keyword>WHERE</keyword>
132 johnpye 180 <keyword>WITH_VALUE</keyword>
133 johnpye 132 <keyword>WILL_BE</keyword>
134     <keyword>WILL_BE_THE_SAME</keyword>
135     <keyword>WILL_NOT_BE_THE_SAME</keyword>
136     </keyword-list>
137    
138     <!-- units -->
139    
140     <pattern-item _name="Units" style="Data Type">
141     <regex>\{[A-Za-z^0-9_/\*\?]+\}</regex>
142     </pattern-item>
143    
144     <!-- dimension -->
145    
146     <pattern-item _name="Dimension" style="Data Type">
147     <regex>\bDIMENSIONLESS|DIMENSION (1/)?(([MQTLCEPS]|TMP|LUM)(\^[0-9]+)?)([\*\/]([MQTLCEPS]|TMP|LUM)(\^[0-9]+)?)*\b</regex>
148     </pattern-item>
149    
150     <!-- constant -->
151    
152     <keyword-list _name="Builtin Constants" style="Preprocessor" case-sensitive="true">
153     <keyword>FALSE</keyword>
154     <keyword>TRUE</keyword>
155 johnpye 1157
156 johnpye 132 <keyword>real_constant</keyword>
157 johnpye 1157 <keyword>integer_constant</keyword>
158     <keyword>symbol_constant</keyword>
159     <keyword>boolean_constant</keyword>
160    
161     <keyword>real</keyword>
162     <keyword>integer</keyword>
163     <keyword>symbol</keyword>
164 johnpye 132 <keyword>boolean</keyword>
165 johnpye 747 <keyword>set</keyword>
166 johnpye 132 </keyword-list>
167    
168     <keyword-list _name="Standard Constants" style="Preprocessor" case-sensitive="true">
169     <keyword>constant</keyword>
170     <keyword>critical_compressibility</keyword>
171     <keyword>acentric_factor</keyword>
172     <keyword>UNIFAC_size</keyword>
173     <keyword>Wilson_constant</keyword>
174     <keyword>vapor_pressure_constant</keyword>
175     <keyword>factor_constant</keyword>
176     <keyword>molar_weight_constant</keyword>
177     <keyword>atomic_mass_constant</keyword>
178     <keyword>temperature_constant</keyword>
179     <keyword>boiling_temperature</keyword>
180     <keyword>critical_temperature</keyword>
181     <keyword>reference_temperature</keyword>
182     <keyword>UNIFAC_a</keyword>
183 jpye 1351 <keyword>length_constant</keyword>
184 johnpye 132 <keyword>pressure_constant</keyword>
185     <keyword>critical_pressure</keyword>
186     <keyword>reference_pressure</keyword>
187     <keyword>molar_volume_constant</keyword>
188     <keyword>critical_volume</keyword>
189     <keyword>reference_molar_volume</keyword>
190     <keyword>reference_mass_density</keyword>
191     <keyword>molar_energy_constant</keyword>
192     <keyword>reference_molar_energy</keyword>
193     <keyword>enthalpy_of_formation_constant</keyword>
194     <keyword>enthalpy_of_formation_constant</keyword>
195     <keyword>heat_of_vaporization_constant</keyword>
196     <keyword>Wilson_energy_constant</keyword>
197     <keyword>molar_entropy_constant</keyword>
198     <keyword>reference_molar_entropy</keyword>
199     <keyword>heat_capacity_constant</keyword>
200     <keyword>heat_capacity_a_constant</keyword>
201     <keyword>heat_capacity_b_constant</keyword>
202     <keyword>heat_capacity_c_constant</keyword>
203     <keyword>heat_capacity_d_constant</keyword>
204     <keyword>gas_constant</keyword>
205     <keyword>gravity_constant</keyword>
206     <keyword>circle_constant</keyword>
207     <keyword>speed_of_light</keyword>
208     <keyword>planck_constant</keyword>
209     <keyword>avogadro_constant</keyword>
210     <keyword>permittivity_constant</keyword>
211     <keyword>permeability_constant</keyword>
212     <keyword>electron_charge</keyword>
213     <keyword>electron_mass</keyword>
214     <keyword>proton_mass</keyword>
215     <keyword>boolean_start_true</keyword>
216     <keyword>boolean_start_false</keyword>
217     <keyword>start_true</keyword>
218     <keyword>start_false</keyword>
219     <keyword>free_energy_of_formation_constant</keyword>
220     <keyword>permeability_constant</keyword>
221     </keyword-list>
222    
223     <!-- equation labels -->
224    
225     <pattern-item _name="Equation Labels" style="String">
226 johnpye 759 <regex>^\s*[a-zA-Z][a-zA-Z0-9_]*(\[[a-zA-Z][a-zA-Z0-9_]*\]|\[0-9]+\])?\:</regex>
227 johnpye 132 </pattern-item>
228    
229    
230     <!-- Functions -->
231    
232     <!-- Single-Row Functions -->
233    
234 johnpye 215 <keyword-list _name="Numerical Functions" style="Function" case-sensitive="TRUE">
235 johnpye 132 <keyword>abs</keyword>
236     <keyword>(arc)?(cos|sin|tan)h?</keyword>
237     <keyword>erf</keyword>
238     <keyword>exp</keyword>
239     <keyword>lnm?</keyword>
240 johnpye 215 <keyword>log10</keyword>
241 johnpye 132 </keyword-list>
242    
243 johnpye 215 <!-- METHODS -->
244    
245     <keyword-list _name="Standard model methods" style="Function" case-sensitive="TRUE">
246     <keyword>default_self</keyword>
247 johnpye 783 <keyword>on_load</keyword>
248 johnpye 1157 <keyword>ode_init</keyword>
249 johnpye 215 <keyword>specify</keyword>
250     <keyword>values</keyword>
251     <keyword>self_test</keyword>
252     <keyword>ClearAll</keyword>
253     <keyword>bound_self</keyword>
254     <keyword>scale_self</keyword>
255     <keyword>reset</keyword>
256     </keyword-list>
257    
258 johnpye 132 <!-- Default measures -->
259    
260     <keyword-list _name = "System Atoms" style="Data Type" case-sensitive="TRUE">
261     <keyword>relation</keyword>
262     <keyword>logic_relation</keyword>
263     <keyword>solver_var</keyword>
264     <keyword>lower_bound</keyword>
265     <keyword>upper_bound</keyword>
266     <keyword>nominal</keyword>
267     <keyword>included</keyword>
268     <keyword>message</keyword>
269     <keyword>fixed</keyword>
270     <keyword>boolean_var</keyword>
271     <keyword>generic_real</keyword>
272     <keyword>solver_int</keyword>
273     <keyword>relaxed</keyword>
274     <keyword>is_zero</keyword>
275     <keyword>solver_binary</keyword>
276     <keyword>solver_semi</keyword>
277     </keyword-list>
278    
279     <keyword-list _name = "Standard Atoms" style="Data Type" case-sensitive="TRUE">
280     <keyword>bound_width</keyword>
281     <keyword>scaling_constant</keyword>
282     <keyword>ode_counter</keyword>
283     <keyword>obs_counter</keyword>
284     <keyword>real_parameter</keyword>
285     <keyword>length_parameter</keyword>
286     <keyword>positive_variable</keyword>
287     <keyword>variable</keyword>
288     <keyword>fraction</keyword>
289     <keyword>positive_factor</keyword>
290     <keyword>small_factor</keyword>
291     <keyword>small_positive_factor</keyword>
292     <keyword>reduced_pressure</keyword>
293     <keyword>exp_sub</keyword>
294     <keyword>power_sub</keyword>
295     <keyword>inverse_temperature</keyword>
296     <keyword>force</keyword>
297 johnpye 783 <keyword>force_per_length</keyword>
298     <keyword>surface_tension</keyword>
299 johnpye 132 <keyword>vapor_pressure</keyword>
300     <keyword>k_constant</keyword>
301     <keyword>molar_mass</keyword>
302     <keyword>molar_rate</keyword>
303     <keyword>mass</keyword>
304     <keyword>mole_scale</keyword>
305     <keyword>mole</keyword>
306     <keyword>mass_rate</keyword>
307 johnpye 1157 <keyword>mass_rate_rate</keyword>
308 johnpye 783 <keyword>mass_flux</keyword>
309 johnpye 132 <keyword>molar_rate_scale</keyword>
310     <keyword>conc_rate</keyword>
311     <keyword>mole_fraction</keyword>
312     <keyword>mass_fraction</keyword>
313     <keyword>molar_volume</keyword>
314     <keyword>volume_scale</keyword>
315     <keyword>volume_rate_scale</keyword>
316     <keyword>volume_rate_square</keyword>
317     <keyword>volume_expansivity</keyword>
318     <keyword>molar_density</keyword>
319     <keyword>mass_density</keyword>
320 johnpye 1157 <keyword>density_rate</keyword>
321 johnpye 132 <keyword>molar_energy</keyword>
322     <keyword>energy_scale</keyword>
323     <keyword>energy_rate_scale</keyword>
324     <keyword>energy_rate</keyword>
325     <keyword>heat_capacity</keyword>
326 johnpye 669 <keyword>heat_transfer_coefficient</keyword>
327 johnpye 132 <keyword>molar_energy_rate</keyword>
328 johnpye 669 <keyword>molar_heat_capacity</keyword>
329 johnpye 132 <keyword>molar_entropy</keyword>
330 johnpye 669 <keyword>relative_volatility</keyword>
331     <keyword>power_per_length</keyword>
332 johnpye 1157 <keyword>power_per_volume</keyword>
333     <keyword>pressure_per_temperature</keyword>
334 johnpye 822 <keyword>irradiance</keyword>
335     <keyword>irradiation</keyword>
336 johnpye 721 <keyword>specific_energy</keyword>
337 johnpye 669 <keyword>specific_enthalpy</keyword>
338     <keyword>specific_entropy</keyword>
339     <keyword>specific_heat_capacity</keyword>
340     <keyword>specific_volume</keyword>
341 johnpye 1270 <keyword>specific_power</keyword>
342     <keyword>specific_energy_rate</keyword>
343 johnpye 132 <keyword>entropy</keyword>
344     <keyword>entropy_rate</keyword>
345     <keyword>conc_rate</keyword>
346     <keyword>partition_coefficient</keyword>
347     <keyword>monetary_unit</keyword>
348     <keyword>cost_per_volume</keyword>
349     <keyword>cost_per_mass</keyword>
350     <keyword>cost_per_time</keyword>
351     <keyword>cost_per_energy</keyword>
352     <keyword>inverse_area</keyword>
353     <keyword>angle</keyword>
354     <keyword>solid_angle</keyword>
355     <keyword>time</keyword>
356     <keyword>speed</keyword>
357 jpye 2449 <keyword>angular_speed</keyword>
358 johnpye 132 <keyword>acceleration</keyword>
359 johnpye 669 <keyword>stiffness</keyword>
360 johnpye 132 <keyword>viscosity</keyword>
361     <keyword>thermal_conductivity</keyword>
362     <keyword>diffusivity</keyword>
363     <keyword>voltage</keyword>
364     <keyword>resistance</keyword>
365     <keyword>current</keyword>
366     <keyword>capacitance</keyword>
367     <keyword>inductance</keyword>
368     <keyword>magnetic_field</keyword>
369     <keyword>electric_field</keyword>
370     <keyword>delta_distance</keyword>
371     <keyword>delta_temperature</keyword>
372 johnpye 1157 <keyword>temperature_rate</keyword>
373 johnpye 669 <keyword>delta_pressure</keyword>
374 johnpye 132 <keyword>delta_mass</keyword>
375     <keyword>delta_mole</keyword>
376     <keyword>delta_mass_rate</keyword>
377     <keyword>delta_molar_rate</keyword>
378     <keyword>delta_volume_rate</keyword>
379     <keyword>delta_energy_rate</keyword>
380     <keyword>delta_molar_energy_rate</keyword>
381     <keyword>delta_entropy_rate</keyword>
382     <keyword>mass_sec</keyword>
383     <keyword>mole_sec</keyword>
384 jpye 1351 <keywork>rate</keywork>
385 johnpye 132 </keyword-list>
386    
387     <keyword-list _name = "Data Types" style = "Data Type" case-sensitive="TRUE">
388     <keyword>factor</keyword>
389     <keyword>distance</keyword>
390     <keyword>pressure</keyword>
391 jpye 1558 <keyword>stress</keyword>
392     <keyword>moment</keyword>
393 johnpye 132 <keyword>area</keyword>
394     <keyword>volume</keyword>
395     <keyword>temperature</keyword>
396     <keyword>energy</keyword>
397     <keyword>volume_rate</keyword>
398     <keyword>frequency</keyword>
399     <keyword>factor</keyword>
400     </keyword-list>
401    
402     <!-- variables -->
403    
404     <!--
405     <pattern-item _name="Variables" style="Variable">
406     <regex>[a-zA-Z_][a-zA-Z0-9_]*</regex>
407     </pattern-item>
408     -->
409    
410     </language>

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