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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 747 - (hide annotations) (download)
Tue Jul 11 05:42:43 2006 UTC (16 years, 6 months ago) by johnpye
File size: 12047 byte(s)
Added couple of missing keywords: 'OF' and 'set'.
1 johnpye 132 <?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 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     <keyword>INTERSECTION</keyword>
97     <keyword>IS_A</keyword>
98     <keyword>IS_REFINED_TO</keyword>
99     <keyword>MAX</keyword>
100     <keyword>MAXIMIZE</keyword>
101     <keyword>METHOD</keyword>
102     <keyword>METHODS</keyword>
103     <keyword>MIN</keyword>
104     <keyword>MINIMIZE</keyword>
105     <keyword>MODEL</keyword>
106     <keyword>NOTES</keyword>
107 johnpye 747 <keyword>OF</keyword>
108 johnpye 132 <keyword>OR</keyword>
109     <keyword>OTHERWISE</keyword>
110     <keyword>PROVIDE</keyword>
111     <keyword>PROD</keyword>
112     <keyword>REPLACE</keyword>
113     <keyword>REQUIRE</keyword>
114     <keyword>REFINES</keyword>
115     <keyword>RUN</keyword>
116     <keyword>SATISFIED</keyword>
117     <keyword>SELECT</keyword>
118     <keyword>SELF</keyword>
119     <keyword>STUDY</keyword>
120     <keyword>SUCH_THAT</keyword>
121     <keyword>SUM</keyword>
122     <keyword>SWITCH</keyword>
123     <keyword>THEN</keyword>
124     <keyword>UNIVERSAL</keyword>
125     <keyword>UNION</keyword>
126     <keyword>USE</keyword>
127     <keyword>WHEN</keyword>
128     <keyword>WHERE</keyword>
129 johnpye 180 <keyword>WITH_VALUE</keyword>
130 johnpye 132 <keyword>WILL_BE</keyword>
131     <keyword>WILL_BE_THE_SAME</keyword>
132     <keyword>WILL_NOT_BE_THE_SAME</keyword>
133     </keyword-list>
134    
135     <!-- units -->
136    
137     <pattern-item _name="Units" style="Data Type">
138     <regex>\{[A-Za-z^0-9_/\*\?]+\}</regex>
139     </pattern-item>
140    
141     <!-- dimension -->
142    
143     <pattern-item _name="Dimension" style="Data Type">
144     <regex>\bDIMENSIONLESS|DIMENSION (1/)?(([MQTLCEPS]|TMP|LUM)(\^[0-9]+)?)([\*\/]([MQTLCEPS]|TMP|LUM)(\^[0-9]+)?)*\b</regex>
145     </pattern-item>
146    
147     <!-- constant -->
148    
149     <keyword-list _name="Builtin Constants" style="Preprocessor" case-sensitive="true">
150     <keyword>FALSE</keyword>
151     <keyword>TRUE</keyword>
152     <keyword>real_constant</keyword>
153     <keyword>boolean</keyword>
154     <keyword>symbol</keyword>
155     <keyword>integer</keyword>
156     <keyword>real</keyword>
157 johnpye 747 <keyword>set</keyword>
158 johnpye 132 </keyword-list>
159    
160     <keyword-list _name="Standard Constants" style="Preprocessor" case-sensitive="true">
161     <keyword>constant</keyword>
162     <keyword>critical_compressibility</keyword>
163     <keyword>acentric_factor</keyword>
164     <keyword>UNIFAC_size</keyword>
165     <keyword>Wilson_constant</keyword>
166     <keyword>vapor_pressure_constant</keyword>
167     <keyword>factor_constant</keyword>
168     <keyword>molar_weight_constant</keyword>
169     <keyword>atomic_mass_constant</keyword>
170     <keyword>temperature_constant</keyword>
171     <keyword>boiling_temperature</keyword>
172     <keyword>critical_temperature</keyword>
173     <keyword>reference_temperature</keyword>
174     <keyword>UNIFAC_a</keyword>
175     <keyword>pressure_constant</keyword>
176     <keyword>critical_pressure</keyword>
177     <keyword>reference_pressure</keyword>
178     <keyword>molar_volume_constant</keyword>
179     <keyword>critical_volume</keyword>
180     <keyword>reference_molar_volume</keyword>
181     <keyword>reference_mass_density</keyword>
182     <keyword>molar_energy_constant</keyword>
183     <keyword>reference_molar_energy</keyword>
184     <keyword>enthalpy_of_formation_constant</keyword>
185     <keyword>enthalpy_of_formation_constant</keyword>
186     <keyword>heat_of_vaporization_constant</keyword>
187     <keyword>Wilson_energy_constant</keyword>
188     <keyword>molar_entropy_constant</keyword>
189     <keyword>reference_molar_entropy</keyword>
190     <keyword>heat_capacity_constant</keyword>
191     <keyword>heat_capacity_a_constant</keyword>
192     <keyword>heat_capacity_b_constant</keyword>
193     <keyword>heat_capacity_c_constant</keyword>
194     <keyword>heat_capacity_d_constant</keyword>
195     <keyword>gas_constant</keyword>
196     <keyword>gravity_constant</keyword>
197     <keyword>circle_constant</keyword>
198     <keyword>speed_of_light</keyword>
199     <keyword>planck_constant</keyword>
200     <keyword>avogadro_constant</keyword>
201     <keyword>permittivity_constant</keyword>
202     <keyword>permeability_constant</keyword>
203     <keyword>electron_charge</keyword>
204     <keyword>electron_mass</keyword>
205     <keyword>proton_mass</keyword>
206     <keyword>boolean_start_true</keyword>
207     <keyword>boolean_start_false</keyword>
208     <keyword>start_true</keyword>
209     <keyword>start_false</keyword>
210     <keyword>free_energy_of_formation_constant</keyword>
211     <keyword>permeability_constant</keyword>
212     <keyword>permeability_constant</keyword>
213     <keyword>permeability_constant</keyword>
214     <keyword>permeability_constant</keyword>
215     <keyword>permeability_constant</keyword>
216     <keyword>permeability_constant</keyword>
217     </keyword-list>
218    
219     <!-- equation labels -->
220    
221     <pattern-item _name="Equation Labels" style="String">
222     <regex>^\s*[a-zA-Z][a-zA-Z0-9_]*\:</regex>
223     </pattern-item>
224    
225    
226     <!-- Functions -->
227    
228     <!-- Single-Row Functions -->
229    
230 johnpye 215 <keyword-list _name="Numerical Functions" style="Function" case-sensitive="TRUE">
231 johnpye 132 <keyword>abs</keyword>
232     <keyword>(arc)?(cos|sin|tan)h?</keyword>
233     <keyword>erf</keyword>
234     <keyword>exp</keyword>
235     <keyword>lnm?</keyword>
236 johnpye 215 <keyword>log10</keyword>
237 johnpye 132 </keyword-list>
238    
239 johnpye 215 <!-- METHODS -->
240    
241     <keyword-list _name="Standard model methods" style="Function" case-sensitive="TRUE">
242     <keyword>default_self</keyword>
243     <keyword>specify</keyword>
244     <keyword>values</keyword>
245     <keyword>self_test</keyword>
246     <keyword>ClearAll</keyword>
247     <keyword>bound_self</keyword>
248     <keyword>scale_self</keyword>
249     <keyword>reset</keyword>
250     </keyword-list>
251    
252 johnpye 132 <!-- Default measures -->
253    
254     <keyword-list _name = "System Atoms" style="Data Type" case-sensitive="TRUE">
255     <keyword>relation</keyword>
256     <keyword>logic_relation</keyword>
257     <keyword>solver_var</keyword>
258     <keyword>lower_bound</keyword>
259     <keyword>upper_bound</keyword>
260     <keyword>nominal</keyword>
261     <keyword>included</keyword>
262     <keyword>message</keyword>
263     <keyword>fixed</keyword>
264     <keyword>boolean_var</keyword>
265     <keyword>generic_real</keyword>
266     <keyword>solver_int</keyword>
267     <keyword>relaxed</keyword>
268     <keyword>is_zero</keyword>
269     <keyword>solver_binary</keyword>
270     <keyword>solver_semi</keyword>
271     </keyword-list>
272    
273     <keyword-list _name = "Standard Atoms" style="Data Type" case-sensitive="TRUE">
274     <keyword>bound_width</keyword>
275     <keyword>scaling_constant</keyword>
276     <keyword>ode_counter</keyword>
277     <keyword>obs_counter</keyword>
278     <keyword>real_parameter</keyword>
279     <keyword>length_parameter</keyword>
280     <keyword>positive_variable</keyword>
281     <keyword>variable</keyword>
282     <keyword>fraction</keyword>
283     <keyword>positive_factor</keyword>
284     <keyword>small_factor</keyword>
285     <keyword>small_positive_factor</keyword>
286     <keyword>reduced_pressure</keyword>
287     <keyword>exp_sub</keyword>
288     <keyword>power_sub</keyword>
289     <keyword>inverse_temperature</keyword>
290     <keyword>force</keyword>
291     <keyword>vapor_pressure</keyword>
292     <keyword>k_constant</keyword>
293     <keyword>molar_mass</keyword>
294     <keyword>molar_rate</keyword>
295     <keyword>mass</keyword>
296     <keyword>mole_scale</keyword>
297     <keyword>mole</keyword>
298     <keyword>mass_rate</keyword>
299     <keyword>molar_rate_scale</keyword>
300     <keyword>conc_rate</keyword>
301     <keyword>mole_fraction</keyword>
302     <keyword>mass_fraction</keyword>
303     <keyword>molar_volume</keyword>
304     <keyword>volume_scale</keyword>
305     <keyword>volume_rate_scale</keyword>
306     <keyword>volume_rate_square</keyword>
307     <keyword>volume_expansivity</keyword>
308     <keyword>molar_density</keyword>
309     <keyword>mass_density</keyword>
310     <keyword>molar_energy</keyword>
311     <keyword>energy_scale</keyword>
312     <keyword>energy_rate_scale</keyword>
313     <keyword>energy_rate</keyword>
314     <keyword>heat_capacity</keyword>
315 johnpye 669 <keyword>heat_transfer_coefficient</keyword>
316 johnpye 132 <keyword>molar_energy_rate</keyword>
317 johnpye 669 <keyword>molar_heat_capacity</keyword>
318 johnpye 132 <keyword>molar_entropy</keyword>
319 johnpye 669 <keyword>relative_volatility</keyword>
320     <keyword>power_per_length</keyword>
321 johnpye 721 <keyword>specific_energy</keyword>
322 johnpye 669 <keyword>specific_enthalpy</keyword>
323     <keyword>specific_entropy</keyword>
324     <keyword>specific_heat_capacity</keyword>
325     <keyword>specific_volume</keyword>
326 johnpye 132 <keyword>entropy</keyword>
327     <keyword>entropy_rate</keyword>
328     <keyword>conc_rate</keyword>
329     <keyword>partition_coefficient</keyword>
330     <keyword>monetary_unit</keyword>
331     <keyword>cost_per_volume</keyword>
332     <keyword>cost_per_mass</keyword>
333     <keyword>cost_per_time</keyword>
334     <keyword>cost_per_energy</keyword>
335     <keyword>inverse_area</keyword>
336     <keyword>angle</keyword>
337     <keyword>solid_angle</keyword>
338     <keyword>time</keyword>
339     <keyword>speed</keyword>
340     <keyword>acceleration</keyword>
341 johnpye 669 <keyword>stiffness</keyword>
342 johnpye 132 <keyword>viscosity</keyword>
343     <keyword>thermal_conductivity</keyword>
344     <keyword>diffusivity</keyword>
345     <keyword>voltage</keyword>
346     <keyword>resistance</keyword>
347     <keyword>current</keyword>
348     <keyword>capacitance</keyword>
349     <keyword>inductance</keyword>
350     <keyword>magnetic_field</keyword>
351     <keyword>electric_field</keyword>
352     <keyword>delta_distance</keyword>
353     <keyword>delta_temperature</keyword>
354 johnpye 669 <keyword>delta_pressure</keyword>
355 johnpye 132 <keyword>delta_mass</keyword>
356     <keyword>delta_mole</keyword>
357     <keyword>delta_mass_rate</keyword>
358     <keyword>delta_molar_rate</keyword>
359     <keyword>delta_volume_rate</keyword>
360     <keyword>delta_energy_rate</keyword>
361     <keyword>delta_molar_energy_rate</keyword>
362     <keyword>delta_entropy_rate</keyword>
363     <keyword>mass_sec</keyword>
364     <keyword>mole_sec</keyword>
365     </keyword-list>
366    
367     <keyword-list _name = "Data Types" style = "Data Type" case-sensitive="TRUE">
368     <keyword>factor</keyword>
369     <keyword>distance</keyword>
370     <keyword>pressure</keyword>
371     <keyword>area</keyword>
372     <keyword>volume</keyword>
373     <keyword>temperature</keyword>
374     <keyword>energy</keyword>
375     <keyword>volume_rate</keyword>
376     <keyword>frequency</keyword>
377     <keyword>factor</keyword>
378     </keyword-list>
379    
380     <!-- variables -->
381    
382     <!--
383     <pattern-item _name="Variables" style="Variable">
384     <regex>[a-zA-Z_][a-zA-Z0-9_]*</regex>
385     </pattern-item>
386     -->
387    
388     </language>

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