Project

General

Profile

Revision 216

View differences:

trunk/scripts/editarea/reg_syntax/php.js
1
editAreaLoader.load_syntax["php"] = {
2
	'DISPLAY_NAME' : 'Php'
3
	,'COMMENT_SINGLE' : {1 : '//', 2 : '#'}
4
	,'COMMENT_MULTI' : {'/*' : '*/'}
5
	,'QUOTEMARKS' : {1: "'", 2: '"'}
6
	,'KEYWORD_CASE_SENSITIVE' : false
7
	,'KEYWORDS' : {
8
		'statements' : [
9
			'include', 'require', 'include_once', 'require_once',
10
			'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',
11
            'endif', 'switch', 'case', 'endswitch',
12
			'return', 'break', 'continue'
13
		]
14
		,'reserved' : [
15
			'_GET', '_POST', '_SESSION', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST',
16
			'null', '__LINE__', '__FILE__',
17
			'false', '<?php', '?>', '<?',
18
			'<script language', '</script>',
19
			'true', 'var', 'default',
20
			'function', 'class', 'new', '&new', 'this',
21
			'__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION',
22
			'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR',
23
			'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR',
24
			'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT',
25
			'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE',
26
			'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',
27
			'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL'
28
			
29
		]
30
		,'functions' : [
31
			'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined',
32
			'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions',
33
			'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
34
			'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv',
35
			'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime',
36
			'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar',
37
			'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown',
38
			'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate',
39
			'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode',
40
			'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat',
41
			'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from',
42
			'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport',
43
			'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'
44

  
45
		]
46
	}
47
	,'OPERATORS' :[
48
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||'
49
	]
50
	,'DELIMITERS' :[
51
		'(', ')', '[', ']', '{', '}'
52
	]
53
	,'REGEXPS' : {
54
		// highlight all variables ($...)
55
		'variables' : {
56
			'search' : '()(\\$\\w+)()'
57
			,'class' : 'variables'
58
			,'modifiers' : 'g'
59
			,'execute' : 'before' // before or after
60
		}
61
	}
62
	,'STYLES' : {
63
		'COMMENTS': 'color: #AAAAAA;'
64
		,'QUOTESMARKS': 'color: #879EFA;'
65
		,'KEYWORDS' : {
66
			'reserved' : 'color: #48BDDF;'
67
			,'functions' : 'color: #0040FD;'
68
			,'statements' : 'color: #60CA00;'
69
			}
70
		,'OPERATORS' : 'color: #FF00FF;'
71
		,'DELIMITERS' : 'color: #2B60FF;'
72
		,'REGEXPS' : {
73
			'variables' : 'color: #E0BD54;'
74
		}		
75
	}
76
	,'AUTO_COMPLETION' :  {
77
		"default": {	// the name of this definition group. It's posisble to have different rules inside the same definition file
78
			"REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"	// \\s|\\.|
79
						,"possible_words_letters": "[a-zA-Z0-9_\$]+"
80
						,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
81
						,"prefix_separator": "\\-\\>|\\:\\:"
82
					}
83
			,"CASE_SENSITIVE": true
84
			,"MAX_TEXT_LENGTH": 100		// the maximum length of the text being analyzed before the cursor position
85
			,"KEYWORDS": {
86
					'': [	// the prefix of thoses items
87
						/**
88
						 * 0 : the keyword the user is typing
89
						 * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous )
90
						 * 		If empty the keyword will be displayed
91
						 * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)
92
						 */
93
						 ['$_POST']
94
			    		,['$_GET']
95
			    		,['$_SESSION']
96
			    		,['$_SERVER']
97
			    		,['$_FILES']
98
			    		,['$_ENV']
99
			    		,['$_COOKIE']
100
			    		,['$_REQUEST']
101
			    		// magic methods
102
			    		,['__construct', '§( {@} )']
103
			    		,['__destruct', '§( {@} )']
104
			    		,['__sleep', '§( {@} )']
105
			    		,['__wakeup', '§( {@} )']
106
			    		,['__toString', '§( {@} )']
107
			    		// include
108
			    		,['include', '§ "{@}";']
109
			    		,['include_once', '§ "{@}";']
110
			    		,['require', '§ "{@}";']
111
			    		,['require_once', '§ "{@}";']
112
			    		// statements
113
			    		,['for', '§( {@} )']
114
			    		,['foreach', '§( {@} )']
115
			    		,['if', '§( {@} )']
116
			    		,['elseif', '§( {@} )']
117
			    		,['while', '§( {@} )']
118
			    		,['switch', '§( {@} )']
119
			    		,['break']
120
			    		,['case']
121
			    		,['continue']
122
			    		,['do']
123
			    		,['else']
124
			    		,['endif']
125
			    		,['endswitch']
126
			    		,['endwhile']
127
			    		,['return']
128
			    		// function
129
			    		,['unset', '§( {@} )']
130
					]
131
				}
132
			}
133
		,"live": {	
134
			
135
			// class NAME: /class\W+([a-z]+)\W+/gi
136
			// method: /^(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi
137
			// static: /^(public|private|protected)?\s+static\s+(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi 
138
			// attributes: /(\$this\-\>|(?:var|public|protected|private)\W+\$)([a-z0-9\_]+)(?!\()\b/gi 
139
			// 		v1 : /(\$this\-\>|var\W+|public\W+|protected\W+|private\W+)([a-z0-9\_]+)\W*(=|;)/gi 
140
			// var type: /(\$(this\-\>)?[a-z0-9\_]+)\s*\=\s*new\s+([a-z0-9\_])+/gi 
141
			
142
			
143
			"REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"	// \\s|\\.|
144
						,"possible_words_letters": "[a-zA-Z0-9_\$]+"
145
						,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
146
						,"prefix_separator": "\\-\\>"
147
					}
148
			,"CASE_SENSITIVE": true
149
			,"MAX_TEXT_LENGTH": 100		// the maximum length of the text being analyzed before the cursor position
150
			,"KEYWORDS": {
151
					'$this': [	// the prefix of thoses items
152
						['test']
153
					]
154
				}
155
			}
156
	}
