ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
metapost.php
Go to the documentation of this file.
1 <?php
2 /*************************************************************************************
3  * metapost.php
4  * -----------
5  * Author: Maxime Chupin (notezik@gmail.com)
6  * Copyright: (c) 2011 Maxime Chupin
7  * Release Version: 1.0.9.0
8  * Date Started: 2011/08/02
9  *
10  * Metapost language file for GeSHi.
11  *
12  * https://en.wikipedia.org/wiki/MetaPost
13  *
14  *************************************************************************************
15  *
16  * This file is part of GeSHi.
17  *
18  * GeSHi is free software; you can redistribute it and/or modify
19  * it under the terms of the GNU General Public License as published by
20  * the Free Software Foundation; either version 2 of the License, or
21  * (at your option) any later version.
22  *
23  * GeSHi is distributed in the hope that it will be useful,
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26  * GNU General Public License for more details.
27  *
28  * You should have received a copy of the GNU General Public License
29  * along with GeSHi; if not, write to the Free Software
30  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31  *
32  ************************************************************************************/
33 
34 $language_data = array (
35  'LANG_NAME' => 'MetaPost',
36  'COMMENT_SINGLE' => array(1 => '%'),
37  'COMMENT_MULTI' => array(
38  'verbatim'=>'etex', //TeX and LaTeX preambule
39  'btex' => 'etex' //TeX invocation
40  ),
41  'COMMENT_REGEXP' => array(
42  ),
43  'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
44  'QUOTEMARKS' => array('"'),
45  'ESCAPE_CHAR' => '',
46  'KEYWORDS' => array(
47  1 => array( //type
48  'boolean',
49  'color', 'cmykcolor',
50  'expr',
51  'numeric',
52  'pair', 'path', 'pen', 'picture',
53  'string', 'suffix',
54  'text', 'transform',
55  ),
56  2 => array( //file construction
57  'beginfig', 'begingroup',
58  'def',
59  'end', 'enddef', 'endfig', 'endgroup',
60  'hide',
61  'image', 'input',
62  'let',
63  'makepen', 'makepath',
64  'newinternal',
65  'primary', 'primarydef',
66  'save', 'secondarydef', 'shipout', 'special',
67  'tertiarydef',
68  'vardef'
69  ),
70  3 => array( //programmation structure
71  'else', 'elseif', 'endfor', 'exitif', 'exitunless',
72  'fi', 'for', 'forever', 'forsuffix',
73  'if',
74  'step',
75  'until', 'upto',
76  ),
77  4 => array( //operations return pair
78  'bot',
79  'dir', 'direction of',
80  'intersectionpoint', 'intiersectiontimes',
81  'lft', 'llcorner', 'lrcorner',
82  'penoffset of', 'point of', 'postcontrol of', 'precontrol of',
83  'rt',
84  'top',
85  'ulcorner', 'unitvector', 'urcorner',
86  'z',
87  ),
88  5 => array( //operations return path or picture or pen
89  'bbox',
90  'center', 'cutafter', 'cutbefore',
91  'dashpart', 'dashpattern',
92  'glyph of',
93  'infont',
94  'pathpart', 'penpart',
95  'reverse',
96  'subpath of',
97  ),
98  6 => array( //operations return string (or complementary)
99  'closefrom',
100  'fontpart',
101  'readfrom',
102  'str', 'substring of',
103  'textpart'
104  ),
105  7 => array( // operations return numeric
106  'abs', 'angle', 'arclength', 'arctime of', 'ASCII',
107  'blackpart', 'bluepart',
108  'ceiling', 'char', 'colormodel', 'cosd', 'cyanpart',
109  'decimal', 'decr', 'directionpoint of', 'directiontime of',
110  'div', 'dotprod',
111  'floor', 'fontsize',
112  'greenpart', 'greypart',
113  'hex',
114  'incr',
115  'length',
116  'magentapart', 'max', 'mexp', 'min', 'mlog', 'mod',
117  'normaldeviate',
118  'oct',
119  'redpart', 'round',
120  'sind', 'sqrt',
121  'uniformdeviate',
122  'xpart', 'xxpart', 'xypart',
123  'yellowpart', 'ypart', 'yxpart', 'yypart',
124  ),
125  8 => array( // operations return boolean
126  'and',
127  'bounded',
128  'clipped',
129  'filled',
130  'known',
131  'not',
132  'odd',
133  'or',
134  'rgbcolor',
135  'stroked',
136  'textual',
137  'unknown'
138  ),
139  9 => array( //operations return color
140  'colorpart'
141  ),
142  10 => array( //operations return transform
143  'inverse'
144  ),
145  11 => array( //constructors
146  'also',
147  'buildcycle',
148  'contour', 'controls', 'cycle',
149  'doublepath',
150  'setbounds',
151  'to',
152  'whatever'
153  ),
154  12 => array( //labels
155  'label',
156  'label.bot',
157  'label.top',
158  'label.llft',
159  'label.lft',
160  'label.ulft',
161  'label.lrt',
162  'label.rt',
163  'label.urt',
164 
165  'labels',
166  'labels.bot',
167  'labels.top',
168  'labels.llft',
169  'labels.lft',
170  'labels.ulft',
171  'labels.lrt',
172  'labels.rt',
173  'labels.urt',
174 
175  'thelabel',
176  'thelabel.bot',
177  'thelabel.top',
178  'thelabel.llft',
179  'thelabel.lft',
180  'thelabel.ulft',
181  'thelabel.lrt',
182  'thelabel.rt',
183  'thelabel.urt',
184 
185  'dotlabel',
186  'dotlabel.bot',
187  'dotlabel.top',
188  'dotlabel.llft',
189  'dotlabel.lft',
190  'dotlabel.ulft',
191  'dotlabel.lrt',
192  'dotlabel.rt',
193  'dotlabel.urt',
194  ),
195  13 => array( //general transformations
196  'about',
197  'reflected', 'reflectedaround',
198  'rotated', 'rotatedabout', 'rotatedaround',
199  'scaled', 'slanted', 'shifted',
200  'transformed',
201  'xscaled',
202  'yscaled',
203  'zscaled',
204  ),
205  14 => array( //draw instructions
206  'addto',
207  'clip', 'cutdraw',
208  'draw', 'drawarrow', 'drawdblarrow', 'drawdot',
209  'fill', 'filldraw',
210  'undraw', 'unfill', 'unfilldraw'
211  ),
212  15 => array( //style of drawing
213  'curl',
214  'dashed', 'drawoptions',
215  'pickup',
216  'tension',
217  'withcmykcolor', 'withcolor',
218  'withgreyscale', 'withpen', 'withpostscript', 'withprescript',
219  'withrgbcolor',
220  ),
221  16 => array( //read write show
222  'errhelp', 'errmessage',
223  'fontmapfile', 'fontmapline',
224  'interim',
225  'loggingall',
226  'message',
227  'scantokens', 'show', 'showdependencies', 'showtoken', 'showvariable',
228  'tracingall', 'tracingnone',
229  'write to',
230  ),
231  17 => array( //Internal variables with numeric values
232  'ahangle', 'ahlength',
233  'bboxmargin',
234  'charcode',
235  'day', 'defaultcolormodel', 'defaultpen', 'defaultscale',
236  'dotlabeldiam',
237  'hour',
238  'labeloffset',
239  'linecap', 'linejoin',
240  'minute', 'miterlimit', 'month', 'mpprocset',
241  'pausing', 'prologues',
242  'restoreclipcolor',
243  'showstopping',
244  'time',
245  'tracingcapsules', 'tracingchoices', 'tracingcommands',
246  'tracingequations', 'tracinglostchars', 'tracingmacros',
247  'tracingonline', 'tracingoutput', 'tracingrestores',
248  'tracingspecs', 'tracingstats', 'tracingtitles',
249  'troffmode', 'truecorners',
250  'warningcheck',
251  'year',
252  ),
253  18 => array( //Internal string variables
254  'filenametemplate',
255  'jobname',
256  'outputformat', 'outputtemplate',
257  ),
258  19 => array( //other predefined variables
259  'background',
260  'currentpen', 'currentpicture', 'cuttings',
261  'defaultfont',
262  'extra_beginfig', 'extra_endfig',
263  ),
264  20 => array( //predefined constants
265  'beveled', 'black', 'blue', 'bp', 'butt',
266  'cc', 'cm',
267  'dd', 'ditto', 'down',
268  'epsilon', 'evenly', 'EOF',
269  'false', 'fullcircle',
270  'green',
271  'halfcircle',
272  'identity',
273  'left',
274  'mitered', 'mm', 'mpversion',
275  'nullpen', 'nullpicture',
276  'origin',
277  'pc', 'pencircle', 'pensquare', 'pt',
278  'quartercircle',
279  'red', 'right', 'rounded',
280  'squared',
281  'true',
282  'unitsquare', 'up',
283  'white', 'withdots',
284  )
285  ),
286  'SYMBOLS' => array(
287  '&', ':=', '=', '+', '-',
288  '*', '**', '/', '++', '+-+',
289  '<', '>', '>=', '<=', '<>',
290  '#@', '@', '@#'
291  ),
292  'CASE_SENSITIVE' => array(
293  GESHI_COMMENTS => false,
294  1 => true,
295  2 => true,
296  3 => true,
297  4 => true,
298  5 => true,
299  6 => true,
300  7 => true,
301  8 => true,
302  9 => true,
303  10 => true,
304  11 => true,
305  12 => true,
306  13 => true,
307  14 => true,
308  15 => true,
309  16 => true,
310  17 => true,
311  18 => true,
312  19 => true,
313  20 => true
314  ),
315  'STYLES' => array(
316  'KEYWORDS' => array(
317  1 => 'color: #472;', //type
318  2 => 'color: #35A;font-weight: bold;', //file construction
319  3 => 'color: #A53;', //structure
320  4 => 'color: #35A;', //operations return pair
321  5 => 'color: #35A;', //operations return path or picture or pen
322  6 => 'color: #35A;', //operations return string
323  7 => 'color: #35A;', //operations return numeric
324  8 => 'color: #35A;', //operations return boolean
325  9 => 'color: #35A;', //operations return color
326  10 => 'color: #35A;', //operations return transform
327  11 => 'color: #35A;', //constructors
328  12 => 'color: #35A;', //labels
329  13 => 'color: #3B5;', //general transformations
330  14 => 'color: #35A;', //draw instructions
331  15 => 'color: #472;', //style of drawing
332  16 => 'color: #000;', //read write show
333  17 => 'color: #000;', //Internal variables with numeric values
334  18 => 'color: #000;', //Internal string variables
335  19 => 'color: #000;', //other predefined variables
336  20 => 'color: #000;' //predefined constants
337  ),
338  'COMMENTS' => array(
339  1 => 'color: #777;',
340  'MULTI' => 'color: #880;'
341  ),
342  'ESCAPE_CHAR' => array(
343  0 => ''
344  ),
345  'BRACKETS' => array(
346  0 => 'color: #820;'
347  ),
348  'STRINGS' => array(
349  0 => 'color: #880;'
350  ),
351  'NUMBERS' => array(
352  0 => 'color: #000;'
353  ),
354  'METHODS' => array(
355  1 => '',
356  2 => ''
357  ),
358  'SYMBOLS' => array(
359  0 => 'color: #000;'
360  ),
361  'REGEXPS' => array(
362  ),
363  'SCRIPT' => array(
364  0 => ''
365  )
366  ),
367  'URLS' => array(
368  1 => '',
369  2 => '',
370  3 => '',
371  4 => '',
372  5 => '',
373  6 => '',
374  7 => '',
375  8 => '',
376  9 => '',
377  10 => '',
378  11 => '',
379  12 => '',
380  13 => '',
381  14 => '',
382  15 => '',
383  16 => '',
384  17 => '',
385  18 => '',
386  19 => '',
387  20 => ''
388  ),
389  'OOLANG' => false,
390  'OBJECT_SPLITTERS' => array(
391  ),
392  'REGEXPS' => array(
393  ),
394  'STRICT_MODE_APPLIES' => GESHI_NEVER,
395  'SCRIPT_DELIMITERS' => array(
396  ),
397  'HIGHLIGHT_STRICT_BLOCK' => array(
398  )
399 );
const GESHI_COMMENTS
Used in language files to mark comments.
Definition: geshi.php:149
$language_data
Definition: metapost.php:34
const GESHI_NEVER
#+ private
Definition: geshi.php:123
const GESHI_CAPS_NO_CHANGE
Lowercase keywords found.
Definition: geshi.php:94