1<?php
2/*************************************************************************************
3 * unicon.php
4 * --------
5 * Author: Matt Oates (mattoates@gmail.com)
6 * Copyright: (c) 2010 Matt Oates (http://mattoates.co.uk)
7 * Release Version: 1.0.9.1
8 * Date Started: 2010/04/20
9 *
10 * Unicon the Unified Extended Dialect of Icon language file for GeSHi.
11 *
12 * CHANGES
13 * -------
14 * 2010/04/24 (0.0.0.2)
15 *  -  Validated with Geshi langcheck.php FAILED due to preprocessor keywords looking like symbols
16 *  -  Hard wrapped to improve readability
17 * 2010/04/20 (0.0.0.1)
18 *  -  First Release
19 *
20 * TODO (updated 2010/04/20)
21 * -------------------------
22 * - Do the &amp; need replacing with &?
23 *
24 *************************************************************************************
25 *
26 *     This file is part of GeSHi.
27 *
28 *   GeSHi is free software; you can redistribute it and/or modify
29 *   it under the terms of the GNU General Public License as published by
30 *   the Free Software Foundation; either version 2 of the License, or
31 *   (at your option) any later version.
32 *
33 *   GeSHi is distributed in the hope that it will be useful,
34 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
35 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
36 *   GNU General Public License for more details.
37 *
38 *   You should have received a copy of the GNU General Public License
39 *   along with GeSHi; if not, write to the Free Software
40 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
41 *
42 ************************************************************************************/
43
44$language_data = array(
45    'LANG_NAME' => 'Unicon (Unified Extended Dialect of Icon)',
46    'COMMENT_SINGLE' => array(1 => '#'),
47    'COMMENT_MULTI' => array(),
48    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
49    'QUOTEMARKS' => array('"', '\''),
50    'ESCAPE_CHAR' => '\\',
51    'KEYWORDS' => array(
52        1 => array(
53            'break', 'case', 'class', 'continue', 'create', 'default', 'do',
54            'else', 'end', 'every', 'fail', 'for', 'if', 'import', 'initial', 'initially',
55            'invocable', 'link', 'method', 'next', 'not', 'of', 'package', 'procedure', 'record',
56            'repeat', 'return', 'switch', 'suspend', 'then', 'to', 'until', 'while'
57            ),
58        2 => array(
59            'global', 'local', 'static'
60            ),
61        3 => array(
62            'allocated', 'ascii', 'clock', 'collections',
63            'column', 'cset', 'current', 'date', 'dateline', 'digits',
64            'dump', 'e', 'error', 'errornumber', 'errortext',
65            'errorvalue', 'errout', 'eventcode', 'eventsource', 'eventvalue',
66            'fail', 'features', 'file', 'host', 'input', 'lcase',
67            'letters', 'level', 'line', 'main', 'now', 'null',
68            'output', 'phi', 'pi', 'pos', 'progname', 'random',
69            'regions', 'source', 'storage', 'subject', 'syserr', 'time',
70            'trace', 'ucase', 'version', 'col', 'control', 'interval',
71            'ldrag', 'lpress', 'lrelease', 'mdrag', 'meta', 'mpress',
72            'mrelease', 'rdrag', 'resize', 'row', 'rpress', 'rrelease',
73            'shift', 'window', 'x', 'y'
74            ),
75        4 => array(
76            'abs', 'acos', 'any', 'args', 'asin', 'atan', 'bal', 'center', 'char',
77            'chmod', 'close', 'cofail', 'collect', 'copy', 'cos', 'cset', 'ctime', 'dbcolumns',
78            'dbdriver', 'dbkeys', 'dblimits', 'dbproduction', 'dbtables', 'delay', 'delete', 'detab',
79            'display', 'dtor', 'entab', 'errorclear', 'event', 'eventmask', 'EvGet', 'exit', 'exp',
80            'fetch', 'fieldnames', 'find', 'flock', 'flush', 'function', 'get', 'getch', 'getche',
81            'getenv', 'gettimeofday', 'globalnames', 'gtime', 'iand', 'icom', 'image', 'insert',
82            'integer', 'ior', 'ishift', 'ixor', 'key', 'left', 'list', 'load', 'loadfunc',
83            'localnames', 'log', 'many', 'map', 'match', 'member', 'mkdir', 'move', 'name', 'numeric',
84            'open', 'opmask', 'ord', 'paramnames', 'parent', 'pipe', 'pop', 'pos', 'proc', 'pull',
85            'push', 'put', 'read', 'reads', 'real', 'receive', 'remove', 'rename', 'repl', 'reverse',
86            'right', 'rmdir', 'rtod', 'runerr', 'seek', 'select', 'send', 'seq', 'serial', 'set',
87            'setenv', 'sort', 'sortf', 'sql', 'sqrt', 'stat', 'staticnames', 'stop', 'string', 'system', 'tab',
88            'table', 'tan', 'trap', 'trim', 'truncate', 'type', 'upto', 'utime', 'variable', 'where',
89            'write', 'writes'
90            ),
91        5 => array(
92            'Active', 'Alert', 'Bg', 'Clip', 'Clone', 'Color', 'ColorValue',
93            'CopyArea', 'Couple', 'DrawArc', 'DrawCircle', 'DrawCurve', 'DrawCylinder', 'DrawDisk',
94            'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', 'DrawRectangle', 'DrawSegment',
95            'DrawSphere', 'DrawString', 'DrawTorus', 'EraseArea', 'Event', 'Fg', 'FillArc',
96            'FillCircle', 'FillPolygon', 'FillRectangle', 'Font', 'FreeColor', 'GotoRC', 'GotoXY',
97            'IdentifyMatrix', 'Lower', 'MatrixMode', 'NewColor', 'PaletteChars', 'PaletteColor',
98            'PaletteKey', 'Pattern', 'Pending', 'Pixel', 'PopMatrix', 'PushMatrix', 'PushRotate',
99            'PushScale', 'PushTranslate', 'QueryPointer', 'Raise', 'ReadImage', 'Refresh', 'Rotate',
100            'Scale', 'Texcoord', 'TextWidth', 'Texture', 'Translate', 'Uncouple', 'WAttrib',
101            'WDefault', 'WFlush', 'WindowContents', 'WriteImage', 'WSync'
102            ),
103        6 => array(
104            'define', 'include', 'ifdef', 'ifndef', 'else', 'endif', 'error',
105            'line', 'undef'
106            ),
107        7 => array(
108            '_V9', '_AMIGA', '_ACORN', '_CMS', '_MACINTOSH', '_MSDOS_386',
109            '_MS_WINDOWS_NT', '_MSDOS', '_MVS', '_OS2', '_POR', 'T', '_UNIX', '_POSIX', '_DBM',
110            '_VMS', '_ASCII', '_EBCDIC', '_CO_EXPRESSIONS', '_CONSOLE_WINDOW', '_DYNAMIC_LOADING',
111            '_EVENT_MONITOR', '_EXTERNAL_FUNCTIONS', '_KEYBOARD_FUNCTIONS', '_LARGE_INTEGERS',
112            '_MULTITASKING', '_PIPES', '_RECORD_IO', '_SYSTEM_FUNCTION', '_MESSAGING', '_GRAPHICS',
113            '_X_WINDOW_SYSTEM', '_MS_WINDOWS', '_WIN32', '_PRESENTATION_MGR', '_ARM_FUNCTIONS',
114            '_DOS_FUNCTIONS'
115            ),
116        8 => array(
117            'line')
118        ),
119    'SYMBOLS' => array(
120        1 => array(
121            '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '\\', '%', '=', '<', '>', '!', '^',
122            '&', '|', '?', ':', ';', ',', '.', '~', '@'
123            ),
124        2 => array(
125            '$(', '$)', '$<', '$>'
126            )
127        ),
128    'CASE_SENSITIVE' => array(
129        GESHI_COMMENTS => false,
130        1 => true,
131        2 => true,
132        3 => true,
133        4 => true,
134        5 => true,
135        6 => true,
136        7 => true,
137        8 => true
138        ),
139    'STYLES' => array(
140        'KEYWORDS' => array(
141            1 => 'color: #b1b100;',
142            2 => 'color: #b1b100;',
143            3 => 'color: #b1b100;',
144            4 => 'color: #b1b100;',
145            5 => 'color: #b1b100;',
146            6 => 'color: #b1b100;',
147            7 => 'color: #b1b100;',
148            8 => 'color: #b1b100;'
149            ),
150        'COMMENTS' => array(
151            1 => 'color: #666666; font-style: italic;',
152            'MULTI' => 'color: #666666; font-style: italic;'
153            ),
154        'ESCAPE_CHAR' => array(
155            0 => 'color: #000099; font-weight: bold;'
156            ),
157        'BRACKETS' => array(
158            0 => 'color: #009900;'
159            ),
160        'STRINGS' => array(
161            0 => 'color: #0000ff;'
162            ),
163        'NUMBERS' => array(
164            0 => 'color: #cc66cc;',
165            ),
166        'METHODS' => array(
167            0 => 'color: #004000;'
168            ),
169        'SYMBOLS' => array(
170            1 => 'color: #339933;'
171            ),
172        'REGEXPS' => array(),
173        'SCRIPT' => array()
174        ),
175    'URLS' => array(
176        1 => '',
177        2 => '',
178        3 => '',
179        4 => '',
180        5 => '',
181        6 => '',
182        7 => '',
183        8 => ''
184        ),
185    'OOLANG' => true,
186    'OBJECT_SPLITTERS' => array(1 => '.'),
187    'REGEXPS' => array(),
188    'STRICT_MODE_APPLIES' => GESHI_NEVER,
189    'SCRIPT_DELIMITERS' => array(),
190    'HIGHLIGHT_STRICT_BLOCK' => array(),
191    'PARSER_CONTROL' => array(
192        'KEYWORDS' => array(
193            3 => array(
194                'DISALLOWED_BEFORE' => '(?<=&amp;)'
195                ),
196            4 => array(
197                'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9_\"\'])",
198                'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_\"\'])"
199                ),
200            6 => array(
201                'DISALLOWED_BEFORE' => '(?<=\$)'
202                ),
203            8 => array(
204                'DISALLOWED_BEFORE' => '(?<=#)'
205                )
206            )
207        )
208);
209