157
};
158 0

  
trunk/scripts/editarea/reg_syntax/css.js
1
editAreaLoader.load_syntax["css"] = {
2
	'DISPLAY_NAME' : 'CSS'
3
	,'COMMENT_SINGLE' : {1 : '@'}
4
	,'COMMENT_MULTI' : {'/*' : '*/'}
5
	,'QUOTEMARKS' : ['"', "'"]
6
	,'KEYWORD_CASE_SENSITIVE' : false
7
	,'KEYWORDS' : {
8
		'attributes' : [
9
			'aqua', 'azimuth', 'background-attachment', 'background-color',
10
			'background-image', 'background-position', 'background-repeat',
11
			'background', 'border-bottom-color', 'border-bottom-style',
12
			'border-bottom-width', 'border-left-color', 'border-left-style',
13
			'border-left-width', 'border-right', 'border-right-color',
14
			'border-right-style', 'border-right-width', 'border-top-color',
15
			'border-top-style', 'border-top-width','border-bottom', 'border-collapse',
16
			'border-left', 'border-width', 'border-color', 'border-spacing',
17
			'border-style', 'border-top', 'border',  'caption-side',
18
			'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset',
19
			'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
20
			'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
21
			'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
22
			'font-weight', 'font', 'height', 'letter-spacing', 'line-height',
23
			'list-style', 'list-style-image', 'list-style-position', 'list-style-type',
24
			'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin',
25
			'marker-offset', 'marks', 'max-height', 'max-width', 'min-height',
26
			'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style',
27
			'outline-width', 'overflow', 'padding-bottom', 'padding-left',
28
			'padding-right', 'padding-top', 'padding', 'page', 'page-break-after',
29
			'page-break-before', 'page-break-inside', 'pause-after', 'pause-before',
30
			'pause', 'pitch', 'pitch-range',  'play-during', 'position', 'quotes',
31
			'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation',
32
			'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration',
33
			'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi',
34
			'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows',
35
			'width', 'word-spacing', 'z-index', 'bottom', 'left'
36
		]
37
		,'values' : [
38
			'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid',
39
			'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both',
40
			'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', 
41
            'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive',
42
			'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
43
			'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded',
44
			'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia',
45
			'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher',
46
			'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline',
47
			'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana',
48
			'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low',
49
			'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace',
50
			'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize',
51
			'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline',
52
			'pointer', 'portrait', 'purple', 'px',
53
			'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards',
54
			's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square',
55
			'static', 'status-bar', 'super', 'sw-resize',
56
			'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent',
57
			'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',
58
			'visible',
59
			'w-resize', 'wait', 'white', 'wider',
60
			'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small',
61
			'yellow', 'yes'
62
		]
63
		,'specials' : [
64
			'important'
65
		]
66
	}
67
	,'OPERATORS' :[
68
		':', ';', '!', '.', '#'
69
	]
70
	,'DELIMITERS' :[
71
		'{', '}'
72
	]
73
	,'STYLES' : {
74
		'COMMENTS': 'color: #AAAAAA;'
75
		,'QUOTESMARKS': 'color: #6381F8;'
76
		,'KEYWORDS' : {
77
			'attributes' : 'color: #48BDDF;'
78
			,'values' : 'color: #2B60FF;'
79
			,'specials' : 'color: #FF0000;'
80
			}
81
		,'OPERATORS' : 'color: #FF00FF;'
82
		,'DELIMITERS' : 'color: #60CA00;'
83
				
84
	}
85
};
86 0

  
trunk/scripts/editarea/reg_syntax/sql.js
1
editAreaLoader.load_syntax["sql"] = {
2
	'DISPLAY_NAME' : 'SQL'
3
	,'COMMENT_SINGLE' : {1 : '--'}
4
	,'COMMENT_MULTI' : {'/*' : '*/'}
5
	,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'}
6
	,'KEYWORD_CASE_SENSITIVE' : false
7
	,'KEYWORDS' : {
8
		'statements' : [
9
			'select', 'SELECT', 'where', 'order', 'by',
10
			'insert', 'from', 'update', 'grant', 'left join', 'right join', 
11
            'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE'
12
		]
13
		,'reserved' : [
14
			'null', 'enum', 'int', 'boolean', 'add', 'varchar'
15
			
16
		]
17
		,'functions' : [
18
   'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR',
19
'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH',
20
'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA',
21
'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND',
22
'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND',
23
'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF',
24
'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK'
25
		]
26
	}
27
	,'OPERATORS' :[
28
     'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*'
29
	]
30
	,'DELIMITERS' :[
31
		'(', ')', '[', ']', '{', '}'
32
	]
33
	,'REGEXPS' : {
34
		// highlight all variables (@...)
35
		'variables' : {
36
			'search' : '()(\\@\\w+)()'
37
			,'class' : 'variables'
38
			,'modifiers' : 'g'
39
			,'execute' : 'before' // before or after
40
		}
41
	}
42
	,'STYLES' : {
43
		'COMMENTS': 'color: #AAAAAA;'
44
		,'QUOTESMARKS': 'color: #879EFA;'
45
		,'KEYWORDS' : {
46
			'reserved' : 'color: #48BDDF;'
47
			,'functions' : 'color: #0040FD;'
48
			,'statements' : 'color: #60CA00;'
49
			}
50
		,'OPERATORS' : 'color: #FF00FF;'
51
		,'DELIMITERS' : 'color: #2B60FF;'
52
		,'REGEXPS' : {
53
			'variables' : 'color: #E0BD54;'
54
		}		
55
	}
56
};
57 0

  
trunk/scripts/editarea/reg_syntax/index.html
1
<html><body bgcolor="#FFFFFF"></body></html>
2 0

  
trunk/scripts/editarea/reg_syntax/xml.js
1
/*
2
* last update: 2006-08-24
3
*/
4

  
5
editAreaLoader.load_syntax["xml"] = {
6
	'DISPLAY_NAME' : 'XML'
7
	,'COMMENT_SINGLE' : {}
8
	,'COMMENT_MULTI' : {'<!--' : '-->'}
9
	,'QUOTEMARKS' : {1: "'", 2: '"'}
10
	,'KEYWORD_CASE_SENSITIVE' : false
11
	,'KEYWORDS' : {
12
	}
13
	,'OPERATORS' :[
14
	]
15
	,'DELIMITERS' :[
16
	]
17
	,'REGEXPS' : {
18
		'xml' : {
19
			'search' : '()(<\\?[^>]*?\\?>)()'
20
			,'class' : 'xml'
21
			,'modifiers' : 'g'
22
			,'execute' : 'before' // before or after
23
		}
24
		,'cdatas' : {
25
			'search' : '()(<!\\[CDATA\\[.*?\\]\\]>)()'
26
			,'class' : 'cdata'
27
			,'modifiers' : 'g'
28
			,'execute' : 'before' // before or after
29
		}
30
		,'tags' : {
31
			'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
32
			,'class' : 'tags'
33
			,'modifiers' : 'gi'
34
			,'execute' : 'before' // before or after
35
		}
36
		,'attributes' : {
37
			'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
38
			,'class' : 'attributes'
39
			,'modifiers' : 'g'
40
			,'execute' : 'before' // before or after
41
		}
42
	}
43
	,'STYLES' : {
44
		'COMMENTS': 'color: #AAAAAA;'
45
		,'QUOTESMARKS': 'color: #6381F8;'
46
		,'KEYWORDS' : {
47
			}
48
		,'OPERATORS' : 'color: #E775F0;'
49
		,'DELIMITERS' : ''
50
		,'REGEXPS' : {
51
			'attributes': 'color: #B1AC41;'
52
			,'tags': 'color: #E62253;'
53
			,'xml': 'color: #8DCFB5;'
54
			,'cdata': 'color: #50B020;'
55
		}	
56
	}		
57
};
58 0

  
trunk/scripts/editarea/reg_syntax/perl.js
1
/***************************************************************************
2
 * (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG.
3
 *
4
 * You may choose any license of the current release or any future release
5
 * of editarea to use, modify and/or redistribute this file.
6
 *
7
 * This language specification file supports for syntax checking on
8
 * a large subset of Perl 5.x.
9
 * The basic common syntax of Perl is fully supported, but as for
10
 * the highlighting of built-in operations, it's mainly designed
11
 * to support for hightlighting Perl code in a Safe environment (compartment)
12
 * as used by CoMaNet for evaluation of administrative scripts. This Safe
13
 * compartment basically allows for all of Opcode's :default operations,
14
 * but little others. See http://perldoc.perl.org/Opcode.html to learn
15
 * more.
16
 ***************************************************************************/
