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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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