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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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