17

  
18
editAreaLoader.load_syntax["perl"] = {
19
	'DISPLAY_NAME' : 'Perl',
20
	'COMMENT_SINGLE' : {1 : '#'},
21
	'QUOTEMARKS' : {1: "'", 2: '"'},
22
	'KEYWORD_CASE_SENSITIVE' : true,
23
	'KEYWORDS' :
24
	{
25
		'core' :
26
			[ "if", "else", "elsif", "while", "for", "each", "foreach",
27
				"next", "last", "goto", "exists", "delete", "undef",
28
				"my", "our", "local", "use", "require", "package", "keys", "values",
29
				"sub", "bless", "ref", "return" ],
30
		'functions' :
31
			[
32
				//from :base_core
33
				"int", "hex", "oct", "abs", "substr", "vec", "study", "pos",
34
				"length", "index", "rindex", "ord", "chr", "ucfirst", "lcfirst",
35
				"uc", "lc", "quotemeta", "chop", "chomp", "split", "list", "splice",
36
				"push", "pop", "shift", "unshift", "reverse", "and", "or", "dor",
37
				"xor", "warn", "die", "prototype",
38
				//from :base_mem
39
				"concat", "repeat", "join", "range",
40
				//none from :base_loop, as we'll see them as basic statements...
41
				//from :base_orig
42
				"sprintf", "crypt", "tie", "untie", "select", "localtime", "gmtime",
43
				//others
44
				"print", "open", "close"
45
			]
46
	},
47
	'OPERATORS' :
48
		[ '+', '-', '/', '*', '=', '<', '>', '!', '||', '.', '&&',
49
			' eq ', ' ne ', '=~' ],
50
	'DELIMITERS' :
51
		[ '(', ')', '[', ']', '{', '}' ],
52
	'REGEXPS' :
53
	{
54
		'packagedecl' : { 'search': '(package )([^ \r\n\t#;]*)()',
55
			'class' : 'scopingnames',
56
			'modifiers' : 'g', 'execute' : 'before' },
57
		'subdecl' : { 'search': '(sub )([^ \r\n\t#]*)()',
58
			'class' : 'scopingnames',
59
			'modifiers' : 'g', 'execute' : 'before' },
60
		'scalars' : { 'search': '()(\\\$[a-zA-Z0-9_:]*)()',
61
			'class' : 'vars',
62
			'modifiers' : 'g', 'execute' : 'after' },
63
		'arrays' : { 'search': '()(@[a-zA-Z0-9_:]*)()',
64
			'class' : 'vars',
65
			'modifiers' : 'g', 'execute' : 'after' },
66
		'hashs' : { 'search': '()(%[a-zA-Z0-9_:]*)()',
67
			'class' : 'vars',
68
			'modifiers' : 'g', 'execute' : 'after' }
69
	},
70

  
71
	'STYLES' :
72
	{
73
		'COMMENTS': 'color: #AAAAAA;',
74
		'QUOTESMARKS': 'color: #DC0000;',
75
		'KEYWORDS' :
76
		{
77
			'core' : 'color: #8aca00;',
78
			'functions' : 'color: #2B60FF;'
79
		},
80
		'OPERATORS' : 'color: #8aca00;',
81
		'DELIMITERS' : 'color: #0038E1;',
82
		'REGEXPS':
83
		{
84
			'scopingnames' : 'color: #ff0000;',
85
			'vars' : 'color: #00aaaa;'
86
		}
87
	} //'STYLES'
88
};
89 0

  
trunk/scripts/editarea/reg_syntax/html.js
1
/*
2
* last update: 2006-08-24
3
*/
4

  
5
editAreaLoader.load_syntax["html"] = {
6
	'DISPLAY_NAME' : 'HTML'
7
	,'COMMENT_SINGLE' : {}
8
	,'COMMENT_MULTI' : {'<!--' : '-->'}
9
	,'QUOTEMARKS' : {1: "'", 2: '"'}
10
	,'KEYWORD_CASE_SENSITIVE' : false
11
	,'KEYWORDS' : {
12
	}
13
	,'OPERATORS' :[
14
	]
15
	,'DELIMITERS' :[
16
	]
17
	,'REGEXPS' : {
18
		'doctype' : {
19
			'search' : '()(<!DOCTYPE[^>]*>)()'
20
			,'class' : 'doctype'
21
			,'modifiers' : ''
22
			,'execute' : 'before' // before or after
23
		}
24
		,'tags' : {
25
			'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
26
			,'class' : 'tags'
27
			,'modifiers' : 'gi'
28
			,'execute' : 'before' // before or after
29
		}
30
		,'attributes' : {
31
			'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
32
			,'class' : 'attributes'
33
			,'modifiers' : 'g'
34
			,'execute' : 'before' // before or after
35
		}
36
	}
37
	,'STYLES' : {
38
		'COMMENTS': 'color: #AAAAAA;'
39
		,'QUOTESMARKS': 'color: #6381F8;'
40
		,'KEYWORDS' : {
41
			}
42
		,'OPERATORS' : 'color: #E775F0;'
43
		,'DELIMITERS' : ''
44
		,'REGEXPS' : {
45
			'attributes': 'color: #B1AC41;'
46
			,'tags': 'color: #E62253;'
47
			,'doctype': 'color: #8DCFB5;'
48
			,'test': 'color: #00FF00;'
49
		}	
50
	}		
51
};
52 0

  
trunk/scripts/editarea/reg_syntax/brainfuck.js
1
editAreaLoader.load_syntax["brainfuck"] = {
2
	'DISPLAY_NAME' : 'Brainfuck'
3
	,'COMMENT_SINGLE' : {}
4
	,'COMMENT_MULTI' : {}
5
	,'QUOTEMARKS' : {}
6
	,'KEYWORD_CASE_SENSITIVE' : true
7
	,'OPERATORS' :[
8
		'+', '-'
9
	]
10
	,'DELIMITERS' :[
11
		'[', ']'
12
	]
13
	,'REGEXPS' : {
14
		'bfispis' : {
15
			'search' : '()(\\.)()'
16
			,'class' : 'bfispis'
17
			,'modifiers' : 'g'
18
			,'execute' : 'before'
19
		}
20
		,'bfupis' : {
21
			'search' : '()(\\,)()'
22
			,'class' : 'bfupis'
23
			,'modifiers' : 'g'
24
			,'execute' : 'before'
25
		}
26
		,'bfmemory' : {
27
			'search' : '()([<>])()'
28
			,'class' : 'bfmemory'
29
			,'modifiers' : 'g'
30
			,'execute' : 'before'
31
		}
32
	}
33
	,'STYLES' : {
34
		'COMMENTS': 'color: #AAAAAA;'
35
		,'QUOTESMARKS': 'color: #6381F8;'
36
		,'OPERATORS' : 'color: #88AA00;'
37
		,'DELIMITERS' : 'color: #00C138;'
38
		,'REGEXPS' : {
39
			'bfispis' : 'color: #EE0000;'
40
			,'bfupis' : 'color: #4455ee;'
41
			,'bfmemory' : 'color: #DD00DD;'
42
		}
43
	}
44
};
45

  
46 0

  
trunk/scripts/editarea/reg_syntax/coldfusion.js
1
editAreaLoader.load_syntax["coldfusion"] = {
2
	'DISPLAY_NAME' : 'Coldfusion'
3
	,'COMMENT_SINGLE' : {1 : '//', 2 : '#'}
4
	,'COMMENT_MULTI' : {'<!--' : '-->'}
5
	,'COMMENT_MULTI2' : {'<!---' : '--->'}
6
	,'QUOTEMARKS' : {1: "'", 2: '"'}
7
	,'KEYWORD_CASE_SENSITIVE' : false
8
		,'KEYWORDS' : {
9
		'statements' : [
10
			'include', 'require', 'include_once', 'require_once',
11
			'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',
12
            'endif', 'switch', 'case', 'endswitch',
13
			'return', 'break', 'continue'
14
		]
15
		,'reserved' : [
16
			'AND', 'break', 'case', 'CONTAIN', 'CONTAINS', 'continue', 'default', 'do', 
17
			'DOES', 'else', 'EQ', 'EQUAL', 'EQUALTO', 'EQV', 'FALSE', 'for', 'GE', 
18
			'GREATER', 'GT', 'GTE', 'if', 'IMP', 'in', 'IS', 'LE', 'LESS', 'LT', 'LTE', 
19
			'MOD', 'NEQ', 'NOT', 'OR', 'return', 'switch', 'THAN', 'TO', 'TRUE', 'var', 
20
			'while', 'XOR'
21
		]
22
		,'functions' : [
23
			'Abs', 'ACos', 'ArrayAppend', 'ArrayAvg', 'ArrayClear', 'ArrayDeleteAt', 'ArrayInsertAt', 
24
			'ArrayIsEmpty', 'ArrayLen', 'ArrayMax', 'ArrayMin', 'ArrayNew', 'ArrayPrepend', 'ArrayResize', 
25
			'ArraySet', 'ArraySort', 'ArraySum', 'ArraySwap', 'ArrayToList', 'Asc', 'ASin', 'Atn', 'AuthenticatedContext', 
26
			'AuthenticatedUser', 'BitAnd', 'BitMaskClear', 'BitMaskRead', 'BitMaskSet', 'BitNot', 'BitOr', 
27
			'BitSHLN', 'BitSHRN', 'BitXor', 'Ceiling', 'Chr', 'CJustify', 'Compare', 'CompareNoCase', 'Cos', 
28
			'CreateDate', 'CreateDateTime', 'CreateODBCDate', 'CreateODBCDateTime', 'CreateODBCTime', 
29
			'CreateTime', 'CreateTimeSpan', 'DateAdd', 'DateCompare', 'DateConvert', 'DateDiff', 
30
			'DateFormat', 'DatePart', 'Day', 'DayOfWeek', 'DayOfWeekAsString', 'DayOfYear', 'DaysInMonth', 
31
			'DaysInYear', 'DE', 'DecimalFormat', 'DecrementValue', 'Decrypt', 'DeleteClientVariable', 
32
			'DirectoryExists', 'DollarFormat', 'Duplicate', 'Encrypt', 'Evaluate', 'Exp', 'ExpandPath', 
33
			'FileExists', 'Find', 'FindNoCase', 'FindOneOf', 'FirstDayOfMonth', 'Fix', 'FormatBaseN', 
34
			'GetBaseTagData', 'GetBaseTagList', 'GetBaseTemplatePath', 'GetClientVariablesList', 
35
			'GetCurrentTemplatePath', 'GetDirectoryFromPath', 'GetException', 'GetFileFromPath', 
36
			'GetFunctionList', 'GetHttpTimeString', 'GetHttpRequestData', 'GetLocale', 'GetMetricData', 
37
			'GetProfileString', 'GetTempDirectory', 'GetTempFile', 'GetTemplatePath', 'GetTickCount', 
38
			'GetTimeZoneInfo', 'GetToken', 'Hash', 'Hour', 'HTMLCodeFormat', 'HTMLEditFormat', 'IIf', 
39
			'IncrementValue', 'InputBaseN', 'Insert', 'Int', 'IsArray', 'IsAuthenticated', 'IsAuthorized', 
40
			'IsBoolean', 'IsBinary', 'IsCustomFunction', 'IsDate', 'IsDebugMode', 'IsDefined', 'IsLeapYear', 
41
			'IsNumeric', 'IsNumericDate', 'IsProtected', 'IsQuery', 'IsSimpleValue', 'IsStruct', 'IsWDDX', 
42
			'JavaCast', 'JSStringFormat', 'LCase', 'Left', 'Len', 'ListAppend', 'ListChangeDelims', 
43
			'ListContains', 'ListContainsNoCase', 'ListDeleteAt', 'ListFind', 'ListFindNoCase', 'ListFirst', 
44
			'ListGetAt', 'ListInsertAt', 'ListLast', 'ListLen', 'ListPrepend', 'ListQualify', 'ListRest', 
45
			'ListSetAt', 'ListSort', 'ListToArray', 'ListValueCount', 'ListValueCountNoCase', 'LJustify', 
46
			'Log', 'Log10', 'LSCurrencyFormat', 'LSDateFormat', 'LSEuroCurrencyFormat', 'LSIsCurrency', 
47
			'LSIsDate', 'LSIsNumeric', 'LSNumberFormat', 'LSParseCurrency', 'LSParseDateTime', 'LSParseNumber', 
48
			'LSTimeFormat', 'LTrim', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'MonthAsString', 'Now', 'NumberFormat', 
49
			'ParagraphFormat', 'ParameterExists', 'ParseDateTime', 'Pi', 'PreserveSingleQuotes', 'Quarter', 
50
			'QueryAddRow', 'QueryNew', 'QuerySetCell', 'QuotedValueList', 'Rand', 'Randomize', 'RandRange', 
51
			'REFind', 'REFindNoCase', 'RemoveChars', 'RepeatString', 'Replace', 'ReplaceList', 'ReplaceNoCase', 
52
			'REReplace', 'REReplaceNoCase', 'Reverse', 'Right', 'RJustify', 'Round', 'RTrim', 'Second', 'SetLocale', 
53
			'SetProfileString', 'SetVariable', 'Sgn', 'Sin', 'SpanExcluding', 'SpanIncluding', 'Sqr', 'StripCR', 
54
			'StructAppend', 'StructClear', 'StructCopy', 'StructCount', 'StructDelete', 'StructFind', 'StructFindKey', 
55
			'StructFindValue', 'StructGet', 'StructInsert', 'StructIsEmpty', 'StructKeyArray', 'StructKeyExists', 
56
			'StructKeyList', 'StructNew', 'StructSort', 'StructUpdate', 'Tan', 'TimeFormat', 'ToBase64', 'ToBinary', 
57
			'ToString', 'Trim', 'UCase', 'URLDecode', 'URLEncodedFormat', 'Val', 'ValueList', 'Week', 'WriteOutput', 
58
			'XMLFormat', 'Year', 'YesNoFormat'
59
		]
60
	}
61
	,'OPERATORS' :[
62
		'+', '-', '/', '*', '%', '!', '&&', '||'
63
	]
64
	,'DELIMITERS' :[
65
		'(', ')', '[', ']', '{', '}'
66
	]
67
	,'REGEXPS' : {
68
		'doctype' : {
69
			'search' : '()(<!DOCTYPE[^>]*>)()'
70
			,'class' : 'doctype'
71
			,'modifiers' : ''
72
			,'execute' : 'before' // before or after
73
		}
74
		,'cftags' : {
75
			'search' : '(<)(/cf[a-z][^ \r\n\t>]*)([^>]*>)'
76
			,'class' : 'cftags'
77
			,'modifiers' : 'gi'
78
			,'execute' : 'before' // before or after
79
		}
80
		,'cftags2' : {
81
			'search' : '(<)(cf[a-z][^ \r\n\t>]*)([^>]*>)'
82
			,'class' : 'cftags2'
83
			,'modifiers' : 'gi'
84
			,'execute' : 'before' // before or after
85
		}
86
		,'tags' : {
87
			'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
88
			,'class' : 'tags'
89
			,'modifiers' : 'gi'
90
			,'execute' : 'before' // before or after
91
		}
92
		,'attributes' : {
93
			'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
94
			,'class' : 'attributes'
95
			,'modifiers' : 'g'
96
			,'execute' : 'before' // before or after
97
		}
98
	}
99
	,'STYLES' : {
100
		'COMMENTS': 'color: #AAAAAA;'
101
		,'QUOTESMARKS': 'color: #6381F8;'
102
		,'KEYWORDS' : {
103
			'reserved' : 'color: #48BDDF;'
104
			,'functions' : 'color: #0000FF;'
105
			,'statements' : 'color: #60CA00;'
106
			}
107
		,'OPERATORS' : 'color: #E775F0;'
108
		,'DELIMITERS' : ''
109
		,'REGEXPS' : {
110
			'attributes': 'color: #990033;'
111
			,'cftags': 'color: #990033;'
112
			,'cftags2': 'color: #990033;'
113
			,'tags': 'color: #000099;'
114
			,'doctype': 'color: #8DCFB5;'
115
			,'test': 'color: #00FF00;'
116
		}	
117
	}		
118
};
119

  
120
 	  	 
