ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
chaiscript.php
Go to the documentation of this file.
1 <?php
2 /*************************************************************************************
3  * chaiscript.php
4  * --------------
5  * Author: Jason Turner & Jonathan Turner
6  * Copyright: (c) 2010 Jason Turner (lefticus@gmail.com),
7  * (c) 2009 Jonathan Turner,
8  * (c) 2004 Ben Keen (ben.keen@gmail.com), Benny Baumann (http://qbnz.com/highlighter)
9  * Release Version: 1.0.9.0
10  * Date Started: 2009/07/03
11  *
12  * ChaiScript language file for GeSHi.
13  *
14  * Based on JavaScript by Ben Keen (ben.keen@gmail.com)
15  *
16  * CHANGES
17  * -------
18  * 2010/03/30 (1.0.8.8)
19  * - Updated to include more language features
20  * - Removed left over pieces from JavaScript
21  * 2009/07/03 (1.0.0)
22  * - First Release
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' => 'ChaiScript',
46  'COMMENT_SINGLE' => array(1 => '//'),
47  'COMMENT_MULTI' => array('/*' => '*/'),
48  //Regular Expressions
49  'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
50  'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
51  'QUOTEMARKS' => array("'", '"'),
52  'ESCAPE_CHAR' => '\\',
53  'KEYWORDS' => array(
54  1 => array(
55  'break', 'else', 'elseif', 'eval', 'for', 'if', 'return', 'while', 'try', 'catch', 'finally',
56  ),
57  2 => array(
58  'def', 'false', 'fun', 'true', 'var', 'attr',
59  ),
60  3 => array(
61  // built in functions
62  'throw',
63  )
64  ),
65  'SYMBOLS' => array(
66  '(', ')', '[', ']', '{', '}',
67  '+', '-', '*', '/', '%',
68  '!', '@', '&', '|', '^',
69  '<', '>', '=',
70  ',', ';', '?', ':'
71  ),
72  'CASE_SENSITIVE' => array(
73  GESHI_COMMENTS => false,
74  1 => false,
75  2 => false,
76  3 => false
77  ),
78  'STYLES' => array(
79  'KEYWORDS' => array(
80  1 => 'color: #000066; font-weight: bold;',
81  2 => 'color: #003366; font-weight: bold;',
82  3 => 'color: #000066;'
83  ),
84  'COMMENTS' => array(
85  1 => 'color: #006600; font-style: italic;',
86  2 => 'color: #009966; font-style: italic;',
87  'MULTI' => 'color: #006600; font-style: italic;'
88  ),
89  'ESCAPE_CHAR' => array(
90  0 => 'color: #000099; font-weight: bold;'
91  ),
92  'BRACKETS' => array(
93  0 => 'color: #009900;'
94  ),
95  'STRINGS' => array(
96  0 => 'color: #3366CC;'
97  ),
98  'NUMBERS' => array(
99  0 => 'color: #CC0000;'
100  ),
101  'METHODS' => array(
102  1 => 'color: #660066;'
103  ),
104  'SYMBOLS' => array(
105  0 => 'color: #339933;'
106  ),
107  'REGEXPS' => array(
108  ),
109  'SCRIPT' => array(
110  0 => '',
111  1 => '',
112  2 => '',
113  3 => ''
114  )
115  ),
116  'URLS' => array(
117  1 => '',
118  2 => '',
119  3 => ''
120  ),
121  'OOLANG' => true,
122  'OBJECT_SPLITTERS' => array(
123  1 => '.'
124  ),
125  'REGEXPS' => array(
126  ),
127  'STRICT_MODE_APPLIES' => GESHI_MAYBE,
128  'SCRIPT_DELIMITERS' => array(
129  0 => array(
130  ),
131  1 => array(
132  )
133  ),
134  'HIGHLIGHT_STRICT_BLOCK' => array(
135  0 => true,
136  1 => true
137  )
138 );
const GESHI_COMMENTS
Used in language files to mark comments.
Definition: geshi.php:149
const GESHI_MAYBE
Strict mode might apply, and can be enabled or disabled by GeSHi->enable_strict_mode().
Definition: geshi.php:126
$language_data
Definition: chaiscript.php:44
const GESHI_CAPS_NO_CHANGE
Lowercase keywords found.
Definition: geshi.php:94