trunk/scripts/editarea/reg_syntax/vb.js
1
editAreaLoader.load_syntax["vb"] = {
2
	'DISPLAY_NAME' : 'Visual Basic'
3
	,'COMMENT_SINGLE' : {1 : "'"}
4
	,'COMMENT_MULTI' : { }
5
	,'QUOTEMARKS' : {1: '"'}
6
	,'KEYWORD_CASE_SENSITIVE' : false
7
	,'KEYWORDS' : {
8
		'statements' : [
9
	        'if','then','for','each','while','do','loop',
10
            'else','elseif','select','case','end select',
11
            'until','next','step','to','in','end if'
12
		]
13
		,'keywords' : [
14
            'empty','isempty','nothing','null','isnull','true','false',
15
            'set','call',
16
            'sub','end sub','function','end function','exit','exit function',
17
            'dim','Mod','In','private','public','shared','const'
18
        ]
19

  
20
		,'functions' : [
21
			'CDate','Date','DateAdd','DateDiff','DatePart','DateSerial','DateValue','Day','FormatDateTime',
22
            'Hour','IsDate','Minute','Month',
23
            'MonthName','Now','Second','Time','Timer','TimeSerial','TimeValue','Weekday','WeekdayName ','Year',
24
            'Asc','CBool','CByte','CCur','CDate','CDbl','Chr','CInt','CLng','CSng','CStr','Hex','Oct','FormatCurrency',
25
            'FormatDateTime','FormatNumber','FormatPercent','Abs','Atn','Cos','Exp','Hex','Int','Fix','Log','Oct',
26
            'Rnd','Sgn','Sin','Sqr','Tan',
27
            'Array','Filter','IsArray','Join','LBound','Split','UBound',
28
            'InStr','InStrRev','LCase','Left','Len','LTrim','RTrim','Trim','Mid','Replace','Right','Space','StrComp',
29
            'String','StrReverse','UCase',
30
            'CreateObject','Eval','GetLocale','GetObject','GetRef','InputBox','IsEmpty','IsNull','IsNumeric',
31
            'IsObject','LoadPicture','MsgBox','RGB','Round','ScriptEngine','ScriptEngineBuildVersion','ScriptEngineMajorVersion',
32
            'ScriptEngineMinorVersion','SetLocale','TypeName','VarType'
33
		]
34
	}
35
	,'OPERATORS' :[
36
		'+', '-', '/', '*', '=', '<', '>', '!', '&'
37
	]
38
	,'DELIMITERS' :[
39
		'(', ')', '[', ']', '{', '}'
40
	]
41
	,'STYLES' : {
42
		'COMMENTS': 'color: #99CC00;'
43
		,'QUOTESMARKS': 'color: #333399;'
44
		,'KEYWORDS' : {
45
			'keywords' : 'color: #3366FF;'
46
			,'functions' : 'color: #0000FF;'
47
			,'statements' : 'color: #3366FF;'
48
			}
49
		,'OPERATORS' : 'color: #FF0000;'
50
		,'DELIMITERS' : 'color: #0000FF;'
51

  
52
	}
53
};
54 0

  
trunk/scripts/editarea/reg_syntax/robotstxt.js
1
editAreaLoader.load_syntax["robotstxt"] = {
2
	'DISPLAY_NAME' : 'Robots txt',
3
	'COMMENT_SINGLE' : {1 : '#'},
4
	'COMMENT_MULTI' : {},
5
	'QUOTEMARKS' : [],
6
	'KEYWORD_CASE_SENSITIVE' : false,
7
	'KEYWORDS' : {
8
		'attributes' : ['User-agent', 'Disallow', 'Allow', 'Crawl-delay'],
9
		'values' : ['*'],
10
		'specials' : ['*']
11
	},
12
	'OPERATORS' :[':'],
13
	'DELIMITERS' :[],
14
	'STYLES' : {
15
		'COMMENTS': 'color: #AAAAAA;',
16
		'QUOTESMARKS': 'color: #6381F8;',
17
		'KEYWORDS' : {
18
			'attributes' : 'color: #48BDDF;',
19
			'values' : 'color: #2B60FF;',
20
			'specials' : 'color: #FF0000;'
21
			},
22
	'OPERATORS' : 'color: #FF00FF;',
23
	'DELIMITERS' : 'color: #60CA00;'			
24
	}
25
};
26 0

  
trunk/scripts/editarea/reg_syntax/js.js
1
editAreaLoader.load_syntax["js"] = {
2
	'DISPLAY_NAME' : 'Javascript'
3
	,'COMMENT_SINGLE' : {1 : '//'}
4
	,'COMMENT_MULTI' : {'/*' : '*/'}
5
	,'QUOTEMARKS' : {1: "'", 2: '"'}
6
	,'KEYWORD_CASE_SENSITIVE' : false
7
	,'KEYWORDS' : {
8
		'statements' : [
9
			'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
10
			'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
11
			'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
12
			'while', 'write', 'with'
13
		]
14
 		,'keywords' : [
15
			'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
16
			'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
17
			'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document',		
18
			// the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice
19
			'Link ', 'outerHeight ', 'Anchor', 'FileUpload', 
20
			'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self', 
21
			'arguments', 'locationbar', 'pageXoffset', 'Form', 
22
			'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status', 
23
			'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy', 
24
			'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden', 
25
			'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents', 
26
			'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text', 
27
			'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity', 
28
			'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed', 
29
			'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents', 
30
			'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus', 
31
			'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document', 
32
			'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window', 
33
			'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy'			
34
		]
35
    	,'functions' : [
36
			// common functions for Window object
37
			'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home',
38
			'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
39
			'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status',
40
			'stop' 
41
		]
42
	}
43
	,'OPERATORS' :[
44
		'+', '-', '/', '*', '=', '<', '>', '%', '!'
45
	]
46
	,'DELIMITERS' :[
47
		'(', ')', '[', ']', '{', '}'
48
	]
49
	,'STYLES' : {
50
		'COMMENTS': 'color: #AAAAAA;'
51
		,'QUOTESMARKS': 'color: #6381F8;'
52
		,'KEYWORDS' : {
53
			'statements' : 'color: #60CA00;'
54
			,'keywords' : 'color: #48BDDF;'
55
			,'functions' : 'color: #2B60FF;'
56
		}
57
		,'OPERATORS' : 'color: #FF00FF;'
58
		,'DELIMITERS' : 'color: #0038E1;'
59
				
60
	}
61
	,'AUTO_COMPLETION' :  {
62
		"default": {	// the name of this definition group. It's posisble to have different rules inside the same definition file
63
			"REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"	// \\s|\\.|
64
						,"possible_words_letters": "[a-zA-Z0-9_]+"
65
						,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
66
						,"prefix_separator": "\\."
67
					}
68
			,"CASE_SENSITIVE": true
69
			,"MAX_TEXT_LENGTH": 100		// the maximum length of the text being analyzed before the cursor position
70
			,"KEYWORDS": {
71
				'': [	// the prefix of thoses items
72
						/**
73
						 * 0 : the keyword the user is typing
74
						 * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous )
75
						 * 		If empty the keyword will be displayed
76
						 * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)
77
						 */
78
						 ['Array', '§()', '']
79
			    		,['alert', '§({@})', 'alert(String message)']
80
			    		,['document']
81
			    		,['window']
82
			    	]
83
		    	,'window' : [
84
			    		 ['location']
85
			    		,['document']
86
			    		,['scrollTo', 'scrollTo({@})', 'scrollTo(Int x,Int y)']
87
					]
88
		    	,'location' : [
89
			    		 ['href']
90
					]
91
			}
92
		}
93
	}
94
};
95 0

  
trunk/scripts/editarea/reg_syntax/basic.js
1
editAreaLoader.load_syntax["basic"] = {
2
	'DISPLAY_NAME' : 'Basic'
3
	,'COMMENT_SINGLE' : {1 : "'", 2 : 'rem'}
4
	,'COMMENT_MULTI' : { }
5
	,'QUOTEMARKS' : {1: '"'}
6
	,'KEYWORD_CASE_SENSITIVE' : false
7
	,'KEYWORDS' : {
8
		'statements' : [
9
			'if','then','for','wend','while',
10
			'else','elseif','select','case','end select',
11
			'until','next','step','to','end if', 'call'
12
		]
13
		,'keywords' : [
14
			'sub', 'end sub', 'function', 'end function', 'exit',
15
			'exit function', 'dim', 'redim', 'shared', 'const',
16
			'is', 'absolute', 'access', 'any', 'append', 'as',
17
			'base', 'beep', 'binary', 'bload', 'bsave', 'chain',
18
			'chdir', 'circle', 'clear', 'close', 'cls', 'color',
19
			'com', 'common', 'data', 'date', 'declare', 'def',
20
			'defdbl', 'defint', 'deflng', 'defsng', 'defstr',
21
			'double', 'draw', 'environ', 'erase', 'error', 'field',
22
			'files', 'fn', 'get', 'gosub', 'goto', 'integer', 'key',
23
			'kill', 'let', 'line', 'list', 'locate', 'lock', 'long',
24
			'lprint', 'lset', 'mkdir', 'name', 'off', 'on', 'open',
25
			'option', 'out', 'output', 'paint', 'palette', 'pcopy',
26
			'poke', 'preset', 'print', 'pset', 'put', 'random',
27
			'randomize', 'read', 'reset', 'restore', 'resume',
28
			'return', 'rmdir', 'rset', 'run', 'screen', 'seg',
29
			'shell', 'single', 'sleep', 'sound', 'static', 'stop',
30
			'strig', 'string', 'swap', 'system', 'time', 'timer',
31
			'troff', 'tron', 'type', 'unlock', 'using', 'view',
32
			'wait', 'width', 'window', 'write'
33
	        ]
34
		,'functions' : [
35
			'abs', 'asc', 'atn', 'cdbl', 'chr', 'cint', 'clng',
36
			'cos', 'csng', 'csrlin', 'cvd', 'cvdmbf', 'cvi', 'cvl',
37
			'cvs', 'cvsmbf', 'eof', 'erdev', 'erl', 'err', 'exp',
38
			'fileattr', 'fix', 'fre', 'freefile', 'hex', 'inkey',
39
			'inp', 'input', 'instr', 'int', 'ioctl', 'lbound',
40
			'lcase', 'left', 'len', 'loc', 'lof', 'log', 'lpos',
41
			'ltrim', 'mid', 'mkd', 'mkdmbf', 'mki', 'mkl', 'mks',
42
			'mksmbf', 'oct', 'peek', 'pen', 'play', 'pmap', 'point',
43
			'pos', 'right', 'rnd', 'rtrim', 'seek', 'sgn', 'sin',
44
			'space', 'spc', 'sqr', 'stick', 'str', 'tab', 'tan',
45
			'ubound', 'ucase', 'val', 'varptr', 'varseg'
46
		]
47
		,'operators' : [
48
			'and', 'eqv', 'imp', 'mod', 'not', 'or', 'xor'
49
		]
50
	}
51
	,'OPERATORS' :[
52
		'+', '-', '/', '*', '=', '<', '>', '!', '&'
53
	]
54
	,'DELIMITERS' :[
55
		'(', ')', '[', ']', '{', '}'
56
	]
57
	,'STYLES' : {
58
		'COMMENTS': 'color: #99CC00;'
59
		,'QUOTESMARKS': 'color: #333399;'
60
		,'KEYWORDS' : {
61
			'keywords' : 'color: #3366FF;'
62
			,'functions' : 'color: #0000FF;'
63
			,'statements' : 'color: #3366FF;'
64
			,'operators' : 'color: #FF0000;'
65
			}
66
		,'OPERATORS' : 'color: #FF0000;'
67
		,'DELIMITERS' : 'color: #0000FF;'
68

  
69
	}
70
};
71 0

  
trunk/scripts/editarea/reg_syntax/java.js
1
editAreaLoader.load_syntax["java"] = {
2
	'DISPLAY_NAME' : 'Java'
3
	,'COMMENT_SINGLE': { 1: '//', 2: '@' }
4
	, 'COMMENT_MULTI': { '/*': '*/' }
5
	, 'QUOTEMARKS': { 1: "'", 2: '"' }
6
	, 'KEYWORD_CASE_SENSITIVE': true
7
	, 'KEYWORDS': {
8
	    'constants': [
9
			'null', 'false', 'true'
10
		]
11
		, 'types': [
12
			'String', 'int', 'short', 'long', 'char', 'double', 'byte',
13
			'float', 'static', 'void', 'private', 'boolean', 'protected',
14
			'public', 'const', 'class', 'final', 'abstract', 'volatile',
15
			'enum', 'transient', 'interface'
16
		]
17
		, 'statements': [
18
            'this', 'extends', 'if', 'do', 'while', 'try', 'catch', 'finally',
19
            'throw', 'throws', 'else', 'for', 'switch', 'continue', 'implements',
20
            'break', 'case', 'default', 'goto'
21
		]
22
 		, 'keywords': [
23
           'new', 'return', 'import', 'native', 'super', 'package', 'assert', 'synchronized',
24
           'instanceof', 'strictfp'
25
		]
26
	}
27
	, 'OPERATORS': [
28
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
29
	]
30
	, 'DELIMITERS': [
31
		'(', ')', '[', ']', '{', '}'
32
	]
33
	, 'REGEXPS': {
34
	    'precompiler': {
35
	        'search': '()(#[^\r\n]*)()'
36
			, 'class': 'precompiler'
37
			, 'modifiers': 'g'
38
			, 'execute': 'before'
39
	    }
40
	}
41
	, 'STYLES': {
42
	    'COMMENTS': 'color: #AAAAAA;'
43
		, 'QUOTESMARKS': 'color: #6381F8;'
44
		, 'KEYWORDS': {
45
		    'constants': 'color: #EE0000;'
46
			, 'types': 'color: #0000EE;'
47
			, 'statements': 'color: #60CA00;'
48
			, 'keywords': 'color: #48BDDF;'
49
		}
50
		, 'OPERATORS': 'color: #FF00FF;'
51
		, 'DELIMITERS': 'color: #0038E1;'
52
		, 'REGEXPS': {
53
		    'precompiler': 'color: #009900;'
54
			, 'precompilerstring': 'color: #994400;'
55
		}
56
	}
57
};
58 0

  
trunk/scripts/editarea/reg_syntax/ruby.js
1
/**
2
 * Ruby syntax v 1.0 
3
 * 
4
 * v1.0 by Patrice De Saint Steban (2007/01/03)
5
 *   
6
**/
7
editAreaLoader.load_syntax["ruby"] = {
8
	'DISPLAY_NAME' : 'Ruby'
9
	,'COMMENT_SINGLE' : {1 : '#'}
10
	,'COMMENT_MULTI' : {}
11
	,'QUOTEMARKS' : {1: "'", 2: '"'}
12
	,'KEYWORD_CASE_SENSITIVE' : true
13
	,'KEYWORDS' : {
14
		'reserved' : [
15
			'alias', 'and', 'BEGIN', 'begin', 'break', 'case', 'class', 'def', 'defined', 'do', 'else',
16
			'elsif', 'END', 'end', 'ensure', 'false', 'for', 'if', 
17
			'in', 'module', 'next', 'not', 'or', 'redo', 'rescue', 'retry',
18
			'return', 'self', 'super', 'then', 'true', 'undef', 'unless', 'until', 'when', 'while', 'yield'
19
		]
20
	}
21
	,'OPERATORS' :[
22
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ','
23
	]
24
	,'DELIMITERS' :[
25
		'(', ')', '[', ']', '{', '}'
26
	]
27
	,'REGEXPS' : {
28
		'constants' : {
29
			'search' : '()([A-Z]\\w*)()'
30
			,'class' : 'constants'
31
			,'modifiers' : 'g'
32
			,'execute' : 'before' 
33
		}
34
		,'variables' : {
35
			'search' : '()([\$\@\%]+\\w+)()'
36
			,'class' : 'variables'
37
			,'modifiers' : 'g'
38
			,'execute' : 'before' 
39
		}
40
		,'numbers' : {
41
			'search' : '()(-?[0-9]+)()'
42
			,'class' : 'numbers'
43
			,'modifiers' : 'g'
44
			,'execute' : 'before' 
45
		}
46
		,'symbols' : {
47
			'search' : '()(:\\w+)()'
48
			,'class' : 'symbols'
49
			,'modifiers' : 'g'
50
			,'execute' : 'before'
51
		}
52
	}
53
	,'STYLES' : {
54
		'COMMENTS': 'color: #AAAAAA;'
55
		,'QUOTESMARKS': 'color: #660066;'
56
		,'KEYWORDS' : {
57
			'reserved' : 'font-weight: bold; color: #0000FF;'
58
			}
59
		,'OPERATORS' : 'color: #993300;'
60
		,'DELIMITERS' : 'color: #993300;'
61
		,'REGEXPS' : {
62
			'variables' : 'color: #E0BD54;'
63
			,'numbers' : 'color: green;'
64
			,'constants' : 'color: #00AA00;'
65
			,'symbols' : 'color: #879EFA;'
66
		}	
67
	}
68
};
trunk/scripts/editarea/reg_syntax/python.js
1
/**
2
 * Python syntax v 1.1 
3
 * 
4
 * v1.1 by Andre Roberge (2006/12/27)
5
 *   
6
**/
7
editAreaLoader.load_syntax["python"] = {
8
	'DISPLAY_NAME' : 'Python'
9
	,'COMMENT_SINGLE' : {1 : '#'}
10
	,'COMMENT_MULTI' : {}
11
	,'QUOTEMARKS' : {1: "'", 2: '"'}
12
	,'KEYWORD_CASE_SENSITIVE' : true
13
	,'KEYWORDS' : {
14
		/*
15
		** Set 1: reserved words
16
		** http://python.org/doc/current/ref/keywords.html
17
		** Note: 'as' and 'with' have been added starting with Python 2.5
18
		*/
19
		'reserved' : [
20
			'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif',
21
			'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 
22
			'import', 'is', 'in', 'lambda', 'not', 'or', 'pass', 'print', 'raise',
23
			'return', 'try', 'while', 'with', 'yield'
24
			//the following are *almost* reserved; we'll treat them as such
25
			, 'False', 'True', 'None'
26
		]
27
		/*
28
		** Set 2: builtins
29
		** http://python.org/doc/current/lib/built-in-funcs.html
30
		*/	
31
		,'builtins' : [
32
			'__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', 
33
			'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', 
34
			'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help',
35
			'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals',
36
			'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range',
37
			'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice',
38
			'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', 
39
			'vars', 'xrange', 'zip',
40
			// Built-in constants: http://www.python.org/doc/2.4.1/lib/node35.html
41
			//'False', 'True', 'None' have been included in 'reserved'
42
			'NotImplemented', 'Ellipsis',
43
			// Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html
44
			'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError',
45
			'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError',
46
			'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError',
47
			'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError',
48
			'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError',
49
			'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError',
50
			'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning',
51
			'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning',
52
			'RuntimeWarning', 'FutureWarning',		
53
			// we will include the string methods as well
54
			// http://python.org/doc/current/lib/string-methods.html
55
			'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs',
56
			'find', 'index', 'isalnum', 'isaplpha', 'isdigit', 'islower', 'isspace', 'istitle',
57
			'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust',
58
			'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title',
59
			'translate', 'upper', 'zfill'
60
		]
61
		/*
62
		** Set 3: standard library
63
		** http://python.org/doc/current/lib/modindex.html
64
		*/
65
		,'stdlib' : [
66
			'__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm',
67
			'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer',
68
			'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi',
69
			'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop',
70
			'collections', 'colorsys', 'commands', 'compileall', 'compiler', 'compiler',
71
			'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt',
72
			'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE',
73
			'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm',
74
			'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl',
75
			'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl',
76
			'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob',
77
			'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib',
78
			'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect',
79
			'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap',
80
			'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify',
81
			'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator',
82
			'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes',
83
			'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile',
84
			'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random',
85
			're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter',
86
			'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve',
87
			'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd',
88
			'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string',
89
			'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev',
90
			'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios',
91
			'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token',
92
			'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2',
93
			'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings',
94
			'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml',
95
			'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib'
96

  
97
		]
98
		/*
99
		** Set 4: special methods
100
		** http://python.org/doc/current/ref/specialnames.html
101
		*/
102
		,'special' : [
103
			// Basic customization: http://python.org/doc/current/ref/customization.html
104
			'__new__', '__init__', '__del__', '__repr__', '__str__', 
105
			'__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__',
106
			'__hash__', '__nonzero__', '__unicode__', '__dict__',
107
			// Attribute access: http://python.org/doc/current/ref/attribute-access.html
108
			'__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__',
109
			'__delete__', '__slots__',
110
			// Class creation, callable objects
111
			'__metaclass__', '__call__', 
112
			// Container types: http://python.org/doc/current/ref/sequence-types.html
113
			'__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__',
114
			'__getslice__', '__setslice__', '__delslice__',
115
			// Numeric types: http://python.org/doc/current/ref/numeric-types.html
116
			'__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__',
117
			'__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__',
118
			'__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__',
119
			'__long__','__lshift__',
120
			'__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__',
121
			'__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__',
122
			'__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__',
123
			'__sub__','__xor__'
124
		]
125
	}
126
	,'OPERATORS' :[
127
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ','
128
	]
129
	,'DELIMITERS' :[
130
		'(', ')', '[', ']', '{', '}'
131
	]
132
	,'STYLES' : {
133
		'COMMENTS': 'color: #AAAAAA;'
134
		,'QUOTESMARKS': 'color: #660066;'
135
		,'KEYWORDS' : {
136
			'reserved' : 'color: #0000FF;'
137
			,'builtins' : 'color: #009900;'
138
			,'stdlib' : 'color: #009900;'
139
			,'special': 'color: #006666;'
140
			}
141
		,'OPERATORS' : 'color: #993300;'
142
		,'DELIMITERS' : 'color: #993300;'
143
				
144
	}
145
};
146 0

  
trunk/scripts/editarea/reg_syntax/cpp.js
1
editAreaLoader.load_syntax["cpp"] = {
2
	'DISPLAY_NAME' : 'CPP'
3
	,'COMMENT_SINGLE' : {1 : '//'}
4
	,'COMMENT_MULTI' : {'/*' : '*/'}
5
	,'QUOTEMARKS' : {1: "'", 2: '"'}
6
	,'KEYWORD_CASE_SENSITIVE' : true
7
	,'KEYWORDS' : {
8
		'constants' : [
9
			'NULL', 'false', 'std', 'stdin', 'stdout', 'stderr',
10
			'true'
11
		]
12
		,'types' : [
13
			'FILE', 'auto', 'char', 'class', 'const', 'double',
14
			'extern', 'float', 'friend', 'inline', 'int',
15
			'iterator', 'long', 'map', 'operator', 'queue',
16
			'register', 'short', 'signed', 'size_t', 'stack',
17
			'static', 'string', 'struct', 'time_t', 'typedef',
18
			'union', 'unsigned', 'vector', 'void', 'volatile'
19
		]
20
		,'statements' : [
21
			'catch', 'do', 'else', 'enum', 'for', 'goto', 'if',
22
			'sizeof', 'switch', 'this', 'throw', 'try', 'while'
23
		]
24
 		,'keywords' : [
25
			'break', 'case', 'continue', 'default', 'delete',
26
			'namespace', 'new', 'private', 'protected', 'public',
27
			'return', 'using'
28
		]
29
	}
30
	,'OPERATORS' :[
31
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
32
	]
33
	,'DELIMITERS' :[
34
		'(', ')', '[', ']', '{', '}'
35
	]
36
	,'REGEXPS' : {
37
		'precompiler' : {
38
			'search' : '()(#[^\r\n]*)()'
39
			,'class' : 'precompiler'
40
			,'modifiers' : 'g'
41
			,'execute' : 'before'
42
		}
43
/*		,'precompilerstring' : {
44
			'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'
45
			,'class' : 'precompilerstring'
46
			,'modifiers' : 'g'
47
			,'execute' : 'before'
48
		}*/
49
	}
50
	,'STYLES' : {
51
		'COMMENTS': 'color: #AAAAAA;'
52
		,'QUOTESMARKS': 'color: #6381F8;'
53
		,'KEYWORDS' : {
54
			'constants' : 'color: #EE0000;'
55
			,'types' : 'color: #0000EE;'
56
			,'statements' : 'color: #60CA00;'
57
			,'keywords' : 'color: #48BDDF;'
58
		}
59
		,'OPERATORS' : 'color: #FF00FF;'
60
		,'DELIMITERS' : 'color: #0038E1;'
61
		,'REGEXPS' : {
62
			'precompiler' : 'color: #009900;'
63
			,'precompilerstring' : 'color: #994400;'
64
		}
65
	}
66
};
67 0

  
trunk/scripts/editarea/reg_syntax/c.js
1
editAreaLoader.load_syntax["c"] = {
2
	'DISPLAY_NAME' : 'C'
3
	,'COMMENT_SINGLE' : {1 : '//'}
4
	,'COMMENT_MULTI' : {'/*' : '*/'}
5
	,'QUOTEMARKS' : {1: "'", 2: '"'}
6
	,'KEYWORD_CASE_SENSITIVE' : true
7
	,'KEYWORDS' : {
8
		'constants' : [
9
			'NULL', 'false', 'stdin', 'stdout', 'stderr', 'true'
10
		]
11
		,'types' : [
12
			'FILE', 'auto', 'char', 'const', 'double',
13
			'extern', 'float', 'inline', 'int', 'long', 'register',
14
			'short', 'signed', 'size_t', 'static', 'struct',
15
			'time_t', 'typedef', 'union', 'unsigned', 'void',
16
			'volatile'
17
		]
18
		,'statements' : [
19
			'do', 'else', 'enum', 'for', 'goto', 'if', 'sizeof',
20
			'switch', 'while'
21
		]
22
 		,'keywords' : [
23
			'break', 'case', 'continue', 'default', 'delete',
24
			'return'
25
		]
26
	}
27
	,'OPERATORS' :[
28
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
29
	]
30
	,'DELIMITERS' :[
31
		'(', ')', '[', ']', '{', '}'
32
	]
33
	,'REGEXPS' : {
34
		'precompiler' : {
35
			'search' : '()(#[^\r\n]*)()'
36
			,'class' : 'precompiler'
37
			,'modifiers' : 'g'
38
			,'execute' : 'before'
39
		}
40
/*		,'precompilerstring' : {
41
			'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'
42
			,'class' : 'precompilerstring'
43
			,'modifiers' : 'g'
44
			,'execute' : 'before'
45
		}*/
46
	}
47
	,'STYLES' : {
48
		'COMMENTS': 'color: #AAAAAA;'
49
		,'QUOTESMARKS': 'color: #6381F8;'
50
		,'KEYWORDS' : {
51
			'constants' : 'color: #EE0000;'
52
			,'types' : 'color: #0000EE;'
53
			,'statements' : 'color: #60CA00;'
54
			,'keywords' : 'color: #48BDDF;'
55
		}
56
		,'OPERATORS' : 'color: #FF00FF;'
57
		,'DELIMITERS' : 'color: #0038E1;'
58
		,'REGEXPS' : {
59
			'precompiler' : 'color: #009900;'
60
			,'precompilerstring' : 'color: #994400;'
61
		}
62
	}
63
};
64 0

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff