diff --git a/inc/geshi.php b/inc/geshi.php index 362acd9c63ceaf113296977ae2cf7be697ff7f2d..2fbf35a776920d407ee940333c3ff9782a19f144 100644 --- a/inc/geshi.php +++ b/inc/geshi.php @@ -41,7 +41,7 @@ // /** The version of this GeSHi file */ -define('GESHI_VERSION', '1.0.7.21'); +define('GESHI_VERSION', '1.0.7.22'); // Define the root directory for the GeSHi code tree if (!defined('GESHI_ROOT')) { @@ -326,13 +326,13 @@ class GeSHi { */ var $highlight_extra_lines_style = 'color: #cc0; background-color: #ffc;'; - /** - * The line ending - * If null, nl2br() will be used on the result string. - * Otherwise, all instances of \n will be replaced with $line_ending - * @var string - */ - var $line_ending = null; + /** + * The line ending + * If null, nl2br() will be used on the result string. + * Otherwise, all instances of \n will be replaced with $line_ending + * @var string + */ + var $line_ending = null; /** * Number at which line numbers should start at @@ -350,7 +350,7 @@ class GeSHi { * The style for the actual code * @var string */ - var $code_style = 'font-family: \'Courier New\', Courier, monospace; font-weight: normal;'; + var $code_style = 'font-family: \'Courier New\', Courier, monospace; font-weight: normal; font-style: normal;'; /** * The overall class for this code block @@ -368,7 +368,7 @@ class GeSHi { * Line number styles * @var string */ - var $line_style1 = 'font-family: \'Courier New\', Courier, monospace; color: black; font-weight: normal; font-style: normal;'; + var $line_style1 = 'font-weight: normal;'; /** * Line number styles for fancy lines @@ -382,6 +382,13 @@ class GeSHi { */ var $line_numbers = GESHI_NO_LINE_NUMBERS; + /** + * Flag to decide if multi line spans are allowed. Set it to false to make sure + * each tag is closed before and reopened after each linefeed. + * @var boolean + */ + var $allow_multiline_span = true; + /** * The "nth" value for fancy line highlighting * @var int @@ -394,11 +401,11 @@ class GeSHi { */ var $tab_width = 8; - /** - * Should we use language-defined tab stop widths? - * @var int - */ - var $use_language_tab_width = false; + /** + * Should we use language-defined tab stop widths? + * @var int + */ + var $use_language_tab_width = false; /** * Default target for keyword links @@ -419,6 +426,13 @@ class GeSHi { */ var $keyword_links = true; + /** + * Currently loaded language file + * @var string + * @since 1.0.7.22 + */ + var $loaded_language = ''; + /**#@-*/ /** @@ -524,7 +538,7 @@ class GeSHi { */ function set_language_path($path) { if ($path) { - $this->language_path = ('/' == substr($path, strlen($path) - 1, 1)) ? $path : $path . '/'; + $this->language_path = ('/' == $path[strlen($path) - 1]) ? $path : $path . '/'; $this->set_language($this->language); // otherwise set_language_path has no effect } } @@ -684,6 +698,29 @@ class GeSHi { $this->line_nth_row = $nth_row; } + /** + * Sets wether spans and other HTML markup generated by GeSHi can + * span over multiple lines or not. Defaults to true to reduce overhead. + * Set it to false if you want to manipulate the output or manually display + * the code in an ordered list. + * + * @param boolean Wether multiline spans are allowed or not + * @since 1.0.7.22 + */ + function enable_multiline_span($flag) { + $this->allow_multiline_span = (bool) $flag; + } + + /** + * Get current setting for multiline spans, see GeSHi:: + * + * @see enable_multiline_span + * @return bool + */ + function get_multiline_span() { + return $this->allow_multiline_span; + } + /** * Sets the style for a keyword group. If $preserve_defaults is * true, then styles are merged with the default styles, with the @@ -702,6 +739,9 @@ class GeSHi { else { $this->language_data['STYLES']['KEYWORDS'][$key] .= $style; } + if(!isset($this->lexic_permissions['KEYWORDS'][$key])) { + $this->lexic_permissions['KEYWORDS'][$key] = true; + } } /** @@ -1013,30 +1053,31 @@ class GeSHi { } } - /** - * Sets whether or not to use tab-stop width specifed by language - * - * @param boolean Whether to use language-specific tab-stop widths + /** + * Sets whether or not to use tab-stop width specifed by language + * + * @param boolean Whether to use language-specific tab-stop widths * @since 1.0.7.20 - */ - function set_use_language_tab_width($use) { - $this->use_language_tab_width = (bool) $use; - } - - /** - * Returns the tab width to use, based on the current language and user - * preference - * - * @return int Tab width + */ + function set_use_language_tab_width($use) { + $this->use_language_tab_width = (bool) $use; + } + + /** + * Returns the tab width to use, based on the current language and user + * preference + * + * @return int Tab width * @since 1.0.7.20 - */ - function get_real_tab_width() { - if (!$this->use_language_tab_width || !isset($this->language_data['TAB_WIDTH'])) { - return $this->tab_width; - } else { - return $this->language_data['TAB_WIDTH']; - } - } + */ + function get_real_tab_width() { + if (!$this->use_language_tab_width || + !isset($this->language_data['TAB_WIDTH'])) { + return $this->tab_width; + } else { + return $this->language_data['TAB_WIDTH']; + } + } /** * Enables/disables strict highlighting. Default is off, calling this @@ -1101,7 +1142,7 @@ class GeSHi { * @todo static? */ function get_language_name_from_extension( $extension, $lookup = array() ) { - if ( !is_array($lookup) || !count($lookup)) { + if ( !is_array($lookup) || empty($lookup)) { $lookup = array( 'actionscript' => array('as'), 'ada' => array('a', 'ada', 'adb', 'ads'), @@ -1119,6 +1160,7 @@ class GeSHi { 'css' => array('css'), 'delphi' => array('dpk', 'dpr', 'pp', 'pas'), 'dos' => array('bat', 'cmd'), + 'gettext' => array('po', 'pot'), 'html4strict' => array('html', 'htm'), 'java' => array('java'), 'javascript' => array('js'), @@ -1144,10 +1186,8 @@ class GeSHi { } foreach ($lookup as $lang => $extensions) { - foreach ($extensions as $ext) { - if ($ext == $extension) { - return $lang; - } + if (in_array($extension, $extensions)) { + return $lang; } } return ''; @@ -1172,7 +1212,7 @@ class GeSHi { */ function load_from_file($file_name, $lookup = array()) { if (is_readable($file_name)) { - $this->set_source(implode('', file($file_name))); + $this->set_source(file_get_contents($file_name)); $this->set_language($this->get_language_name_from_extension(substr(strrchr($file_name, '.'), 1), $lookup)); } else { @@ -1370,15 +1410,16 @@ class GeSHi { function highlight_lines_extra($lines, $style = null) { if (is_array($lines)) { foreach ($lines as $line) { - $this->highlight_lines_extra(line, $style); + $this->highlight_lines_extra($line, $style); } } else { - $this->highlight_extra_lines[intval($lines)] = intval($lines); + $lines = intval($lines); + $this->highlight_extra_lines[$lines] = $lines; if ($style != null) { - $this->highlight_extra_lines_styles[intval($lines)] = $style; + $this->highlight_extra_lines_styles[$lines] = $style; } else { - unset($this->highlight_extra_lines_styles[intval($lines)]); + unset($this->highlight_extra_lines_styles[$lines]); } } } @@ -1393,15 +1434,15 @@ class GeSHi { $this->highlight_extra_lines_style = $styles; } - /** - * Sets the line-ending - * - * @param string The new line-ending - * @since 1.0.2 - */ - function set_line_ending($line_ending) { - $this->line_ending = (string)$line_ending; - } + /** + * Sets the line-ending + * + * @param string The new line-ending + * @since 1.0.2 + */ + function set_line_ending($line_ending) { + $this->line_ending = (string)$line_ending; + } /** * Sets what number line numbers should start at. Should @@ -1447,7 +1488,7 @@ class GeSHi { * @since 1.0.2 */ function enable_keyword_links($enable = true) { - $this->keyword_links = ($enable) ? true : false; + $this->keyword_links = (bool) $enable; } /** @@ -1480,9 +1521,6 @@ class GeSHi { // Initialise various stuff $length = strlen($code); - $STRING_OPEN = ''; - $CLOSE_STRING = false; - $ESCAPE_CHAR_OPEN = false; $COMMENT_MATCHED = false; // Turn highlighting on if strict mode doesn't apply to this language $HIGHLIGHTING_ON = ( !$this->strict_mode ) ? true : ''; @@ -1502,53 +1540,38 @@ class GeSHi { if ($this->strict_mode) { // Break the source into bits. Each bit will be a portion of the code // within script delimiters - for example, HTML between < and > - $parts = array(0 => array(0 => '')); + $parts = array(0 => array(0 => '', 1 => '')); $k = 0; - for ($i = 0; $i < $length; $i++) { - $char = substr($code, $i, 1); - if (!$HIGHLIGHTING_ON) { - foreach ($this->language_data['SCRIPT_DELIMITERS'] as $key => $delimiters) { - foreach ($delimiters as $open => $close) { - // Get the next little bit for this opening string - $check = substr($code, $i, strlen($open)); - // If it matches... - if ($check == $open) { - // We start a new block with the highlightable - // code in it - $HIGHLIGHTING_ON = $open; - $i += strlen($open) - 1; - $char = $open; - $parts[++$k][0] = $char; - - // No point going around again... - break(2); + for ($i = 0; $i < $length; ++$i) { + foreach ($this->language_data['SCRIPT_DELIMITERS'] as $delimiters) { + foreach ($delimiters as $open => $close) { + // Get the next little bit for this opening string + $open_strlen = strlen($open); + $check = substr($code, $i, $open_strlen); + // If it matches... + if ($check == $open) { + // We start a new block with the highlightable + // code in it + ++$k; + $parts[$k][0] = $open; + $close_i = strpos($code, $close, $i + $open_strlen) + strlen($close); + if ($close_i === false) { + $close_i = $length - 1; } + $parts[$k][1] = substr($code, $i, $close_i - $i); + $i = $close_i - 1; + ++$k; + $parts[$k][0] = ''; + $parts[$k][1] = ''; + + // No point going around again... + continue 3; } } } - else { - foreach ($this->language_data['SCRIPT_DELIMITERS'] as $key => $delimiters) { - foreach ($delimiters as $open => $close) { - if ($open == $HIGHLIGHTING_ON) { - // Found the closing tag - break(2); - } - } - } - // We check code from our current position BACKWARDS. This is so - // the ending string for highlighting can be included in the block - $check = substr($code, $i - strlen($close) + 1, strlen($close)); - if ($check == $close) { - $HIGHLIGHTING_ON = ''; - // Add the string to the rest of the string for this part - $parts[$k][1] = ( isset($parts[$k][1]) ) ? $parts[$k][1] . $char : $char; - $parts[++$k][0] = ''; - $char = ''; - } - } - $parts[$k][1] = ( isset($parts[$k][1]) ) ? $parts[$k][1] . $char : $char; + // only non-highlightable text reaches this point + $parts[$k][1] .= $code[$i]; } - $HIGHLIGHTING_ON = ''; } else { // Not strict mode - simply dump the source into @@ -1561,6 +1584,45 @@ class GeSHi { ); } + //Unset variables we won't need any longer + unset($code); + + //Preload some repeatedly used values regarding hardquotes ... + $hq = isset($this->language_data['HARDQUOTE']) ? $this->language_data['HARDQUOTE'][0] : false; + $hq_strlen = strlen($hq); + + //Preload if line numbers are to be generated afterwards + //Added a check if line breaks should be forced even without line numbers, fixes SF#1727398 + $check_linenumbers = $this->line_numbers != GESHI_NO_LINE_NUMBERS + || !empty($this->highlight_extra_lines) || !$this->allow_multiline_span; + + //preload the escape char for faster checking ... + $escaped_escape_char = GeSHi::hsc($this->language_data['ESCAPE_CHAR']); + + if (!$this->use_classes) { + $string_attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][0] . '"'; + $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][0] . '"'; + } + else { + $string_attributes = ' class="st0"'; + $escape_char_attributes = ' class="es0"'; + } + + // this is used for single-line comments + $sc_disallowed_before = ""; + $sc_disallowed_after = ""; + + if(isset($this->language_data['PARSER_CONTROL'])) { + if (isset($this->language_data['PARSER_CONTROL']['COMMENTS'])) { + if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE'])) { + $sc_disallowed_before = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE']; + } + if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER'])) { + $sc_disallowed_after = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER']; + } + } + } + // Now we go through each part. We know that even-indexed parts are // code that shouldn't be highlighted, and odd-indexed parts should // be highlighted @@ -1571,10 +1633,8 @@ class GeSHi { if ($this->strict_mode) { // Find the class key for this block of code foreach ($this->language_data['SCRIPT_DELIMITERS'] as $script_key => $script_data) { - foreach ($script_data as $open => $close) { - if ($data[0] == $open) { - break(2); - } + if (isset($script_data[$data[0]])) { + break; } } @@ -1598,208 +1658,286 @@ class GeSHi { // Now, highlight the code in this block. This code // is really the engine of GeSHi (along with the method // parse_non_string_part). + + // cache comment regexps incrementally + $comment_regexp_cache = array(); + $next_comment_regexp_pos = -1; + $comment_regexp_cache_per_key = array(); + $length = strlen($part); - for ($i = 0; $i < $length; $i++) { + for ($i = 0; $i < $length; ++$i) { // Get the next char - $char = substr($part, $i, 1); - $hq = isset($this->language_data['HARDQUOTE']) ? $this->language_data['HARDQUOTE'][0] : false; - // Is this char the newline and line numbers being used? - if (($this->line_numbers != GESHI_NO_LINE_NUMBERS - || count($this->highlight_extra_lines) > 0) - && $char == "\n") { - // If so, is there a string open? If there is, we should end it before - // the newline and begin it again (so when <li>s are put in the source - // remains XHTML compliant) - // note to self: This opens up possibility of config files specifying - // that languages can/cannot have multiline strings??? - if ($STRING_OPEN) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][0] . '"'; - } - else { - $attributes = ' class="st0"'; + $char = $part[$i]; + + if (in_array($char, $this->language_data['QUOTEMARKS']) && $this->lexic_permissions['STRINGS']) { + // The start of a new string + + // parse the stuff before this + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + + // now handle the string + $string = ''; + + // look for closing quote + $start = $i; + while ($close_pos = strpos($part, $char, $start + 1)) { + $start = $close_pos; + if ($this->lexic_permissions['ESCAPE_CHAR'] && $part[$close_pos - 1] == $this->language_data['ESCAPE_CHAR']) { + // this quote is escaped + continue; } - $char = '</span>' . $char . "<span$attributes>"; + // found closing quote + break; } - } - else if ($char == $STRING_OPEN) { - // A match of a string delimiter - if (($this->lexic_permissions['ESCAPE_CHAR'] && $ESCAPE_CHAR_OPEN) || - ($this->lexic_permissions['STRINGS'] && !$ESCAPE_CHAR_OPEN)) { - $char = GeSHi::hsc($char) . '</span>'; + if (!$close_pos) { + // span till the end of this $part when no closing delimiter is found + $close_pos = $length; } - $escape_me = false; - if ($HARDQUOTE_OPEN) { - if ($ESCAPE_CHAR_OPEN) { - $escape_me = true; - } - else { - foreach ($this->language_data['HARDESCAPE'] as $hardesc) { - if (substr($part, $i, strlen($hardesc)) == $hardesc) { - $escape_me = true; - break; - } + + $string = substr($part, $i, $close_pos - $i + 1); + $i = $close_pos; + + // handle escape chars and encode html chars + // (special because when we have escape chars within our string they may not be escaped) + if ($this->lexic_permissions['ESCAPE_CHAR'] && $this->language_data['ESCAPE_CHAR']) { + $start = 0; + $new_string = ''; + while ($es_pos = strpos($string, $this->language_data['ESCAPE_CHAR'], $start)) { + $new_string .= GeSHi::hsc(substr($string, $start, $es_pos - $start)) + . "<span$escape_char_attributes>" . $escaped_escape_char; + if ($string[$es_pos + 1] == "\n") { + // don't put a newline around newlines + $new_string .= "</span>\n"; + } else { + $new_string .= GeSHi::hsc($string[$es_pos + 1]) . '</span>'; } + $start = $es_pos + 2; } + $string = $new_string . GeSHi::hsc(substr($string, $start)); + $new_string = ''; + } else { + $string = GeSHi::hsc($string); } - if (!$ESCAPE_CHAR_OPEN) { - $STRING_OPEN = ''; - $CLOSE_STRING = true; - } - if (!$escape_me) { - $HARDQUOTE_OPEN = false; + if ($check_linenumbers) { + // Are line numbers used? If, we should end the string before + // the newline and begin it again (so when <li>s are put in the source + // remains XHTML compliant) + // note to self: This opens up possibility of config files specifying + // that languages can/cannot have multiline strings??? + $string = str_replace("\n", "</span>\n<span$string_attributes>", $string); } - $ESCAPE_CHAR_OPEN = false; + + $result .= "<span$string_attributes>" . $string . '</span>'; + $string = ''; + continue; } - else if (in_array($char, $this->language_data['QUOTEMARKS']) && - ($STRING_OPEN == '') && $this->lexic_permissions['STRINGS']) { - // The start of a new string - $STRING_OPEN = $char; - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][0] . '"'; + else if ($hq && substr($part, $i, $hq_strlen) == $hq && $this->lexic_permissions['STRINGS']) { + // The start of a hard quoted string + + // parse the stuff before this + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + + // now handle the string + $string = ''; + + // look for closing quote + $start = $i + $hq_strlen; + while ($close_pos = strpos($part, $this->language_data['HARDQUOTE'][1], $start + 1)) { + $start = $close_pos; + if ($this->lexic_permissions['ESCAPE_CHAR'] && $part[$close_pos - 1] == $this->language_data['ESCAPE_CHAR']) { + // make sure this quote is not escaped + foreach ($this->language_data['HARDESCAPE'] as $hardescape) { + if (substr($part, $close_pos - 1, strlen($hardescape)) == $hardescape) { + // this quote is escaped + continue 2; + } + } + } + // found closing quote + break; } - else { - $attributes = ' class="st0"'; + if (!$close_pos) { + // span till the end of this $part when no closing delimiter is found + $close_pos = $length; } - $char = "<span$attributes>" . GeSHi::hsc($char); - $result .= $this->parse_non_string_part( $stuff_to_parse ); - $stuff_to_parse = ''; - } - else if ($hq && substr($part, $i, strlen($hq)) == $hq && - ($STRING_OPEN == '') && $this->lexic_permissions['STRINGS']) { - // The start of a hard quoted string - $STRING_OPEN = $this->language_data['HARDQUOTE'][1]; - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][0] . '"'; + $string = substr($part, $i, $close_pos - $i + 1); + $i = $close_pos; + + // handle escape chars and encode html chars + // (special because when we have escape chars within our string they may not be escaped) + if ($this->lexic_permissions['ESCAPE_CHAR'] && $this->language_data['ESCAPE_CHAR']) { + $start = 0; + $new_string = ''; + while ($es_pos = strpos($string, $this->language_data['ESCAPE_CHAR'], $start)) { + // hmtl escape stuff before + $new_string .= GeSHi::hsc(substr($string, $start, $es_pos - $start)); + // check if this is a hard escape + foreach ($this->language_data['HARDESCAPE'] as $hardescape) { + if (substr($string, $es_pos, strlen($hardescape)) == $hardescape) { + // indeed, this is a hardescape + $new_string .= "<span$escape_char_attributes>" . GeSHi::hsc($hardescape) + . '</span>'; + $start = $es_pos + strlen($hardescape); + continue 2; + } + } + // not a hard escape + $new_string .= $escaped_escape_char; + $start = $es_pos + 1; + } + $string = $new_string . GeSHi::hsc(substr($string, $start)); + } else { + $string = GeSHi::hsc($string); } - else { - $attributes = ' class="st0"'; + + if ($check_linenumbers) { + // Are line numbers used? If, we should end the string before + // the newline and begin it again (so when <li>s are put in the source + // remains XHTML compliant) + // note to self: This opens up possibility of config files specifying + // that languages can/cannot have multiline strings??? + $string = str_replace("\n", "</span>\n<span$string_attributes>", $string); } - $char = "<span$attributes>" . $hq; - $i += strlen($hq) - 1; - $HARDQUOTE_OPEN = true; - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; + + $result .= "<span$string_attributes>" . $string . '</span>'; + $string = ''; + continue; } - else if ($char == $this->language_data['ESCAPE_CHAR'] && $STRING_OPEN != '') { - // An escape character - if (!$ESCAPE_CHAR_OPEN) { - $ESCAPE_CHAR_OPEN = !$HARDQUOTE_OPEN; // true unless $HARDQUOTE_OPEN - if ($HARDQUOTE_OPEN) { - foreach ($this->language_data['HARDESCAPE'] as $hard) { - if (substr($part, $i, strlen($hard)) == $hard) { - $ESCAPE_CHAR_OPEN = true; + else { + // update regexp comment cache if needed + if (isset($this->language_data['COMMENT_REGEXP']) && $next_comment_regexp_pos < $i) { + $next_comment_regexp_pos = $length; + foreach ($this->language_data['COMMENT_REGEXP'] as $comment_key => $regexp) { + $match_i = false; + if (isset($comment_regexp_cache_per_key[$comment_key]) && + $comment_regexp_cache_per_key[$comment_key] >= $i) { + // we have already matched something + $match_i = $comment_regexp_cache_per_key[$comment_key]; + } + else if (preg_match($regexp, $part, $match, PREG_OFFSET_CAPTURE, $i)) { + $match_i = $match[0][1]; + $comment_regexp_cache[$match_i] = array( + 'key' => $comment_key, + 'length' => strlen($match[0][0]), + ); + $comment_regexp_cache_per_key[$comment_key] = $match_i; + } else { + $comment_regexp_cache_per_key[$comment_key] = false; + continue; + } + + if ($match_i !== false && $match_i < $next_comment_regexp_pos) { + $next_comment_regexp_pos = $match_i; + if ($match_i === $i) { break; } } } - if ($ESCAPE_CHAR_OPEN && $this->lexic_permissions['ESCAPE_CHAR']) { + } + //Have a look for regexp comments + if ($i == $next_comment_regexp_pos) { + $COMMENT_MATCHED = true; + $comment = $comment_regexp_cache[$next_comment_regexp_pos]; + $test_str = GeSHi::hsc(substr($part, $i, $comment['length'])); + + //@todo If remove important do remove here + if ($this->lexic_permissions['COMMENTS']['MULTI']) { if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][0] . '"'; + $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment['key']] . '"'; } else { - $attributes = ' class="es0"'; + $attributes = ' class="co' . $comment['key'] . '"'; } - $char = "<span$attributes>" . $char; - if (substr($code, $i + 1, 1) == "\n") { - // escaping a newline, what's the point in putting the span around - // the newline? It only causes hassles when inserting line numbers - $char .= '</span>'; - $ESCAPE_CHAR_OPEN = false; + $test_str = "<span$attributes>" . $test_str . "</span>"; + + // Short-cut through all the multiline code + if ($check_linenumbers) { + // strreplace to put close span and open span around multiline newlines + $test_str = str_replace( + "\n", "</span>\n<span$attributes>", + str_replace("\n ", "\n ", $test_str) + ); } } + + $i += $comment['length'] - 1; + + // parse the rest + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; } - else { - $ESCAPE_CHAR_OPEN = false; - if ($this->lexic_permissions['ESCAPE_CHAR']) { - $char .= '</span>'; - } - } - } - else if ($ESCAPE_CHAR_OPEN) { - if ($this->lexic_permissions['ESCAPE_CHAR']) { - $char .= '</span>'; - } - $ESCAPE_CHAR_OPEN = false; - $test_str = $char; - } - else if ($STRING_OPEN == '') { - // Is this a multiline comment? - foreach ($this->language_data['COMMENT_MULTI'] as $open => $close) { - $com_len = strlen($open); - $test_str = substr( $part, $i, $com_len ); - $test_str_match = $test_str; - if (strtolower($open) == strtolower($test_str)) { - $COMMENT_MATCHED = true; - //@todo If remove important do remove here - if ($this->lexic_permissions['COMMENTS']['MULTI'] || - $test_str == GESHI_START_IMPORTANT) { - if ($test_str != GESHI_START_IMPORTANT) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS']['MULTI'] . '"'; + // If we haven't matched a regexp comment, try multi-line comments + if (!$COMMENT_MATCHED) { + // Is this a multiline comment? + foreach ($this->language_data['COMMENT_MULTI'] as $open => $close) { + $com_len = strlen($open); + $test_str = substr( $part, $i, $com_len ); + $test_str_match = $test_str; + if (strtolower($open) == strtolower($test_str)) { + $COMMENT_MATCHED = true; + //@todo If remove important do remove here + if ($this->lexic_permissions['COMMENTS']['MULTI'] || + $test_str == GESHI_START_IMPORTANT) { + if ($test_str != GESHI_START_IMPORTANT) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS']['MULTI'] . '"'; + } + else { + $attributes = ' class="coMULTI"'; + } + $test_str = "<span$attributes>" . GeSHi::hsc($test_str); } else { - $attributes = ' class="coMULTI"'; + if (!$this->use_classes) { + $attributes = ' style="' . $this->important_styles . '"'; + } + else { + $attributes = ' class="imp"'; + } + // We don't include the start of the comment if it's an + // "important" part + $test_str = "<span$attributes>"; } - $test_str = "<span$attributes>" . GeSHi::hsc($test_str); } else { - if (!$this->use_classes) { - $attributes = ' style="' . $this->important_styles . '"'; - } - else { - $attributes = ' class="imp"'; - } - // We don't include the start of the comment if it's an - // "important" part - $test_str = "<span$attributes>"; + $test_str = GeSHi::hsc($test_str); } - } - else { - $test_str = GeSHi::hsc($test_str); - } - $close_pos = strpos( $part, $close, $i + strlen($close) ); + $close_pos = strpos( $part, $close, $i + strlen($open) ); - $oops = false; - if ($close_pos === false) { - $close_pos = strlen($part); - $oops = true; - } - else { - $close_pos -= ($com_len - strlen($close)); - } + if ($close_pos === false) { + $close_pos = $length; + } - // Short-cut through all the multiline code - $rest_of_comment = GeSHi::hsc(substr($part, $i + $com_len, $close_pos - $i)); - if (($this->lexic_permissions['COMMENTS']['MULTI'] || - $test_str_match == GESHI_START_IMPORTANT) && - ($this->line_numbers != GESHI_NO_LINE_NUMBERS || - count($this->highlight_extra_lines) > 0)) { - // strreplace to put close span and open span around multiline newlines - $test_str .= str_replace( - "\n", "</span>\n<span$attributes>", - str_replace("\n ", "\n ", $rest_of_comment) - ); - } - else { - $test_str .= $rest_of_comment; - } + // Short-cut through all the multiline code + $rest_of_comment = GeSHi::hsc(substr($part, $i + strlen($open), $close_pos - $i - strlen($open) + strlen($close))); + if (($this->lexic_permissions['COMMENTS']['MULTI'] || + $test_str_match == GESHI_START_IMPORTANT) && + $check_linenumbers) { + // strreplace to put close span and open span around multiline newlines + $test_str .= str_replace( + "\n", "</span>\n<span$attributes>", + str_replace("\n ", "\n ", $rest_of_comment) + ); + } + else { + $test_str .= $rest_of_comment; + } - if ($this->lexic_permissions['COMMENTS']['MULTI'] || - $test_str_match == GESHI_START_IMPORTANT) { - $test_str .= '</span>'; - if ($oops) { - $test_str .= "\n"; + if ($this->lexic_permissions['COMMENTS']['MULTI'] || + $test_str_match == GESHI_START_IMPORTANT) { + $test_str .= '</span>'; } + $i = $close_pos + strlen($close) - 1; + // parse the rest + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + break; } - $i = $close_pos + $com_len - 1; - // parse the rest - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - break; } } // If we haven't matched a multiline comment, try single-line comments @@ -1815,22 +1953,8 @@ class GeSHi { } //This check will find special variables like $# in bash or compiler directives of Delphi beginning {$ if($match) { - $disallowed_before = ""; - $disallowed_after = ""; - - if(isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS'])) { - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE'])) { - $disallowed_before = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE']; - } - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER'])) { - $disallowed_after = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER']; - } - } - } - - $match = $match && (!strlen($disallowed_before) || ((false === strpos($disallowed_before, substr($part, $i-1, 1))) && (0!=$i))); - $match = $match && (!strlen($disallowed_after) || ((false === strpos($disallowed_after, substr($part, $i+1, 1))) && (strlen($part)-1>$i))); + $match = $match && (empty($sc_disallowed_before) || ((false === strpos($sc_disallowed_before, $part[$i-1])) && (0 != $i))); + $match = $match && (empty($sc_disallowed_after) || ((false === strpos($sc_disallowed_after, $part[$i+1])) && ($length-1>$i))); } if ($match) { $COMMENT_MATCHED = true; @@ -1849,7 +1973,7 @@ class GeSHi { $close_pos = strpos($part, "\n", $i); $oops = false; if ($close_pos === false) { - $close_pos = strlen($part); + $close_pos = $length; $oops = true; } $test_str .= GeSHi::hsc(substr($part, $i + $com_len, $close_pos - $i - $com_len)); @@ -1869,28 +1993,9 @@ class GeSHi { } } } - else if ($STRING_OPEN != '') { - // Otherwise, convert it to HTML form - if (strtolower($this->encoding) == 'utf-8') { - //only escape <128 (we don't want to break multibyte chars) - if (ord($char) < 128) { - $char = GeSHi::hsc($char); - } - } - else { - //encode everthing - $char = GeSHi::hsc($char); - } - } // Where are we adding this char? if (!$COMMENT_MATCHED) { - if (($STRING_OPEN == '') && !$CLOSE_STRING) { - $stuff_to_parse .= $char; - } - else { - $result .= $char; - $CLOSE_STRING = false; - } + $stuff_to_parse .= $char; } else { $result .= $test_str; @@ -1920,17 +2025,16 @@ class GeSHi { } } - // Parse the last stuff (redundant?) - $result .= $this->parse_non_string_part($stuff_to_parse); + //This fix is related to SF#1923020, but has to be applied regardless of + //actually highlighting symbols. + $result = str_replace(array('<SEMI>', '<PIPE>'), array(';', '|'), $result); + +// // Parse the last stuff (redundant?) +// $result .= $this->parse_non_string_part($stuff_to_parse); // Lop off the very first and last spaces $result = substr($result, 1, -1); - // Are we still in a string? - if ($STRING_OPEN) { - $result .= '</span>'; - } - // We're finished: stop timing $this->set_time($start_time, microtime()); @@ -1946,24 +2050,27 @@ class GeSHi { * @since 1.0.0 * @access private */ - function indent($result) { + function indent(&$result) { /// Replace tabs with the correct number of spaces if (false !== strpos($result, "\t")) { $lines = explode("\n", $result); - $tab_width = $this->get_real_tab_width(); - foreach ($lines as $key => $line) { + $result = null;//Save memory while we process the lines individually + $tab_width = $this->get_real_tab_width(); + $tab_string = ' ' . str_repeat(' ', $tab_width); + + for ($key = 0, $n = count($lines); $key < $n; $key++) { + $line = $lines[$key]; if (false === strpos($line, "\t")) { - $lines[$key] = $line; continue; } $pos = 0; $length = strlen($line); - $result_line = ''; + $lines[$key] = ''; // reduce memory $IN_TAG = false; - for ($i = 0; $i < $length; $i++) { - $char = substr($line, $i, 1); + for ($i = 0; $i < $length; ++$i) { + $char = $line[$i]; // Simple engine to work out whether we're in a tag. // If we are we modify $pos. This is so we ignore HTML // in the line and only workout the tab replacement @@ -1971,26 +2078,27 @@ class GeSHi { // This test could be improved to include strings in the // html so that < or > would be allowed in user's styles // (e.g. quotes: '<' '>'; or similar) - if ($IN_TAG && '>' == $char) { - $IN_TAG = false; - $result_line .= '>'; - ++$pos; + if ($IN_TAG) { + if('>' == $char) { + $IN_TAG = false; + } + $lines[$key] .= $char; } - else if (!$IN_TAG && '<' == $char) { + else if ('<' == $char) { $IN_TAG = true; - $result_line .= '<'; - ++$pos; + $lines[$key] .= '<'; } - else if (!$IN_TAG && '&' == $char) { - $substr = substr($line, $i + 3, 4); - //$substr_5 = substr($line, 5, 1); + else if ('&' == $char) { + $substr = substr($line, $i + 3, 5); $posi = strpos($substr, ';'); - if (false !== $posi) { - $pos += $posi + 3; + if (false === $posi) { + ++$pos; + } else { + $pos -= $posi+2; } - $result_line .= '&'; + $lines[$key] .= $char; } - else if (!$IN_TAG && "\t" == $char) { + else if ("\t" == $char) { $str = ''; // OPTIMISE - move $strs out. Make an array: // $tabs = array( @@ -1998,28 +2106,32 @@ class GeSHi { // 2 => ' ', // 3 => ' ' etc etc // to use instead of building a string every time - $strs = array(0 => ' ', 1 => ' '); - for ($k = 0; $k < ($tab_width - (($i - $pos) % $tab_width)); $k++) $str .= $strs[$k % 2]; - $result_line .= $str; - $pos += ($i - $pos) % $tab_width + 1; + $tab_end_width = $tab_width - ($pos % $tab_width); //Moved out of the look as it doesn't change within the loop + if(($pos%2) || 1 == $tab_end_width) { + $str .= substr($tab_string, 6, $tab_end_width); + } else { + $str .= substr($tab_string, 0, $tab_end_width+5); + } + $lines[$key] .= $str; + $pos += $tab_end_width; if (false === strpos($line, "\t", $i + 1)) { - $result_line .= substr($line, $i + 1); + $lines[$key] .= substr($line, $i + 1); break; } } - else if ($IN_TAG) { + else if (0 == $pos && ' ' == $char) { + $lines[$key] .= ' '; ++$pos; - $result_line .= $char; } else { - $result_line .= $char; - //++$pos; + $lines[$key] .= $char; + ++$pos; } } - $lines[$key] = $result_line; } $result = implode("\n", $lines); + unset($lines);//We don't need the lines separated beyond this --- free them! } // Other whitespace // BenBE: Fix to reduce the number of replacements to be done @@ -2027,12 +2139,12 @@ class GeSHi { $result = str_replace(' ', ' ', $result); if ($this->line_numbers == GESHI_NO_LINE_NUMBERS) { - if ($this->line_ending === null) { - $result = nl2br($result); - } else { - $result = str_replace("\n", $this->line_ending, $result); - } - } + if ($this->line_ending === null) { + $result = nl2br($result); + } else { + $result = str_replace("\n", $this->line_ending, $result); + } + } return $result; } @@ -2045,13 +2157,14 @@ class GeSHi { * @access private */ function change_case($instr) { - if ($this->language_data['CASE_KEYWORDS'] == GESHI_CAPS_UPPER) { - return strtoupper($instr); - } - else if ($this->language_data['CASE_KEYWORDS'] == GESHI_CAPS_LOWER) { - return strtolower($instr); + switch ($this->language_data['CASE_KEYWORDS']) { + case GESHI_CAPS_UPPER: + return strtoupper($instr); + case GESHI_CAPS_LOWER: + return strtolower($instr); + default: + return $instr; } - return $instr; } /** @@ -2081,13 +2194,14 @@ class GeSHi { // Old system: strtolower //$keyword = ( $this->language_data['CASE_SENSITIVE'][$group] ) ? $keyword : strtolower($keyword); // New system: get keyword from language file to get correct case + $lower_keyword = strtolower($keyword); foreach ($this->language_data['KEYWORDS'][$group] as $word) { - if (strtolower($word) == strtolower($keyword)) { + if (strtolower($word) == $lower_keyword) { break; } } $word = ( substr($word, 0, 4) == '<' ) ? substr($word, 4) : $word; - $word = ( substr($word, -4) == '>' ) ? substr($word, 0, strlen($word) - 4) : $word; + $word = ( substr($word, -4) == '>' ) ? substr($word, 0, - 4) : $word; if (!$word) return ''; return '<|UR1|"' . @@ -2158,8 +2272,27 @@ class GeSHi { // Highlight keywords // if there is a couple of alpha symbols there *might* be a keyword if (preg_match('#[a-zA-Z]{2,}#', $stuff_to_parse)) { + $disallowed_before = "a-zA-Z0-9\$_\|\#;>|^"; + $disallowed_after = "a-zA-Z0-9_\|%\\-&"; + if(isset($this->language_data['PARSER_CONTROL'])) { + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) { + $disallowed_before = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; + } + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) { + $disallowed_after = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; + } + } + } + foreach ($this->language_data['KEYWORDS'] as $k => $keywordset) { - if ($this->lexic_permissions['KEYWORDS'][$k]) { + if (!isset($this->lexic_permissions['KEYWORDS'][$k]) || + $this->lexic_permissions['KEYWORDS'][$k]) { + + $case_sensitive = $this->language_data['CASE_SENSITIVE'][$k]; + $modifiers = $case_sensitive ? 'e' : 'ie'; + $styles = "/$k/"; + foreach ($keywordset as $keyword) { $keyword = preg_quote($keyword, '/'); // @@ -2168,33 +2301,24 @@ class GeSHi { // in just yet - otherwise languages with the keywords "color" or "or" have // a fit. // - if (false !== stristr($stuff_to_parse_pregquote, $keyword )) { - $stuff_to_parse .= ' '; + if ($case_sensitive) { + $keyword_found = strpos($stuff_to_parse_pregquote, $keyword) !== false; + } else { + $keyword_found = stristr($stuff_to_parse_pregquote, $keyword) !== false; + } + if ($keyword_found) { // Might make a more unique string for putting the number in soon // Basically, we don't put the styles in yet because then the styles themselves will // get highlighted if the language has a CSS keyword in it (like CSS, for example ;)) - $styles = "/$k/"; - $modifiers = ($this->language_data['CASE_SENSITIVE'][$k]) ? "e" : "ie"; - - $disallowed_before = "a-zA-Z0-9\$_\|\#;>|^"; - $disallowed_after = "a-zA-Z0-9_<\|%\\-&"; - if(isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) { - $disallowed_before = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; - } - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) { - $disallowed_after = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; - } - } - } + + $stuff_to_parse .= ' '; $stuff_to_parse = preg_replace( - "/([^$disallowed_before])($keyword)(?=[^$disallowed_after])/$modifiers", + "/([^$disallowed_before])($keyword)(?!\<DOT\>(?:htm|php))(?=[^$disallowed_after])/$modifiers", "'\\1' . $func2('\\2', '$k', 'BEGIN') . '<|$styles>' . $func('\\2') . '|>' . $func2('\\2', '$k', 'END')", $stuff_to_parse ); - $stuff_to_parse = substr($stuff_to_parse, 0, strlen($stuff_to_parse) - 1); + $stuff_to_parse = substr($stuff_to_parse, 0, -1); } } } @@ -2206,7 +2330,9 @@ class GeSHi { // foreach ($this->language_data['KEYWORDS'] as $k => $kws) { if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['KEYWORDS'][$k] . '"'; + $attributes = ' style="' . + (isset($this->language_data['STYLES']['KEYWORDS'][$k]) ? + $this->language_data['STYLES']['KEYWORDS'][$k] : "") . '"'; } else { $attributes = ' class="kw' . $k . '"'; @@ -2248,7 +2374,7 @@ class GeSHi { // if ($this->lexic_permissions['BRACKETS']) { $code_entities_match = array('[', ']', '(', ')', '{', '}'); - if (!$this->use_classes) { + if (!$this->use_classes && isset($this->language_data['STYLES']['BRACKETS'][0])) { $code_entities_replace = array( '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">[|>', '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">]|>', @@ -2272,7 +2398,7 @@ class GeSHi { } //FIX for symbol highlighting ... - if($this->lexic_permissions['SYMBOLS']) { + if($this->lexic_permissions['SYMBOLS'] && !empty($this->language_data['SYMBOLS'])) { //As this is a costy operation, we avoid doing it for multiple groups ... //Instead we perform it for all symbols at once. // @@ -2439,6 +2565,11 @@ class GeSHi { * @todo Needs to load keys for lexic permissions for keywords, regexps etc */ function load_language($file_name) { + if ($file_name == $this->loaded_language) { + // this file is already loaded! + return; + } + $this->loaded_language = $file_name; $this->enable_highlighting(); $language_data = array(); require $file_name; @@ -2473,12 +2604,12 @@ class GeSHi { * @since 1.0.0 * @access private */ - function finalise($parsed_code) { + function finalise(&$parsed_code) { // Remove end parts of important declarations // This is BUGGY!! My fault for bad code: fix coming in 1.2 // @todo Remove this crap if ($this->enable_important_blocks && - (strstr($parsed_code, GeSHi::hsc(GESHI_START_IMPORTANT)) === false)) { + (strpos($parsed_code, GeSHi::hsc(GESHI_START_IMPORTANT)) === false)) { $parsed_code = str_replace(GeSHi::hsc(GESHI_END_IMPORTANT), '', $parsed_code); } @@ -2497,28 +2628,31 @@ class GeSHi { $this->overall_id = 'geshi-' . substr(md5(microtime()), 0, 4); } + // Get code into lines + $code = explode("\n", $parsed_code); + $parsed_code = ''; + // If we're using line numbers, we insert <li>s and appropriate // markup to style them (otherwise we don't need to do anything) if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { // If we're using the <pre> header, we shouldn't add newlines because // the <pre> will line-break them (and the <li>s already do this for us) $ls = ($this->header_type != GESHI_HEADER_PRE) ? "\n" : ''; - // Get code into lines - $code = explode("\n", $parsed_code); + // Set vars to defaults for following loop - $parsed_code = ''; $i = 0; // Foreach line... - foreach ($code as $line) { + for ($i = 0, $n = count($code); $i < $n;) { //Reset the attributes for a new line ... $attrs = array(); // Make lines have at least one space in them if they're empty // BenBE: Checking emptiness using trim instead of relying on blanks - if ('' == trim($line)) { - $line = ' '; + if ('' == trim($code[$i])) { + $code[$i] = ' '; } + // If this is a "special line"... if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && $i % $this->line_nth_row == ($this->line_nth_row - 1)) { @@ -2556,13 +2690,15 @@ class GeSHi { } ++$i; + // Are we supposed to use ids? If so, add them if ($this->add_ids) { $attrs['id'][] = "$this->overall_id-$i"; } + if (in_array($i, $this->highlight_extra_lines)) { if ($this->use_classes) { - if(array_key_exists($i, $this->highlight_extra_lines_styles)) { + if (isset($this->highlight_extra_lines_styles[$i])) { $attrs['class'][] = "lx$i"; } else { $attrs['class'][] = "ln-xtra"; @@ -2577,24 +2713,22 @@ class GeSHi { foreach ($attrs as $key => $attr) { $attr_string .= ' ' . $key . '="' . implode(' ', $attr) . '"'; } - $parsed_code .= "<li$attr_string>$start$line$end</li>$ls"; + + $parsed_code .= "<li$attr_string>$start{$code[$i - 1]}$end</li>$ls"; } } else { // No line numbers, but still need to handle highlighting lines extra. // Have to use divs so the full width of the code is highlighted - $code = explode("\n", $parsed_code); - $parsed_code = ''; - $i = 0; - foreach ($code as $line) { + for ($i = 0, $n = count($code); $i < $n; ++$i) { // Make lines have at least one space in them if they're empty // BenBE: Checking emptiness using trim instead of relying on blanks - if ('' == trim($line)) { - $line = ' '; + if ('' == trim($code[$i])) { + $code[$i] = ' '; } - if (in_array(++$i, $this->highlight_extra_lines)) { + if (in_array($i + 1, $this->highlight_extra_lines)) { if ($this->use_classes) { - if (array_key_exists($i, $this->highlight_extra_lines_styles)) { + if (isset($this->highlight_extra_lines_styles[$i])) { $parsed_code .= "<div class=\"lx$i\">"; } else { $parsed_code .= "<div class=\"ln-xtra\">"; @@ -2603,17 +2737,13 @@ class GeSHi { $parsed_code .= "<div style=\"" . $this->get_line_style($i) . "\">"; } // Remove \n because it stuffs up <pre> header - $parsed_code .= $line . "</div>"; + $parsed_code .= $code[$i] . "</div>"; } else { - $parsed_code .= $line . "\n"; + $parsed_code .= $code[$i] . "\n"; } } } - - if ($this->header_type == GESHI_HEADER_PRE) { - // enforce line numbers when using pre - $parsed_code = str_replace('<li></li>', '<li> </li>', $parsed_code); - } + unset($code); return $this->header() . chop($parsed_code) . $this->footer(); } @@ -2858,7 +2988,16 @@ class GeSHi { '&' => '&', '"' => '"', '<' => '<', - '>' => '>' + '>' => '>', + + //This fix is related to SF#1923020, but has to be applied + //regardless of actually highlighting symbols. + + //Circumvent a bug with symbol highlighting + //This is required as ; would produce undesirable side-effects if it + //was not to be processed as an entity. + ';' => '<SEMI>', // Force ; to be processed as entity + '|' => '<PIPE>' // Force | to be processed as entity ); // ENT_COMPAT set if (ENT_NOQUOTES == $quote_style) // don't convert double quotes @@ -3056,15 +3195,15 @@ class GeSHi { * @since 1.0.7.21 */ function get_line_style($line) { - //$style = null; - $style = null; - if (array_key_exists($line, $this->highlight_extra_lines_styles)) { - $style = $this->highlight_extra_lines_styles[$line]; - } else { // if no "extra" style assigned - $style = $this->highlight_extra_lines_style; - } - - return $style; + //$style = null; + $style = null; + if (isset($this->highlight_extra_lines_styles[$line])) { + $style = $this->highlight_extra_lines_styles[$line]; + } else { // if no "extra" style assigned + $style = $this->highlight_extra_lines_style; + } + + return $style; } } // End Class GeSHi diff --git a/inc/geshi/abap.php b/inc/geshi/abap.php index b25408079957258887873e660ef0cedf5320fc87..0c652be43807727bb0dc65769876df28fedee1d5 100644 --- a/inc/geshi/abap.php +++ b/inc/geshi/abap.php @@ -4,7 +4,7 @@ * -------- * Author: Andres Picazo (andres@andrespicazo.com) * Copyright: (c) 2007 Andres Picazo - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/04 * * ABAP language file for GeSHi. diff --git a/inc/geshi/actionscript.php b/inc/geshi/actionscript.php index a873c268f0f6b6b9de3a7e62d5e6490dc36592ee..f1081e7121fbf0523a298f5c59ed62e13decee6b 100644 --- a/inc/geshi/actionscript.php +++ b/inc/geshi/actionscript.php @@ -4,7 +4,7 @@ * ---------------- * Author: Steffen Krause (Steffen.krause@muse.de) * Copyright: (c) 2004 Steffen Krause, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/20 * * Actionscript language file for GeSHi. diff --git a/inc/geshi/actionscript3.php b/inc/geshi/actionscript3.php new file mode 100644 index 0000000000000000000000000000000000000000..b32222e60a2c08b82e209cf96cdd419adf69e217 --- /dev/null +++ b/inc/geshi/actionscript3.php @@ -0,0 +1,464 @@ +<?php +/************************************************************************************* + * actionscript3.php + * ---------------- + * Author: Jordi Boggiano (j.boggiano@seld.be) + * Copyright: (c) 2007 Jordi Boggiano (http://www.seld.be/), Benny Baumann (http://qbnz.com/highlighter) + * Release Version: 1.0.7.22 + * Date Started: 2007/11/26 + * + * ActionScript3 language file for GeSHi. + * + * All keywords scraped from the Flex 2.0.1 Documentation + * + * The default style is based on FlexBuilder2 coloring, with the addition of class, package, method and + * constant names that are highlighted to help identifying problem when used on public pastebins. + * + * For styling, keywords data from 0 to 1 (accessible through .kw1, etc.) are described here : + * + * 1 : operators + * 2 : 'var' keyword + * 3 : 'function' keyword + * 4 : 'class' and 'package' keywords + * 5 : all flash.* class names plus Top Level classes, mx are excluded + * 6 : all flash.* package names, mx are excluded + * 7 : valid flash method names and properties (there is no type checks sadly, for example String().x will be highlighted as 'x' is valid, but obviously strings don't have a x property) + * 8 : valid flash constant names (again, no type check) + * + * + * CHANGES + * ------- + * 2007/12/06 (1.0.7.22) + * - Added the 'this' keyword (oops) + * + * TODO (updated 2007/11/30) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'ActionScript 3', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'with', 'while', 'void', 'undefined', 'typeof', 'try', 'true', + 'throw', 'this', 'switch', 'super', 'set', 'return', 'public', 'protected', + 'private', 'null', 'new', 'is', 'internal', 'instanceof', 'in', + 'import', 'if', 'get', 'for', 'false', 'else', 'each', 'each', 'do', + 'delete', 'default', 'continue', 'catch', 'case', 'break', 'as' + ), + 2 => array( + 'var' + ), + 3 => array( + 'function' + ), + 4 => array( + 'class', 'package' + ), + 5 => array( + 'uint', 'int', 'arguments', 'XMLSocket', 'XMLNodeType', 'XMLNode', + 'XMLList', 'XMLDocument', 'XML', 'Video', 'VerifyError', + 'URLVariables', 'URLStream', 'URLRequestMethod', 'URLRequestHeader', + 'URLRequest', 'URLLoaderDataFormat', 'URLLoader', 'URIError', + 'TypeError', 'Transform', 'TimerEvent', 'Timer', 'TextSnapshot', + 'TextRenderer', 'TextLineMetrics', 'TextFormatAlign', 'TextFormat', + 'TextFieldType', 'TextFieldAutoSize', 'TextField', 'TextEvent', + 'TextDisplayMode', 'TextColorType', 'System', 'SyntaxError', + 'SyncEvent', 'StyleSheet', 'String', 'StatusEvent', 'StaticText', + 'StageScaleMode', 'StageQuality', 'StageAlign', 'Stage', + 'StackOverflowError', 'Sprite', 'SpreadMethod', 'SoundTransform', + 'SoundMixer', 'SoundLoaderContext', 'SoundChannel', 'Sound', + 'Socket', 'SimpleButton', 'SharedObjectFlushStatus', 'SharedObject', + 'Shape', 'SecurityPanel', 'SecurityErrorEvent', 'SecurityError', + 'SecurityDomain', 'Security', 'ScriptTimeoutError', 'Scene', + 'SWFVersion', 'Responder', 'RegExp', 'ReferenceError', 'Rectangle', + 'RangeError', 'QName', 'Proxy', 'ProgressEvent', + 'PrintJobOrientation', 'PrintJobOptions', 'PrintJob', 'Point', + 'PixelSnapping', 'ObjectEncoding', 'Object', 'Number', 'NetStream', + 'NetStatusEvent', 'NetConnection', 'Namespace', 'MovieClip', + 'MouseEvent', 'Mouse', 'MorphShape', 'Microphone', 'MemoryError', + 'Matrix', 'Math', 'LocalConnection', 'LoaderInfo', 'LoaderContext', + 'Loader', 'LineScaleMode', 'KeyboardEvent', 'Keyboard', + 'KeyLocation', 'JointStyle', 'InvalidSWFError', + 'InterpolationMethod', 'InteractiveObject', 'IllegalOperationError', + 'IOErrorEvent', 'IOError', 'IMEEvent', 'IMEConversionMode', 'IME', + 'IExternalizable', 'IEventDispatcher', 'IDynamicPropertyWriter', + 'IDynamicPropertyOutput', 'IDataOutput', 'IDataInput', 'ID3Info', + 'IBitmapDrawable', 'HTTPStatusEvent', 'GridFitType', 'Graphics', + 'GradientType', 'GradientGlowFilter', 'GradientBevelFilter', + 'GlowFilter', 'Function', 'FrameLabel', 'FontType', 'FontStyle', + 'Font', 'FocusEvent', 'FileReferenceList', 'FileReference', + 'FileFilter', 'ExternalInterface', 'EventPhase', 'EventDispatcher', + 'Event', 'EvalError', 'ErrorEvent', 'Error', 'Endian', 'EOFError', + 'DropShadowFilter', 'DisplayObjectContainer', 'DisplayObject', + 'DisplacementMapFilterMode', 'DisplacementMapFilter', 'Dictionary', + 'DefinitionError', 'Date', 'DataEvent', 'ConvolutionFilter', + 'ContextMenuItem', 'ContextMenuEvent', 'ContextMenuBuiltInItems', + 'ContextMenu', 'ColorTransform', 'ColorMatrixFilter', 'Class', + 'CapsStyle', 'Capabilities', 'Camera', 'CSMSettings', 'ByteArray', + 'Boolean', 'BlurFilter', 'BlendMode', 'BitmapFilterType', + 'BitmapFilterQuality', 'BitmapFilter', 'BitmapDataChannel', + 'BitmapData', 'Bitmap', 'BevelFilter', 'AsyncErrorEvent', 'Array', + 'ArgumentError', 'ApplicationDomain', 'AntiAliasType', + 'ActivityEvent', 'ActionScriptVersion', 'AccessibilityProperties', + 'Accessibility', 'AVM1Movie' + ), + 6 => array( + 'flash.xml', 'flash.utils', 'flash.ui', 'flash.text', + 'flash.system', 'flash.profiler', 'flash.printing', 'flash.net', + 'flash.media', 'flash.geom', 'flash.filters', 'flash.external', + 'flash.events', 'flash.errors', 'flash.display', + 'flash.accessibility' + ), + 7 => array( + 'zoom', 'year', 'y', 'xmlDecl', 'x', 'writeUnsignedInt', + 'writeUTFBytes', 'writeUTF', 'writeShort', 'writeObject', + 'writeMultiByte', 'writeInt', 'writeFloat', 'writeExternal', + 'writeDynamicProperty', 'writeDynamicProperties', 'writeDouble', + 'writeBytes', 'writeByte', 'writeBoolean', 'wordWrap', + 'willTrigger', 'width', 'volume', 'visible', 'videoWidth', + 'videoHeight', 'version', 'valueOf', 'value', 'usingTLS', + 'useRichTextClipboard', 'useHandCursor', 'useEchoSuppression', + 'useCodePage', 'url', 'uri', 'uploadCompleteData', 'upload', + 'updateProperties', 'updateAfterEvent', 'upState', 'unshift', + 'unlock', 'unload', 'union', 'unescapeMultiByte', 'unescape', + 'underline', 'uncompress', 'type', 'ty', 'tx', 'transparent', + 'translate', 'transformPoint', 'transform', 'trackAsMenu', 'track', + 'trace', 'totalMemory', 'totalFrames', 'topLeft', 'top', + 'togglePause', 'toXMLString', 'toUpperCase', 'toUTCString', + 'toTimeString', 'toString', 'toPrecision', 'toLowerCase', + 'toLocaleUpperCase', 'toLocaleTimeString', 'toLocaleString', + 'toLocaleLowerCase', 'toLocaleDateString', 'toFixed', + 'toExponential', 'toDateString', 'timezoneOffset', 'timerComplete', + 'timer', 'time', 'threshold', 'thickness', 'textWidth', + 'textSnapshot', 'textInput', 'textHeight', 'textColor', 'text', + 'test', 'target', 'tan', 'tabStops', 'tabIndexChange', 'tabIndex', + 'tabEnabledChange', 'tabEnabled', 'tabChildrenChange', + 'tabChildren', 'sync', 'swfVersion', 'swapChildrenAt', + 'swapChildren', 'subtract', 'substring', 'substr', 'styleSheet', + 'styleNames', 'strength', 'stopPropagation', + 'stopImmediatePropagation', 'stopDrag', 'stopAll', 'stop', 'status', + 'startDrag', 'start', 'stageY', 'stageX', 'stageWidth', + 'stageHeight', 'stageFocusRect', 'stage', 'sqrt', 'split', 'splice', + 'source', 'soundTransform', 'soundComplete', 'sortOn', 'sort', + 'songName', 'some', 'socketData', 'smoothing', 'slice', 'size', + 'sin', 'silent', 'silenceTimeout', 'silenceLevel', 'showSettings', + 'showRedrawRegions', 'showDefaultContextMenu', 'show', 'shortcut', + 'shiftKey', 'shift', 'sharpness', 'sharedEvents', 'shadowColor', + 'shadowAlpha', 'settings', 'setUseEchoSuppression', 'setUTCSeconds', + 'setUTCMonth', 'setUTCMinutes', 'setUTCMilliseconds', 'setUTCHours', + 'setUTCFullYear', 'setUTCDate', 'setTimeout', 'setTime', + 'setTextFormat', 'setStyle', 'setSilenceLevel', 'setSettings', + 'setSelection', 'setSelected', 'setSelectColor', 'setSeconds', + 'setQuality', 'setPropertyIsEnumerable', 'setProperty', 'setPixels', + 'setPixel32', 'setPixel', 'setNamespace', 'setName', + 'setMotionLevel', 'setMonth', 'setMode', 'setMinutes', + 'setMilliseconds', 'setLoopback', 'setLoopBack', 'setLocalName', + 'setKeyFrameInterval', 'setInterval', 'setHours', 'setFullYear', + 'setEmpty', 'setDirty', 'setDate', 'setCompositionString', + 'setClipboard', 'setChildren', 'setChildIndex', + 'setAdvancedAntiAliasingTable', 'serverString', 'separatorBefore', + 'sendToURL', 'send', 'selectionEndIndex', 'selectionBeginIndex', + 'selectable', 'select', 'seek', 'securityError', 'securityDomain', + 'secondsUTC', 'seconds', 'search', 'scrollV', 'scrollRect', + 'scrollH', 'scroll', 'screenResolutionY', 'screenResolutionX', + 'screenDPI', 'screenColor', 'scenes', 'scaleY', 'scaleX', + 'scaleMode', 'scale9Grid', 'scale', 'save', 'sandboxType', + 'sameDomain', 'running', 'round', 'rotation', 'rotate', 'root', + 'rollOver', 'rollOut', 'rightToRight', 'rightToLeft', 'rightPeak', + 'rightMargin', 'right', 'rewind', 'reverse', 'resume', 'restrict', + 'resize', 'reset', 'requestHeaders', 'replaceText', + 'replaceSelectedText', 'replace', 'repeatCount', 'render', + 'removedFromStage', 'removed', 'removeNode', 'removeNamespace', + 'removeEventListener', 'removeChildAt', 'removeChild', + 'relatedObject', 'registerFont', 'registerClassAlias', 'redOffset', + 'redMultiplier', 'rect', 'receiveVideo', 'receiveAudio', + 'readUnsignedShort', 'readUnsignedInt', 'readUnsignedByte', + 'readUTFBytes', 'readUTF', 'readShort', 'readObject', + 'readMultiByte', 'readInt', 'readFloat', 'readExternal', + 'readDouble', 'readBytes', 'readByte', 'readBoolean', 'ratios', + 'rate', 'random', 'quality', 'push', 'publish', 'proxyType', + 'prototype', 'propertyIsEnumerable', 'progress', + 'processingInstructions', 'printAsBitmap', 'print', + 'previousSibling', 'preventDefault', 'prevScene', 'prevFrame', + 'prettyPrinting', 'prettyIndent', 'preserveAlpha', 'prependChild', + 'prefix', 'pow', 'position', 'pop', 'polar', 'playerType', 'play', + 'pixelSnapping', 'pixelDissolve', 'pixelBounds', 'pixelAspectRatio', + 'perlinNoise', 'pause', 'parseXML', 'parseInt', 'parseFloat', + 'parseCSS', 'parse', 'parentNode', 'parentDomain', + 'parentAllowsChild', 'parent', 'parameters', 'paperWidth', + 'paperHeight', 'pan', 'paletteMap', 'pageWidth', 'pageHeight', + 'overState', 'outsideCutoff', 'os', 'orientation', 'open', + 'opaqueBackground', 'onPlayStatus', 'onMetaData', 'onCuePoint', + 'offsetPoint', 'offset', 'objectID', 'objectEncoding', 'numLock', + 'numLines', 'numFrames', 'numChildren', 'normalize', 'noise', + 'nodeValue', 'nodeType', 'nodeName', 'nodeKind', 'noAutoLabeling', + 'nextValue', 'nextSibling', 'nextScene', 'nextNameIndex', + 'nextName', 'nextFrame', 'netStatus', 'navigateToURL', + 'namespaceURI', 'namespaceDeclarations', 'namespace', 'names', + 'name', 'muted', 'multiline', 'moveTo', 'mouseY', 'mouseX', + 'mouseWheelEnabled', 'mouseWheel', 'mouseUp', 'mouseTarget', + 'mouseOver', 'mouseOut', 'mouseMove', 'mouseLeave', + 'mouseFocusChange', 'mouseEnabled', 'mouseDown', 'mouseChildren', + 'motionTimeout', 'motionLevel', 'monthUTC', 'month', + 'modificationDate', 'mode', 'minutesUTC', 'minutes', 'min', + 'millisecondsUTC', 'milliseconds', 'method', 'message', 'merge', + 'menuSelect', 'menuItemSelect', 'maxScrollV', 'maxScrollH', + 'maxLevel', 'maxChars', 'max', 'matrixY', 'matrixX', 'matrix', + 'match', 'mask', 'mapPoint', 'mapBitmap', 'map', 'manufacturer', + 'macType', 'loopback', 'loop', 'log', 'lock', 'localeCompare', + 'localY', 'localX', 'localToGlobal', 'localName', + 'localFileReadDisable', 'loaderURL', 'loaderInfo', 'loader', + 'loadPolicyFile', 'loadBytes', 'load', 'liveDelay', 'link', + 'lineTo', 'lineStyle', 'lineGradientStyle', 'level', + 'letterSpacing', 'length', 'leftToRight', 'leftToLeft', 'leftPeak', + 'leftMargin', 'left', 'leading', 'lastIndexOf', 'lastIndex', + 'lastChild', 'language', 'labels', 'knockout', 'keyUp', + 'keyLocation', 'keyFrameInterval', 'keyFocusChange', 'keyDown', + 'keyCode', 'kerning', 'join', 'italic', 'isXMLName', + 'isPrototypeOf', 'isNaN', 'isFocusInaccessible', 'isFinite', + 'isEmpty', 'isDefaultPrevented', 'isDebugger', 'isBuffering', + 'isAttribute', 'isAccessible', 'ioError', 'invert', 'invalidate', + 'intersects', 'intersection', 'interpolate', 'insideCutoff', + 'insertChildBefore', 'insertChildAfter', 'insertBefore', 'inner', + 'init', 'info', 'inflatePoint', 'inflate', 'indexOf', 'index', + 'indent', 'inScopeNamespaces', 'imeComposition', 'ime', + 'ignoreWhitespace', 'ignoreWhite', 'ignoreProcessingInstructions', + 'ignoreComments', 'ignoreCase', 'identity', 'idMap', 'id3', + 'httpStatus', 'htmlText', 'hoursUTC', 'hours', 'hitTestTextNearPos', + 'hitTestState', 'hitTestPoint', 'hitTestObject', 'hitTest', + 'hitArea', 'highlightColor', 'highlightAlpha', 'hideObject', + 'hideBuiltInItems', 'hide', 'height', 'hasVideoEncoder', 'hasTLS', + 'hasStreamingVideo', 'hasStreamingAudio', 'hasSimpleContent', + 'hasScreenPlayback', 'hasScreenBroadcast', 'hasProperty', + 'hasPrinting', 'hasOwnProperty', 'hasMP3', 'hasIME', 'hasGlyphs', + 'hasEventListener', 'hasEmbeddedVideo', 'hasDefinition', + 'hasComplexContent', 'hasChildNodes', 'hasAudioEncoder', 'hasAudio', + 'hasAccessibility', 'gridFitType', 'greenOffset', 'greenMultiplier', + 'graphics', 'gotoAndStop', 'gotoAndPlay', 'globalToLocal', 'global', + 'getUTCSeconds', 'getUTCMonth', 'getUTCMinutes', + 'getUTCMilliseconds', 'getUTCHours', 'getUTCFullYear', 'getUTCDay', + 'getUTCDate', 'getTimezoneOffset', 'getTimer', 'getTime', + 'getTextRunInfo', 'getTextFormat', 'getText', 'getStyle', + 'getStackTrace', 'getSelectedText', 'getSelected', 'getSeconds', + 'getRemote', 'getRect', 'getQualifiedSuperclassName', + 'getQualifiedClassName', 'getProperty', 'getPrefixForNamespace', + 'getPixels', 'getPixel32', 'getPixel', 'getParagraphLength', + 'getObjectsUnderPoint', 'getNamespaceForPrefix', 'getMonth', + 'getMinutes', 'getMilliseconds', 'getMicrophone', 'getLocal', + 'getLineText', 'getLineOffset', 'getLineMetrics', 'getLineLength', + 'getLineIndexOfChar', 'getLineIndexAtPoint', 'getImageReference', + 'getHours', 'getFullYear', 'getFirstCharInParagraph', + 'getDescendants', 'getDefinitionByName', 'getDefinition', 'getDay', + 'getDate', 'getColorBoundsRect', 'getClassByAlias', 'getChildIndex', + 'getChildByName', 'getChildAt', 'getCharIndexAtPoint', + 'getCharBoundaries', 'getCamera', 'getBounds', 'genre', + 'generateFilterRect', 'gain', 'fullYearUTC', 'fullYear', + 'fullScreen', 'fscommand', 'fromCharCode', 'framesLoaded', + 'frameRate', 'frame', 'fps', 'forwardAndBack', 'formatToString', + 'forceSimple', 'forEach', 'fontType', 'fontStyle', 'fontSize', + 'fontName', 'font', 'focusRect', 'focusOut', 'focusIn', 'focus', + 'flush', 'floor', 'floodFill', 'firstChild', 'findText', 'filters', + 'filter', 'fillRect', 'fileList', 'extension', 'extended', 'exp', + 'exec', 'exactSettings', 'every', 'eventPhase', 'escapeMultiByte', + 'escape', 'errorID', 'error', 'equals', 'enumerateFonts', + 'enterFrame', 'endian', 'endFill', 'encodeURIComponent', + 'encodeURI', 'enabled', 'embedFonts', 'elements', + 'dynamicPropertyWriter', 'dropTarget', 'drawRoundRect', 'drawRect', + 'drawEllipse', 'drawCircle', 'draw', 'download', 'downState', + 'doubleClickEnabled', 'doubleClick', 'dotall', 'domain', + 'docTypeDecl', 'doConversion', 'divisor', 'distance', 'dispose', + 'displayState', 'displayMode', 'displayAsPassword', 'dispatchEvent', + 'description', 'describeType', 'descent', 'descendants', + 'deltaTransformPoint', 'delta', 'deleteProperty', 'delay', + 'defaultTextFormat', 'defaultSettings', 'defaultObjectEncoding', + 'decodeURIComponent', 'decodeURI', 'decode', 'deblocking', + 'deactivate', 'dayUTC', 'day', 'dateUTC', 'date', 'dataFormat', + 'data', 'd', 'customItems', 'curveTo', 'currentTarget', + 'currentScene', 'currentLabels', 'currentLabel', 'currentFrame', + 'currentFPS', 'currentDomain', 'currentCount', 'ctrlKey', 'creator', + 'creationDate', 'createTextNode', 'createGradientBox', + 'createElement', 'createBox', 'cos', 'copyPixels', 'copyChannel', + 'copy', 'conversionMode', 'contextMenuOwner', 'contextMenu', + 'contentType', 'contentLoaderInfo', 'content', 'containsRect', + 'containsPoint', 'contains', 'constructor', 'connectedProxyType', + 'connected', 'connect', 'condenseWhite', 'concatenatedMatrix', + 'concatenatedColorTransform', 'concat', 'computeSpectrum', + 'compress', 'componentY', 'componentX', 'complete', 'compare', + 'comments', 'comment', 'colors', 'colorTransform', 'color', 'code', + 'close', 'cloneNode', 'clone', 'client', 'click', 'clearTimeout', + 'clearInterval', 'clear', 'clamp', 'children', 'childNodes', + 'childIndex', 'childAllowsParent', 'child', 'checkPolicyFile', + 'charCount', 'charCodeAt', 'charCode', 'charAt', 'changeList', + 'change', 'ceil', 'caretIndex', 'caption', 'capsLock', 'cancelable', + 'cancel', 'callee', 'callProperty', 'call', 'cacheAsBitmap', 'c', + 'bytesTotal', 'bytesLoaded', 'bytesAvailable', 'buttonMode', + 'buttonDown', 'bullet', 'builtInItems', 'bufferTime', + 'bufferLength', 'bubbles', 'browse', 'bottomScrollV', 'bottomRight', + 'bottom', 'borderColor', 'border', 'bold', 'blurY', 'blurX', + 'blueOffset', 'blueMultiplier', 'blockIndent', 'blendMode', + 'bitmapData', 'bias', 'beginGradientFill', 'beginFill', + 'beginBitmapFill', 'bandwidth', 'backgroundColor', 'background', + 'b', 'available', 'avHardwareDisable', 'autoSize', 'attributes', + 'attribute', 'attachNetStream', 'attachCamera', 'attachAudio', + 'atan2', 'atan', 'asyncError', 'asin', 'ascent', 'artist', + 'areSoundsInaccessible', 'areInaccessibleObjectsUnderPoint', + 'applyFilter', 'apply', 'applicationDomain', 'appendText', + 'appendChild', 'antiAliasType', 'angle', 'alwaysShowSelection', + 'altKey', 'alphas', 'alphaOffset', 'alphaMultiplier', 'alpha', + 'allowInsecureDomain', 'allowDomain', 'align', 'album', + 'addedToStage', 'added', 'addPage', 'addNamespace', 'addHeader', + 'addEventListener', 'addChildAt', 'addChild', 'addCallback', 'add', + 'activityLevel', 'activity', 'active', 'activating', 'activate', + 'actionScriptVersion', 'acos', 'accessibilityProperties', 'abs' + ), + 8 => array( + 'WRAP', 'VERTICAL', 'VARIABLES', + 'UTC', 'UPLOAD_COMPLETE_DATA', 'UP', 'UNLOAD', 'UNKNOWN', + 'UNIQUESORT', 'TOP_RIGHT', 'TOP_LEFT', 'TOP', 'TIMER_COMPLETE', + 'TIMER', 'TEXT_NODE', 'TEXT_INPUT', 'TEXT', 'TAB_INDEX_CHANGE', + 'TAB_ENABLED_CHANGE', 'TAB_CHILDREN_CHANGE', 'TAB', 'SYNC', + 'SUBTRACT', 'SUBPIXEL', 'STATUS', 'STANDARD', 'SQUARE', 'SQRT2', + 'SQRT1_2', 'SPACE', 'SOUND_COMPLETE', 'SOCKET_DATA', 'SHOW_ALL', + 'SHIFT', 'SETTINGS_MANAGER', 'SELECT', 'SECURITY_ERROR', 'SCROLL', + 'SCREEN', 'ROUND', 'ROLL_OVER', 'ROLL_OUT', 'RIGHT', 'RGB', + 'RETURNINDEXEDARRAY', 'RESIZE', 'REPEAT', 'RENDER', + 'REMOVED_FROM_STAGE', 'REMOVED', 'REMOTE', 'REGULAR', 'REFLECT', + 'RED', 'RADIAL', 'PROGRESS', 'PRIVACY', 'POST', 'POSITIVE_INFINITY', + 'PORTRAIT', 'PIXEL', 'PI', 'PENDING', 'PAGE_UP', 'PAGE_DOWN', 'PAD', + 'OVERLAY', 'OUTER', 'OPEN', 'NaN', 'NUM_PAD', 'NUMPAD_SUBTRACT', + 'NUMPAD_MULTIPLY', 'NUMPAD_ENTER', 'NUMPAD_DIVIDE', + 'NUMPAD_DECIMAL', 'NUMPAD_ADD', 'NUMPAD_9', 'NUMPAD_8', 'NUMPAD_7', + 'NUMPAD_6', 'NUMPAD_5', 'NUMPAD_4', 'NUMPAD_3', 'NUMPAD_2', + 'NUMPAD_1', 'NUMPAD_0', 'NUMERIC', 'NO_SCALE', 'NO_BORDER', + 'NORMAL', 'NONE', 'NEVER', 'NET_STATUS', 'NEGATIVE_INFINITY', + 'MULTIPLY', 'MOUSE_WHEEL', 'MOUSE_UP', 'MOUSE_OVER', 'MOUSE_OUT', + 'MOUSE_MOVE', 'MOUSE_LEAVE', 'MOUSE_FOCUS_CHANGE', 'MOUSE_DOWN', + 'MITER', 'MIN_VALUE', 'MICROPHONE', 'MENU_SELECT', + 'MENU_ITEM_SELECT', 'MEDIUM', 'MAX_VALUE', 'LOW', 'LOG2E', 'LOG10E', + 'LOCAL_WITH_NETWORK', 'LOCAL_WITH_FILE', 'LOCAL_TRUSTED', + 'LOCAL_STORAGE', 'LN2', 'LN10', 'LITTLE_ENDIAN', 'LINK', + 'LINEAR_RGB', 'LINEAR', 'LIGHT_COLOR', 'LIGHTEN', 'LEFT', 'LCD', + 'LAYER', 'LANDSCAPE', 'KOREAN', 'KEY_UP', 'KEY_FOCUS_CHANGE', + 'KEY_DOWN', 'JUSTIFY', 'JAPANESE_KATAKANA_HALF', + 'JAPANESE_KATAKANA_FULL', 'JAPANESE_HIRAGANA', 'Infinity', 'ITALIC', + 'IO_ERROR', 'INVERT', 'INSERT', 'INPUT', 'INNER', 'INIT', + 'IME_COMPOSITION', 'IGNORE', 'ID3', 'HTTP_STATUS', 'HORIZONTAL', + 'HOME', 'HIGH', 'HARDLIGHT', 'GREEN', 'GET', 'FULLSCREEN', 'FULL', + 'FOCUS_OUT', 'FOCUS_IN', 'FLUSHED', 'FLASH9', 'FLASH8', 'FLASH7', + 'FLASH6', 'FLASH5', 'FLASH4', 'FLASH3', 'FLASH2', 'FLASH1', 'F9', + 'F8', 'F7', 'F6', 'F5', 'F4', 'F3', 'F2', 'F15', 'F14', 'F13', + 'F12', 'F11', 'F10', 'F1', 'EXACT_FIT', 'ESCAPE', 'ERROR', 'ERASE', + 'ENTER_FRAME', 'ENTER', 'END', 'EMBEDDED', 'ELEMENT_NODE', 'E', + 'DYNAMIC', 'DOWN', 'DOUBLE_CLICK', 'DIFFERENCE', 'DEVICE', + 'DESCENDING', 'DELETE', 'DEFAULT', 'DEACTIVATE', 'DATA', + 'DARK_COLOR', 'DARKEN', 'CRT', 'CONTROL', 'CONNECT', 'COMPLETE', + 'COLOR', 'CLOSE', 'CLICK', 'CLAMP', 'CHINESE', 'CHANGE', 'CENTER', + 'CASEINSENSITIVE', 'CAPTURING_PHASE', 'CAPS_LOCK', 'CANCEL', + 'CAMERA', 'BUBBLING_PHASE', 'BOTTOM_RIGHT', 'BOTTOM_LEFT', 'BOTTOM', + 'BOLD_ITALIC', 'BOLD', 'BLUE', 'BINARY', 'BIG_ENDIAN', 'BEVEL', + 'BEST', 'BACKSPACE', 'AUTO', 'AT_TARGET', 'ASYNC_ERROR', 'AMF3', + 'AMF0', 'ALWAYS', 'ALPHANUMERIC_HALF', 'ALPHANUMERIC_FULL', 'ALPHA', + 'ADVANCED', 'ADDED_TO_STAGE', 'ADDED', 'ADD', 'ACTIVITY', + 'ACTIONSCRIPT3', 'ACTIONSCRIPT2' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '%', '&', '*', '|', '/', '<', '>', '^', '-', '+', '~', '?', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0033ff; font-weight: bold;', + 2 => 'color: #6699cc; font-weight: bold;', + 3 => 'color: #339966; font-weight: bold;', + 4 => 'color: #9900cc; font-weight: bold;', + 5 => 'color: #004993;', + 6 => 'color: #004993;', + 7 => 'color: #004993;', + 8 => 'color: #004993;' + ), + 'COMMENTS' => array( + 1 => 'color: #009900;', + 'MULTI' => 'color: #3f5fbf;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #990000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000; font-weight:bold;' + ), + 'METHODS' => array( + 0 => 'color: #000000;', + ), + 'SYMBOLS' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://www.google.com/search?q={FNAME}%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:{FNAME}.html&filter=0&num=100&btnI=lucky', + 6 => '', + 7 => '', + 8 => '' + ), + 'OOLANG' => false,//Save some time as OO identifiers aren't used + 'OBJECT_SPLITTERS' => array( + // commented out because it's not very relevant for AS, as all properties, methods and constants are dot-accessed. + // I believe it's preferable to have package highlighting for example, which is not possible with this enabled. + // 0 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> \ No newline at end of file diff --git a/inc/geshi/ada.php b/inc/geshi/ada.php index cd61a9e2291c111f66d60718575cc829f28ea029..776d3bfe5253e9ec9a48ad94e14d7f8f2c896487 100644 --- a/inc/geshi/ada.php +++ b/inc/geshi/ada.php @@ -4,7 +4,7 @@ * ------- * Author: Tux (tux@inmail.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/07/29 * * Ada language file for GeSHi. diff --git a/inc/geshi/apache.php b/inc/geshi/apache.php index aed20b8f4071d0413ef22a386330f2c86e678395..ca89d2dc727d35c594534d5b4f78c10bbb9c099b 100644 --- a/inc/geshi/apache.php +++ b/inc/geshi/apache.php @@ -4,7 +4,7 @@ * ---------- * Author: Tux (tux@inmail.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/29/07 * * Apache language file for GeSHi. diff --git a/inc/geshi/applescript.php b/inc/geshi/applescript.php index 831bf2d0f63c8b847acd1158bf10a5a9d694be86..7162db672be83b6ce3761a74d822943fb67442cb 100644 --- a/inc/geshi/applescript.php +++ b/inc/geshi/applescript.php @@ -4,13 +4,15 @@ * -------- * Author: Stephan Klimek (http://www.initware.org) * Copyright: Stephan Klimek (http://www.initware.org) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/07/20 * * AppleScript language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * * TODO * ------------------------- @@ -121,7 +123,9 @@ $language_data = array ( 1 => ',+-=<>/?^&*' ), 'REGEXPS' => array( + //Variables 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', + //File descriptors 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, diff --git a/inc/geshi/asm.php b/inc/geshi/asm.php index 38bc5a4f1a2b983f21120aa3dbe85c161202f48f..83b1bc2d708726065ff22d4122f4655306a5f5d2 100644 --- a/inc/geshi/asm.php +++ b/inc/geshi/asm.php @@ -4,7 +4,7 @@ * ------- * Author: Tux (tux@inmail.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/07/27 * * x86 Assembler language file for GeSHi. @@ -12,8 +12,10 @@ * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/11/27 (1.0.2) - * - Added support for multiple object splitters + * - Added support for multiple object splitters * 2004/10/27 (1.0.1) * - Added support for URLs * - Added binary and hexadecimal regexps @@ -47,92 +49,94 @@ $language_data = array ( 'LANG_NAME' => 'ASM', 'COMMENT_SINGLE' => array(1 => ';'), 'COMMENT_MULTI' => array(), + //Line address prefix suppression + 'COMMENT_REGEXP' => array(2 => "/^(?:[0-9a-f]{0,4}:)?[0-9a-f]{4}(?:[0-9a-f]{4})?/mi"), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '', 'KEYWORDS' => array( /*CPU*/ 1 => array( - 'aaa','aad','aam','aas','adc','add','and','call','cbw','clc','cld','cli','cmc','cmp', - 'cmps','cmpsb','cmpsw','cwd','daa','das','dec','div','esc','hlt','idiv','imul','in','inc', - 'int','into','iret','ja','jae','jb','jbe','jc','jcxz','je','jg','jge','jl','jle','jmp', - 'jna','jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz', - 'jo','jp','jpe','jpo','js','jz','lahf','lds','lea','les','lods','lodsb','lodsw','loop', - 'loope','loopew','loopne','loopnew','loopnz','loopnzw','loopw','loopz','loopzw','mov', - 'movs','movsb','movsw','mul','neg','nop','not','or','out','pop','popf','push','pushf', - 'rcl','rcr','ret','retf','retn','rol','ror','sahf','sal','sar','sbb','scas','scasb','scasw', - 'shl','shr','stc','std','sti','stos','stosb','stosw','sub','test','wait','xchg','xlat', - 'xlatb','xor','bound','enter','ins','insb','insw','leave','outs','outsb','outsw','popa','pusha','pushw', - 'arpl','lar','lsl','sgdt','sidt','sldt','smsw','str','verr','verw','clts','lgdt','lidt','lldt','lmsw','ltr', - 'bsf','bsr','bt','btc','btr','bts','cdq','cmpsd','cwde','insd','iretd','iretdf','iretf', - 'jecxz','lfs','lgs','lodsd','loopd','looped','loopned','loopnzd','loopzd','lss','movsd', - 'movsx','movzx','outsd','popad','popfd','pushad','pushd','pushfd','scasd','seta','setae', - 'setb','setbe','setc','sete','setg','setge','setl','setle','setna','setnae','setnb','setnbe', - 'setnc','setne','setng','setnge','setnl','setnle','setno','setnp','setns','setnz','seto','setp', - 'setpe','setpo','sets','setz','shld','shrd','stosd','bswap','cmpxchg','invd','invlpg','wbinvd','xadd','lock', - 'rep','repe','repne','repnz','repz' - ), + 'aaa','aad','aam','aas','adc','add','and','call','cbw','clc','cld','cli','cmc','cmp', + 'cmps','cmpsb','cmpsw','cwd','daa','das','dec','div','esc','hlt','idiv','imul','in','inc', + 'int','into','iret','ja','jae','jb','jbe','jc','jcxz','je','jg','jge','jl','jle','jmp', + 'jna','jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz', + 'jo','jp','jpe','jpo','js','jz','lahf','lds','lea','les','lods','lodsb','lodsw','loop', + 'loope','loopew','loopne','loopnew','loopnz','loopnzw','loopw','loopz','loopzw','mov', + 'movs','movsb','movsw','mul','neg','nop','not','or','out','pop','popf','push','pushf', + 'rcl','rcr','ret','retf','retn','rol','ror','sahf','sal','sar','sbb','scas','scasb','scasw', + 'shl','shr','stc','std','sti','stos','stosb','stosw','sub','test','wait','xchg','xlat', + 'xlatb','xor','bound','enter','ins','insb','insw','leave','outs','outsb','outsw','popa','pusha','pushw', + 'arpl','lar','lsl','sgdt','sidt','sldt','smsw','str','verr','verw','clts','lgdt','lidt','lldt','lmsw','ltr', + 'bsf','bsr','bt','btc','btr','bts','cdq','cmpsd','cwde','insd','iretd','iretdf','iretf', + 'jecxz','lfs','lgs','lodsd','loopd','looped','loopned','loopnzd','loopzd','lss','movsd', + 'movsx','movzx','outsd','popad','popfd','pushad','pushd','pushfd','scasd','seta','setae', + 'setb','setbe','setc','sete','setg','setge','setl','setle','setna','setnae','setnb','setnbe', + 'setnc','setne','setng','setnge','setnl','setnle','setno','setnp','setns','setnz','seto','setp', + 'setpe','setpo','sets','setz','shld','shrd','stosd','bswap','cmpxchg','invd','invlpg','wbinvd','xadd','lock', + 'rep','repe','repne','repnz','repz' + ), /*FPU*/ 2 => array( - 'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp', - 'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv', - 'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1', - 'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul', - 'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv', - 'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave', - 'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp', - 'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1', - 'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos', - 'fstenvd','fucom','fucomp','fucompp' - ), + 'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp', + 'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv', + 'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1', + 'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul', + 'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv', + 'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave', + 'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp', + 'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1', + 'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos', + 'fstenvd','fucom','fucomp','fucompp' + ), /*registers*/ 3 => array( - 'ah','al','ax','bh','bl','bp','bx','ch','cl','cr0','cr2','cr3','cs','cx','dh','di','dl', - 'dr0','dr1','dr2','dr3','dr6','dr7','ds','dx','eax','ebp','ebx','ecx','edi','edx', - 'es','esi','esp','fs','gs','si','sp','ss','st','tr3','tr4','tr5','tr6','tr7', 'ah', 'bh', 'ch', 'dh' - ), + 'ah','al','ax','bh','bl','bp','bx','ch','cl','cr0','cr2','cr3','cs','cx','dh','di','dl', + 'dr0','dr1','dr2','dr3','dr6','dr7','ds','dx','eax','ebp','ebx','ecx','edi','edx', + 'es','esi','esp','fs','gs','si','sp','ss','st','tr3','tr4','tr5','tr6','tr7', 'ah', 'bh', 'ch', 'dh' + ), /*Directive*/ 4 => array( - '186','286','286c','286p','287','386','386c','386p','387','486','486p', - '8086','8087','alpha','break','code','const','continue','cref','data','data?', - 'dosseg','else','elseif','endif','endw','err','err1','err2','errb', - 'errdef','errdif','errdifi','erre','erridn','erridni','errnb','errndef', - 'errnz','exit','fardata','fardata?','if','lall','lfcond','list','listall', - 'listif','listmacro','listmacroall',' model','no87','nocref','nolist', - 'nolistif','nolistmacro','radix','repeat','sall','seq','sfcond','stack', - 'startup','tfcond','type','until','untilcxz','while','xall','xcref', - 'xlist','alias','align','assume','catstr','comm','comment','db','dd','df','dosseg','dq', - 'dt','dup','dw','echo','else','elseif','elseif1','elseif2','elseifb','elseifdef','elseifdif', - 'elseifdifi','elseife','elseifidn','elseifidni','elseifnb','elseifndef','end', - 'endif','endm','endp','ends','eq',' equ','even','exitm','extern','externdef','extrn','for', - 'forc','ge','goto','group','high','highword','if','if1','if2','ifb','ifdef','ifdif', - 'ifdifi','ife',' ifidn','ifidni','ifnb','ifndef','include','includelib','instr','invoke', - 'irp','irpc','label','le','length','lengthof','local','low','lowword','lroffset', - 'macro','mask','mod','msfloat','name','ne','offset','opattr','option','org','%out', - 'page','popcontext','proc','proto','ptr','public','purge','pushcontext','record', - 'repeat','rept','seg','segment','short','size','sizeof','sizestr','struc','struct', - 'substr','subtitle','subttl','textequ','this','title','type','typedef','union','while','width', - '.model', '.stack', '.code', '.data' - - ), - + '186','286','286c','286p','287','386','386c','386p','387','486','486p', + '8086','8087','alpha','break','code','const','continue','cref','data','data?', + 'dosseg','else','elseif','endif','endw','err','err1','err2','errb', + 'errdef','errdif','errdifi','erre','erridn','erridni','errnb','errndef', + 'errnz','exit','fardata','fardata?','if','lall','lfcond','list','listall', + 'listif','listmacro','listmacroall',' model','no87','nocref','nolist', + 'nolistif','nolistmacro','radix','repeat','sall','seq','sfcond','stack', + 'startup','tfcond','type','until','untilcxz','while','xall','xcref', + 'xlist','alias','align','assume','catstr','comm','comment','db','dd','df','dosseg','dq', + 'dt','dup','dw','echo','else','elseif','elseif1','elseif2','elseifb','elseifdef','elseifdif', + 'elseifdifi','elseife','elseifidn','elseifidni','elseifnb','elseifndef','end', + 'endif','endm','endp','ends','eq',' equ','even','exitm','extern','externdef','extrn','for', + 'forc','ge','goto','group','high','highword','if','if1','if2','ifb','ifdef','ifdif', + 'ifdifi','ife',' ifidn','ifidni','ifnb','ifndef','include','includelib','instr','invoke', + 'irp','irpc','label','le','length','lengthof','local','low','lowword','lroffset', + 'macro','mask','mod','msfloat','name','ne','offset','opattr','option','org','%out', + 'page','popcontext','proc','proto','ptr','public','purge','pushcontext','record', + 'repeat','rept','seg','segment','short','size','sizeof','sizestr','struc','struct', + 'substr','subtitle','subttl','textequ','this','title','type','typedef','union','while','width', + '.model', '.stack', '.code', '.data' + ), /*Operands*/ 5 => array( - '@b','@f','addr','basic','byte','c','carry?','dword', - 'far','far16','fortran','fword','near','near16','overflow?','parity?','pascal','qword', - 'real4',' real8','real10','sbyte','sdword','sign?','stdcall','sword','syscall','tbyte', - 'vararg','word','zero?','flat','near32','far32', - 'abs','all','assumes','at','casemap','common','compact', - 'cpu','dotname','emulator','epilogue','error','export','expr16','expr32','farstack','flat', - 'forceframe','huge','language','large','listing','ljmp','loadds','m510','medium','memory', - 'nearstack','nodotname','noemulator','nokeyword','noljmp','nom510','none','nonunique', - 'nooldmacros','nooldstructs','noreadonly','noscoped','nosignextend','nothing', - 'notpublic','oldmacros','oldstructs','os_dos','para','private','prologue','radix', - 'readonly','req','scoped','setif2','smallstack','tiny','use16','use32','uses' - ) + '@b','@f','addr','basic','byte','c','carry?','dword', + 'far','far16','fortran','fword','near','near16','overflow?','parity?','pascal','qword', + 'real4',' real8','real10','sbyte','sdword','sign?','stdcall','sword','syscall','tbyte', + 'vararg','word','zero?','flat','near32','far32', + 'abs','all','assumes','at','casemap','common','compact', + 'cpu','dotname','emulator','epilogue','error','export','expr16','expr32','farstack','flat', + 'forceframe','huge','language','large','listing','ljmp','loadds','m510','medium','memory', + 'nearstack','nodotname','noemulator','nokeyword','noljmp','nom510','none','nonunique', + 'nooldmacros','nooldstructs','noreadonly','noscoped','nosignextend','nothing', + 'notpublic','oldmacros','oldstructs','os_dos','para','private','prologue','radix', + 'readonly','req','scoped','setif2','smallstack','tiny','use16','use32','uses' + ) ), 'SYMBOLS' => array( - '[', ']', '(', ')' + '[', ']', '(', ')', + '+', '-', '*', '/', '%', + '.', ',', ';', ':' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => true, @@ -144,35 +148,36 @@ $language_data = array ( ), 'STYLES' => array( 'KEYWORDS' => array( - 1 => 'color: #00007f;', - 2 => 'color: #0000ff;', - 3 => 'color: #46aa03; font-weight:bold;', - 4 => 'color: #0000ff;', - 5 => 'color: #0000ff;' + 1 => 'color: #00007f; font-weight: bold;', + 2 => 'color: #0000ff; font-weight: bold;', + 3 => 'color: #00007f;', + 4 => 'color: #000000; font-weight: bold;', + 5 => 'color: #000000; font-weight: bold;' ), 'COMMENTS' => array( - 1 => 'color: #adadad; font-style: italic;', + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #adadad; font-style: italic;', ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #009900; font-weight: bold;' ), 'STRINGS' => array( 0 => 'color: #7f007f;' ), 'NUMBERS' => array( - 0 => 'color: #ff0000;' + 0 => 'color: #0000ff;' ), 'METHODS' => array( ), 'SYMBOLS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #339933;' ), 'REGEXPS' => array( - 0 => 'color: #ff0000;', - 1 => 'color: #ff0000;' + 0 => 'color: #0000ff;', + 1 => 'color: #0000ff;' ), 'SCRIPT' => array( ) @@ -185,15 +190,23 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( - 0 => '0[0-9a-fA-F]{1,32}[hH]', - 1 => '[01]{1,64}[bB]' + //Hex numbers + 0 => /* */ "(?<=([\\s\\(\\)\\[\\],;.:+\\-/*]))(?:[0-9][0-9a-fA-F]{0,31}[hH]|0x[0-9a-fA-F]{1,32})(?=([\\s\\(\\)\\[\\],;.:+\\-/*]))", + //Binary numbers + 1 => "(?<=([\\s\\(\\)\\[\\],;.:+\\-/*]))[01]{1,64}[bB](?=([\\s\\(\\)\\[\\],;.:+\\-/*]))" ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( ), 'HIGHLIGHT_STRICT_BLOCK' => array( ), - 'TAB_WIDTH' => 8 + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "a-zA-Z0-9\$_\|\#>|^", + 'DISALLOWED_AFTER' => "a-zA-Z0-9_<\|%" + ) + ) ); ?> diff --git a/inc/geshi/asp.php b/inc/geshi/asp.php index 0895ae30a144dac4f9728df6b1856c52140da591..77c33d072209eef9cc0cbe11ed8e8ebec456eed9 100644 --- a/inc/geshi/asp.php +++ b/inc/geshi/asp.php @@ -4,7 +4,7 @@ * -------- * Author: Amit Gupta (http://blog.igeek.info/) * Copyright: (c) 2004 Amit Gupta (http://blog.igeek.info/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/08/13 * * ASP language file for GeSHi. @@ -48,7 +48,7 @@ $language_data = array ( 'LANG_NAME' => 'ASP', 'COMMENT_SINGLE' => array(1 => "'", 2 => '//'), 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => 0, + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array('"'), 'ESCAPE_CHAR' => '', 'KEYWORDS' => array( @@ -77,6 +77,10 @@ $language_data = array ( 'MoveNext', 'LBound', 'UBound', 'Transfer', 'Open', 'Close', 'MapPath', 'FileExists', 'OpenTextFile', 'ReadAll' ) ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', + ';', ':', '?', '=' + ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, 1 => false, diff --git a/inc/geshi/bash.php b/inc/geshi/bash.php index 55d295f4c65f5e9559ba9bdeb42e46d07d6aacce..196d778e567f5b68fc4fc3642f8b7e8de7d168a1 100644 --- a/inc/geshi/bash.php +++ b/inc/geshi/bash.php @@ -4,13 +4,15 @@ * -------- * Author: Andreas Gohr (andi@splitbrain.org) * Copyright: (c) 2004 Andreas Gohr, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/08/20 * * BASH language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2007/09/05 (1.0.7.21) * - PARSER_CONTROL patch using SF #1788408 (BenBE) * 2007/06/11 (1.0.7.20) @@ -54,6 +56,12 @@ $language_data = array ( // 1564839) 'COMMENT_SINGLE' => array('#'), 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + //Variables + 1 => "/\\$\\{[^\\n\\}]*?\\}/i", + //BASH-style Heredoc + 2 => '/<<-?\s*?([\'"]?)([a-zA-Z0-9]+)\1;[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU' + ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', @@ -131,7 +139,7 @@ $language_data = array ( ) ), 'SYMBOLS' => array( - '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;' + '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, @@ -146,7 +154,9 @@ $language_data = array ( 3 => 'color: #7a0874; font-weight: bold;' ), 'COMMENTS' => array( - 0 => 'color: #808080; font-style: italic;' + 0 => 'color: #666666; font-style: italic;', + 1 => 'color: #800000;', + 2 => 'color: #cc0000; font-style: italic;' ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' @@ -184,10 +194,13 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( + //Variables (will be handled by comment_regexps) 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}", + //Variables without braces 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*", + //Variable assignment 2 => "([a-zA-Z_][a-zA-Z0-9_]*)=", -// 3 => "(?<!\\$)#[^\n]*", + //Shorthand shell variables 4 => "\\$[*#\$\\-\\?!]" ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, @@ -195,9 +208,13 @@ $language_data = array ( ), 'HIGHLIGHT_STRICT_BLOCK' => array( ), + 'TAB_WIDTH' => 4, 'PARSER_CONTROL' => array( 'COMMENTS' => array( 'DISALLOWED_BEFORE' => '$' + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "\-a-zA-Z0-9\$_\|\#>|^", ) ) ); diff --git a/inc/geshi/basic4gl.php b/inc/geshi/basic4gl.php index d36c1fd3fbc66386aadbbe1223149ef12fca2cd8..d4085e592a86f43522ec9182f5ddfde5352b7eb0 100644 --- a/inc/geshi/basic4gl.php +++ b/inc/geshi/basic4gl.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Matthew Webb (bmatthew1@blueyonder.co.uk) * Copyright: (c) 2004 Matthew Webb (http://matthew-4gl.wikispaces.com) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2007/09/15 * * Basic4GL language file for GeSHi. @@ -282,55 +282,55 @@ $language_data = array ( ), 'SYMBOLS' => array( - '=', '<', '>', '>=', '<=', '+', '-', '*', '/', '%', '(', ')', '{', '}', '[', ']', '&', ';', ':', '$' - ), - + '=', '<', '>', '>=', '<=', '+', '-', '*', '/', '%', '(', ')', '{', '}', '[', ']', '&', ';', ':', '$' + ), 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000080; font-weight: bold;', - 2 => 'color: #FF0000;', - 3 => 'color: #0000FF;' - ), - 'COMMENTS' => array( - 1 => 'color: #657CC4; font-style: italic;' - ), - 'BRACKETS' => array( - 0 => 'color: #000080;' - ), - 'STRINGS' => array( - 0 => 'color: #008000;' - ), - 'NUMBERS' => array( - 0 => 'color: #000080; font-weight: bold;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #0000FF;' - ), - 'ESCAPE_CHAR' => array( - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #FF0000;', + 3 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #657CC4; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #000080;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000080; font-weight: bold;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0000FF;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 ); + ?> diff --git a/inc/geshi/blitzbasic.php b/inc/geshi/blitzbasic.php index dd8389be56c596cd010a7642e1ceaa3cb19ff35e..d6e354ff825e66dbd5df1f1385a55ea2783145a8 100644 --- a/inc/geshi/blitzbasic.php +++ b/inc/geshi/blitzbasic.php @@ -4,7 +4,7 @@ * -------------- * Author: P�draig O`Connel (info@moonsword.info) * Copyright: (c) 2005 P�draig O`Connel (http://moonsword.info) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 16.10.2005 * * BlitzBasic language file for GeSHi. diff --git a/inc/geshi/bnf.php b/inc/geshi/bnf.php index 14642ab173524b6bbc471638ed2ba6a9afc756b2..d606ea17b0d15c4b74da2bac6b74813210bde265 100644 --- a/inc/geshi/bnf.php +++ b/inc/geshi/bnf.php @@ -4,7 +4,7 @@ * -------- * Author: Rowan Rodrik van der Molen (rowan@bigsmoke.us) * Copyright: (c) 2006 Rowan Rodrik van der Molen (http://www.bigsmoke.us/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/09/28 * * BNF (Backus-Naur form) language file for GeSHi. @@ -13,6 +13,9 @@ * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) + * - Removed superflicious regexps * 2006/09/18 (1.0.0) * - First Release * @@ -49,7 +52,7 @@ $language_data = array ( 'ESCAPE_CHAR' => '', 'KEYWORDS' => array(), 'SYMBOLS' => array( - '<', '>', '::=', '|' + '(', ')', '<', '>', '::=', '|' ), 'CASE_SENSITIVE' => array( //GESHI_COMMENTS => false @@ -91,6 +94,7 @@ $language_data = array ( 'OOLANG' => false, 'OBJECT_SPLITTERS' => array(), 'REGEXPS' => array( + //terminal symbols 0 => array( GESHI_SEARCH => '(<)([^&]+?)(>)', GESHI_REPLACE => '\\2', @@ -98,27 +102,6 @@ $language_data = array ( GESHI_BEFORE => '\\1', GESHI_AFTER => '\\3' ), - 1 => array( - GESHI_SEARCH => '(<|>)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 2 => array( - GESHI_SEARCH => '(::=)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 3 => array( - GESHI_SEARCH => '([()])', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( diff --git a/inc/geshi/c.php b/inc/geshi/c.php index b6687f78b052f2456f0ebc83c86d97120d1b76bd..feef3dd83b50e5506b671b8a208cacf985ca6be1 100644 --- a/inc/geshi/c.php +++ b/inc/geshi/c.php @@ -6,13 +6,15 @@ * Contributors: * - Jack Lloyd (lloyd@randombit.net) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/04 * * C language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/XX/XX (1.0.4) * - Added a couple of new keywords (Jack Lloyd) * 2004/11/27 (1.0.3) @@ -53,6 +55,8 @@ $language_data = array ( 'LANG_NAME' => 'C', 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), 'COMMENT_MULTI' => array('/*' => '*/'), + //Multiline-continued single-line comments + 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', @@ -91,7 +95,7 @@ $language_data = array ( 4 => 'color: #993333;' ), 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', + 1 => 'color: #666666; font-style: italic;', 2 => 'color: #339933;', 'MULTI' => 'color: #808080; font-style: italic;' ), @@ -99,7 +103,7 @@ $language_data = array ( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #009900;' ), 'STRINGS' => array( 0 => 'color: #ff0000;' @@ -112,7 +116,7 @@ $language_data = array ( 2 => 'color: #202020;' ), 'SYMBOLS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #339933;' ), 'REGEXPS' => array( ), diff --git a/inc/geshi/c_mac.php b/inc/geshi/c_mac.php index 86b16979e182381a387223a354dd059789768b5b..69be5c068a98cd792d78d6bad7afa8b07e8e2861 100644 --- a/inc/geshi/c_mac.php +++ b/inc/geshi/c_mac.php @@ -4,13 +4,15 @@ * --------- * Author: M. Uli Kusterer (witness.of.teachtext@gmx.net) * Copyright: (c) 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/04 * * C for Macs language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/11/27 * - First Release * @@ -41,6 +43,8 @@ $language_data = array ( 'LANG_NAME' => 'C (Mac)', 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), 'COMMENT_MULTI' => array('/*' => '*/'), + //Multiline-continued single-line comments + 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', diff --git a/inc/geshi/caddcl.php b/inc/geshi/caddcl.php index 47689a33e3efe9bab41b6b89485781dc07b3a493..2b8ffc7672d6b2b4479d7286a931bf0c7d457b5e 100644 --- a/inc/geshi/caddcl.php +++ b/inc/geshi/caddcl.php @@ -4,7 +4,7 @@ * ---------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/08/30 * * CAD DCL (Dialog Control Language) file for GeSHi. diff --git a/inc/geshi/cadlisp.php b/inc/geshi/cadlisp.php index c95e168fb9d2cd24922d3e1007fa05b71dabd3b1..d3a9407e9da5ea5c16a06ef3b935db3641a54bb6 100644 --- a/inc/geshi/cadlisp.php +++ b/inc/geshi/cadlisp.php @@ -4,7 +4,7 @@ * ----------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/blog) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/08/30 * * AutoCAD/IntelliCAD Lisp language file for GeSHi. diff --git a/inc/geshi/cfdg.php b/inc/geshi/cfdg.php index 96837683a4635a2535bd4872b11ae854822a88d9..6963db8f226db0b21742f11a8ea7c5ad1bf260f6 100644 --- a/inc/geshi/cfdg.php +++ b/inc/geshi/cfdg.php @@ -4,7 +4,7 @@ * -------- * Author: John Horigan <john@glyphic.com> * Copyright: (c) 2006 John Horigan http://www.ozonehouse.com/john/ - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/03/11 * * CFDG language file for GeSHi. diff --git a/inc/geshi/cfm.php b/inc/geshi/cfm.php index c0e6cbd87c02b3e2eea176eb948d38fe738af9a4..96c86c21b799d35662e039dfb42d9fad2b4ef2d3 100644 --- a/inc/geshi/cfm.php +++ b/inc/geshi/cfm.php @@ -4,7 +4,7 @@ * ------- * Author: Diego * Copyright: (c) 2006 Diego - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/02/25 * * ColdFusion language file for GeSHi. diff --git a/inc/geshi/cpp-qt.php b/inc/geshi/cpp-qt.php index 0c1fba95c3a147de3c24ee06d19859219a86ac3e..c2a32d38d5f53ed0a5f98de78d4a897c78ad10ca 100644 --- a/inc/geshi/cpp-qt.php +++ b/inc/geshi/cpp-qt.php @@ -4,13 +4,15 @@ * ------- * Author: Iulian M * Copyright: (c) 2006 Iulian M - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/09/27 * * C++ language file for GeSHi, with QT extensions. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * * TODO * ---- @@ -39,6 +41,8 @@ $language_data = array ( 'LANG_NAME' => 'C++ (QT)', 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), 'COMMENT_MULTI' => array('/*' => '*/'), + //Multiline-continued Singleline comments + 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', @@ -261,7 +265,13 @@ $language_data = array ( ), 'HIGHLIGHT_STRICT_BLOCK' => array( ), - 'TAB_WIDTH' => 4 + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "a-zA-Z0-9\$_\|\#>|^", + 'DISALLOWED_AFTER' => "a-zA-Z0-9_<\|%\\-" + ) + ) ); ?> diff --git a/inc/geshi/cpp.php b/inc/geshi/cpp.php index 7db2681fa192de73d90245cfccfa11ce5346b9c2..1a8bccf5c25103f49aae19553da7f7c988cf4e33 100644 --- a/inc/geshi/cpp.php +++ b/inc/geshi/cpp.php @@ -7,13 +7,15 @@ * - M. Uli Kusterer (witness.of.teachtext@gmx.net) * - Jack Lloyd (lloyd@randombit.net) * Copyright: (c) 2004 Dennis Bayer, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/09/27 * * C++ language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/XX/XX (1.0.2) * - Added several new keywords (Jack Lloyd) * 2004/11/27 (1.0.1) @@ -50,6 +52,8 @@ $language_data = array ( 'LANG_NAME' => 'C++', 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), 'COMMENT_MULTI' => array('/*' => '*/'), + //Multiline-continued single-line comments + 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', diff --git a/inc/geshi/csharp.php b/inc/geshi/csharp.php index dfd3e8e8c9f364bb132c62ab7f0ad32d67296bba..6c24913632eb6ecc425fa2b2197db5992a0ed8f3 100644 --- a/inc/geshi/csharp.php +++ b/inc/geshi/csharp.php @@ -4,13 +4,15 @@ * ---------- * Author: Alan Juden (alan@judenware.org) * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/04 * * C# language file for GeSHi. * * CHANGES * ------- + * 2008/05/25 (1.0.7.22) + * - Added highlighting of using and namespace directives as non-OOP * 2005/01/05 (1.0.1) * - Used hardquote support for @"..." strings (Cliff Stanford) * 2004/11/27 (1.0.0) @@ -43,6 +45,10 @@ 'LANG_NAME' => 'C#', 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Using and Namespace directives (basic support) + //Please note that the alias syntax for using is not supported + 3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'HARDQUOTE' => array('@"', '"'), @@ -160,8 +166,8 @@ ), ), 'SYMBOLS' => array( - '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', '|', ':', - '(', ')', '{', '}', '[', ']' + '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';', + '(', ')', '{', '}', '[', ']', '|' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => true, @@ -182,6 +188,7 @@ 'COMMENTS' => array( 1 => 'color: #008080; font-style: italic;', 2 => 'color: #008080;', + 3 => 'color: #008080;', 'MULTI' => 'color: #008080; font-style: italic;' ), 'ESCAPE_CHAR' => array( @@ -191,7 +198,7 @@ 0 => 'color: #000000;' ), 'STRINGS' => array( - 0 => 'color: #808080;' + 0 => 'color: #666666;' ), 'NUMBERS' => array( 0 => 'color: #FF0000;' diff --git a/inc/geshi/css.php b/inc/geshi/css.php index 43f834f37ee0551c72b0f8f3252e6da65a126ce4..01dd5f1463bb90760b2dc1283476b09fbe98a4e9 100644 --- a/inc/geshi/css.php +++ b/inc/geshi/css.php @@ -4,13 +4,15 @@ * ------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/18 * * CSS language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/11/27 (1.0.3) * - Added support for multiple object splitters * 2004/10/27 (1.0.2) @@ -181,17 +183,22 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( + //DOM Node ID 0 => '\#[a-zA-Z0-9\-_]+', + //CSS classname 1 => '\.[a-zA-Z0-9\-_]+', + //CSS Pseudo classes 2 => ':[a-zA-Z0-9\-]+', + //Measurements 3 => '(\d+|(\d*\.\d+))(em|ex|pt|px|cm|in|%)', + //Links \ referenced resources 4 => array( GESHI_SEARCH => '(url\()([^)]+)(\))', GESHI_REPLACE => '\\2', GESHI_BEFORE => '\\1', GESHI_AFTER => '\\3', GESHI_MODIFIERS => 'si' - ) + ) ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( diff --git a/inc/geshi/d.php b/inc/geshi/d.php index 4850ab7bce74b922dbb0bb810604d43eea739879..3f92de72ddb323a692358bc4c49f12dcf68369ce 100644 --- a/inc/geshi/d.php +++ b/inc/geshi/d.php @@ -4,7 +4,7 @@ * ----- * Author: Thomas Kuehne (thomas@kuehne.cn) * Copyright: (c) 2005 Thomas Kuehne (http://thomas.kuehne.cn/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/04/22 * * D language file for GeSHi. diff --git a/inc/geshi/delphi.php b/inc/geshi/delphi.php index 7f958598838bdfd433ee10537c096ed2f188682f..869b0979def646a8b4e27604f8d168a14e9fcb0c 100644 --- a/inc/geshi/delphi.php +++ b/inc/geshi/delphi.php @@ -4,13 +4,15 @@ * ---------- * Author: Járja Norbert (jnorbi@vipmail.hu), Benny Baumann (BenBE@omorphia.de) * Copyright: (c) 2004 Járja Norbert, Benny Baumann (BenBE@omorphia.de), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/07/26 * * Delphi (Object Pascal) language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2005/11/19 (1.0.3) * - Updated the very incomplete keyword and type lists * 2005/09/03 (1.0.2) @@ -47,23 +49,26 @@ $language_data = array ( 'LANG_NAME' => 'Delphi', 'COMMENT_SINGLE' => array(1 => '//'), 'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'), + //Compiler directives + 'COMMENT_REGEXP' => array(2 => '/{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'), 'CASE_KEYWORDS' => 0, - 'QUOTEMARKS' => array("'", '"'), + 'QUOTEMARKS' => array("'"), 'ESCAPE_CHAR' => '', 'KEYWORDS' => array( 1 => array( - 'Abstract', 'And', 'Array', 'As', 'Asm', 'At', 'Begin', 'Case', 'Class', - 'Const', 'Constructor', 'Contains', 'Destructor', 'DispInterface', 'Div', - 'Do', 'DownTo', 'Else', 'End', 'Except', 'File', 'Finalization', - 'Finally', 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', - 'Inherited', 'Initialization', 'Inline', 'Interface', 'Is', 'Label', + 'Abstract', 'And', 'Array', 'As', 'Asm', 'At', 'Begin', 'Case', + 'Class', 'Const', 'Constructor', 'Contains', 'Destructor', + 'DispInterface', 'Div', 'Do', 'DownTo', 'Else', 'End', 'Except', + 'Export', 'Exports', 'External', 'File', 'Finalization', 'Finally', + 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', 'Inherited', + 'Initialization', 'Inline', 'Interface', 'Is', 'Label', 'Library', 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Overload', 'Override', 'Package', 'Packed', 'Private', 'Procedure', 'Program', 'Property', - 'Protected', 'Public', 'Published', 'Raise', 'Record', 'Repeat', - 'Requires', 'Resourcestring', 'Set', 'Shl', 'Shr', 'Then', 'ThreadVar', - 'To', 'Try', 'Type', 'Unit', 'Until', 'Uses', 'Var', 'Virtual', 'While', - 'With', 'Xor', 'assembler', 'cdecl', 'far', 'near', 'pascal', 'register', - 'safecall', 'stdcall', 'varargs' + 'Protected', 'Public', 'Published', 'Raise', 'Record', 'Register', + 'Repeat', 'Requires', 'Resourcestring', 'Set', 'Shl', 'Shr', 'Then', + 'ThreadVar', 'To', 'Try', 'Type', 'Unit', 'Until', 'Uses', 'Var', + 'Virtual', 'While', 'With', 'Xor', 'assembler', 'cdecl', 'far', + 'near', 'pascal', 'register', 'cdecl', 'safecall', 'stdcall', 'varargs' ), 2 => array( 'nil', 'false', 'self', 'true', 'var', 'type', 'const' @@ -222,22 +227,24 @@ $language_data = array ( 1 => 'color: #000000; font-weight: bold;', 2 => 'color: #000000; font-weight: bold;', 3 => 'color: #000066;', - 4 => 'color: #993333;' + 4 => 'color: #000066; font-weight: bold;' ), 'COMMENTS' => array( 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #008000; font-style: italic;', 'MULTI' => 'color: #808080; font-style: italic;' ), 'ESCAPE_CHAR' => array( + 0 => 'color: #ff0000; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #000066;' ), 'STRINGS' => array( 0 => 'color: #ff0000;' ), 'NUMBERS' => array( - 0 => 'color: #cc66cc;' + 0 => 'color: #0000ff;' ), 'METHODS' => array( 1 => 'color: #006600;' @@ -247,10 +254,10 @@ $language_data = array ( 1 => 'color: #ff0000;' ), 'SYMBOLS' => array( - 0 => 'color: #66cc66;', - 1 => 'color: #66cc66;', - 2 => 'color: #66cc66;', - 3 => 'color: #66cc66;' + 0 => 'color: #000066;', + 1 => 'color: #000066;', + 2 => 'color: #000066;', + 3 => 'color: #000066;' ), 'SCRIPT' => array( ) @@ -266,7 +273,9 @@ $language_data = array ( 1 => '.' ), 'REGEXPS' => array( + //Hex numbers 0 => '\$[0-9a-fA-F]+', + //Characters 1 => '\#\$?[0-9]{1,3}' ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, diff --git a/inc/geshi/diff.php b/inc/geshi/diff.php index 6acd30813c11e54e763efcc2b45107618977e87a..f029be663f2ef74a9b12329fd4079cb613b55b8c 100644 --- a/inc/geshi/diff.php +++ b/inc/geshi/diff.php @@ -4,16 +4,17 @@ * -------- * Author: Conny Brunnkvist (conny@fuchsia.se), W. Tasin (tasin@fhm.edu) * Copyright: (c) 2004 Fuchsia Open Source Solutions (http://www.fuchsia.se/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/12/29 * * Diff-output language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2006/02/27 * - changing language file to use matching of start (^) and end ($) (wt) - * * 2004/12/29 (1.0.0) * - First Release * @@ -109,71 +110,80 @@ $language_data = array ( 'OOLANG' => false, 'OBJECT_SPLITTER' => '', 'REGEXPS' => array( - 0 => "[0-9,]+[acd][0-9,]+", - 1 => array( + 0 => "[0-9,]+[acd][0-9,]+", + //Removed lines + 1 => array( GESHI_SEARCH => '^\\<.*$', GESHI_REPLACE => '\\0', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '', GESHI_AFTER => '' ), - 2 => array( + //Inserted lines + 2 => array( GESHI_SEARCH => '^\\>.*$', GESHI_REPLACE => '\\0', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '', GESHI_AFTER => '' ), - 3 => array( + //Location line + 3 => array( GESHI_SEARCH => '^[\\-]{3}\\s.*$', GESHI_REPLACE => '\\0', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '', GESHI_AFTER => '' ), - 4 => array( + //Inserted line + 4 => array( GESHI_SEARCH => '^(\\+){3}\\s.*$', GESHI_REPLACE => '\\0', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '', GESHI_AFTER => '' ), - 5 => array( + //Modified line + 5 => array( GESHI_SEARCH => '^\\!.*$', GESHI_REPLACE => '\\0', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '', GESHI_AFTER => '' ), - 6 => array( + //File specification + 6 => array( GESHI_SEARCH => '^[\\@]{2}.*$', GESHI_REPLACE => '\\0', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '', GESHI_AFTER => '' ), - 7 => array( + //Removed line + 7 => array( GESHI_SEARCH => '^\\-.*$', GESHI_REPLACE => '\\0', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '', GESHI_AFTER => '' ), - 8 => array( + //Inserted line + 8 => array( GESHI_SEARCH => '^\\+.*$', GESHI_REPLACE => '\\0', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '', GESHI_AFTER => '' ), - 9 => array( + //File specification + 9 => array( GESHI_SEARCH => '^(\\*){3}\\s.*$', GESHI_REPLACE => '\\0', GESHI_MODIFIERS => 'm', GESHI_BEFORE => '', GESHI_AFTER => '' ), - ), + ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( ), diff --git a/inc/geshi/div.php b/inc/geshi/div.php index 21577874cd80a38aca0a782d7d0b8fe769e86288..2c716e0af692eb35322d5e19f18fe64191573223 100644 --- a/inc/geshi/div.php +++ b/inc/geshi/div.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Gabriel Lorenzo (ermakina@gmail.com) * Copyright: (c) 2005 Gabriel Lorenzo (http://ermakina.gazpachito.net) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/06/19 * * DIV language file for GeSHi. diff --git a/inc/geshi/dos.php b/inc/geshi/dos.php index b57e7bc426705d69a6235612d92023d2ffec5d30..d5b031f96db25c243a4ee14e9ccb38cb2314259f 100644 --- a/inc/geshi/dos.php +++ b/inc/geshi/dos.php @@ -4,20 +4,21 @@ * ------- * Author: Alessandro Staltari (staltari@geocities.com) * Copyright: (c) 2005 Alessandro Staltari (http://www.geocities.com/SiliconValley/Vista/8155/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/07/05 * * DOS language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2005/07/05 (1.0.0) * - First Release * * TODO (updated 2005/07/05) * ------------------------- * - * - Find a way to higlight %* * - Highlight pipes and redirection (do we really need this?) * - Add missing keywords. * - Find a good hyperlink for keywords. @@ -60,15 +61,17 @@ $language_data = array ( 'LANG_NAME' => 'DOS', - 'COMMENT_SINGLE' => array(1 =>'REM', 2 => '@REM'), + 'COMMENT_SINGLE' => array(), 'COMMENT_MULTI' => array(), + //DOS comment lines + 'COMMENT_REGEXP' => array(1 => "/^\s*@?REM/mi"), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array(), 'ESCAPE_CHAR' => '', 'KEYWORDS' => array( /* Flow control keywords */ 1 => array( - 'if', 'else', 'goto', + 'if', 'else', 'goto', 'shift', 'for', 'in', 'do', 'call', 'exit' ), @@ -80,26 +83,27 @@ $language_data = array ( ), /* Internal commands */ 3 => array( - 'shift', - 'cd', 'dir', 'echo', + 'cd', 'md', 'rd', 'chdir', 'mkdir', 'rmdir', 'dir', + 'del', 'copy', + 'echo', 'setlocal', 'endlocal', 'set', 'pause' ), /* Special files */ - 4 => array( 'prn', 'nul', 'lpt3', 'lpt2', 'lpt1', 'con', 'com4', 'com3', 'com2', 'com1', 'aux' ) ), 'SYMBOLS' => array( - '(', ')' + '(', ')', '@', '%' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, 1 => false, 2 => false, 3 => false, + 4 => false ), 'STYLES' => array( 'KEYWORDS' => array( @@ -113,6 +117,7 @@ $language_data = array ( 2 => 'color: #808080; font-style: italic;' ), 'ESCAPE_CHAR' => array( + 0 => 'color: #ff0000; font-weight: bold;' ), 'BRACKETS' => array( 0 => 'color: #66cc66;' @@ -147,39 +152,40 @@ $language_data = array ( 4 => 'http://www.ss64.com/nt/{FNAME}.html' ), 'REGEXPS' => array( - /* Label */ + /* Label */ 0 => array( -/* GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\s\n]*)',*/ - GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\n]*)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'si', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - /* Variable assignement */ +/* GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\s\n]*)',*/ + GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\n]*)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + /* Variable assignement */ 1 => array( -/* GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\s\n]+)([\s]*=)',*/ - GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\n]+)([\s]*=)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'si', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - /* Arguments or variable evaluation */ +/* GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\s\n]+)([\s]*=)',*/ + GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\n]+)([\s]*=)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + /* Arguments or variable evaluation */ 2 => array( -/* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((?<!%\d)%|)',*/ - GESHI_SEARCH => '(%)([\d*]|[^%]*(?=%))((?<!%\d)%|)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'si', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ) +/* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((?<!%\d)%|)',*/ + GESHI_SEARCH => '(%)([\d*]|[^%]*(?=%))((?<!%\d)%|)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ) ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( ), 'HIGHLIGHT_STRICT_BLOCK' => array( - ) + ), + 'TAB_WIDTH' => 4 ); ?> diff --git a/inc/geshi/dot.php b/inc/geshi/dot.php index 15709b7434c17ec2f4113ca296a47fdece15aacc..ab63067ef0864f45a0a87ef8d3c514ce1c55c903 100644 --- a/inc/geshi/dot.php +++ b/inc/geshi/dot.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Adrien Friggeri (adrien@friggeri.net) * Copyright: (c) 2007 Adrien Friggeri (http://www.friggeri.net) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2007/05/30 * * dot language file for GeSHi. diff --git a/inc/geshi/eiffel.php b/inc/geshi/eiffel.php index a81d873afc0ee09f2fe089259849140c0d2bd509..7216baa5f411f34dfc90935bb834d29e3b01b263 100644 --- a/inc/geshi/eiffel.php +++ b/inc/geshi/eiffel.php @@ -4,7 +4,7 @@ * ---------- * Author: Zoran Simic (zsimic@axarosenberg.com) * Copyright: (c) 2005 Zoran Simic - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/06/30 * * Eiffel language file for GeSHi. diff --git a/inc/geshi/fortran.php b/inc/geshi/fortran.php index 6b4e3c3b4e715183f34c36a314d3420f722593f6..790eea7a66798e862c44fa05db714be0ba0beaa2 100644 --- a/inc/geshi/fortran.php +++ b/inc/geshi/fortran.php @@ -4,13 +4,15 @@ * ----------- * Author: Cedric Arrabie (cedric.arrabie@univ-pau.fr) * Copyright: (C) 2006 Cetric Arrabie - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/04/22 * * Fortran language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2006/04/20 (1.0.0) * - First Release * @@ -43,6 +45,8 @@ $language_data = array ( 'LANG_NAME'=>'Fortran', 'COMMENT_SINGLE'=> array(1 =>'!',2=>'Cf2py'), 'COMMENT_MULTI'=> array(), + //Fortran Comments + 'COMMENT_REGEXP' => array(1 => '/^C.*?$/mi'), 'CASE_KEYWORDS'=> GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS'=> array("'",'"'), 'ESCAPE_CHAR'=>'\\', @@ -105,7 +109,7 @@ $language_data = array ( 4 =>'color: #993333;' ), 'COMMENTS'=> array( - 1 =>'color: #808080; font-style: italic;', + 1 =>'color: #666666; font-style: italic;', 2 =>'color: #339933;', 'MULTI'=>'color: #808080; font-style: italic;' ), @@ -113,7 +117,7 @@ $language_data = array ( 0 =>'color: #000099; font-weight: bold;' ), 'BRACKETS'=> array( - 0 =>'color: #66cc66;' + 0 =>'color: #009900;' ), 'STRINGS'=> array( 0 =>'color: #ff0000;' @@ -126,7 +130,7 @@ $language_data = array ( 2 =>'color: #202020;' ), 'SYMBOLS'=> array( - 0 =>'color: #66cc66;' + 0 =>'color: #339933;' ), 'REGEXPS'=> array( ), diff --git a/inc/geshi/freebasic.php b/inc/geshi/freebasic.php index 4276938a850dedbbb73a86bddca32524878d2f97..044f6bb6edd8253353a506c77aa36cb572c84e87 100644 --- a/inc/geshi/freebasic.php +++ b/inc/geshi/freebasic.php @@ -4,7 +4,7 @@ * ------------- * Author: Roberto Rossi * Copyright: (c) 2005 Roberto Rossi (http://rsoftware.altervista.org) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/08/19 * * FreeBasic (http://www.freebasic.net/) language file for GeSHi. diff --git a/inc/geshi/genero.php b/inc/geshi/genero.php index f20521b5f5552a1d117bec5c35fa45612e9a69cd..579f9a2849470027f49694f61ed6aec6816519fd 100644 --- a/inc/geshi/genero.php +++ b/inc/geshi/genero.php @@ -4,8 +4,8 @@ * ---------- * Author: Lars Gersmann (lars.gersmann@gmail.com) * Copyright: (c) 2007 Lars Gersmann, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 - * CVS Revision Version: $Revision: 1.4 $ + * Release Version: 1.0.7.22 + * Date started: 2007/07/01 * * Genero (FOURJ's Genero 4GL) language file for GeSHi. * diff --git a/inc/geshi/gettext.php b/inc/geshi/gettext.php new file mode 100644 index 0000000000000000000000000000000000000000..f8e85bc965ce7bc3ffe86b829e7491be3dbd958e --- /dev/null +++ b/inc/geshi/gettext.php @@ -0,0 +1,70 @@ +<?php +/************************************************************************************* + * gettext.php + * -------- + * Author: Milian Wolff (mail@milianw.de) + * Copyright: (c) 2008 Milian Wolff + * Release Version: 1.0.7.22 + * Date Started: 2008/05/25 + * + * GNU Gettext .po/.pot language file for GeSHi. + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'GNU Gettext', + 'COMMENT_SINGLE' => array('#:', '#.', '#'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array('msgid', 'msgstr'), + ), + 'SYMBOLS' => array(), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;' + ), + 'COMMENTS' => array( + 0 => 'color: #000099;', + 1 => 'color: #000099;', + 2 => 'color: #666666; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + ), + 'OOLANG' => false, + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'TAB_WIDTH' => 4, +); + +?> diff --git a/inc/geshi/glsl.php b/inc/geshi/glsl.php new file mode 100644 index 0000000000000000000000000000000000000000..972aac81ac7ed38ed824c9433d07c8625c7e2deb --- /dev/null +++ b/inc/geshi/glsl.php @@ -0,0 +1,193 @@ +<?php +/************************************************************************************* + * glsl.php + * ----- + * Author: Benny Baumann (BenBE@omorphia.de) + * Copyright: (c) 2008 Benny Baumann (BenBE@omorphia.de) + * Release Version: 1.0.7.22 + * Date Started: 2008/03/20 + * + * glSlang language file for GeSHi. + * + * CHANGES + * ------- + * 2008/03/20 (1.0.7.21) + * - First Release + * + * TODO + * ---- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'glSlang', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'if', 'else', 'for', 'while', 'do', 'break', 'continue', 'asm', + 'switch', 'case', 'default', 'return', 'discard', + 'namespace', 'using', 'sizeof', 'cast' + ), + 2 => array( + 'const', 'uniform', 'attribute', 'centroid', 'varying', 'invariant', + 'in', 'out', 'inout', 'input', 'output', 'typedef', 'volatile', + 'public', 'static', 'extern', 'external', 'packed', + 'inline', 'noinline' + ), + 3 => array( + 'void', 'bool', 'int', 'long', 'short', 'float', 'half', 'fixed', + 'unsigned', 'lowp', 'mediump', 'highp', 'precision', + 'vec2', 'vec3', 'vec4', 'bvec2', 'bvec3', 'bvec4', + 'dvec2', 'dvec3', 'dvec4', 'fvec2', 'fvec3', 'fvec4', + 'hvec2', 'hvec3', 'hvec4', 'ivec2', 'ivec3', 'ivec4', + 'mat2', 'mat3', 'mat4', 'mat2x2', 'mat3x2', 'mat4x2', + 'mat2x3', 'mat3x3', 'mat4x3', 'mat2x4', 'mat3x4', 'mat4x4', + 'sampler1D', 'sampler2D', 'sampler3D', 'samplerCube', + 'sampler1DShadow', 'sampler2DShadow', + 'struct', 'class', 'union', 'enum', 'interface', 'template' + ), + 4 => array( + 'this', 'false', 'true' + ), + 5 => array( + 'radians', 'degrees', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', + 'pow', 'exp2', 'log2', 'sqrt', 'inversesqrt', 'abs', 'sign', 'ceil', + 'floor', 'fract', 'mod', 'min', 'max', 'clamp', 'mix', 'step', + 'smoothstep', 'length', 'distance', 'dot', 'cross', 'normalize', + 'ftransform', 'faceforward', 'reflect', 'matrixCompMult', 'equal', + 'lessThan', 'lessThanEqual', 'greaterThan', 'greaterThanEqual', + 'notEqual', 'any', 'all', 'not', 'texture1D', 'texture1DProj', + 'texture1DLod', 'texture1DProjLod', 'texture2D', 'texture2DProj', + 'texture2DLod', 'texture2DProjLod', 'texture3D', 'texture3DProj', + 'texture3DLod', 'texture3DProjLod', 'textureCube', 'textureCubeLod', + 'shadow1D', 'shadow1DProj', 'shadow1DLod', 'shadow1DProjLod', + 'shadow2D', 'shadow2DProj', 'shadow2DLod', 'shadow2DProjLod', + 'noise1', 'noise2', 'noise3', 'noise4' + ), + 6 => array( + 'gl_Position', 'gl_PointSize', 'gl_ClipVertex', 'gl_FragColor', + 'gl_FragData', 'gl_FragDepth', 'gl_FragCoord', 'gl_FrontFacing', + 'gl_Color', 'gl_SecondaryColor', 'gl_Normal', 'gl_Vertex', + 'gl_MultiTexCoord0', 'gl_MultiTexCoord1', 'gl_MultiTexCoord2', + 'gl_MultiTexCoord3', 'gl_MultiTexCoord4', 'gl_MultiTexCoord5', + 'gl_MultiTexCoord6', 'gl_MultiTexCoord7', 'gl_FogCoord', + 'gl_MaxLights', 'gl_MaxClipPlanes', 'gl_MaxTextureUnits', + 'gl_MaxTextureCoords', 'gl_MaxVertexAttribs', 'gl_MaxVaryingFloats', + 'gl_MaxVertexUniformComponents', 'gl_MaxVertexTextureImageUnits', + 'gl_MaxCombinedTextureImageUnits', 'gl_MaxTextureImageUnits', + 'gl_MaxFragmentUniformComponents', 'gl_MaxDrawBuffers', 'gl_Point', + 'gl_ModelViewMatrix', 'gl_ProjectionMatrix', 'gl_FrontMaterial', + 'gl_ModelViewProjectionMatrix', 'gl_TextureMatrix', 'gl_ClipPlane', + 'gl_NormalMatrix', 'gl_ModelViewMatrixInverse', 'gl_BackMaterial', + 'gl_ProjectionMatrixInverse', 'gl_ModelViewProjectionMatrixInverse', + 'gl_TextureMatrixInverse', 'gl_ModelViewMatrixTranspose', 'gl_Fog', + 'gl_ProjectionMatrixTranspose', 'gl_NormalScale', 'gl_DepthRange', + 'gl_odelViewProjectionMatrixTranspose', 'gl_TextureMatrixTranspose', + 'gl_ModelViewMatrixInverseTranspose', 'gl_LightSource', + 'gl_ProjectionMatrixInverseTranspose', 'gl_LightModel', + 'gl_ModelViewProjectionMatrixInverseTranspose', 'gl_TexCoord', + 'gl_TextureMatrixInverseTranspose', 'gl_TextureEnvColor', + 'gl_FrontLightModelProduct', 'gl_BackLightModelProduct', + 'gl_FrontLightProduct', 'gl_BackLightProduct', 'gl_ObjectPlaneS', + 'gl_ObjectPlaneT', 'gl_ObjectPlaneR', 'gl_ObjectPlaneQ', + 'gl_EyePlaneS', 'gl_EyePlaneT', 'gl_EyePlaneR', 'gl_EyePlaneQ', + 'gl_FrontColor', 'gl_BackColor', 'gl_FrontSecondaryColor', + 'gl_BackSecondaryColor', 'gl_FogFragCoord', 'gl_PointCoord' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', + '&', '?', ':', '|', ';', ',', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #333399; font-weight: bold;', + 3 => 'color: #000066; font-weight: bold;', + 4 => 'color: #333399; font-weight: bold;', + 5 => 'color: #993333; font-weight: bold;', + 6 => 'color: #551111;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #009900;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000066;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000ff;' + ), + 'METHODS' => array( + 1 => 'color: #009900;', + 2 => 'color: #663300;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/inc/geshi/gml.php b/inc/geshi/gml.php index 199a0fd978446d1a2a7aa053ce90824d8a334abe..300d77c7a15fdf935eac6800dc8a24e43a9a4e25 100644 --- a/inc/geshi/gml.php +++ b/inc/geshi/gml.php @@ -4,7 +4,7 @@ * -------- * Author: José Jorge Enríquez (jenriquez@users.sourceforge.net) * Copyright: (c) 2005 José Jorge Enríquez Rodríguez (http://www.zonamakers.com) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/06/21 * * GML language file for GeSHi. diff --git a/inc/geshi/groovy.php b/inc/geshi/groovy.php index 3ae006db394d2fd9c3c40e1e9c9f453c43821d27..16f223bd4d913d8441412979da7e868e0d788204 100644 --- a/inc/geshi/groovy.php +++ b/inc/geshi/groovy.php @@ -4,7 +4,7 @@ * ---------- * Author: Ivan F. Villanueva B. (geshi_groovy@artificialidea.com) * Copyright: (c) 2006 Ivan F. Villanueva B.(http://www.artificialidea.com) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/04/29 * * Groovy language file for GeSHi. @@ -13,6 +13,8 @@ * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2006/04/29 (1.0.0) * - First Release * @@ -2105,6 +2107,7 @@ $language_data = array ( 1 => '.' ), 'REGEXPS' => array( + //Variables 0 => '\\$\\{[a-zA-Z_][a-zA-Z0-9_]*\\}' ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, diff --git a/inc/geshi/haskell.php b/inc/geshi/haskell.php index 2971d08138c1046de9d9ef84be5efc4a2e55cf27..a35abbebd6b4c469799d6b45999a98073b3d6a2a 100644 --- a/inc/geshi/haskell.php +++ b/inc/geshi/haskell.php @@ -4,7 +4,7 @@ * ---------- * Author: Jason Dagit (dagit@codersbase.com) based on ocaml.php by Flaie (fireflaie@gmail.com) * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/08/27 * * Haskell language file for GeSHi. @@ -41,6 +41,7 @@ $language_data = array ( 'LANG_NAME' => 'Haskell', 'COMMENT_SINGLE' => array( 1 => '--'), 'COMMENT_MULTI' => array('{-' => '-}'), + 'COMMENT_REGEXP' => array(2 => "/-->/"), 'CASE_KEYWORDS' => 0, 'QUOTEMARKS' => array('"'), 'ESCAPE_CHAR' => "\\", @@ -120,10 +121,10 @@ $language_data = array ( ), /* highlighting symbols is really important in Haskell */ 'SYMBOLS' => array( - '|', '->', '<-', '@', '!', '::', '_', '~', '=', + '|', '->', '<-', '@', '!', '::', '_', '~', '=', '?', '&&', '||', '==', '/=', '<', '<=', '>', - '>=','+', '-', '*','/', '**', '^', '^^', - '>>=', '>>', '=<<', '$', '.', '$!', + '>=','+', '-', '*','/', '%', '**', '^', '^^', + '>>=', '>>', '=<<', '$', '.', ',', '$!', '++', '!!' ), 'CASE_SENSITIVE' => array( @@ -144,9 +145,11 @@ $language_data = array ( ), 'COMMENTS' => array( 1 => 'color: #5d478b; font-style: italic;', + 2 => 'color: #339933; font-weight: bold;', 'MULTI' => 'color: #5d478b; font-style: italic;' /* light purpHle */ ), 'ESCAPE_CHAR' => array( + 0 => 'background-color: #3cb371; font-weight: bold;' ), 'BRACKETS' => array( 0 => 'color: green;' @@ -163,7 +166,7 @@ $language_data = array ( 'REGEXPS' => array( ), 'SYMBOLS' => array( - 0 => 'color: #66cc66; font-weight: bold;' + 0 => 'color: #339933; font-weight: bold;' ), 'SCRIPT' => array( ) diff --git a/inc/geshi/html4strict.php b/inc/geshi/html4strict.php index 99156473bf4580dd1d23c94006bdb026c3ce495d..b61c66c7d6f14cca805da2e0d6515d10bb411307 100644 --- a/inc/geshi/html4strict.php +++ b/inc/geshi/html4strict.php @@ -4,7 +4,7 @@ * --------------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/07/10 * * HTML 4.01 strict language file for GeSHi. @@ -147,7 +147,7 @@ $language_data = array ( '<ul>', '<u>', '<ul', '<u', - '</ul>', '</ul>', + '</ul>', '</u>', '</ul', '</u', '<var>', diff --git a/inc/geshi/idl.php b/inc/geshi/idl.php index fd6829bf36cbc9a7b173ceb93dcb6c952fdc961e..d2320e8c4a117511b9dceff1d667a30bd7550056 100644 --- a/inc/geshi/idl.php +++ b/inc/geshi/idl.php @@ -4,7 +4,7 @@ * ------- * Author: Cedric Bosdonnat (cedricbosdo@openoffice.org) * Copyright: (c) 2006 Cedric Bosdonnat - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/08/20 * * Unoidl language file for GeSHi. diff --git a/inc/geshi/ini.php b/inc/geshi/ini.php index b7de9afa4edadfebb795480e11cce3d14a920567..71125447571041b1e6ac7fa395c32bc7336ba468 100644 --- a/inc/geshi/ini.php +++ b/inc/geshi/ini.php @@ -4,13 +4,15 @@ * -------- * Author: deguix (cevo_deguix@yahoo.com.br) * Copyright: (c) 2005 deguix - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/03/27 * * INI language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2005/12/28 (1.0.1) * - Removed unnecessary keyword style index * - Added support for " strings @@ -94,19 +96,22 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( + //Section names 0 => '\[.+\]', + //Entry names 1 => array( - GESHI_SEARCH => '([a-zA-Z0-9_]+\s*)=(.+)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '=\\2' + GESHI_SEARCH => '^(\s*)([a-zA-Z0-9_]+)(\s*=)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' ), + //Entry values 2 => array( // Evil hackery to get around GeSHi bug: <>" and ; are added so <span>s can be matched // Explicit match on variable names because if a comment is before the first < of the span // gets chewed up... - GESHI_SEARCH => '([<>";a-zA-Z0-9_]+\s*)=(.+)', + GESHI_SEARCH => '([<>";a-zA-Z0-9_]+\s*)=(.*)', GESHI_REPLACE => '\\2', GESHI_MODIFIERS => '', GESHI_BEFORE => '\\1=', diff --git a/inc/geshi/inno.php b/inc/geshi/inno.php index 3b8fc92dff47310d7949575d5c5f61cba593933d..9802f8fff9b4060534ebbd8c705b3d17d241d3b8 100644 --- a/inc/geshi/inno.php +++ b/inc/geshi/inno.php @@ -4,7 +4,7 @@ * ---------- * Author: Thomas Klingler (hotline@theratech.de) based on delphi.php from Járja Norbert (jnorbi@vipmail.hu) * Copyright: (c) 2004 Járja Norbert, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/07/29 * * Inno Script language inkl. Delphi (Object Pascal) language file for GeSHi. @@ -73,8 +73,6 @@ $language_data = array ( 'uninsclearvalue','uninsdeleteentry','uninsdeletekey','uninsdeletekeyifempty', 'uninsdeletesection','uninsdeletesectionifempty','uninsdeletevalue', 'uninsneveruninstall','useapppaths','verysilent','waituntilidle' - - ), 3 => array( 'Abs', 'Addr', 'AnsiCompareStr', 'AnsiCompareText', 'AnsiContainsStr', 'AnsiEndsStr', 'AnsiIndexStr', 'AnsiLeftStr', @@ -134,8 +132,6 @@ $language_data = array ( 'VersionInfoVersion','VersionInfoCompany','VersionInfoDescription','VersionInfoTextVersion', 'WindowResizable','WindowShowCaption','WindowStartMaximized', 'WindowVisible','WizardImageBackColor','WizardImageFile','WizardImageStretch','WizardSmallImageBackColor','WizardSmallImageFile','WizardStyle','WorkingDir' - - ), 4 => array( 'AnsiChar', 'AnsiString', 'Boolean', 'Byte', 'Cardinal', 'Char', 'Comp', 'Currency', 'Double', 'Extended', @@ -150,7 +146,6 @@ $language_data = array ( 'SYMBOLS' => array( '(', ')', '[', ']', '{', '}', '@', '%', '&', '*', '|', '/', '<', '>' ), - 'CASE_SENSITIVE' => array( GESHI_COMMENTS => true, 1 => false, diff --git a/inc/geshi/io.php b/inc/geshi/io.php index 97c1c063dea5f91e7ee582c0a4d06fdbf47ba67e..b48556f9a42f4a155a942c4f08950670a1d7a7f0 100644 --- a/inc/geshi/io.php +++ b/inc/geshi/io.php @@ -4,7 +4,7 @@ * ------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2006 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/09/23 * * Io language file for GeSHi. Thanks to Johnathan Wright for the suggestion and help diff --git a/inc/geshi/java.php b/inc/geshi/java.php index 4c5689df2b8350fcdfd93a849b52716e6ee9194d..81cdd3dc832758f57295321a0de20755b2c6f31e 100644 --- a/inc/geshi/java.php +++ b/inc/geshi/java.php @@ -4,13 +4,15 @@ * -------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/07/10 * * Java language file for GeSHi. * * CHANGES * ------- + * 2008/05/25 (1.0.7.22) + * - Added highlighting of import and package directives as non-OOP * 2005/12/28 (1.0.4) * - Added instanceof keyword * 2004/11/27 (1.0.3) @@ -51,24 +53,27 @@ $language_data = array ( 'LANG_NAME' => 'Java', - 'COMMENT_SINGLE' => array(1 => '//', 2 => 'import'), + 'COMMENT_SINGLE' => array(1 => '//'), 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Import and Package directives (Basic Support only) + 2 => '/(?:(?<=import[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', 'KEYWORDS' => array( 1 => array( 'for', 'foreach', 'if', 'else', 'while', 'do', - 'switch', 'case' - ), - 2 => array( - 'null', 'return', 'false', 'final', 'true', 'public', + 'switch', 'case', 'return', 'public', 'private', 'protected', 'extends', 'break', 'class', 'new', 'try', 'catch', 'throws', 'finally', 'implements', - 'interface', 'throw', 'native', 'synchronized', 'this', + 'interface', 'throw', 'final', 'native', 'synchronized', 'this', 'abstract', 'transient', 'instanceof', 'assert', 'continue', 'default', 'enum', 'package', 'static', 'strictfp', 'super', - 'volatile', 'const', 'goto' + 'volatile', 'const', 'goto', 'import', 'package' + ), + 2 => array( + 'null', 'false', 'true' ), 3 => array( 'AbstractAction', 'AbstractBorder', 'AbstractButton', 'AbstractCellEditor', @@ -1321,7 +1326,11 @@ $language_data = array ( ) ), 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?' + '(', ')', '[', ']', '{', '}', + '+', '-', '*', '/', '%', + '!', '&', '|', '^', + '<', '>', '=', + '?', ':', ';', ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => true, @@ -1332,34 +1341,34 @@ $language_data = array ( ), 'STYLES' => array( 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #aaaadd; font-weight: bold;', - 4 => 'color: #993333;' + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000066; font-weight: bold;', + 3 => 'color: #003399;', + 4 => 'color: #000066; font-weight: bold;' ), 'COMMENTS' => array( - 1=> 'color: #808080; font-style: italic;', - 2=> 'color: #a1a100;', - 'MULTI' => 'color: #808080; font-style: italic;' + 1=> 'color: #666666; font-style: italic;', + 2=> 'color: #006699;', + 'MULTI' => 'color: #666666; font-style: italic;' ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #009900;' ), 'STRINGS' => array( - 0 => 'color: #ff0000;' + 0 => 'color: #0000ff;' ), 'NUMBERS' => array( 0 => 'color: #cc66cc;' ), 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' + 1 => 'color: #006633;', + 2 => 'color: #006633;' ), 'SYMBOLS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #339933;' ), 'SCRIPT' => array( ), diff --git a/inc/geshi/java5.php b/inc/geshi/java5.php index d1699dee4e3b267596b4ed3bb08dcb2c20aef38b..60c41a4fe1c86739385b47d81e268ce42cae1536 100644 --- a/inc/geshi/java5.php +++ b/inc/geshi/java5.php @@ -4,13 +4,15 @@ * -------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/07/10 * * Java language file for GeSHi. * * CHANGES * ------- + * 2008/05/25 (1.0.7.22) + * - Added highlighting of import and package directives as non-OOP * 2005/12/28 (1.0.4) * - Added instanceof keyword * 2004/11/27 (1.0.3) @@ -50,8 +52,11 @@ $language_data = array ( 'LANG_NAME' => 'Java(TM) 2 Platform Standard Edition 5.0', - 'COMMENT_SINGLE' => array(1 => '//'), /* import statements are not comments! */ + 'COMMENT_SINGLE' => array(1 => '//'), 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Import and Package directives (Basic Support only) + 2 => '/(?:(?<=import[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', @@ -640,195 +645,196 @@ $language_data = array ( ), 'STYLES' => array( 'KEYWORDS' => array( - 1 => 'color: #b1b100;', + 1 => 'color: #000000; font-weight: bold;', 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #993333;', - 4 => 'color: #b13366;', - 5 => 'color: #aaaadd; font-weight: bold;', - 6 => 'color: #aaaadd; font-weight: bold;', - 7 => 'color: #aaaadd; font-weight: bold;', - 8 => 'color: #aaaadd; font-weight: bold;', - 9 => 'color: #aaaadd; font-weight: bold;', - 10 => 'color: #aaaadd; font-weight: bold;', - 11 => 'color: #aaaadd; font-weight: bold;', - 12 => 'color: #aaaadd; font-weight: bold;', - 13 => 'color: #aaaadd; font-weight: bold;', - 14 => 'color: #aaaadd; font-weight: bold;', - 15 => 'color: #aaaadd; font-weight: bold;', - 16 => 'color: #aaaadd; font-weight: bold;', - 17 => 'color: #aaaadd; font-weight: bold;', - 18 => 'color: #aaaadd; font-weight: bold;', - 19 => 'color: #aaaadd; font-weight: bold;', - 20 => 'color: #aaaadd; font-weight: bold;', - 21 => 'color: #aaaadd; font-weight: bold;', - 22 => 'color: #aaaadd; font-weight: bold;', - 23 => 'color: #aaaadd; font-weight: bold;', - 24 => 'color: #aaaadd; font-weight: bold;', - 25 => 'color: #aaaadd; font-weight: bold;', - 26 => 'color: #aaaadd; font-weight: bold;', - 27 => 'color: #aaaadd; font-weight: bold;', - 28 => 'color: #aaaadd; font-weight: bold;', - 29 => 'color: #aaaadd; font-weight: bold;', - 30 => 'color: #aaaadd; font-weight: bold;', - 31 => 'color: #aaaadd; font-weight: bold;', - 32 => 'color: #aaaadd; font-weight: bold;', - 33 => 'color: #aaaadd; font-weight: bold;', - 34 => 'color: #aaaadd; font-weight: bold;', - 35 => 'color: #aaaadd; font-weight: bold;', - 36 => 'color: #aaaadd; font-weight: bold;', - 37 => 'color: #aaaadd; font-weight: bold;', - 38 => 'color: #aaaadd; font-weight: bold;', - 39 => 'color: #aaaadd; font-weight: bold;', - 40 => 'color: #aaaadd; font-weight: bold;', - 41 => 'color: #aaaadd; font-weight: bold;', - 42 => 'color: #aaaadd; font-weight: bold;', - 43 => 'color: #aaaadd; font-weight: bold;', - 44 => 'color: #aaaadd; font-weight: bold;', - 45 => 'color: #aaaadd; font-weight: bold;', - 46 => 'color: #aaaadd; font-weight: bold;', - 47 => 'color: #aaaadd; font-weight: bold;', - 48 => 'color: #aaaadd; font-weight: bold;', - 49 => 'color: #aaaadd; font-weight: bold;', - 50 => 'color: #aaaadd; font-weight: bold;', - 51 => 'color: #aaaadd; font-weight: bold;', - 52 => 'color: #aaaadd; font-weight: bold;', - 53 => 'color: #aaaadd; font-weight: bold;', - 54 => 'color: #aaaadd; font-weight: bold;', - 55 => 'color: #aaaadd; font-weight: bold;', - 56 => 'color: #aaaadd; font-weight: bold;', - 57 => 'color: #aaaadd; font-weight: bold;', - 58 => 'color: #aaaadd; font-weight: bold;', - 59 => 'color: #aaaadd; font-weight: bold;', - 60 => 'color: #aaaadd; font-weight: bold;', - 61 => 'color: #aaaadd; font-weight: bold;', - 62 => 'color: #aaaadd; font-weight: bold;', - 63 => 'color: #aaaadd; font-weight: bold;', - 64 => 'color: #aaaadd; font-weight: bold;', - 65 => 'color: #aaaadd; font-weight: bold;', - 66 => 'color: #aaaadd; font-weight: bold;', - 67 => 'color: #aaaadd; font-weight: bold;', - 68 => 'color: #aaaadd; font-weight: bold;', - 69 => 'color: #aaaadd; font-weight: bold;', - 70 => 'color: #aaaadd; font-weight: bold;', - 71 => 'color: #aaaadd; font-weight: bold;', - 72 => 'color: #aaaadd; font-weight: bold;', - 73 => 'color: #aaaadd; font-weight: bold;', - 74 => 'color: #aaaadd; font-weight: bold;', - 75 => 'color: #aaaadd; font-weight: bold;', - 76 => 'color: #aaaadd; font-weight: bold;', - 77 => 'color: #aaaadd; font-weight: bold;', - 78 => 'color: #aaaadd; font-weight: bold;', - 79 => 'color: #aaaadd; font-weight: bold;', - 80 => 'color: #aaaadd; font-weight: bold;', - 81 => 'color: #aaaadd; font-weight: bold;', - 82 => 'color: #aaaadd; font-weight: bold;', - 83 => 'color: #aaaadd; font-weight: bold;', - 84 => 'color: #aaaadd; font-weight: bold;', - 85 => 'color: #aaaadd; font-weight: bold;', - 86 => 'color: #aaaadd; font-weight: bold;', - 87 => 'color: #aaaadd; font-weight: bold;', - 88 => 'color: #aaaadd; font-weight: bold;', - 89 => 'color: #aaaadd; font-weight: bold;', - 90 => 'color: #aaaadd; font-weight: bold;', - 91 => 'color: #aaaadd; font-weight: bold;', - 92 => 'color: #aaaadd; font-weight: bold;', - 93 => 'color: #aaaadd; font-weight: bold;', - 94 => 'color: #aaaadd; font-weight: bold;', - 95 => 'color: #aaaadd; font-weight: bold;', - 96 => 'color: #aaaadd; font-weight: bold;', - 97 => 'color: #aaaadd; font-weight: bold;', - 98 => 'color: #aaaadd; font-weight: bold;', - 99 => 'color: #aaaadd; font-weight: bold;', - 100 => 'color: #aaaadd; font-weight: bold;', - 101 => 'color: #aaaadd; font-weight: bold;', - 102 => 'color: #aaaadd; font-weight: bold;', - 103 => 'color: #aaaadd; font-weight: bold;', - 104 => 'color: #aaaadd; font-weight: bold;', - 105 => 'color: #aaaadd; font-weight: bold;', - 106 => 'color: #aaaadd; font-weight: bold;', - 107 => 'color: #aaaadd; font-weight: bold;', - 108 => 'color: #aaaadd; font-weight: bold;', - 109 => 'color: #aaaadd; font-weight: bold;', - 110 => 'color: #aaaadd; font-weight: bold;', - 111 => 'color: #aaaadd; font-weight: bold;', - 112 => 'color: #aaaadd; font-weight: bold;', - 113 => 'color: #aaaadd; font-weight: bold;', - 114 => 'color: #aaaadd; font-weight: bold;', - 115 => 'color: #aaaadd; font-weight: bold;', - 116 => 'color: #aaaadd; font-weight: bold;', - 117 => 'color: #aaaadd; font-weight: bold;', - 118 => 'color: #aaaadd; font-weight: bold;', - 119 => 'color: #aaaadd; font-weight: bold;', - 120 => 'color: #aaaadd; font-weight: bold;', - 121 => 'color: #aaaadd; font-weight: bold;', - 122 => 'color: #aaaadd; font-weight: bold;', - 123 => 'color: #aaaadd; font-weight: bold;', - 124 => 'color: #aaaadd; font-weight: bold;', - 125 => 'color: #aaaadd; font-weight: bold;', - 126 => 'color: #aaaadd; font-weight: bold;', - 127 => 'color: #aaaadd; font-weight: bold;', - 128 => 'color: #aaaadd; font-weight: bold;', - 129 => 'color: #aaaadd; font-weight: bold;', - 130 => 'color: #aaaadd; font-weight: bold;', - 131 => 'color: #aaaadd; font-weight: bold;', - 132 => 'color: #aaaadd; font-weight: bold;', - 133 => 'color: #aaaadd; font-weight: bold;', - 134 => 'color: #aaaadd; font-weight: bold;', - 135 => 'color: #aaaadd; font-weight: bold;', - 136 => 'color: #aaaadd; font-weight: bold;', - 137 => 'color: #aaaadd; font-weight: bold;', - 138 => 'color: #aaaadd; font-weight: bold;', - 139 => 'color: #aaaadd; font-weight: bold;', - 140 => 'color: #aaaadd; font-weight: bold;', - 141 => 'color: #aaaadd; font-weight: bold;', - 142 => 'color: #aaaadd; font-weight: bold;', - 143 => 'color: #aaaadd; font-weight: bold;', - 144 => 'color: #aaaadd; font-weight: bold;', - 145 => 'color: #aaaadd; font-weight: bold;', - 146 => 'color: #aaaadd; font-weight: bold;', - 147 => 'color: #aaaadd; font-weight: bold;', - 148 => 'color: #aaaadd; font-weight: bold;', - 149 => 'color: #aaaadd; font-weight: bold;', - 150 => 'color: #aaaadd; font-weight: bold;', - 151 => 'color: #aaaadd; font-weight: bold;', - 152 => 'color: #aaaadd; font-weight: bold;', - 153 => 'color: #aaaadd; font-weight: bold;', - 154 => 'color: #aaaadd; font-weight: bold;', - 155 => 'color: #aaaadd; font-weight: bold;', - 156 => 'color: #aaaadd; font-weight: bold;', - 157 => 'color: #aaaadd; font-weight: bold;', - 158 => 'color: #aaaadd; font-weight: bold;', - 159 => 'color: #aaaadd; font-weight: bold;', - 160 => 'color: #aaaadd; font-weight: bold;', - 161 => 'color: #aaaadd; font-weight: bold;', - 162 => 'color: #aaaadd; font-weight: bold;', - 163 => 'color: #aaaadd; font-weight: bold;', - 164 => 'color: #aaaadd; font-weight: bold;', - 165 => 'color: #aaaadd; font-weight: bold;', - 166 => 'color: #aaaadd; font-weight: bold;' + 3 => 'color: #006600; font-weight: bold;', + 4 => 'color: #006600; font-weight: bold;', + 5 => 'color: #003399; font-weight: bold;', + 6 => 'color: #003399; font-weight: bold;', + 7 => 'color: #003399; font-weight: bold;', + 8 => 'color: #003399; font-weight: bold;', + 9 => 'color: #003399; font-weight: bold;', + 10 => 'color: #003399; font-weight: bold;', + 11 => 'color: #003399; font-weight: bold;', + 12 => 'color: #003399; font-weight: bold;', + 13 => 'color: #003399; font-weight: bold;', + 14 => 'color: #003399; font-weight: bold;', + 15 => 'color: #003399; font-weight: bold;', + 16 => 'color: #003399; font-weight: bold;', + 17 => 'color: #003399; font-weight: bold;', + 18 => 'color: #003399; font-weight: bold;', + 19 => 'color: #003399; font-weight: bold;', + 20 => 'color: #003399; font-weight: bold;', + 21 => 'color: #003399; font-weight: bold;', + 22 => 'color: #003399; font-weight: bold;', + 23 => 'color: #003399; font-weight: bold;', + 24 => 'color: #003399; font-weight: bold;', + 25 => 'color: #003399; font-weight: bold;', + 26 => 'color: #003399; font-weight: bold;', + 27 => 'color: #003399; font-weight: bold;', + 28 => 'color: #003399; font-weight: bold;', + 29 => 'color: #003399; font-weight: bold;', + 30 => 'color: #003399; font-weight: bold;', + 31 => 'color: #003399; font-weight: bold;', + 32 => 'color: #003399; font-weight: bold;', + 33 => 'color: #003399; font-weight: bold;', + 34 => 'color: #003399; font-weight: bold;', + 35 => 'color: #003399; font-weight: bold;', + 36 => 'color: #003399; font-weight: bold;', + 37 => 'color: #003399; font-weight: bold;', + 38 => 'color: #003399; font-weight: bold;', + 39 => 'color: #003399; font-weight: bold;', + 40 => 'color: #003399; font-weight: bold;', + 41 => 'color: #003399; font-weight: bold;', + 42 => 'color: #003399; font-weight: bold;', + 43 => 'color: #003399; font-weight: bold;', + 44 => 'color: #003399; font-weight: bold;', + 45 => 'color: #003399; font-weight: bold;', + 46 => 'color: #003399; font-weight: bold;', + 47 => 'color: #003399; font-weight: bold;', + 48 => 'color: #003399; font-weight: bold;', + 49 => 'color: #003399; font-weight: bold;', + 50 => 'color: #003399; font-weight: bold;', + 51 => 'color: #003399; font-weight: bold;', + 52 => 'color: #003399; font-weight: bold;', + 53 => 'color: #003399; font-weight: bold;', + 54 => 'color: #003399; font-weight: bold;', + 55 => 'color: #003399; font-weight: bold;', + 56 => 'color: #003399; font-weight: bold;', + 57 => 'color: #003399; font-weight: bold;', + 58 => 'color: #003399; font-weight: bold;', + 59 => 'color: #003399; font-weight: bold;', + 60 => 'color: #003399; font-weight: bold;', + 61 => 'color: #003399; font-weight: bold;', + 62 => 'color: #003399; font-weight: bold;', + 63 => 'color: #003399; font-weight: bold;', + 64 => 'color: #003399; font-weight: bold;', + 65 => 'color: #003399; font-weight: bold;', + 66 => 'color: #003399; font-weight: bold;', + 67 => 'color: #003399; font-weight: bold;', + 68 => 'color: #003399; font-weight: bold;', + 69 => 'color: #003399; font-weight: bold;', + 70 => 'color: #003399; font-weight: bold;', + 71 => 'color: #003399; font-weight: bold;', + 72 => 'color: #003399; font-weight: bold;', + 73 => 'color: #003399; font-weight: bold;', + 74 => 'color: #003399; font-weight: bold;', + 75 => 'color: #003399; font-weight: bold;', + 76 => 'color: #003399; font-weight: bold;', + 77 => 'color: #003399; font-weight: bold;', + 78 => 'color: #003399; font-weight: bold;', + 79 => 'color: #003399; font-weight: bold;', + 80 => 'color: #003399; font-weight: bold;', + 81 => 'color: #003399; font-weight: bold;', + 82 => 'color: #003399; font-weight: bold;', + 83 => 'color: #003399; font-weight: bold;', + 84 => 'color: #003399; font-weight: bold;', + 85 => 'color: #003399; font-weight: bold;', + 86 => 'color: #003399; font-weight: bold;', + 87 => 'color: #003399; font-weight: bold;', + 88 => 'color: #003399; font-weight: bold;', + 89 => 'color: #003399; font-weight: bold;', + 90 => 'color: #003399; font-weight: bold;', + 91 => 'color: #003399; font-weight: bold;', + 92 => 'color: #003399; font-weight: bold;', + 93 => 'color: #003399; font-weight: bold;', + 94 => 'color: #003399; font-weight: bold;', + 95 => 'color: #003399; font-weight: bold;', + 96 => 'color: #003399; font-weight: bold;', + 97 => 'color: #003399; font-weight: bold;', + 98 => 'color: #003399; font-weight: bold;', + 99 => 'color: #003399; font-weight: bold;', + 100 => 'color: #003399; font-weight: bold;', + 101 => 'color: #003399; font-weight: bold;', + 102 => 'color: #003399; font-weight: bold;', + 103 => 'color: #003399; font-weight: bold;', + 104 => 'color: #003399; font-weight: bold;', + 105 => 'color: #003399; font-weight: bold;', + 106 => 'color: #003399; font-weight: bold;', + 107 => 'color: #003399; font-weight: bold;', + 108 => 'color: #003399; font-weight: bold;', + 109 => 'color: #003399; font-weight: bold;', + 110 => 'color: #003399; font-weight: bold;', + 111 => 'color: #003399; font-weight: bold;', + 112 => 'color: #003399; font-weight: bold;', + 113 => 'color: #003399; font-weight: bold;', + 114 => 'color: #003399; font-weight: bold;', + 115 => 'color: #003399; font-weight: bold;', + 116 => 'color: #003399; font-weight: bold;', + 117 => 'color: #003399; font-weight: bold;', + 118 => 'color: #003399; font-weight: bold;', + 119 => 'color: #003399; font-weight: bold;', + 120 => 'color: #003399; font-weight: bold;', + 121 => 'color: #003399; font-weight: bold;', + 122 => 'color: #003399; font-weight: bold;', + 123 => 'color: #003399; font-weight: bold;', + 124 => 'color: #003399; font-weight: bold;', + 125 => 'color: #003399; font-weight: bold;', + 126 => 'color: #003399; font-weight: bold;', + 127 => 'color: #003399; font-weight: bold;', + 128 => 'color: #003399; font-weight: bold;', + 129 => 'color: #003399; font-weight: bold;', + 130 => 'color: #003399; font-weight: bold;', + 131 => 'color: #003399; font-weight: bold;', + 132 => 'color: #003399; font-weight: bold;', + 133 => 'color: #003399; font-weight: bold;', + 134 => 'color: #003399; font-weight: bold;', + 135 => 'color: #003399; font-weight: bold;', + 136 => 'color: #003399; font-weight: bold;', + 137 => 'color: #003399; font-weight: bold;', + 138 => 'color: #003399; font-weight: bold;', + 139 => 'color: #003399; font-weight: bold;', + 140 => 'color: #003399; font-weight: bold;', + 141 => 'color: #003399; font-weight: bold;', + 142 => 'color: #003399; font-weight: bold;', + 143 => 'color: #003399; font-weight: bold;', + 144 => 'color: #003399; font-weight: bold;', + 145 => 'color: #003399; font-weight: bold;', + 146 => 'color: #003399; font-weight: bold;', + 147 => 'color: #003399; font-weight: bold;', + 148 => 'color: #003399; font-weight: bold;', + 149 => 'color: #003399; font-weight: bold;', + 150 => 'color: #003399; font-weight: bold;', + 151 => 'color: #003399; font-weight: bold;', + 152 => 'color: #003399; font-weight: bold;', + 153 => 'color: #003399; font-weight: bold;', + 154 => 'color: #003399; font-weight: bold;', + 155 => 'color: #003399; font-weight: bold;', + 156 => 'color: #003399; font-weight: bold;', + 157 => 'color: #003399; font-weight: bold;', + 158 => 'color: #003399; font-weight: bold;', + 159 => 'color: #003399; font-weight: bold;', + 160 => 'color: #003399; font-weight: bold;', + 161 => 'color: #003399; font-weight: bold;', + 162 => 'color: #003399; font-weight: bold;', + 163 => 'color: #003399; font-weight: bold;', + 164 => 'color: #003399; font-weight: bold;', + 165 => 'color: #003399; font-weight: bold;', + 166 => 'color: #003399; font-weight: bold;' ), 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' + 1 => 'color: #666666; font-style: italic;', + 1 => 'color: #006699;', + 'MULTI' => 'color: #666666; font-style: italic;' ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #009900;' ), 'STRINGS' => array( - 0 => 'color: #ff0000;' + 0 => 'color: #0000ff;' ), 'NUMBERS' => array( 0 => 'color: #cc66cc;' ), 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' + 1 => 'color: #006633;', + 2 => 'color: #006633;' ), 'SYMBOLS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #339933;' ), 'SCRIPT' => array( ), diff --git a/inc/geshi/javascript.php b/inc/geshi/javascript.php index 9135ef4ca3f0cc5b43e5e938b8ab2e60a10d361f..5384f037d41bccb7805eb50a59bd9424dc55381c 100644 --- a/inc/geshi/javascript.php +++ b/inc/geshi/javascript.php @@ -4,13 +4,15 @@ * -------------- * Author: Ben Keen (ben.keen@gmail.com) * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/20 * * JavaScript language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/11/27 (1.0.1) * - Added support for multiple object splitters * 2004/10/27 (1.0.0) @@ -43,6 +45,8 @@ $language_data = array ( 'LANG_NAME' => 'Javascript', 'COMMENT_SINGLE' => array(1 => '//'), 'COMMENT_MULTI' => array('/*' => '*/'), + //Regular Expressions + 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|[^\\/\\\\])+\\/(?:\\\\.|[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', @@ -68,7 +72,11 @@ $language_data = array ( ) ), 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' + '(', ')', '[', ']', '{', '}', + '+', '-', '*', '/', '%', + '!', '@', '&', '|', '^', + '<', '>', '=', + ',', ';', '?', ':' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, @@ -83,14 +91,15 @@ $language_data = array ( 3 => 'color: #000066;' ), 'COMMENTS' => array( - 1 => 'color: #009900; font-style: italic;', - 'MULTI' => 'color: #009900; font-style: italic;' + 1 => 'color: #006600; font-style: italic;', + 2 => 'color: #009966; font-style: italic;', + 'MULTI' => 'color: #006600; font-style: italic;' ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #009900;' ), 'STRINGS' => array( 0 => 'color: #3366CC;' @@ -102,10 +111,9 @@ $language_data = array ( 1 => 'color: #006600;' ), 'SYMBOLS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #339933;' ), 'REGEXPS' => array( - 0 => 'color: #0066FF;' ), 'SCRIPT' => array( 0 => '', @@ -124,7 +132,6 @@ $language_data = array ( 1 => '.' ), 'REGEXPS' => array( - 0 => "/.*/([igm]*)?" // matches js reg exps ), 'STRICT_MODE_APPLIES' => GESHI_MAYBE, 'SCRIPT_DELIMITERS' => array( diff --git a/inc/geshi/kixtart.php b/inc/geshi/kixtart.php new file mode 100644 index 0000000000000000000000000000000000000000..c9a4b2f65f7b82dbd44aabc1e3758dcffb421f6b --- /dev/null +++ b/inc/geshi/kixtart.php @@ -0,0 +1,331 @@ +<?php +/************************************************************************************* + * kixtart.php + * -------- + * Author: Riley McArdle (riley@glyff.net) + * Copyright: (c) 2007 Riley McArdle (http://www.glyff.net/) + * Release Version: 1.0.7.22 + * Date Started: 2007/08/31 + * + * PHP language file for GeSHi. + * + * CHANGES + * ------- + * 2007/08/31 (1.0.7.22) + * - First Release + * + * TODO (updated 2007/08/31) + * ------------------------- + * * + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'KiXtart', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'While', 'Loop', + 'Use', + 'Small', + 'Sleep', + 'Shell', + 'SetTime', + 'SetM', + 'SetL', + 'Set', + 'Select', 'Case', + 'Run', + 'Return', + 'Redim', + 'RD', + 'Quit', + 'Play', + 'Move', + 'MD', + 'Include', + 'If', 'Else', 'Endif', + 'GoTo', + 'GoSub', + 'Go', + 'Global', + 'GetS', + 'Get', + 'Function', 'Endfunction', + 'For', 'Next', + 'Each', + 'FlushKb', + 'Exit', + 'Do', 'Until', + 'Display', + 'Dim', + 'Del', + 'Debug', + 'Copy', + 'Cookie1', + 'Color', + 'CLS', + 'CD', + 'Call', + 'Break', + 'Big', + 'Beep', + ), + 2 => array( + '@Address', + '@Build', + '@Color', + '@Comment', + '@CPU', + '@CRLF', + '@CSD', + '@CurDir', + '@Date', + '@Day', + '@Domain', + '@DOS', + '@Error', + '@FullName', + '@HomeDir', + '@HomeDrive', + '@HomeShr', + '@HostName', + '@InWin', + '@IPaddressX', + '@KiX', + '@LanRoot', + '@LDomain', + '@LDrive', + '@LM', + '@LogonMode', + '@LongHomeDir', + '@LServer', + '@MaxPWAge', + '@MDayNo', + '@MHz', + '@MonthNo', + '@Month', + '@MSecs', + '@OnWoW64', + '@PID', + '@PrimaryGroup', + '@Priv', + '@ProductSuite', + '@ProductType', + '@PWAge', + '@RAS', + '@Result', + '@RServer', + '@ScriptDir', + '@ScriptExe', + '@ScriptName', + '@SError', + '@SID', + '@Site', + '@StartDir', + '@SysLang', + '@Ticks', + '@Time', + '@TsSession', + '@UserID', + '@UserLang', + '@WDayNo', + '@Wksta', + '@WUserID', + '@YDayNo', + '@Year', + ), + 3 => array( + 'WriteValue', + 'WriteProfileString', + 'WriteLine', + 'VarTypeName', + 'VarType', + 'Val', + 'UnloadHive', + 'UCase', + 'Ubound', + 'Trim', + 'Substr', + 'SRnd', + 'Split', + 'SidToName', + 'ShutDown', + 'ShowProgramGroup', + 'SetWallpaper', + 'SetTitle', + 'SetSystemState', + 'SetOption', + 'SetFocus', + 'SetFileAttr', + 'SetDefaultPrinter', + 'SetConsole', + 'SetAscii', + 'SendMessage', + 'SendKeys', + 'SaveKey', + 'RTrim', + 'Round', + 'Rnd', + 'Right', + 'RedirectOutput', + 'ReadValue', + 'ReadType', + 'ReadProfileString', + 'ReadLine', + 'Open', + 'MessageBox', + 'MemorySize', + 'LTrim', + 'Logoff', + 'LogEvent', + 'LoadKey', + 'LoadHive', + 'Len', + 'Left', + 'LCase', + 'KeyExist', + 'KbHit', + 'Join', + 'IsDeclared', + 'Int', + 'InStrRev', + 'InStr', + 'InGroup', + 'IIF', + 'GetObject', + 'GetFileVersion', + 'GetFileTime', + 'GetFileSize', + 'GetFileAttr', + 'GetDiskSpace', + 'FreeFileHandle', + 'FormatNumber', + 'Fix', + 'ExpandEnvironmentVars', + 'Exist', + 'Execute', + 'EnumValue', + 'EnumLocalGroup', + 'EnumKey', + 'EnumIpInfo', + 'EnumGroup', + 'Dir', + 'DelValue', + 'DelTree', + 'DelProgramItem', + 'DelProgramGroup', + 'DelPrinterConnection', + 'DelKey', + 'DecToHex', + 'CStr', + 'CreateObject', + 'CompareFileTimes', + 'Close', + 'ClearEventLog', + 'CInt', + 'Chr', + 'CDbl', + 'Box', + 'BackupEventLog', + 'At', + 'AScan', + 'Asc', + 'AddProgramItem', + 'AddProgramGroup', + 'AddPrinterConnection', + 'AddKey', + 'Abs' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '?', ':', '+', '-', '*', '/', '&', '|', '^', '~', '<', '>', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://www.kixtart.org/manual/Commands/{FNAME}.htm', + 2 => '', + 3 => 'http://www.kixtart.org/manual/Functions/{FNAME}.htm', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/inc/geshi/latex.php b/inc/geshi/latex.php index 3638efd49dcdb2618ec1c9b9d87e95d4ccdc2144..bba951cd3209c310d9cf161b54333dd2b8d6da20 100644 --- a/inc/geshi/latex.php +++ b/inc/geshi/latex.php @@ -4,7 +4,7 @@ * ----- * Author: efi, Matthias Pospiech (mail@matthiaspospiech.de) * Copyright: (c) 2006 efi, Matthias Pospiech (mail@matthiaspospiech.de), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/09/23 * * LaTeX language file for GeSHi. @@ -69,16 +69,19 @@ $language_data = array ( 1 => 'color: #808080; font-style: italic;' ), 'ESCAPE_CHAR' => array( + 0 => 'color: #000000; font-weight: bold;' ), 'BRACKETS' => array( ), 'STRINGS' => array( + 0 => 'color: #000000;' ), 'NUMBERS' => array( ), 'METHODS' => array( ), 'SYMBOLS' => array( + 1 => 'color: #800000; font-weight: bold;' ), 'REGEXPS' => array( 1 => 'color: #00A000; font-weight: bold;', // Math inner @@ -92,6 +95,7 @@ $language_data = array ( //9 => 'color: #F00000; font-weight: normal;', // Structure 10 => 'color: #0000D0; font-weight: bold;', // Environment 11 => 'color: #0000D0; font-weight: bold;', // Environment + 12 => 'color: #800000; font-weight: normal;', // Escaped char ), 'SCRIPT' => array( ) @@ -138,7 +142,7 @@ $language_data = array ( 5 => array( GESHI_SEARCH => "(\\$)(.+)(\\$)", GESHI_REPLACE => '\1\2\3', - GESHI_MODIFIERS => '', + GESHI_MODIFIERS => 'U', GESHI_BEFORE => '', GESHI_AFTER => '' ), @@ -166,26 +170,36 @@ $language_data = array ( GESHI_BEFORE => '', GESHI_AFTER => '\\3' ), -// Structure: sections -/*9 => array( + // Structure: sections + /*9 => array( GESHI_SEARCH => "(\\\\)(part|chapter|section|subsection|subsubsection|paragraph|subparagraph)(?=[^a-zA-Z])", GESHI_REPLACE => '\1\\2', GESHI_MODIFIERS => '', GESHI_BEFORE => '', GESHI_AFTER => '\\3' ),*/ -// environment begin -10 => array( + + // environment begin + 10 => array( GESHI_SEARCH => "(\\\\begin)(\\{)(.*)(\\})", GESHI_REPLACE => '\\3', - GESHI_MODIFIERS => '', + GESHI_MODIFIERS => 'U', GESHI_BEFORE => '', GESHI_AFTER => '' ), -// environment end -11 => array( + // environment end + 11 => array( GESHI_SEARCH => "(\\\\end)(\\{)(.*)(\\})", GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => 'U', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + + // environment end + 12 => array( + GESHI_SEARCH => "(\\\\[_$%])", + GESHI_REPLACE => '\\1', GESHI_MODIFIERS => '', GESHI_BEFORE => '', GESHI_AFTER => '' @@ -197,7 +211,12 @@ $language_data = array ( 'SCRIPT_DELIMITERS' => array( ), 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '\\' ) + ) ); ?> diff --git a/inc/geshi/lisp.php b/inc/geshi/lisp.php index 7d96b9d19f3287a6de795591f4a24a7fd57ede67..f7f655ecc9421391a0d8ca9bbdcab94812ca3c41 100644 --- a/inc/geshi/lisp.php +++ b/inc/geshi/lisp.php @@ -4,7 +4,7 @@ * -------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/08/30 * * Generic Lisp language file for GeSHi. diff --git a/inc/geshi/lotusformulas.php b/inc/geshi/lotusformulas.php new file mode 100644 index 0000000000000000000000000000000000000000..80b8d670d6e6f4acdb2d46397201e890f89e89bd --- /dev/null +++ b/inc/geshi/lotusformulas.php @@ -0,0 +1,314 @@ +<?php +/************************************************************************************* + * lotusformulas.php + * ------------------------ + * Author: Richard Civil (info@richardcivil.net) + * Copyright: (c) 2008 Richard Civil (info@richardcivil.net), Nigel McNie (http://qbnz.com/highlighter) + * Release Version: 1.0.7.22 + * Date Started: 2008/04/12 + * + * @Formula/@Command language file for GeSHi. + * + * @Formula/@Command source: IBM Lotus Notes/Domino 8 Designer Help + * + * CHANGES + * ------- + * 2008/04/12 (1.0.7.22) + * - First Release + * + * TODO (updated 2008/04/12) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'Lotus Notes @Formulas', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array('REM' => ';'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array ( + '[ZoomPreview]', '[WorkspaceStackReplicaIcons]', + '[WorkspaceProperties]', '[WindowWorkspace]', + '[WindowTile]', '[WindowRestore]', '[WindowNext]', + '[WindowMinimizeAll]', '[WindowMinimize]', '[WindowMaximizeAll]', + '[WindowMaximize]', '[WindowCascade]', '[ViewSwitchForm]', + '[ViewShowUnread]', '[ViewShowServerNames]', '[ViewShowSearchBar]', + '[ViewShowRuler]', '[ViewShowPageBreaks]', '[ViewShowOnlyUnread]', + '[ViewShowOnlySelected]', '[ViewShowOnlySearchResults]', + '[ViewShowOnlyCategories]', '[ViewShowObject]', + '[ViewShowFieldHelp]', '[ViewRenamePerson]', '[ViewRefreshUnread]', + '[ViewRefreshFields]', '[ViewNavigatorsNone]', + '[ViewNavigatorsFolders]', '[ViewMoveName]', '[ViewHorizScrollbar]', + '[ViewExpandWithChildren]', '[ViewExpandAll]', '[ViewExpand]', + '[ViewCollapseAll]', '[ViewCollapse]', '[ViewChange]', + '[ViewCertify]', '[ViewBesideFolders]', '[ViewBelowFolders]', + '[ViewArrangeIcons]', '[V3EditPrevField]', '[V3EditNextField]', + '[UserIDSwitch]', '[UserIDSetPassword]', '[UserIDMergeCopy]', + '[UserIDInfo]', '[UserIDEncryptionKeys]', '[UserIDCreateSafeCopy]', + '[UserIDClearPassword]', '[UserIDCertificates]', + '[ToolsUserLogoff]', '[ToolsSpellCheck]', '[ToolsSmartIcons]', + '[ToolsSetupUserSetup]', '[ToolsSetupPorts]', '[ToolsSetupMail]', + '[ToolsSetupLocation]', '[ToolsScanUnreadSelected]', + '[ToolsScanUnreadPreferred]', '[ToolsScanUnreadChoose]', + '[ToolsRunMacro]', '[ToolsRunBackgroundMacros]', '[ToolsReplicate]', + '[ToolsRefreshSelectedDocs]', '[ToolsRefreshAllDocs]', + '[ToolsMarkSelectedUnread]', '[ToolsMarkSelectedRead]', + '[ToolsMarkAllUnread]', '[ToolsMarkAllRead]', '[ToolsHangUp]', + '[ToolsCategorize]', '[ToolsCall]', '[TextUnderline]', + '[TextSpacingSingle]', '[TextSpacingOneAndaHalf]', + '[TextSpacingDouble]', '[TextSetFontSize]', '[TextSetFontFace]', + '[TextSetFontColor]', '[TextReduceFont]', '[TextPermanentPen]', + '[TextParagraphStyles]', '[TextParagraph]', '[TextOutdent]', + '[TextNumbers]', '[TextNormal]', '[TextItalic]', '[TextFont]', + '[TextEnlargeFont]', '[TextCycleSpacing]', '[TextBullet]', + '[TextBold]', '[TextAlignRight]', '[TextAlignNone]', + '[TextAlignLeft]', '[TextAlignFull]', '[TextAlignCenter]', + '[SwitchView]', '[SwitchForm]', '[StyleCycleKey]', + '[SmartIconsNextSet]', '[SmartIconsFloating]', '[ShowProperties]', + '[ShowHidePreviewPane]', '[ShowHideParentPreview]', + '[ShowHideLinkPreview]', '[ShowHideIMContactList]', + '[SetCurrentLocation]', '[SendInstantMessage]', + '[SectionRemoveHeader]', '[SectionProperties]', + '[SectionExpandAll]', '[SectionExpand]', '[SectionDefineEditors]', + '[SectionCollapseAll]', '[SectionCollapse]', '[RunScheduledAgents]', + '[RunAgent]', '[ReplicatorStop]', '[ReplicatorStart]', + '[ReplicatorSendReceiveMail]', '[ReplicatorSendMail]', + '[ReplicatorReplicateWithServer]', '[ReplicatorReplicateSelected]', + '[ReplicatorReplicateNext]', '[ReplicatorReplicateHigh]', + '[Replicator]', '[RenameDatabase]', '[RemoveFromFolder]', + '[RemoteDebugLotusScript]', '[ReloadWindow]', '[RefreshWindow]', + '[RefreshParentNote]', '[RefreshHideFormulas]', '[RefreshFrame]', + '[PublishDatabase]', '[PictureProperties]', '[PasteBitmapAsObject]', + '[PasteBitmapAsBackground]', '[OpenView]', '[OpenPage]', + '[OpenNavigator]', '[OpenInNewWindow]', '[OpenHelpDocument]', + '[OpenFrameset]', '[OpenDocument]', '[OpenCalendar]', + '[ObjectProperties]', '[ObjectOpen]', '[ObjectDisplayAs]', + '[NavPrevUnread]', '[NavPrevSelected]', '[NavPrevMain]', + '[NavPrev]', '[NavNextUnread]', '[NavNextSelected]', + '[NavNextMain]', '[NavNext]', '[NavigatorTest]', + '[NavigatorProperties]', '[NavigateToBacklink]', + '[NavigatePrevUnread]', '[NavigatePrevSelected]', + '[NavigatePrevMain]', '[NavigatePrevHighlight]', '[NavigatePrev]', + '[NavigateNextUnread]', '[NavigateNextSelected]', + '[NavigateNextMain]', '[NavigateNextHighlight]', '[NavigateNext]', + '[MoveToTrash]', '[MailSendPublicKey]', '[MailSendEncryptionKey]', + '[MailSendCertificateRequest]', '[MailSend]', '[MailScanUnread]', + '[MailRequestNewPublicKey]', '[MailRequestNewName]', + '[MailRequestCrossCert]', '[MailOpen]', '[MailForwardAsAttachment]', + '[MailForward]', '[MailComposeMemo]', '[MailAddress]', + '[LayoutProperties]', '[LayoutElementSendToBack]', + '[LayoutElementProperties]', '[LayoutElementBringToFront]', + '[LayoutAddText]', '[LayoutAddGraphic]', '[InsertSubform]', + '[HotspotProperties]', '[HotspotClear]', '[HelpUsingDatabase]', + '[HelpAboutNotes]', '[HelpAboutDatabase]', '[GoUpLevel]', + '[FormTestDocument]', '[FormActions]', '[FolderRename]', + '[FolderProperties]', '[FolderMove]', '[FolderExpandWithChildren]', + '[FolderExpandAll]', '[FolderExpand]', '[FolderDocuments]', + '[FolderCustomize]', '[FolderCollapse]', '[Folder]', + '[FindFreeTimeDialog]', '[FileSaveNewVersion]', '[FileSave]', + '[FilePrintSetup]', '[FilePrint]', '[FilePageSetup]', + '[FileOpenDBRepID]', '[FileOpenDatabase]', '[FileNewReplica]', + '[FileNewDatabase]', '[FileImport]', '[FileFullTextUpdate]', + '[FileFullTextInfo]', '[FileFullTextDelete]', + '[FileFullTextCreate]', '[FileExport]', '[FileExit]', + '[FileDatabaseUseServer]', '[FileDatabaseRemove]', + '[FileDatabaseInfo]', '[FileDatabaseDelete]', '[FileDatabaseCopy]', + '[FileDatabaseCompact]', '[FileDatabaseACL]', '[FileCloseWindow]', + '[ExitNotes]', '[Execute]', '[ExchangeUnreadMarks]', '[EmptyTrash]', + '[EditUp]', '[EditUntruncate]', '[EditUndo]', '[EditTop]', + '[EditTableInsertRowColumn]', '[EditTableFormat]', + '[EditTableDeleteRowColumn]', '[EditShowHideHiddenChars]', + '[EditSelectByDate]', '[EditSelectAll]', '[EditRight]', + '[EditRestoreDocument]', '[EditResizePicture]', + '[EditQuoteSelection]', '[EditProfileDocument]', '[EditProfile]', + '[EditPrevField]', '[EditPhoneNumbers]', '[EditPasteSpecial]', + '[EditPaste]', '[EditOpenLink]', '[EditNextField]', + '[EditMakeDocLink]', '[EditLocations]', '[EditLinks]', '[EditLeft]', + '[EditInsertText]', '[EditInsertTable]', '[EditInsertPopup]', + '[EditInsertPageBreak]', '[EditInsertObject]', + '[EditInsertFileAttachment]', '[EditInsertButton]', + '[EditIndentFirstLine]', '[EditIndent]', '[EditHorizScrollbar]', + '[EditHeaderFooter]', '[EditGotoField]', '[EditFindNext]', + '[EditFindInPreview]', '[EditFind]', '[EditEncryptionKeys]', + '[EditDown]', '[EditDocument]', '[EditDetach]', '[EditDeselectAll]', + '[EditCut]', '[EditCopy]', '[EditClear]', '[EditButton]', + '[EditBottom]', '[DiscoverFolders]', '[Directories]', + '[DialingRules]', '[DesignViewSelectFormula]', '[DesignViews]', + '[DesignViewNewColumn]', '[DesignViewFormFormula]', + '[DesignViewEditActions]', '[DesignViewColumnDef]', + '[DesignViewAttributes]', '[DesignViewAppendColumn]', + '[DesignSynopsis]', '[DesignSharedFields]', '[DesignReplace]', + '[DesignRefresh]', '[DesignMacros]', '[DesignIcon]', + '[DesignHelpUsingDocument]', '[DesignHelpAboutDocument]', + '[DesignFormWindowTitle]', '[DesignFormUseField]', + '[DesignFormShareField]', '[DesignForms]', '[DesignFormNewField]', + '[DesignFormFieldDef]', '[DesignFormAttributes]', + '[DesignDocumentInfo]', '[DebugLotusScript]', + '[DatabaseReplSettings]', '[DatabaseDelete]', '[CreateView]', + '[CreateTextbox]', '[CreateSubForm]', '[CreateSection]', + '[CreateRectangularHotspot]', '[CreateRectangle]', + '[CreatePolyline]', '[CreatePolygon]', '[CreateNavigator]', + '[CreateLayoutRegion]', '[CreateForm]', '[CreateFolder]', + '[CreateEllipse]', '[CreateControlledAccessSection]', + '[CreateAgent]', '[CreateAction]', '[CopySelectedAsTable]', + '[ComposeWithReference]', '[Compose]', '[CloseWindow]', '[Clear]', + '[ChooseFolders]', '[CalendarGoTo]', '[CalendarFormat]', + '[AttachmentView]', '[AttachmentProperties]', '[AttachmentLaunch]', + '[AttachmentDetachAll]', '[AgentTestRun]', '[AgentSetServerName]', + '[AgentRun]', '[AgentLog]', '[AgentEnableDisable]', '[AgentEdit]', + '[AdminTraceConnection]', '[AdminStatisticsConfig]', + '[AdminSendMailTrace]', '[AdminRemoteConsole]', + '[AdminRegisterUser]', '[AdminRegisterServer]', + '[AdminRegisterFromFile]', '[AdminOutgoingMail]', + '[AdminOpenUsersView]', '[AdminOpenStatistics]', + '[AdminOpenServersView]', '[AdminOpenServerLog]', + '[AdminOpenGroupsView]', '[AdminOpenCertLog]', '[AdminOpenCatalog]', + '[AdminOpenAddressBook]', '[AdminNewOrgUnit]', + '[AdminNewOrganization]', '[Administration]', + '[AdminIDFileSetPassword]', '[AdminIDFileExamine]', + '[AdminIDFileClearPassword]', '[AdminDatabaseQuotas]', + '[AdminDatabaseAnalysis]', '[AdminCrossCertifyKey]', + '[AdminCrossCertifyIDFile]', '[AdminCreateGroup]', '[AdminCertify]', + '[AddToIMContactList]', '[AddDatabaseRepID]', '[AddDatabase]', + '[AddBookmark]' + ), + 2 => array( + 'SELECT', 'FIELD', 'ENVIRONMENT', 'DEFAULT', '@Zone ', '@Yesterday', + '@Yes', '@Year', '@Word', '@Wide', '@While', '@Weekday', + '@WebDbName', '@ViewTitle', '@ViewShowThisUnread', '@Version', + '@VerifyPassword', '@ValidateInternetAddress', '@V4UserAccess', + '@V3UserName', '@V2If', '@UserRoles', '@UserPrivileges', + '@UserNamesList', '@UserNameLanguage', '@UserName', '@UserAccess', + '@UrlQueryString', '@URLOpen', '@URLHistory', '@URLGetHeader', + '@URLEncode', '@URLDecode', '@UpperCase', '@UpdateFormulaContext', + '@Unique', '@UndeleteDocument', '@Unavailable', '@True', '@Trim', + '@Transform', '@ToTime', '@ToNumber', '@Tomorrow', '@Today', + '@TimeZoneToText', '@TimeToTextInZone', '@TimeMerge', '@Time', + '@ThisValue', '@ThisName', '@TextToTime', '@TextToNumber', '@Text', + '@TemplateVersion', '@Tan', '@Sum', '@Success', '@Subset', + '@StatusBar', '@Sqrt', '@Soundex', '@Sort', '@Sin', '@Sign', + '@SetViewInfo', '@SetTargetFrame', '@SetProfileField', + '@SetHTTPHeader', '@SetField', '@SetEnvironment', '@SetDocField', + '@Set', '@ServerName', '@ServerAccess', '@Select', '@Second', + '@Round', '@RightBack', '@Right', '@Return', '@Responses', + '@ReplicaID', '@ReplaceSubstring', '@Replace', '@Repeat', + '@RegQueryValue', '@RefreshECL', '@Random', '@ProperCase', + '@Prompt', '@Power', '@PostedCommand', '@PolicyIsFieldLocked', + '@Platform', '@PickList', '@Pi', '@PasswordQuality', '@Password', + '@OrgDir', '@OptimizeMailAddress', '@OpenInNewWindow', '@Now', + '@Nothing', '@NoteID', '@No', '@NewLine', '@Narrow', '@NameLookup', + '@Name', '@Month', '@Modulo', '@Modified', '@Minute', '@Min', + '@MiddleBack', '@Middle', '@Member', '@Max', '@Matches', + '@MailSignPreference', '@MailSend', '@MailSavePreference', + '@MailEncryptSentPreference', '@MailEncryptSavedPreference', + '@MailDbName', '@LowerCase', '@Log', '@Locale', '@Ln', '@Like', + '@Length', '@LeftBack', '@Left', '@LDAPServer', '@LaunchApp', + '@LanguagePreference', '@Keywords', '@IsVirtualizedDirectory', + '@IsValid', '@IsUsingJavaElement', '@IsUnavailable', '@IsTime', + '@IsText', '@IsResponseDoc', '@IsNumber', '@IsNull', '@IsNotMember', + '@IsNewDoc', '@IsModalHelp', '@IsMember', '@IsExpandable', + '@IsError', '@IsEmbeddedInsideWCT', '@IsDocTruncated', + '@IsDocBeingSaved', '@IsDocBeingRecalculated', '@IsDocBeingMailed', + '@IsDocBeingLoaded', '@IsDocBeingEdited', '@IsDB2', '@IsCategory', + '@IsAvailable', '@IsAppInstalled', '@IsAgentEnabled', '@Integer', + '@InheritedDocumentUniqueID', '@Implode', '@IfError', '@If', + '@Hour', '@HashPassword', '@HardDeleteDocument', '@GetViewInfo', + '@GetProfileField', '@GetPortsList', '@GetIMContactListGroupNames', + '@GetHTTPHeader', '@GetFocusTable', '@GetField', '@GetDocField', + '@GetCurrentTimeZone', '@GetAddressBooks', '@FormLanguage', '@For', + '@FontList', '@FloatEq', '@FileDir', '@False', '@Failure', + '@Explode', '@Exp', '@Eval', '@Error', '@Environment', '@Ends', + '@EnableAlarms', '@Elements', '@EditUserECL', '@EditECL', + '@DoWhile', '@Domain', '@DocumentUniqueID', '@DocSiblings', + '@DocParentNumber', '@DocOmmittedLength', '@DocNumber', '@DocMark', + '@DocLock', '@DocLevel', '@DocLength', '@DocFields', + '@DocDescendants', '@DocChildren', '@Do', '@DialogBox', + '@DeleteField', '@DeleteDocument', '@DDETerminate', '@DDEPoke', + '@DDEInitiate', '@DDEExecute', '@DbTitle', '@DbName', '@DbManager', + '@DbLookup', '@DbExists', '@DbCommand', '@DbColumn', '@DB2Schema', + '@Day', '@Date', '@Created', '@Count', '@Cos', '@Contains', + '@ConfigFile', '@Compare', '@Command', '@ClientType', + '@CheckFormulaSyntax', '@CheckAlarms', '@Char', '@Certificate', + '@BusinessDays', '@BrowserInfo', '@Begins', '@Author', + '@Attachments', '@AttachmentNames', '@AttachmentModifiedTimes', + '@AttachmentLengths', '@ATan2', '@ATan', '@ASin', '@Ascii', + '@AllDescendants', '@AllChildren', '@All', '@AdminECLIsLocked', + '@Adjust', '@AddToFolder', '@ACos', '@Accessed', '@AbstractSimple', + '@Abstract', '@Abs' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #800000;', + 2 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #FF00FF;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF00FF;' + ), + 'METHODS' => array( + 1 => 'color: #0000AA;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 2 + ); + +?> diff --git a/inc/geshi/lotusscript.php b/inc/geshi/lotusscript.php new file mode 100644 index 0000000000000000000000000000000000000000..b244fc8b389d80ff6b0264c290b2176b0e474e8a --- /dev/null +++ b/inc/geshi/lotusscript.php @@ -0,0 +1,186 @@ +<?php +/** + * lotusscript.php + * ------------------------ + * Author: Richard Civil (info@richardcivil.net) + * Copyright: (c) 2008 Richard Civil (info@richardcivil.net), Nigel McNie (http://qbnz.com/highlighter) + * Release Version: 1.0.7.22 + * Date Started: 2008/04/12 + * + * LotusScript language file for GeSHi. + * + * LotusScript source: IBM Lotus Notes/Domino 8 Designer Help + * + * CHANGES + * ------- + * 2008/04/12 (1.0.7.22) + * - First Release + * + * TODO (2008/04/12) + * ----------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'LotusScript', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array('%REM' => '%END REM'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"' , "|"), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array ( + 'Yield', 'Year', 'Xor', 'Write', 'With', 'Width', 'While', 'Wend', + 'Weekday', 'VarType', 'Variant', 'Val', 'UString', 'UString$', + 'UseLSX', 'Use', 'Until', 'Unlock', 'Unicode', 'Uni', 'UChr', + 'UChr$', 'UCase', 'UCase$', 'UBound', 'TypeName', 'Type', 'TRUE', + 'Trim', 'Trim$', 'Today', 'To', 'TimeValue', 'TimeSerial', 'Timer', + 'TimeNumber', 'Time', 'Time$', 'Then', 'Text', 'Tan', 'Tab', 'Sub', + 'StrToken', 'StrToken$', 'StrRightBack', 'StrRightBack$', + 'StrRight', 'StrRight$', 'StrLeftBack', 'StrLeftBack$', 'StrLeft', + 'StrLeft$', 'String', 'String$', 'StrConv', 'StrCompare', 'StrComp', + 'Str', 'Str$', 'Stop', 'Step', 'Static', 'Sqr', 'Split', 'Spc', + 'Space', 'Space$', 'Sleep', 'Single', 'Sin', 'Shell', 'Shared', + 'Sgn', 'SetFileAttr', 'SetAttr', 'Set', 'SendKeys', 'Select', + 'Seek', 'Second', 'RTrim', 'RTrim$', 'RSet', 'Round', 'Rnd', + 'RmDir', 'RightC', 'RightC$', 'RightBP', 'RightBP$', 'RightB', + 'RightB$', 'Right', 'Right$', 'Return', 'Resume', 'Reset', + 'Replace', 'Remove', 'Rem', 'ReDim', 'Read', 'Randomize', + 'Random', 'Put', 'Public', 'Property', 'Private', 'Print', + 'Preserve', 'Pitch', 'PI', 'Output', 'Or', 'Option', 'Open', 'On', + 'Oct', 'Oct$', 'NULL', 'Now', 'NOTHING', 'Not', 'NoPitch', 'NoCase', + 'Next', 'New', 'Name', 'MsgBox', 'Month', 'Mod', 'MkDir', 'Minute', + 'MidC', 'MidC$', 'MidBP', 'MidBP$', 'MidB', 'MidB$', 'Mid', 'Mid$', + 'MessageBox', 'Me', 'LTrim', 'LTrim$', 'LSServer', 'LSI_Info', + 'LSet', 'Loop', 'Long', 'Log', 'LOF', 'Lock', 'LOC', 'LMBCS', + 'ListTag', 'List', 'Line', 'Like', 'Lib', 'Let', 'LenC', 'LenBP', + 'LenB', 'Len', 'LeftC', 'LeftC$', 'LeftBP', 'LeftBP$', 'LeftB', + 'LeftB$', 'Left', 'Left$', 'LCase', 'LCase$', 'LBound', 'Kill', + 'Join', 'IsUnknown', 'IsScalar', 'IsObject', 'IsNumeric', 'IsNull', + 'IsList', 'IsEmpty', 'IsElement', 'IsDate', 'IsArray', 'IsA', 'Is', + 'Integer', 'Int', 'InStrC', 'InStrBP', 'InStrB', 'InStr', 'InputBP', + 'InputBP$', 'InputBox', 'InputBox$', 'InputB', 'InputB$', 'Input', + 'Input$', 'In', 'IMSetMode', 'Implode', 'Implode$', 'Imp', + 'IMEStatus', 'If', 'Hour', 'Hex', 'Hex$', 'Goto', 'GoSub', + 'GetThreadInfo', 'GetFileAttr', 'GetAttr', 'Get', 'Function', + 'FullTrim', 'From', 'FreeFile', 'Fraction', 'Format', 'Format$', + 'ForAll', 'For', 'Fix', 'FileLen', 'FileDateTime', 'FileCopy', + 'FileAttr', 'FALSE', 'Explicit', 'Exp', 'Exit', 'Execute', 'Event', + 'Evaluate', 'Error', 'Error$', 'Err', 'Erl', 'Erase', 'Eqv', 'EOF', + 'Environ', 'Environ$', 'End', 'ElseIf', 'Else', 'Double', 'DoEvents', + 'Do', 'Dir', 'Dir$', 'Dim', 'DestroyLock', 'Delete', 'DefVar', + 'DefStr', 'DefSng', 'DefLng', 'DefInt', 'DefDbl', 'DefCur', + 'DefByte', 'DefBool', 'Declare', 'Day', 'DateValue', 'DateSerial', + 'DateNumber', 'Date', 'Date$', 'DataType', 'CVDate', 'CVar', + 'Currency', 'CurDrive', 'CurDrive$', 'CurDir', 'CurDir$', 'CStr', + 'CSng', 'CreateLock', 'Cos', 'Const', 'Compare', 'Command', + 'Command$', 'CodeUnlock', 'CodeLockCheck', 'CodeLock', 'Close', + 'CLng', 'Class', 'CInt', 'Chr', 'Chr$', 'ChDrive', 'ChDir', 'CDbl', + 'CDat', 'CCur', 'CByte', 'CBool', 'Case', 'Call', 'ByVal', 'Byte', + 'Boolean', 'Bind', 'Binary', 'Bin', 'Bin$', 'Beep', 'Base', 'Atn2', + 'Atn', 'ASin', 'Asc', 'As', 'ArrayUnique', 'ArrayReplace', + 'ArrayGetIndex', 'ArrayAppend', 'Append', 'AppActivate', 'Any', + 'And', 'Alias', 'ActivateApp', 'ACos', 'Access', 'Abs', '%Include', + '%If', '%END', '%ElseIf', '%Else' + ), + 2 => array ( + 'NotesXSLTransformer', 'NotesXMLProcessor', 'NotesViewNavigator', + 'NotesViewEntryCollection', 'NotesViewEntry', 'NotesViewColumn', + 'NotesView', 'NotesUIWorkspace', 'NotesUIView', 'NotesUIScheduler', + 'NotesUIDocument', 'NotesUIDatabase', 'NotesTimer', 'NotesStream', + 'NotesSession', 'NotesSAXParser', 'NotesSAXException', + 'NotesSAXAttributeList', 'NotesRichTextTable', 'NotesRichTextTab', + 'NotesRichTextStyle', 'NotesRichTextSection', 'NotesRichTextRange', + 'NotesRichTextParagraphStyle', 'NotesRichTextNavigator', + 'NotesRichTextItem', 'NotesRichTextDocLink', + 'NotesReplicationEntry', 'NotesReplication', 'NotesRegistration', + 'NotesOutlineEntry', 'NotesOutline', 'NotesNoteCollection', + 'NotesNewsLetter', 'NotesName', 'NotesMIMEHeader', + 'NotesMIMEEntity', 'NotesLog', 'NotesItem', 'NotesInternational', + 'NotesForm', 'NotesEmbeddedObject', 'NotesDXLImporter', + 'NotesDXLExporter', 'NotesDOMXMLDeclNode', 'NotesDOMTextNode', + 'NotesDOMProcessingInstructionNode', 'NotesDOMParser', + 'NotesDOMNotationNode', 'NotesDOMNodeList', 'NotesDOMNode', + 'NotesDOMNamedNodeMap', 'NotesDOMEntityReferenceNode', + 'NotesDOMEntityNode', 'NotesDOMElementNode', + 'NotesDOMDocumentTypeNode', 'NotesDOMDocumentNode', + 'NotesDOMDocumentFragmentNode', 'NotesDOMCommentNode', + 'NotesDOMCharacterDataNote', 'NotesDOMCDATASectionNode', + 'NotesDOMAttributeNode', 'NotesDocumentCollection', 'NotesDocument', + 'NotesDbDirectory', 'NotesDateTime', 'NotesDateRange', + 'NotesDatabase', 'NotesColorObject', 'NotesAgent', + 'NotesAdministrationProcess', 'NotesACLEntry', 'NotesACL', + 'Navigator', 'Field', 'Button' + ) + ) , + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000EE;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #000000;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF00FF;' + ), + 'METHODS' => array( + 1 => 'color: #0000AA;' + ), + 'SYMBOLS' => array( + 0 => 'color: #006600;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 2 +); + +?> diff --git a/inc/geshi/lua.php b/inc/geshi/lua.php index 6ae651de4b51b2e77cd0c923aa337b8253737e5f..c806cbf4e9a1fd854388c0a025d91e280e12a647 100644 --- a/inc/geshi/lua.php +++ b/inc/geshi/lua.php @@ -4,7 +4,7 @@ * ------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/07/10 * * LUA language file for GeSHi. diff --git a/inc/geshi/m68k.php b/inc/geshi/m68k.php index 27cf48bf1bd003fd32454a83cfb1f8f8d19e856f..000c0e8f8f9525848eaa69060baaf30dfc439fa7 100644 --- a/inc/geshi/m68k.php +++ b/inc/geshi/m68k.php @@ -4,7 +4,7 @@ * -------- * Author: Benny Baumann (BenBE@omorphia.de) * Copyright: (c) 2007 Benny Baumann (http://www.omorphia.de/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2007/02/06 * * Motorola 68000 Assembler language file for GeSHi. @@ -14,6 +14,8 @@ * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2007/06/02 (1.0.0) * - First Release * @@ -120,9 +122,12 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( + //Hex numbers 0 => '#?0[0-9a-fA-F]{1,32}[hH]', + //Binary numbers 1 => '\%[01]{1,64}[bB]', - 2 => '^[_a-zA-Z][_a-zA-Z0-9]{0,50}\:' + //Labels + 2 => '^[_a-zA-Z][_a-zA-Z0-9]*?\:' ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( diff --git a/inc/geshi/matlab.php b/inc/geshi/matlab.php index 32ccabd37c63392173f4110a5ea45874904fa574..31a67d3e0b966954cefd3877ff21d3fb9c189082 100644 --- a/inc/geshi/matlab.php +++ b/inc/geshi/matlab.php @@ -4,14 +4,14 @@ * ----------- * Author: Florian Knorn (floz@gmx.de) * Copyright: (c) 2004 Florian Knorn (http://www.florian-knorn.com) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/02/09 * * Matlab M-file language file for GeSHi. * * CHANGES * ------- - * 2006-03-25 + * 2006-03-25 (1.0.7.22) * - support for the transpose operator * - many keywords added * - links to the matlab documentation at mathworks @@ -44,6 +44,8 @@ $language_data = array ( 'LANG_NAME' => 'Matlab M', 'COMMENT_SINGLE' => array(1 => '%'), 'COMMENT_MULTI' => array(), + //Matlab Strings + 'COMMENT_REGEXP' => array(2 => "/(?<!\\w)('[^\\n\\r']*?')/"), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array(), 'ESCAPE_CHAR' => '', @@ -54,744 +56,114 @@ $language_data = array ( 'switch', 'try', 'while','...' ), 2 => array( - 'all', - 'any', - 'exist', - 'find', - 'is', - 'isa', - 'logical', - 'mislocked', + 'all','any','exist','find','is','isa','logical','mislocked', - 'builtin', - 'eval', - 'evalc', - 'evalin', - 'feval', - 'function', - 'global', - 'nargchk', - 'persistent', - 'script', - 'break', - 'case', - 'catch', - 'else', - 'elseif', - 'end', - 'error', - 'for', - 'if', - 'otherwise', - 'return', - 'switch', - 'try', - 'warning', - 'while', - 'input', - 'keyboard', - 'menu', - 'pause', - 'class', - 'double', - 'inferiorto', - 'inline', - 'int8', - 'int16', - 'int32', - 'isa', - 'loadobj', - 'saveobj', - 'single', - 'superiorto', - 'uint8', - 'int16', - 'uint32', - 'dbclear', - 'dbcont', - 'dbdown', - 'dbmex', - 'dbquit', - 'dbstack', - 'dbstatus', - 'dbstep', - 'dbstop', - 'dbtype', - 'dbup', - - 'blkdiag', - 'eye', - 'linspace', - 'logspace', - 'ones', - 'rand', - 'randn', - 'zeros', - 'ans', - 'computer', - 'eps', - 'flops', - 'i', - 'Inf', - 'inputname', - 'j', - 'NaN', - 'nargin', - 'nargout', - 'pi', - 'realmax', - 'realmin', - 'varargin', - 'varargout', - 'calendar', - 'clock', - 'cputime', - 'date', - 'datenum', - 'datestr', - 'datevec', - 'eomday', - 'etime', - 'now', - 'tic', - 'toc', - 'weekday', - 'cat', - 'diag', - 'fliplr', - 'flipud', - 'repmat', - 'reshape', - 'rot90', - 'tril', - 'triu', - 'compan', - 'gallery', - 'hadamard', - 'hankel', - 'hilb', - 'invhilb', - 'magic', - 'pascal', - 'toeplitz', - 'wilkinson', - 'abs', - 'acos', - 'acosh', - 'acot', - 'acoth', - 'acsc', - 'acsch', - 'angle', - 'asec', - 'asech', - 'asin', - 'asinh', - 'atan', - 'atanh', - 'atan2', - 'ceil', - 'complex', - 'conj', - 'cos', - 'cosh', - 'cot', - 'coth', - 'csc', - 'csch', - 'exp', - 'fix', - 'floor', - 'gcd', - 'imag', - 'lcm', - 'log', - 'log2', - 'log10', - 'mod', - 'nchoosek', - 'real', - 'rem', - 'round', - 'sec', - 'sech', - 'sign', - 'sin', - 'sinh', - 'sqrt', - 'tan', - 'tanh', - 'airy', - 'besselh', - 'besseli', - 'besselk', - 'besselj', - 'Bessely', - 'beta', - 'betainc', - 'betaln', - 'ellipj', - 'ellipke', - 'erf', - 'erfc', - 'erfcx', - 'erfiny', - 'expint', - 'factorial', - 'gamma', - 'gammainc', - 'gammaln', - 'legendre', - 'pow2', - 'rat', - 'rats', - 'cart2pol', - 'cart2sph', - 'pol2cart', - 'sph2cart', - 'abs', - 'eval', - 'real', - 'strings', - 'deblank', - 'findstr', - 'lower', - 'strcat', - 'strcmp', - 'strcmpi', - 'strjust', - 'strmatch', - 'strncmp', - 'strrep', - 'strtok', - 'strvcat', - 'symvar', - 'texlabel', - 'upper', - 'char', - 'int2str', - 'mat2str', - 'num2str', - 'sprintf', - 'sscanf', - 'str2double', - 'str2num', - 'bin2dec', - 'dec2bin', - 'dec2hex', - 'hex2dec', - 'hex2num', - 'fclose', - 'fopen', - 'fread', - 'fwrite', - 'fgetl', - 'fgets', - 'fprintf', - 'fscanf', - 'feof', - 'ferror', - 'frewind', - 'fseek', - 'ftell', - 'sprintf', - 'sscanf', - 'dlmread', - 'dlmwrite', - 'hdf', - 'imfinfo', - 'imread', - 'imwrite', - 'textread', - 'wk1read', - 'wk1write', - 'bitand', - 'bitcmp', - 'bitor', - 'bitmax', - 'bitset', - 'bitshift', - 'bitget', - 'bitxor', - 'fieldnames', - 'getfield', - 'rmfield', - 'setfield', - 'struct', - 'struct2cell', - 'class', - 'isa', - 'cell', - 'cellfun', - 'cellstr', - 'cell2struct', - 'celldisp', - 'cellplot', - 'num2cell', - 'cat', - 'flipdim', - 'ind2sub', - 'ipermute', - 'ndgrid', - 'ndims', - 'permute', - 'reshape', - 'shiftdim', - 'squeeze', - 'sub2ind', - 'cond', - 'condeig', - 'det', - 'norm', - 'null', - 'orth', - 'rank', - 'rcond', - 'rref', - 'rrefmovie', - 'subspace', - 'trace', - 'chol', - 'inv', - 'lscov', - 'lu', - 'nnls', - 'pinv', - 'qr', - 'balance', - 'cdf2rdf', - 'eig', - 'gsvd', - 'hess', - 'poly', - 'qz', - 'rsf2csf', - 'schur', - 'svd', - 'expm', - 'funm', - 'logm', - 'sqrtm', - 'qrdelete', - 'qrinsert', - 'bar', - 'barh', - 'hist', - 'hold', - 'loglog', - 'pie', - 'plot', - 'polar', - 'semilogx', - 'semilogy', - 'subplot', - 'bar3', - 'bar3h', - 'comet3', - 'cylinder', - 'fill3', - 'plot3', - 'quiver3', - 'slice', - 'sphere', - 'stem3', - 'waterfall', - 'clabel', - 'datetick', - 'grid', - 'gtext', - 'legend', - 'plotyy', - 'title', - 'xlabel', - 'ylabel', - 'zlabel', - 'contour', - 'contourc', - 'contourf', - 'hidden', - 'meshc', - 'mesh', - 'peaks', - 'surf', - 'surface', - 'surfc', - 'surfl', - 'trimesh', - 'trisurf', - 'coneplot', - 'contourslice', - 'isocaps', - 'isonormals', - 'isosurface', - 'reducepatch', - 'reducevolume', - 'shrinkfaces', - 'smooth3', - 'stream2', - 'stream3', - 'streamline', - 'surf2patch', - 'subvolume', - 'griddata', - 'meshgrid', - 'area', - 'box', - 'comet', - 'compass', - 'errorbar', - 'ezcontour', - 'ezcontourf', - 'ezmesh', - 'ezmeshc', - 'ezplot', - 'ezplot3', - 'ezpolar', - 'ezsurf', - 'ezsurfc', - 'feather', - 'fill', - 'fplot', - 'pareto', - 'pie3', - 'plotmatrix', - 'pcolor', - 'rose', - 'quiver', - 'ribbon', - 'stairs', - 'scatter', - 'scatter3', - 'stem', - 'convhull', - 'delaunay', - 'dsearch', - 'inpolygon', - 'polyarea', - 'tsearch', - 'voronoi', - 'camdolly', - 'camlookat', - 'camorbit', - 'campan', - 'campos', - 'camproj', - 'camroll', - 'camtarget', - 'camup', - 'camva', - 'camzoom', - 'daspect', - 'pbaspect', - 'view', - 'viewmtx', - 'xlim', - 'ylim', - 'zlim', - 'camlight', - 'diffuse', - 'lighting', - 'lightingangle', - 'material', - 'specular', - 'brighten', - 'bwcontr', - 'caxis', - 'colorbar', - 'colorcube', - 'colordef', - 'colormap', - 'graymon', - 'hsv2rgb', - 'rgb2hsv', - 'rgbplot', - 'shading', - 'spinmap', - 'surfnorm', - 'whitebg', - 'autumn', - 'bone', - 'contrast', - 'cool', - 'copper', - 'flag', - 'gray', - 'hot', - 'hsv', - 'jet', - 'lines', - 'prism', - 'spring', - 'summer', - 'winter', - 'orient', - 'print', - 'printopt', - 'saveas', - 'copyobj', - 'findobj', - 'gcbo', - 'gco', - 'get', - 'rotate', - 'ishandle', - 'set', - 'axes', - 'figure', - 'image', - 'light', - 'line', - 'patch', - 'rectangle', - 'surface', - 'text Create', - 'uicontext Create', - 'capture', - 'clc', - 'clf', - 'clg', - 'close', - 'gcf', - 'newplot', - 'refresh', - 'saveas', - 'axis', - 'cla', - 'gca', - 'propedit', - 'reset', - 'rotate3d', - 'selectmoveresize', - 'shg', - 'ginput', - 'zoom', - 'dragrect', - 'drawnow', - 'rbbox', - 'dialog', - 'errordlg', - 'helpdlg', - 'inputdlg', - 'listdlg', - 'msgbox', - 'pagedlg', - 'printdlg', - 'questdlg', - 'uigetfile', - 'uiputfile', - 'uisetcolor', - 'uisetfont', - 'warndlg', - 'menu', - 'menuedit', - 'uicontextmenu', - 'uicontrol', - 'uimenu', - 'dragrect', - 'findfigs', - 'gcbo', - 'rbbox', - 'selectmoveresize', - 'textwrap', - 'uiresume', - 'uiwait Used', - 'waitbar', - 'waitforbuttonpress', - 'convhull', - 'cumprod', - 'cumsum', - 'cumtrapz', - 'delaunay', - 'dsearch', - 'factor', - 'inpolygon', - 'max', - 'mean', - 'median', - 'min', - 'perms', - 'polyarea', - 'primes', - 'prod', - 'sort', - 'sortrows', - 'std', - 'sum', - 'trapz', - 'tsearch', - 'var', - 'voronoi', - 'del2', - 'diff', - 'gradient', - 'corrcoef', - 'cov', - 'conv', - 'conv2', - 'deconv', - 'filter', - 'filter2', - 'abs', - 'angle', - 'cplxpair', - 'fft', - 'fft2', - 'fftshift', - 'ifft', - 'ifft2', - 'ifftn', - 'ifftshift', - 'nextpow2', - 'unwrap', - 'cross', - 'intersect', - 'ismember', - 'setdiff', - 'setxor', - 'union', - 'unique', - 'conv', - 'deconv', - 'poly', - 'polyder', - 'polyeig', - 'polyfit', - 'polyval', - 'polyvalm', - 'residue', - 'roots', - 'griddata', - 'interp1', - 'interp2', - 'interp3', - 'interpft', - 'interpn', - 'meshgrid', - 'ndgrid', - 'spline', - 'dblquad', - 'fmin', - 'fmins', - 'fzero', - 'ode45,', - 'ode113,', - 'ode15s,', - 'ode23s,', - 'ode23t,', - 'ode23tb', - 'odefile', - 'odeget', - 'odeset', - 'quad,', - 'vectorize', - 'spdiags', - 'speye', - 'sprand', - 'sprandn', - 'sprandsym', - 'find', - 'full', - 'sparse', - 'spconvert', - 'nnz', - 'nonzeros', - 'nzmax', - 'spalloc', - 'spfun', - 'spones', - 'colmmd', - 'colperm', - 'dmperm', - 'randperm', - 'symmmd', - 'symrcm', - 'condest', - 'normest', - 'bicg', - 'bicgstab', - 'cgs', - 'cholinc', - 'cholupdate', - 'gmres', - 'luinc', - 'pcg', - 'qmr', - 'qr', - 'qrdelete', - 'qrinsert', - 'qrupdate', - 'eigs', - 'svds', - 'spparms', - 'lin2mu', - 'mu2lin', - 'sound', - 'soundsc', - 'auread', - 'auwrite', - 'wavread', - 'wavwrite', - '[Keywords 6]', - 'addpath', - 'doc', - 'docopt', - 'help', - 'helpdesk', - 'helpwin', - 'lasterr', - 'lastwarn', - 'lookfor', - 'partialpath', - 'path', - 'pathtool', - 'profile', - 'profreport', - 'rmpath', - 'type', - 'ver', - 'version', - 'web', - 'what', - 'whatsnew', - 'which', - 'clear', - 'disp', - 'length', - 'load', - 'mlock', - 'munlock', - 'openvar', - 'pack', - 'save', - 'saveas', - 'size', - 'who', - 'whos', - 'workspace', - 'clc', - 'echo', - 'format', - 'home', - 'more', - 'cd', - 'copyfile', - 'delete', - 'diary', - 'dir', - 'edit', - 'fileparts', - 'fullfile', - 'inmem', - 'ls', - 'matlabroot', - 'mkdir', - 'open', - 'pwd', - 'tempdir', - 'tempname', - 'matlabrc', - 'quit', -) + 'builtin','eval','evalc','evalin','feval','function','global', + 'nargchk','persistent','script','break','case','catch','else', + 'elseif','end','error','for','if','otherwise','return','switch', + 'try','warning','while','input','keyboard','menu','pause','class', + 'double','inferiorto','inline','int8','int16','int32','isa', + 'loadobj','saveobj','single','superiorto','uint8','int16','uint32', + 'dbclear','dbcont','dbdown','dbmex','dbquit','dbstack','dbstatus', + 'dbstep','dbstop','dbtype','dbup','blkdiag','eye','linspace', + 'logspace','ones','rand','randn','zeros','ans','computer','eps', + 'flops','i','Inf','inputname','j','NaN','nargin','nargout','pi', + 'realmax','realmin','varargin','varargout','calendar','clock', + 'cputime','date','datenum','datestr','datevec','eomday','etime', + 'now','tic','toc','weekday','cat','diag','fliplr','flipud','repmat', + 'reshape','rot90','tril','triu','compan','gallery','hadamard', + 'hankel','hilb','invhilb','magic','pascal','toeplitz','wilkinson', + 'abs','acos','acosh','acot','acoth','acsc','acsch','angle','asec', + 'asech','asin','asinh','atan','atanh','atan2','ceil','complex', + 'conj','cos','cosh','cot','coth','csc','csch','exp','fix','floor', + 'gcd','imag','lcm','log','log2','log10','mod','nchoosek','real', + 'rem','round','sec','sech','sign','sin','sinh','sqrt','tan','tanh', + 'airy','besselh','besseli','besselk','besselj','Bessely','beta', + 'betainc','betaln','ellipj','ellipke','erf','erfc','erfcx','erfiny', + 'expint','factorial','gamma','gammainc','gammaln','legendre','pow2', + 'rat','rats','cart2pol','cart2sph','pol2cart','sph2cart','abs', + 'eval','real','strings','deblank','findstr','lower','strcat', + 'strcmp','strcmpi','strjust','strmatch','strncmp','strrep','strtok', + 'strvcat','symvar','texlabel','upper','char','int2str','mat2str', + 'num2str','sprintf','sscanf','str2double','str2num','bin2dec', + 'dec2bin','dec2hex','hex2dec','hex2num','fclose','fopen','fread', + 'fwrite','fgetl','fgets','fprintf','fscanf','feof','ferror', + 'frewind','fseek','ftell','sprintf','sscanf','dlmread','dlmwrite', + 'hdf','imfinfo','imread','imwrite','textread','wk1read','wk1write', + 'bitand','bitcmp','bitor','bitmax','bitset','bitshift','bitget', + 'bitxor','fieldnames','getfield','rmfield','setfield','struct', + 'struct2cell','class','isa','cell','cellfun','cellstr', + 'cell2struct','celldisp','cellplot','num2cell','cat','flipdim', + 'ind2sub','ipermute','ndgrid','ndims','permute','reshape', + 'shiftdim','squeeze','sub2ind','cond','condeig','det','norm','null', + 'orth','rank','rcond','rref','rrefmovie','subspace','trace','chol', + 'inv','lscov','lu','nnls','pinv','qr','balance','cdf2rdf','eig', + 'gsvd','hess','poly','qz','rsf2csf','schur','svd','expm','funm', + 'logm','sqrtm','qrdelete','qrinsert','bar','barh','hist','hold', + 'loglog','pie','plot','polar','semilogx','semilogy','subplot', + 'bar3','bar3h','comet3','cylinder','fill3','plot3','quiver3', + 'slice','sphere','stem3','waterfall','clabel','datetick','grid', + 'gtext','legend','plotyy','title','xlabel','ylabel','zlabel', + 'contour','contourc','contourf','hidden','meshc','mesh','peaks', + 'surf','surface','surfc','surfl','trimesh','trisurf','coneplot', + 'contourslice','isocaps','isonormals','isosurface','reducepatch', + 'reducevolume','shrinkfaces','smooth3','stream2','stream3', + 'streamline','surf2patch','subvolume','griddata','meshgrid','area', + 'box','comet','compass','errorbar','ezcontour','ezcontourf', + 'ezmesh','ezmeshc','ezplot','ezplot3','ezpolar','ezsurf','ezsurfc', + 'feather','fill','fplot','pareto','pie3','plotmatrix','pcolor', + 'rose','quiver','ribbon','stairs','scatter','scatter3','stem', + 'convhull','delaunay','dsearch','inpolygon','polyarea','tsearch', + 'voronoi','camdolly','camlookat','camorbit','campan','campos', + 'camproj','camroll','camtarget','camup','camva','camzoom','daspect', + 'pbaspect','view','viewmtx','xlim','ylim','zlim','camlight', + 'diffuse','lighting','lightingangle','material','specular', + 'brighten','bwcontr','caxis','colorbar','colorcube','colordef', + 'colormap','graymon','hsv2rgb','rgb2hsv','rgbplot','shading', + 'spinmap','surfnorm','whitebg','autumn','bone','contrast','cool', + 'copper','flag','gray','hot','hsv','jet','lines','prism','spring', + 'summer','winter','orient','print','printopt','saveas','copyobj', + 'findobj','gcbo','gco','get','rotate','ishandle','set','axes', + 'figure','image','light','line','patch','rectangle','surface', + 'text Create','uicontext Create','capture','clc','clf','clg', + 'close','gcf','newplot','refresh','saveas','axis','cla','gca', + 'propedit','reset','rotate3d','selectmoveresize','shg','ginput', + 'zoom','dragrect','drawnow','rbbox','dialog','errordlg','helpdlg', + 'inputdlg','listdlg','msgbox','pagedlg','printdlg','questdlg', + 'uigetfile','uiputfile','uisetcolor','uisetfont','warndlg','menu', + 'menuedit','uicontextmenu','uicontrol','uimenu','dragrect', + 'findfigs','gcbo','rbbox','selectmoveresize','textwrap','uiresume', + 'uiwait Used','waitbar','waitforbuttonpress','convhull','cumprod', + 'cumsum','cumtrapz','delaunay','dsearch','factor','inpolygon','max', + 'mean','median','min','perms','polyarea','primes','prod','sort', + 'sortrows','std','sum','trapz','tsearch','var','voronoi','del2', + 'diff','gradient','corrcoef','cov','conv','conv2','deconv','filter', + 'filter2','abs','angle','cplxpair','fft','fft2','fftshift','ifft', + 'ifft2','ifftn','ifftshift','nextpow2','unwrap','cross','intersect', + 'ismember','setdiff','setxor','union','unique','conv','deconv', + 'poly','polyder','polyeig','polyfit','polyval','polyvalm','residue', + 'roots','griddata','interp1','interp2','interp3','interpft', + 'interpn','meshgrid','ndgrid','spline','dblquad','fmin','fmins', + 'fzero','ode45,','ode113,','ode15s,','ode23s,','ode23t,','ode23tb', + 'odefile','odeget','odeset','quad,','vectorize','spdiags','speye', + 'sprand','sprandn','sprandsym','find','full','sparse','spconvert', + 'nnz','nonzeros','nzmax','spalloc','spfun','spones','colmmd', + 'colperm','dmperm','randperm','symmmd','symrcm','condest','normest', + 'bicg','bicgstab','cgs','cholinc','cholupdate','gmres','luinc', + 'pcg','qmr','qr','qrdelete','qrinsert','qrupdate','eigs','svds', + 'spparms','lin2mu','mu2lin','sound','soundsc','auread','auwrite', + 'wavread','wavwrite', + //'[Keywords 6]', + 'addpath','doc','docopt','help','helpdesk','helpwin','lasterr', + 'lastwarn','lookfor','partialpath','path','pathtool','profile', + 'profreport','rmpath','type','ver','version','web','what', + 'whatsnew','which','clear','disp','length','load','mlock', + 'munlock','openvar','pack','save','saveas','size','who','whos', + 'workspace','clc','echo','format','home','more','cd','copyfile', + 'delete','diary','dir','edit','fileparts','fullfile','inmem','ls', + 'matlabroot','mkdir','open','pwd','tempdir','tempname','matlabrc', + 'quit' + ) ), 'SYMBOLS' => array( '...' @@ -810,6 +182,7 @@ $language_data = array ( ), 'COMMENTS' => array( 1 => 'color: #228B22;', + 2 => 'color:#A020F0;' ), 'ESCAPE_CHAR' => array( 0 => '' @@ -831,7 +204,6 @@ $language_data = array ( 0 => 'color: #080;' ), 'REGEXPS' => array( - 0 => 'color:#A020F0;' ), 'SCRIPT' => array( 0 => '' @@ -849,13 +221,6 @@ $language_data = array ( 2 => '::' ), 'REGEXPS' => array( - 0 => array( - GESHI_SEARCH => "([^\w])'([^\\n\\r']*)'", - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => "\\1'", - GESHI_AFTER => "'" - ) ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( diff --git a/inc/geshi/mirc.php b/inc/geshi/mirc.php index 29faac2a78c0c09cde7faa2a95f5cc4c47d58426..75a6506f3c71bb32d64aba5801e956f9eafdb0ee 100644 --- a/inc/geshi/mirc.php +++ b/inc/geshi/mirc.php @@ -4,13 +4,15 @@ * ----- * Author: Alberto 'Birckin' de Areba (Birckin@hotmail.com) * Copyright: (c) 2006 Alberto de Areba - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/05/29 * * mIRC Scripting language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2006/05/29 (1.0.0) * - First Release * @@ -128,10 +130,14 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( + //Variable names 0 => '\$[a-zA-Z0-9]+', + //Variable names 1 => '(%|&)[a-zA-Z0-9]+', - 2 => '(#|@)[a-zA-Z0-9]+', + //Channel names + 2 => '(#|@)[a-zA-Z0-9]+', 3 => '-[a-z\d]+', + //Client to Client Protocol handling 4 => '(on|ctcp) (!|@|&)?(\d|\*):[a-zA-Z]+:', /*4 => array( GESHI_SEARCH => '((on|ctcp) (!|@|&)?(\d|\*):(Action|Active|Agent|AppActive|Ban|Chat|Close|Connect|Ctcp|CtcpReply|DccServer|DeHelp|DeOp|DeVoice|Dialog|Dns|Error|Exit|FileRcvd|FileSent|GetFail|Help|Hotlink|Input|Invite|Join|KeyDown|KeyUp|Kick|Load|Logon|MidiEnd|Mode|Mp3End|Nick|NoSound|Notice|Notify|Op|Open|Part|Ping|Pong|PlayEnd|Quit|Raw|RawMode|SendFail|Serv|ServerMode|ServerOp|Signal|Snotice|Start|Text|Topic|UnBan|Unload|Unotify|User|Mode|Voice|Wallops|WaveEnd):)', @@ -140,7 +146,9 @@ $language_data = array ( GESHI_BEFORE => '', GESHI_AFTER => '' ),*/ + //Raw protocol handling 5 => 'raw (\d|\*):', + //Timer handling 6 => '/timer(?!s\b)[0-9a-zA-Z_]+', ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, diff --git a/inc/geshi/mpasm.php b/inc/geshi/mpasm.php index 6c5f425be30c7e3d57b15f2455451c53a72b822d..7ff8aa5d06badf6f85719149e5a0ef4a6df5042d 100644 --- a/inc/geshi/mpasm.php +++ b/inc/geshi/mpasm.php @@ -4,13 +4,15 @@ * --------- * Author: Bakalex (bakalex@gmail.com) * Copyright: (c) 2004 Bakalex, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/12/6 * * Microchip Assembler language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2005/01/29 (1.0.0) * - First Release * @@ -145,7 +147,9 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( + //Hex numbers 0 => '[0-9a-fA-F]{1,32}[hH]', + //Binary numbers 1 => '[01]{1,64}[bB]' ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, diff --git a/inc/geshi/mxml.php b/inc/geshi/mxml.php new file mode 100644 index 0000000000000000000000000000000000000000..14c548febe312d9031a0a805da7309abf0e2b253 --- /dev/null +++ b/inc/geshi/mxml.php @@ -0,0 +1,145 @@ +<?php +/************************************************************************************* + * mxml.php + * ------- + * Author: David Spurr + * Copyright: (c) 2007 David Spurr (http://www.defusion.org.uk/) + * Release Version: 1.0.7.22 + * Date Started: 2007/10/04 + * + * MXML language file for GeSHi. Based on the XML file by Nigel McNie + * + * CHANGES + * ------- + * 2007/10/04 (1.0.7.22) + * - First Release + * + * TODO + * ---- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'MXML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('<!--' => '-->'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + 0 => 'color: #00bbdd;', + 1 => 'color: #ddbb00;', + 2 => 'color: #339933;', + 3 => 'color: #000000;' + ), + 'REGEXPS' => array( + 0 => 'font-weight: bold; color: black;', + 1 => 'color: #7400FF;', + 2 => 'color: #7400FF;' + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + // xml declaration + 0 => array( + GESHI_SEARCH => '(<[/?|(\?xml)]?[a-z0-9_\-:]*(\?>))', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // opening tags + 1 => array( + GESHI_SEARCH => '(</?[a-z]+:[a-z]+)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // closing tags + 2 => array( + GESHI_SEARCH => '(/?>)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<!DOCTYPE' => '>' + ), + 1 => array( + '&' => ';' + ), + 2 => array( + //'<![CDATA[' => ']]>' + '<mx:Script>' => '</mx:Script>' + ), + 3 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false, + 2 => false, + 3 => true + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/inc/geshi/mysql.php b/inc/geshi/mysql.php index 143c5325168fa983923d9784c5fad5ad5855a6dd..af0eb2c39f3cb7178a2e611068b40679d112d1a7 100644 --- a/inc/geshi/mysql.php +++ b/inc/geshi/mysql.php @@ -4,7 +4,7 @@ * --------- * Author: Carl F�rstenberg (azatoth@gmail.com) * Copyright: (c) 2005 Carl F�rstenberg, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/04 * * MySQL language file for GeSHi. @@ -31,151 +31,154 @@ ************************************************************************************/ $language_data = array ( - 'LANG_NAME' => 'MySQL', - 'COMMENT_SINGLE' => array(1 =>'--', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => 1, - 'QUOTEMARKS' => array("'", '"', ''), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - /* Mix */ - 'ALTER DATABASE', 'ALTER TABLE', 'CREATE DATABASE', 'CREATE INDEX', 'CREATE TABLE', 'DROP DATABASE', - 'DROP INDEX', 'DROP TABLE', 'RENAME TABLE', 'DELETE', 'DO', 'HANDLER', 'INSERT', 'LOAD DATA INFILE', - 'REPLACE', 'SELECT', 'TRUNCATE', 'UPDATE', 'DESCRIBE', 'USE', 'START TRANSACTION', 'COMMIT', 'ROLLBACK', - 'SAVEPOINT', 'ROLLBACK TO SAVEPOINT', 'LOCK TABLES', 'UNLOCK_TABLES', 'SET TRANACTIONS', 'SET', 'SHOW', - 'CREATE PROCEDURE', 'CREATE FUNCTION', 'ALTER PROCEDURE', 'ALTER FUNCTION', 'DROP PROCEDURE', 'DROP FUNCTION', - 'SHOW CREATE PROCEDURE', 'SHOW CREATE FUNCTION', 'SHOW PROCEDURE STATUS', 'SHOW FUNCTION STATUS', - 'CALL', 'BEGIN', 'END', 'DECLARE', 'CREATE ROUTINE', 'ALTER ROUTINE', 'CREATE', 'ALTER', 'DROP', - 'PRIMARY KEY', 'VALUES', 'INTO', 'FROM', - 'ANALYZE', 'BDB', 'BERKELEYDB', 'BTREE', 'BY', 'CASCADE', 'CHECK', 'COLUMN', 'COLUMNS', 'CONSTRAINT', - 'CROSS', 'DATABASES', 'DELAYED', 'DISTINCT', 'DISTINCTROW', 'ENCLOSED', 'ERRORS', 'ESCAPED', 'EXISTS', - 'EXPLAIN', 'FALSE', 'FIELDS', 'FORCE', 'FOREIGN', 'FULLTEXT', 'GEOMETRY', 'GRANT', 'GROUP', 'HASH', - 'HAVING', 'HELP', 'HIGH_PRIORITY', 'IGNORE', 'INNER', 'INNODB', 'INTERVAL', 'JOIN', 'KEYS', 'KILL', - 'LINES', 'LOW_PRIORITY', 'MASTER_SERVER_ID', 'MATCH', 'MIDDLEINT', 'MRG_MYISAM', 'NATURAL', 'OPTIMIZE', - 'OPTION', 'OPTIONALLY', 'ORDER', 'OUTER', 'OUTFILE', 'PRIVILEGES', 'PURGE', 'READ', 'REFERENCES', - 'REQUIRE', 'RESTRICT', 'RETURNS', 'REVOKE', 'RLIKE', 'RTREE', 'SOME', 'SONAME', 'SPATIAL', 'SQL_BIG_RESULT', - 'SQL_CALC_FOUND_ROWS', 'SQL_SMALL_RESULT', 'SSL', 'STARTING', 'STRAIGHT_JOIN', 'STRIPED', 'TERMINATED', - 'TRUE', 'TYPES', 'UNION', 'USAGE', 'USER_RESOURCES', 'USING', 'VARCHARACTER', 'WARNINGS', 'WHERE', 'WRITE', - /* Control Flow Functions */ - 'CASE', 'WHEN', 'THEN', 'ELSE', 'END', - /* String Functions */ - 'UNHEX', 'BIN', 'BIT_LENGTH', 'CHAR_LENGTH', 'CHARACTER_LENGTH', 'COMPRESS', 'CONCAT', - 'CONCAT_WS', 'CONV', 'ELT', 'EXPORT_SET', 'FIELD', 'FIND_IN_SET', 'FORMAT', 'HEX', - 'INSERT', 'INSTR', 'LCASE', 'LEFT', 'LENGTH', 'LOAD_FILE', 'LOCATE', 'LOWER', 'LPAD', - 'LTRIM', 'MAKE_SET', 'MID', 'OCT', 'OCTET_LENGTH', 'ORD', 'POSITION', 'QUOTE', 'REPEAT', - 'REPLACE', 'REVERSE', 'RIGHT', 'RPAD', 'RTRIM', 'SOUNDEX', 'SPACE', 'SUBSTRING', - 'SUBSTRING_INDEX', 'TRIM', 'UCASE', 'UPPER', 'UNCOMPRESS', 'UNCOMPRESSD_LENGTH', - 'MD5', 'SHA1', - /* Numeric Functions */ - 'ABS', 'ACOS', 'ASIN', 'ATAN', 'ATAN2', 'CEILING', 'CEIL', 'COS', 'COT', 'CRC32', 'DEGREES', - 'EXP', 'FLOOR', 'LN', 'LOG', 'LOG2', 'LOG10', 'MOD', 'PI', 'POW', 'POWER', 'RADIANS', 'RAND', - 'ROUND', 'SIGN', 'SIN', 'SQRT', 'TAN', 'TRUNCATE', - /* Date and Time Functions */ - 'ADDDATE', 'ADDTIME', 'CONVERT_TZ', 'CURDATE', 'CURRENT_DATE', 'CURTIME', 'CURRENT_TIME', - 'CURRENT_TIMESTAMP', 'DATEDIFF', 'DATE_ADD', 'DATE_SUB', 'DATE_FORMAT', 'DAY', - 'DAYNAME', 'DAYOFMONTH', 'DAYOFWEEK', 'DAYOFYEAR', 'EXTRACT', 'FROM_DAYS', 'FROM_UNIXTIME', - 'GET_FORMAT', 'LAST_DAY', 'LOCALTIME', 'LOCALTIMESTAMP', 'MAKEDATE', 'MAKETIME', - 'MICROSECOND', 'MONTHNAME', 'NOW', 'PERIOD_ADD', 'PERIOD_DIFF', 'QUARTER', - 'SECOND', 'SEC_TO_TIME', 'STR_TO_DATE', 'SUBDATE', 'SUBTIME', 'SYSDATE', 'TIME', 'TIMEDIFF', - 'TIMESTAMP', 'TIMESTAMPADD', 'TIMESTAMPDIFF', 'TIME_FORMAT', 'TIME_TO_SEC', 'TO_DAYS', - 'UNIX_TIMESTAMP', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP', 'WEEKDAY', 'WEEKOFYEAR', - 'YEARWEEK', + 'LANG_NAME' => 'MySQL', + 'COMMENT_SINGLE' => array(1 =>'--', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => 1, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + /* Mix */ + 'ALTER DATABASE', 'ALTER TABLE', 'CREATE DATABASE', 'CREATE INDEX', 'CREATE TABLE', 'DROP DATABASE', + 'DROP INDEX', 'DROP TABLE', 'RENAME TABLE', 'DELETE', 'DO', 'HANDLER', 'INSERT', 'LOAD DATA INFILE', + 'REPLACE', 'SELECT', 'TRUNCATE', 'UPDATE', 'DESCRIBE', 'USE', 'START TRANSACTION', 'COMMIT', 'ROLLBACK', + 'SAVEPOINT', 'ROLLBACK TO SAVEPOINT', 'LOCK TABLES', 'UNLOCK_TABLES', 'SET TRANACTIONS', 'SET', 'SHOW', + 'CREATE PROCEDURE', 'CREATE FUNCTION', 'ALTER PROCEDURE', 'ALTER FUNCTION', 'DROP PROCEDURE', 'DROP FUNCTION', + 'SHOW CREATE PROCEDURE', 'SHOW CREATE FUNCTION', 'SHOW PROCEDURE STATUS', 'SHOW FUNCTION STATUS', + 'CALL', 'BEGIN', 'END', 'DECLARE', 'CREATE ROUTINE', 'ALTER ROUTINE', 'CREATE', 'ALTER', 'DROP', + 'PRIMARY KEY', 'VALUES', 'INTO', 'FROM', + 'ANALYZE', 'BDB', 'BERKELEYDB', 'BTREE', 'BY', 'CASCADE', 'CHECK', 'COLUMN', 'COLUMNS', 'CONSTRAINT', + 'CROSS', 'DATABASES', 'DELAYED', 'DISTINCT', 'DISTINCTROW', 'ENCLOSED', 'ERRORS', 'ESCAPED', 'EXISTS', + 'EXPLAIN', 'FALSE', 'FIELDS', 'FORCE', 'FOREIGN', 'FULLTEXT', 'GEOMETRY', 'GRANT', 'GROUP', 'HASH', + 'HAVING', 'HELP', 'HIGH_PRIORITY', 'IGNORE', 'INNER', 'INNODB', 'INTERVAL', 'JOIN', 'KEYS', 'KILL', + 'LINES', 'LOW_PRIORITY', 'MASTER_SERVER_ID', 'MATCH', 'MIDDLEINT', 'MRG_MYISAM', 'NATURAL', 'OPTIMIZE', + 'OPTION', 'OPTIONALLY', 'ORDER', 'OUTER', 'OUTFILE', 'PRIVILEGES', 'PURGE', 'READ', 'REFERENCES', + 'REQUIRE', 'RESTRICT', 'RETURNS', 'REVOKE', 'RLIKE', 'RTREE', 'SOME', 'SONAME', 'SPATIAL', 'SQL_BIG_RESULT', + 'SQL_CALC_FOUND_ROWS', 'SQL_SMALL_RESULT', 'SSL', 'STARTING', 'STRAIGHT_JOIN', 'STRIPED', 'TERMINATED', + 'TRUE', 'TYPES', 'UNION', 'USAGE', 'USER_RESOURCES', 'USING', 'VARCHARACTER', 'WARNINGS', 'WHERE', 'WRITE', - ), - 2 => array( - 'INTEGER', 'SMALLINT', 'DECIMAL', 'NUMERIC', 'FLOAT', 'REAL', 'DOUBLE PRECISION', - 'DOUBLE', 'INT', 'DEC', 'BIT' ,'TINYINT', 'SMALLINT', 'MEDIUMINT', 'BIGINT', - 'DATETIME', 'DATE', 'TIMESTAMP', 'TIME', 'YEAR', - 'CHAR', 'VARCHAR', 'BINARY', 'CHARACTER VARYING', 'VARBINARY', 'TINYBLOB', 'TINYTEXT', - 'BLOB', 'TEXT','MEDIUMBLOB', 'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'ENUM', 'SET', - 'SERIAL DEFAULT VALUE', 'SERIAL', 'FIXED' - ), - 3 => array( - 'ZEROFILL', 'NOT NULL', 'UNSIGNED', 'AUTO_INCREMENT', 'UNIQUE', 'NOT', 'NULL', 'CHARACTER SET', 'CHARSET', - 'ASCII', 'UNICODE', 'NATIONAL', 'BOTH', 'LEADING', 'TRAILING','DEFAULT' - ), - 4 => array( - 'MICROSECOND', 'SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'SECOND_MICROSECOND', - 'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'HOUR_MICROSECOND', 'HOUR_SECOND', 'HOUR_MINUTE', 'DAY_MICROSECOND', - 'DAY_SECOND', 'DAY_MINUTE', 'DAY_HOUR', 'YEAR_MONTH' - ), - 5 => array( - 'OR', 'XOR', 'AND', 'NOT', 'BETWEEN', 'IS', 'LIKE', 'REGEXP', 'IN', 'DIV', - 'MOD', 'BINARY', 'COLLATE', 'LIMIT', 'OFFSET' - ), - ), - 'SYMBOLS' => array( - ':=', - '||', 'OR', 'XOR', - '&&', 'AND', - 'NOT', - 'BETWEEN', 'CASE', 'WHEN', 'THEN', 'ELSE', - '=', '<=>', '>=', '>', '<=', '<', '<>', '!=', 'IS', 'LIKE', 'REGEXP', 'IN', - '|', - '&', - '<<', '>>', - '-', '+', - '*', '/', 'DIV', '%', 'MOD', - '^', - '-', '~', - '!', - 'BINARY', 'COLLATE', - '(', ')', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #993333; font-weight: bold;', - 2 => 'color: #aa9933; font-weight: bold;', - 3 => 'color: #aa3399; font-weight: bold;', - 4 => 'color: #33aa99; font-weight: bold;', - 5 => 'color: #993333; font-weight: bold;' - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #808080; font-style: italic;', - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) + /* Control Flow Functions */ + 'CASE', 'WHEN', 'THEN', 'ELSE', 'END', + + /* String Functions */ + 'UNHEX', 'BIN', 'BIT_LENGTH', 'CHAR_LENGTH', 'CHARACTER_LENGTH', 'COMPRESS', 'CONCAT', + 'CONCAT_WS', 'CONV', 'ELT', 'EXPORT_SET', 'FIELD', 'FIND_IN_SET', 'FORMAT', 'HEX', + 'INSERT', 'INSTR', 'LCASE', 'LEFT', 'LENGTH', 'LOAD_FILE', 'LOCATE', 'LOWER', 'LPAD', + 'LTRIM', 'MAKE_SET', 'MID', 'OCT', 'OCTET_LENGTH', 'ORD', 'POSITION', 'QUOTE', 'REPEAT', + 'REPLACE', 'REVERSE', 'RIGHT', 'RPAD', 'RTRIM', 'SOUNDEX', 'SPACE', 'SUBSTRING', + 'SUBSTRING_INDEX', 'TRIM', 'UCASE', 'UPPER', 'UNCOMPRESS', 'UNCOMPRESSD_LENGTH', + 'MD5', 'SHA1', + + /* Numeric Functions */ + 'ABS', 'ACOS', 'ASIN', 'ATAN', 'ATAN2', 'CEILING', 'CEIL', 'COS', 'COT', 'CRC32', 'DEGREES', + 'EXP', 'FLOOR', 'LN', 'LOG', 'LOG2', 'LOG10', 'MOD', 'PI', 'POW', 'POWER', 'RADIANS', 'RAND', + 'ROUND', 'SIGN', 'SIN', 'SQRT', 'TAN', 'TRUNCATE', + + /* Date and Time Functions */ + 'ADDDATE', 'ADDTIME', 'CONVERT_TZ', 'CURDATE', 'CURRENT_DATE', 'CURTIME', 'CURRENT_TIME', + 'CURRENT_TIMESTAMP', 'DATEDIFF', 'DATE_ADD', 'DATE_SUB', 'DATE_FORMAT', 'DAY', + 'DAYNAME', 'DAYOFMONTH', 'DAYOFWEEK', 'DAYOFYEAR', 'EXTRACT', 'FROM_DAYS', 'FROM_UNIXTIME', + 'GET_FORMAT', 'LAST_DAY', 'LOCALTIME', 'LOCALTIMESTAMP', 'MAKEDATE', 'MAKETIME', + 'MICROSECOND', 'MONTHNAME', 'NOW', 'PERIOD_ADD', 'PERIOD_DIFF', 'QUARTER', + 'SECOND', 'SEC_TO_TIME', 'STR_TO_DATE', 'SUBDATE', 'SUBTIME', 'SYSDATE', 'TIME', 'TIMEDIFF', + 'TIMESTAMP', 'TIMESTAMPADD', 'TIMESTAMPDIFF', 'TIME_FORMAT', 'TIME_TO_SEC', 'TO_DAYS', + 'UNIX_TIMESTAMP', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP', 'WEEKDAY', 'WEEKOFYEAR', + 'YEARWEEK', + ), + 2 => array( + 'INTEGER', 'SMALLINT', 'DECIMAL', 'NUMERIC', 'FLOAT', 'REAL', 'DOUBLE PRECISION', + 'DOUBLE', 'INT', 'DEC', 'BIT' ,'TINYINT', 'SMALLINT', 'MEDIUMINT', 'BIGINT', + 'DATETIME', 'DATE', 'TIMESTAMP', 'TIME', 'YEAR', + 'CHAR', 'VARCHAR', 'BINARY', 'CHARACTER VARYING', 'VARBINARY', 'TINYBLOB', 'TINYTEXT', + 'BLOB', 'TEXT','MEDIUMBLOB', 'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'ENUM', 'SET', + 'SERIAL DEFAULT VALUE', 'SERIAL', 'FIXED' + ), + 3 => array( + 'ZEROFILL', 'NOT NULL', 'UNSIGNED', 'AUTO_INCREMENT', 'UNIQUE', 'NOT', 'NULL', 'CHARACTER SET', 'CHARSET', + 'ASCII', 'UNICODE', 'NATIONAL', 'BOTH', 'LEADING', 'TRAILING','DEFAULT' + ), + 4 => array( + 'MICROSECOND', 'SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR', 'SECOND_MICROSECOND', + 'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'HOUR_MICROSECOND', 'HOUR_SECOND', 'HOUR_MINUTE', 'DAY_MICROSECOND', + 'DAY_SECOND', 'DAY_MINUTE', 'DAY_HOUR', 'YEAR_MONTH' + ), + 5 => array( + 'OR', 'XOR', 'AND', 'NOT', 'BETWEEN', 'IS', 'LIKE', 'REGEXP', 'IN', 'DIV', + 'MOD', 'BINARY', 'COLLATE', 'LIMIT', 'OFFSET' + ), + ), + 'SYMBOLS' => array( + ':=', + '||', 'OR', 'XOR', + '&&', 'AND', + 'NOT', + 'BETWEEN', 'CASE', 'WHEN', 'THEN', 'ELSE', + '=', '<=>', '>=', '>', '<=', '<', '<>', '!=', 'IS', 'LIKE', 'REGEXP', 'IN', + '|', + '&', + '<<', '>>', + '-', '+', + '*', '/', 'DIV', '%', 'MOD', + '^', + '~', + '!', + 'BINARY', 'COLLATE', + '(', ')', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #993333; font-weight: bold;', + 2 => 'color: #aa9933; font-weight: bold;', + 3 => 'color: #aa3399; font-weight: bold;', + 4 => 'color: #33aa99; font-weight: bold;', + 5 => 'color: #993333; font-weight: bold;' + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #808080; font-style: italic;', + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) ); ?> diff --git a/inc/geshi/nsis.php b/inc/geshi/nsis.php index bf8345a9fd794eca3d921aae667e3d01ff9eb579..5541dabc15e2187b1e52d7f5e1e1f0f28adb0467 100644 --- a/inc/geshi/nsis.php +++ b/inc/geshi/nsis.php @@ -4,7 +4,7 @@ * -------- * Author: deguix (cevo_deguix@yahoo.com.br), Tux (http://tux.a4.cz/) * Copyright: (c) 2005 deguix, 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/12/03 * * Nullsoft Scriptable Install System language file for GeSHi. diff --git a/inc/geshi/objc.php b/inc/geshi/objc.php index 9adf7322856a9a30f5f74eac225d49a0203fe181..4697b17b6d647c91131b42de17e7a6d11b1c1b00 100644 --- a/inc/geshi/objc.php +++ b/inc/geshi/objc.php @@ -4,7 +4,7 @@ * -------- * Author: M. Uli Kusterer (witness.of.teachtext@gmx.net) * Copyright: (c) 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/04 * * Objective C language file for GeSHi. diff --git a/inc/geshi/ocaml-brief.php b/inc/geshi/ocaml-brief.php index 13d90c9abab0bdc3a8eecbf54153e75f5eaff1a4..a280150e7089c55bb2756b3d9f8c80c7ac1fe57a 100644 --- a/inc/geshi/ocaml-brief.php +++ b/inc/geshi/ocaml-brief.php @@ -4,7 +4,7 @@ * ---------- * Author: Flaie (fireflaie@gmail.com) * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/08/27 * * OCaml (Objective Caml) language file for GeSHi. @@ -45,7 +45,7 @@ $language_data = array ( 'QUOTEMARKS' => array('"'), 'ESCAPE_CHAR' => "", 'KEYWORDS' => array( - /* main OCaml keywords */ + /* main OCaml keywords */ 1 => array( 'and', 'As', 'asr', 'begin', 'Class', 'Closed', 'constraint', 'do', 'done', 'downto', 'else', 'end', 'exception', 'external', 'failwith', 'false', 'flush', 'for', 'fun', 'function', 'functor', diff --git a/inc/geshi/ocaml.php b/inc/geshi/ocaml.php index 70a9928f3bf34ccfc84c141437b7ac3e33c86abd..9b30edf95a6201e9d7c324590a44f9c233caf7f6 100644 --- a/inc/geshi/ocaml.php +++ b/inc/geshi/ocaml.php @@ -4,13 +4,15 @@ * ---------- * Author: Flaie (fireflaie@gmail.com) * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/08/27 * * OCaml (Objective Caml) language file for GeSHi. * * CHANGES * ------- + * 2008/03/29 (1.0.7.22) + * - Fixed warnings resulting from missing style information * 2005/08/27 (1.0.0) * - First Release * @@ -47,7 +49,7 @@ $language_data = array ( 'KEYWORDS' => array( /* main OCaml keywords */ 1 => array( - 'and', 'As', 'asr', 'begin', 'Class', 'Closed', 'constraint', 'do', 'done', 'downto', 'else', + 'and', 'as', 'asr', 'begin', 'class', 'closed', 'constraint', 'do', 'done', 'downto', 'else', 'end', 'exception', 'external', 'failwith', 'false', 'flush', 'for', 'fun', 'function', 'functor', 'if', 'in', 'include', 'inherit', 'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor', 'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser', @@ -100,14 +102,18 @@ $language_data = array ( 'CASE_SENSITIVE' => array( GESHI_COMMENTS => true, 1 => false, - 2 => true, /* functions name are case seinsitive */ + 2 => true, /* functions name are case sensitive */ 3 => true, /* types name too */ 4 => true /* finally exceptions too */ ), 'STYLES' => array( 'KEYWORDS' => array( - 1 => 'color: #06c; font-weight: bold;' /* nice blue */ - ), + 1 => 'color: #06c; font-weight: bold;', /* nice blue */ + 2 => 'color: #06c; font-weight: bold;', /* nice blue */ + 3 => 'color: #06c; font-weight: bold;', /* nice blue */ + 4 => 'color: #06c; font-weight: bold;', /* nice blue */ + 5 => 'color: #06c; font-weight: bold;' /* nice blue */ + ), 'COMMENTS' => array( 'MULTI' => 'color: #5d478b; font-style: italic;' /* light purple */ ), diff --git a/inc/geshi/oobas.php b/inc/geshi/oobas.php index f3e5973d8ad4bc93236d8ed4897eb920d53e5412..40337cc47243f00becaecd68ec67e0db3195e51c 100644 --- a/inc/geshi/oobas.php +++ b/inc/geshi/oobas.php @@ -4,13 +4,15 @@ * --------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/08/30 * * OpenOffice.org Basic language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/11/27 (1.0.1) * - Added support for multiple object splitters * 2004/10/27 (1.0.0) @@ -43,13 +45,14 @@ $language_data = array ( 'LANG_NAME' => 'OpenOffice.org Basic', 'COMMENT_SINGLE' => array(1 => "'"), 'COMMENT_MULTI' => array(), + //Single-Line comments using REM keyword + 'COMMENT_REGEXP' => array(2 => '/\bREM.*?$/i'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array('"'), 'ESCAPE_CHAR' => '', 'KEYWORDS' => array( 1 => array( - 'dim','private','public','global','as','if','redim','true','set', - 'byval', + 'dim','private','public','global','as','if','redim','true','set','byval', 'false','bool','double','integer','long','object','single','variant', 'msgbox','print','inputbox','green','blue','red','qbcolor', 'rgb','open','close','reset','freefile','get','input','line', @@ -59,9 +62,9 @@ $language_data = array ( 'dateserial','datevalue','day','month','weekday','year','cdatetoiso', 'cdatefromiso','hour','minute','second','timeserial','timevalue', 'date','now','time','timer','erl','err','error','on','error','goto','resume', - 'and','eqv','imp','not','or','xor','mod','','atn','cos','sin','tan','log', + 'and','eqv','imp','not','or','xor','mod','atn','cos','sin','tan','log', 'exp','rnd','randomize','sqr','fix','int','abs','sgn','hex','oct', - 'it','then','else','select','case','iif','do','loop','for','next', + 'it','then','else','select','case','iif','do','loop','for','next','to', 'while','wend','gosub','return','goto','on','goto','call','choose','declare', 'end','exit','freelibrary','function','rem','stop','sub','switch','with', 'cbool','cdate','cdbl','cint','clng','const','csng','cstr','defbool', @@ -87,7 +90,8 @@ $language_data = array ( 1 => 'color: #b1b100;' ), 'COMMENTS' => array( - 1 => 'color: #808080;' + 1 => 'color: #808080;', + 2 => 'color: #808080;' ), 'BRACKETS' => array( 0 => 'color: #66cc66;' diff --git a/inc/geshi/oracle8.php b/inc/geshi/oracle8.php index e2a6dd3a5e02e761560c765373a9e602b1755f88..55dce5c2a703b357f6f0bff047479518edb12d9b 100644 --- a/inc/geshi/oracle8.php +++ b/inc/geshi/oracle8.php @@ -4,7 +4,7 @@ * ----------- * Author: Guy Wicks (Guy.Wicks@rbs.co.uk) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/04 * * Oracle 8 language file for GeSHi @@ -432,7 +432,7 @@ $language_data = array ( ) ), 'SYMBOLS' => array( - '(', ')', '=', '<', '>', '|' + '(', ')', '=', '<', '>', '|', '+', '-', '*', '/', ',' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, @@ -471,7 +471,6 @@ $language_data = array ( ), 'URLS' => array( ), - 'OOLANG' => false, 'OBJECT_SPLITTERS' => array( ), diff --git a/inc/geshi/pascal.php b/inc/geshi/pascal.php index 9256c221fe5fadc55c5066032779513a0c31dab5..79aec8ffe09f83e78c33da56359e76a5eef25cd4 100644 --- a/inc/geshi/pascal.php +++ b/inc/geshi/pascal.php @@ -4,13 +4,15 @@ * ---------- * Author: Tux (tux@inamil.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/07/26 * * Pascal language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/11/27 (1.0.2) * - Added support for multiple object splitters * 2004/10/27 (1.0.1) @@ -54,27 +56,29 @@ $language_data = array ( 'ESCAPE_CHAR' => '\\', 'KEYWORDS' => array( 1 => array( - 'if', 'while', 'until', 'repeat', 'default', - 'do', 'else', 'for', 'switch', 'goto','label','asm','begin','end', - 'assembler','case', 'downto', 'to','div','mod','far','forward','in','inherited', - 'inline','interrupt','label','library','not','var','of','then','stdcall', - 'cdecl','end.','raise','try','except','name','finally','resourcestring','override','overload', - 'default','public','protected','private','property','published','stored','catch' + 'absolute','asm','assembler','begin','break','case','catch','cdecl', + 'const','constructor','default','destructor','div','do','downto', + 'else','end','except','export','exports','external','far', + 'finalization','finally','for','forward','function','goto','if', + 'implementation','in','index','inherited','initialization','inline', + 'interface','interrupt','label','library','mod','name','not','of', + 'or','overload','override','private','procedure','program', + 'property','protected','public','published','raise','repeat', + 'resourcestring','shl','shr','stdcall','stored','switch','then', + 'to','try','type','unit','until','uses','var','while','xor' ), 2 => array( - 'nil', 'false', 'break', 'true', 'function', 'procedure','implementation','interface', - 'unit','program','initialization','finalization','uses' + 'nil', 'false', 'true', ), 3 => array( - 'abs', 'absolute','and','arc','arctan','chr','constructor','destructor', - 'dispose','cos','eof','eoln','exp','get','index','ln','new','xor','write','writeln', - 'shr','sin','sqrt','succ','pred','odd','read','readln','ord','ordinal','blockread','blockwrite' + 'abs','and','arc','arctan','blockread','blockwrite','chr','dispose', + 'cos','eof','eoln','exp','get','ln','new','odd','ord','ordinal', + 'pred','read','readln','sin','sqrt','succ','write','writeln' ), 4 => array( - 'array', 'char', 'const', 'boolean', 'real', 'integer', 'longint', - 'word', 'shortint', 'record','byte','bytebool','string', - 'type','object','export','exports','external','file','longbool','pointer','set', - 'packed','ansistring','union' + 'ansistring','array','boolean','byte','bytebool','char','file', + 'integer','longbool','longint','object','packed','pointer','real', + 'record','set','shortint','smallint','string','union','word' ), ), 'SYMBOLS' => array( @@ -88,21 +92,21 @@ $language_data = array ( ), 'STYLES' => array( 'KEYWORDS' => array( - 1 => 'color: #b1b100;', + 1 => 'color: #000000; font-weight: bold;', 2 => 'color: #000000; font-weight: bold;', - 3 => '', - 4 => 'color: #993333;' + 3 => 'color: #000066;', + 4 => 'color: #000066; font-weight: bold;' ), 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', + 1 => 'color: #666666; font-style: italic;', 2 => 'color: #339933;', - 'MULTI' => 'color: #808080; font-style: italic;' + 'MULTI' => 'color: #666666; font-style: italic;' ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #009900;' ), 'STRINGS' => array( 0 => 'color: #ff0000;' @@ -114,7 +118,7 @@ $language_data = array ( 1 => 'color: #202020;' ), 'SYMBOLS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #339933;' ), 'REGEXPS' => array( ), diff --git a/inc/geshi/per.php b/inc/geshi/per.php index 9e7627e1f4faf264eec8fb972ceb6b81fa1f0915..03d4078dfdd939fbcbea68258c6adc4809c7ec21 100644 --- a/inc/geshi/per.php +++ b/inc/geshi/per.php @@ -4,7 +4,7 @@ * -------- * Author: Lars Gersmann (lars.gersmann@gmail.com) * Copyright: (c) 2007 Lars Gersmann - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2007/06/03 * * Per (forms) (FOURJ's Genero 4GL) language file for GeSHi. @@ -29,7 +29,7 @@ * ************************************************************************************/ - $language_data = array ( +$language_data = array ( 'LANG_NAME' => 'per', 'COMMENT_SINGLE' => array(1 => '--', 2 => '#'), 'COMMENT_MULTI' => array('{' => '}'), diff --git a/inc/geshi/perl.php b/inc/geshi/perl.php index 0ac9e08f2c2e20b3748cfe7a77567ffe8f9f89e8..c4c005cbdc7a1a2783e1e6581abe532c91bcb8fc 100644 --- a/inc/geshi/perl.php +++ b/inc/geshi/perl.php @@ -4,13 +4,16 @@ * -------- * Author: Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com) * Copyright: (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/08/20 * * Perl language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) + * - Added comment_regexp for predefined variables * 2008/02/15 (1.003) * - Fixed SF#1891630 with placebo patch * 2006/01/05 (1.0.2) @@ -58,6 +61,16 @@ $language_data = array ( '=for' => '=cut', '=encoding' => '=cut', '=pod' => '=cut' + ), + 'COMMENT_REGEXP' => array( + //Regular expressions + 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|[^\\/\\\\])+\\/(?:\\\\.|[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", + //Regular expression match variables + 3 => '/\$\d+/', + //Heredoc + 4 => '/<<\s*?([\'"]?)([a-zA-Z0-9]+)\1;[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', + //Predefined variables + 5 => '/\$(\^[a-zA-Z]?|[\$`\'&_.,+\-~:\\\\\/"\|%=\?!@<>\(\)\[\]])|@_/', ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array('"'), @@ -113,7 +126,10 @@ $language_data = array ( ) ), 'SYMBOLS' => array( - '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>' + '<', '>', '=', + '!', '@', '~', '&', '|', + '+','-', '*', '/', '%', + ',', ';', '?', ':' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => true, @@ -128,14 +144,18 @@ $language_data = array ( 3 => 'color: #000066;' ), 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #009966; font-style: italic;', + 3 => 'color: #0000ff;', + 4 => 'color: #cc0000; font-style: italic;', + 5 => 'color: #0000ff;', + 'MULTI' => 'color: #666666; font-style: italic;' ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #009900;' ), 'STRINGS' => array( 0 => 'color: #ff0000;' @@ -148,7 +168,7 @@ $language_data = array ( 2 => 'color: #006600;' ), 'SYMBOLS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #339933;' ), 'REGEXPS' => array( 0 => 'color: #0000ff;', @@ -166,7 +186,9 @@ $language_data = array ( 2 => '::' ), 'REGEXPS' => array( + //Variable 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', + //File Descriptor 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, diff --git a/inc/geshi/php-brief.php b/inc/geshi/php-brief.php index 66c5b46e86982ba56763fea691c001350d8a8d57..056691e2a7efa50885fc394418977f72e9918e1b 100644 --- a/inc/geshi/php-brief.php +++ b/inc/geshi/php-brief.php @@ -4,13 +4,15 @@ * ------------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/02 * * PHP language file for GeSHi (brief version). * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/11/27 (1.0.3) * - Added support for multiple object splitters * - Fixed &new problem @@ -49,6 +51,8 @@ $language_data = array ( 'LANG_NAME' => 'PHP', 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), 'COMMENT_MULTI' => array('/*' => '*/'), + //Heredoc and Nowdoc syntax + 'COMMENT_REGEXP' => array(3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', @@ -97,31 +101,32 @@ $language_data = array ( 'KEYWORDS' => array( 1 => 'color: #b1b100;', 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;' + 3 => 'color: #990000;' ), 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #666666; font-style: italic;', + 3 => 'color: #0000cc; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #009900;' ), 'STRINGS' => array( - 0 => 'color: #ff0000;' + 0 => 'color: #0000ff;' ), 'NUMBERS' => array( 0 => 'color: #cc66cc;' ), 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' + 1 => 'color: #004000;', + 2 => 'color: #004000;' ), 'SYMBOLS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #339933;' ), 'REGEXPS' => array( 0 => 'color: #0000ff;' @@ -145,6 +150,7 @@ $language_data = array ( 2 => '::' ), 'REGEXPS' => array( + //Variables 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" ), 'STRICT_MODE_APPLIES' => GESHI_MAYBE, diff --git a/inc/geshi/php.php b/inc/geshi/php.php index 1e9bb49a3a5e2f16aec5a785c1ddd47f1fd0068c..c459d7c37d528822b8c9371f7971ac10c9bf12e8 100644 --- a/inc/geshi/php.php +++ b/inc/geshi/php.php @@ -4,13 +4,15 @@ * -------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/20 * * PHP language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/11/25 (1.0.3) * - Added support for multiple object splitters * - Fixed &new problem @@ -52,6 +54,8 @@ $language_data = array ( 'LANG_NAME' => 'PHP', 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), 'COMMENT_MULTI' => array('/*' => '*/'), + //Heredoc and Nowdoc syntax + 'COMMENT_REGEXP' => array(3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU'), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), 'ESCAPE_CHAR' => '\\', @@ -274,35 +278,35 @@ $language_data = array ( 'KEYWORDS' => array( 1 => 'color: #b1b100;', 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;' + 3 => 'color: #990000;' ), 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #666666; font-style: italic;', + 3 => 'color: #0000cc; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #009900;' ), 'STRINGS' => array( - 0 => 'color: #ff0000;' + 0 => 'color: #0000ff;' ), 'NUMBERS' => array( 0 => 'color: #cc66cc;' ), 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' + 1 => 'color: #004000;', + 2 => 'color: #004000;' ), 'SYMBOLS' => array( - 0 => 'color: #66cc66;' + 0 => 'color: #339933;' ), 'REGEXPS' => array( - 0 => 'color: #0000ff;', - 1 => 'color: #ff0000' + 0 => 'color: #000033;' ), 'SCRIPT' => array( 0 => '', @@ -323,14 +327,8 @@ $language_data = array ( 2 => '::' ), 'REGEXPS' => array( - 0 => array( - GESHI_SEARCH => "([a-zA-Z]+)(\\n)(.*?)(\\n)(\\1[^a-zA-Z0-9])", - GESHI_REPLACE => '\3', - GESHI_BEFORE => '\1\2', - GESHI_AFTER => '\4\5', - GESHI_MODIFIERS => 'siU' - ), - 1 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" + //Variables + 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" ), 'STRICT_MODE_APPLIES' => GESHI_MAYBE, 'SCRIPT_DELIMITERS' => array( diff --git a/inc/geshi/plsql.php b/inc/geshi/plsql.php index 3611930177c6ec5f2187dda39a30266be8406641..d8e71a1b4ce13eadb6d3352ed92597dd848b1e3f 100644 --- a/inc/geshi/plsql.php +++ b/inc/geshi/plsql.php @@ -4,7 +4,7 @@ * ------- * Author: Victor Engmark <victor.engmark@gmail.com> * Copyright: (c) 2006 Victor Engmark (http://l0b0.net/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/10/26 * * Oracle 9.2 PL/SQL language file for GeSHi. diff --git a/inc/geshi/python.php b/inc/geshi/python.php index 96b99d8d5a80efac797ac90ede261db9afc537b4..1c5dba5be333e6d7918043a88bb662960cfa1db7 100644 --- a/inc/geshi/python.php +++ b/inc/geshi/python.php @@ -4,7 +4,7 @@ * ---------- * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/08/30 * * Python language file for GeSHi. @@ -46,7 +46,8 @@ $language_data = array ( 'COMMENT_SINGLE' => array(1 => '#'), 'COMMENT_MULTI' => array(), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', "'", '"""'), + //Longest quotemarks ALWAYS first + 'QUOTEMARKS' => array('"""', '"', "'"), 'ESCAPE_CHAR' => '\\', 'KEYWORDS' => array( diff --git a/inc/geshi/qbasic.php b/inc/geshi/qbasic.php index 61dacfccfabcb940b8a1f87191f90e5181a4ecfb..df404389e92d14947721480fdc44c758b1f5bba3 100644 --- a/inc/geshi/qbasic.php +++ b/inc/geshi/qbasic.php @@ -4,13 +4,15 @@ * ---------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/20 * * QBasic/QuickBASIC language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2004/11/27 (1.0.3) * - Added support for multiple object splitters * 2004/10/27 (1.0.2) @@ -49,8 +51,12 @@ ************************************************************************************/ $language_data = array ( 'LANG_NAME' => 'QBasic/QuickBASIC', - 'COMMENT_SINGLE' => array(1 => "'", 2 => ' REM', 3 => "\tREM"), + 'COMMENT_SINGLE' => array(1 => "'"), 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + //Single-Line Comments using REM command + 2 => "/\bREM.*?$/i" + ), 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, 'QUOTEMARKS' => array('"'), 'ESCAPE_CHAR' => '', @@ -87,7 +93,7 @@ $language_data = array ( ) ), 'SYMBOLS' => array( - '(', ')' + '(', ')', ',', '+', '-', '*', '/', '=', '<', '>' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, @@ -101,8 +107,7 @@ $language_data = array ( ), 'COMMENTS' => array( 1 => 'color: #808080;', - 2 => 'color: #808080;', - 3 => 'color: #808080;' + 2 => 'color: #808080;' ), 'BRACKETS' => array( 0 => 'color: #66cc66;' diff --git a/inc/geshi/rails.php b/inc/geshi/rails.php index c7e3960732d75fbd0ad0c69119723e2a3b2bad3c..7d792cf4d39ea0ed2b9d29ce622692582d41b813 100644 --- a/inc/geshi/rails.php +++ b/inc/geshi/rails.php @@ -4,7 +4,7 @@ * --------- * Author: Moises Deniz * Copyright: (c) 2005 Moises Deniz - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2007/03/21 * * Ruby language and Ruby on Rails Framework file for GeSHi @@ -381,7 +381,7 @@ $language_data = array ( GESHI_BEFORE => '\\1', GESHI_AFTER => '' ), - 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*", + 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*", //Static OOP References 3 => array( GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)", GESHI_REPLACE => '\\2', diff --git a/inc/geshi/reg.php b/inc/geshi/reg.php index 3957f3b641763dc9873b5d240973fab140e1643e..1f0ad17ef09cb450209bdf64bf854ab150c74624 100644 --- a/inc/geshi/reg.php +++ b/inc/geshi/reg.php @@ -4,20 +4,23 @@ * ------- * Author: Sean Hanna (smokingrope@gmail.com) * Copyright: (c) 2006 Sean Hanna - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 03/15/2006 * * Microsoft Registry Editor Language File. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) + * - Updated and optimized most regular expressions * 03/15/2006 (0.5.0) * - Syntax File Created * 04/27/2006 (0.9.5) - * - Syntax Coloring Cleaned Up - * - First Release + * - Syntax Coloring Cleaned Up + * - First Release * 04/29/2006 (1.0.0) - * - Updated a few coloring settings + * - Updated a few coloring settings * * TODO (updated 4/27/2006) * ------------------------- @@ -77,23 +80,39 @@ $language_data = array ( 'HKLM', 'HKCR', 'HKCU', 'HKU', 'HKCC', 'HKDD' )/***/ ), - 'SYMBOLS' => array( ), + 'SYMBOLS' => array( + '=' + ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, 1 => false, 2 => false ), 'STYLES' => array( - 'KEYWORDS' => array( 1 => 'color: #00CCFF;', - 2 => 'color: #0000FF;' ), - 'COMMENTS' => array( 1 => 'color: #009900;' ), - 'ESCAPE_CHAR' => array(), - 'BRACKETS' => array(0 => 'color: #000000;'), - 'STRINGS' => array( 0 => 'color: #009900;' ), - 'NUMBERS' => array(), - 'METHODS' => array(), - 'SYMBOLS' => array(0 => 'color: #000000;'), - 'SCRIPT' => array(), + 'KEYWORDS' => array( + 1 => 'color: #00CCFF;', + 2 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #009900;' + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'SCRIPT' => array( + ), 'REGEXPS' => array( 0 => '', 1 => 'color: #0000FF;', @@ -103,8 +122,7 @@ $language_data = array ( 5 => '', 6 => '', 7 => '', - 8 => '', - 9 => 'color: #FF6600;', + 8 => 'color: #FF6600;', ) ), 'OOLANG' => false, @@ -122,81 +140,72 @@ $language_data = array ( ), // Highlight File Format Header Version 5 1 => array( - GESHI_SEARCH => '((\\n|^)\\s*)(Windows Registry Editor Version [0-9]+(.)+([0-9]+))((\\n|$)\\s*)', - GESHI_REPLACE => '\\3', - GESHI_MODIFIERS => '', + GESHI_SEARCH => '(^\s*)(Windows Registry Editor Version \d+\.\d+)(\s*$)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\6', + GESHI_AFTER => '\\3', GESHI_CLASS => 'geshi_registry_header' ), // Highlight File Format Header Version 4 2 => array( - GESHI_SEARCH => '((\\n|^)\\s*)(REGEDIT [0-9]+)(\\s*(\\n|$))', - GESHI_REPLACE => '\\3', - GESHI_MODIFIERS => '', + GESHI_SEARCH => '(^\\s*)(REGEDIT\s?\d+)(\s*$)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\4', + GESHI_AFTER => '\\3', GESHI_CLASS => 'geshi_registry_header' ), // Highlight dword: 32 bit integer values 3 => array( - GESHI_SEARCH => '(=\\s*)(dword:[0-9]{8})(\\s*(\\n|$))', + GESHI_SEARCH => '(=\s*)(dword:[0-9a-fA-F]{8})(\s*$)', GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', + GESHI_MODIFIERS => 'm', GESHI_BEFORE => '\\1', GESHI_AFTER => '\\3', GESHI_CLASS => 'kw2' ), // Highlight variable names 4 => array( - GESHI_SEARCH => '((\\n|^)\\s*\\"\\;)(.*)(\\"\\;\\s*=)', - GESHI_REPLACE => '\\3', - GESHI_MODIFIERS => '', + GESHI_SEARCH => '(^\s*)(\".*?\")(\s*=)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\4', + GESHI_AFTER => '\\3', GESHI_CLASS => 'geshi_variable' ), // Highlight String Values 5 => array( - GESHI_SEARCH => '(=\\s*)(\\"\\;.*\\"\\;)(\\s*(\\n|$))', + GESHI_SEARCH => '(=\s*)(\".*?\")(\s*$)', GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', + GESHI_MODIFIERS => 'm', GESHI_BEFORE => '\\1', GESHI_AFTER => '\\3', GESHI_CLASS => 'st0' ), - // Highlight Hexadecimal Values + // Highlight Hexadecimal Values (Single-Line and Multi-Line) 6 => array( - GESHI_SEARCH => '(=\\s*)(hex((\\\\\\([0-9]{1,2}\\\\\\))|()):(([0-9a-fA-F]{2},)|(\\s))*(([0-9a-fA-F]{2})|(\\\\\\\\)))(\\s*(\\n|$))', + GESHI_SEARCH => '(^\s*)(hex:[0-9a-fA-F]{2}(,(\\\s*\n\s*)?[0-9a-fA-F]{2})*)', GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', + GESHI_MODIFIERS => 'm', GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\12', - GESHI_CLASS => 'kw2' - ), - // Highlight Hexadecimal Values (Multi-Line) - 7 => array( - GESHI_SEARCH => '((\\n|^)\\s*)((([0-9a-fA-F]{2},)|(\\s))*(([0-9a-fA-F]{2})|(\\\\\\\\)))', - GESHI_REPLACE => '\\3', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\10', + GESHI_AFTER => '', GESHI_CLASS => 'kw2' ), // Highlight Default Variable - 8 => array( - GESHI_SEARCH => '((\\n|^)\\s*)(@)(\\s*=)', - GESHI_REPLACE => '\\3', - GESHI_MODIFIERS => '', + 7 => array( + GESHI_SEARCH => '(^\s*)(@)(\s*=)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\4', + GESHI_AFTER => '\\3', GESHI_CLASS => 'geshi_variable' ), // Highlight GUID's found anywhere. - 9 => array( - GESHI_SEARCH => '(\\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\})', + 8 => array( + GESHI_SEARCH => '(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\})', GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', + GESHI_MODIFIERS => 'i', GESHI_BEFORE => '', GESHI_AFTER => '', GESHI_CLASS => 'geshi_guid' diff --git a/inc/geshi/robots.php b/inc/geshi/robots.php index 5746a56cbf13fac1ab95620a3153ad3855bb15fe..3b7493e0f79021b341d14c2cfe8afc3112ba087b 100644 --- a/inc/geshi/robots.php +++ b/inc/geshi/robots.php @@ -4,7 +4,7 @@ * -------- * Author: Christian Lescuyer (cl@goelette.net) * Copyright: (c) 2006 Christian Lescuyer http://xtian.goelette.info - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/02/17 * * robots.txt language file for GeSHi. diff --git a/inc/geshi/ruby.php b/inc/geshi/ruby.php index 1c00787ba2a91ece6b80d0d2cd0f515ce26f0b35..d7fad833a2e2db9fec2b6cd01cc3fffd649bdca8 100644 --- a/inc/geshi/ruby.php +++ b/inc/geshi/ruby.php @@ -4,11 +4,18 @@ * -------- * Author: Moises Deniz * Copyright: (c) 2007 Moises Deniz - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2007/03/21 * * Ruby language file for GeSHi * + * CHANGES + * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) + * 2007/03/21 (1.0.7.19) + * - Initial release + * ************************************************************************************* * * This file is part of GeSHi. @@ -121,7 +128,7 @@ $language_data = array ( ), 'SYMBOLS' => array( '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>', - '+', '-', '=>', '=>', '<<' + '+', '-', '=>', '<<' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, @@ -139,7 +146,7 @@ $language_data = array ( ), 'COMMENTS' => array( 1 => 'color:#008000; font-style:italic;', - 'MULTI' => 'color:#000080; font-style:italic;' + 'MULTI' => 'color:#000080; font-style:italic;' ), 'ESCAPE_CHAR' => array( 0 => 'color:#000099;' @@ -181,21 +188,21 @@ $language_data = array ( 1 => '.' ), 'REGEXPS' => array( - 0 => array( + 0 => array(//Variables GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)", GESHI_REPLACE => '\\2', GESHI_MODIFIERS => '', GESHI_BEFORE => '\\1', GESHI_AFTER => '' ), - 1 => array( + 1 => array(//Arrays GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)", GESHI_REPLACE => '\\2', GESHI_MODIFIERS => '', GESHI_BEFORE => '\\1', GESHI_AFTER => '' ), - 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*", + 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*",//Static OOP symbols 3 => array( GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)", GESHI_REPLACE => '\\2', diff --git a/inc/geshi/sas.php b/inc/geshi/sas.php index 12c96428b93edf288b8907e1c4fd42ee21a39b1d..ba94bff979d80f62cf45337b5ae8373fc85720d2 100644 --- a/inc/geshi/sas.php +++ b/inc/geshi/sas.php @@ -4,19 +4,21 @@ * ------- * Author: Galen Johnson (solitaryr@gmail.com) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/12/27 * * SAS language file for GeSHi. Based on the sas vim file. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) + * - Cleaned up code style * 2005/12/27 (1.0.0) * - First Release * * TODO (updated 2005/12/27) * ------------------------- - * * * Check highlighting stuff works * ************************************************************************************* @@ -52,305 +54,251 @@ $language_data = array ( ), 2 => array( '%BQUOTE', '%NRBQUOTE', '%CMPRES', '%QCMPRES', - '%COMPSTOR', '%DATATYP', '%DISPLAY', '%DO', '%ELSE', '%END', '%EVAL', '%GLOBAL', '%GOTO', '%IF', '%INDEX', '%INPUT', '%KEYDEF', '%LABEL', '%LEFT', '%LENGTH', '%LET', '%LOCAL', '%LOWCASE', '%MACRO', '%MEND', '%NRBQUOTE', '%NRQUOTE', '%NRSTR', - '%PUT', '%QCMPRES', '%QLEFT', '%QLOWCASE', '%QSCAN', '%QSUBSTR', '%QSYSFUNC', '%QTRIM', '%QUOTE', '%QUPCASE', '%SCAN', '%STR', '%SUBSTR', '%SUPERQ', '%SYSCALL', '%SYSEVALF', '%SYSEXEC', '%SYSFUNC', '%SYSGET', '%SYSLPUT', '%SYSPROD', '%SYSRC', '%SYSRPUT', '%THEN', - '%TO', '%TRIM', '%UNQUOTE', '%UNTIL', '%UPCASE', '%VERIFY', '%WHILE', '%WINDOW' ), 3 => array( 'ABS', 'ADDR', 'AIRY', 'ARCOS', 'ARSIN', 'ATAN', 'ATTRC', 'ATTRN', - 'BAND', 'BETAINV', 'BLSHIFT', 'BNOT', 'BOR', 'BRSHIFT', 'BXOR', 'BYTE', 'CDF', 'CEIL', 'CEXIST', 'CINV', 'CLOSE', 'CNONCT', 'COLLATE', 'COMPBL', 'COMPOUND', 'COMPRESS', 'COSH', 'COS', 'CSS', 'CUROBS', 'CV', 'DACCDBSL', 'DACCDB', 'DACCSL', 'DACCSYD', 'DACCTAB', 'DAIRY', 'DATETIME', 'DATEJUL', 'DATEPART', 'DATE', 'DAY', 'DCLOSE', 'DEPDBSL', 'DEPDB', 'DEPSL', - 'DEPSYD', 'DEPSYD', 'DEPTAB', 'DEPTAB', 'DEQUOTE', 'DHMS', 'DIF', 'DIGAMMA', 'DIM', 'DINFO', 'DNUM', 'DOPEN', 'DOPTNAME', 'DOPTNUM', 'DREAD', 'DROPNOTE', 'DSNAME', 'ERFC', 'ERF', 'EXIST', 'EXP', 'FAPPEND', 'FCLOSE', 'FCOL', 'FDELETE', 'FETCHOBS', 'FETCH', 'FEXIST', 'FGET', 'FILEEXIST', 'FILENAME', 'FILEREF', 'FINFO', 'FINV', 'FIPNAMEL', 'FIPNAME', 'FIPSTATE', 'FLOOR', 'FNONCT', - 'FNOTE', 'FOPEN', 'FOPTNAME', 'FOPTNUM', 'FPOINT', 'FPOS', 'FPUT', 'FREAD', 'FREWIND', 'FRLEN', 'FSEP', 'FUZZ', 'FWRITE', 'GAMINV', 'GAMMA', 'GETOPTION', 'GETVARC', 'GETVARN', 'HBOUND', 'HMS', 'HOSTHELP', 'HOUR', 'IBESSEL', 'INDEXW', 'INDEXC', 'INDEX', 'INPUTN', 'INPUTC', 'INPUT', 'INTRR', 'INTCK', 'INTNX', 'INT', 'IRR', 'JBESSEL', 'JULDATE', 'KURTOSIS', 'LAG', 'LBOUND', - 'LEFT', 'LENGTH', 'LGAMMA', 'LIBNAME', 'LIBREF', 'LOG10', 'LOG2', 'LOGPDF', 'LOGPMF', 'LOGSDF', 'LOG', 'LOWCASE', 'MAX', 'MDY', 'MEAN', 'MINUTE', 'MIN', 'MOD', 'MONTH', 'MOPEN', 'MORT', 'NETPV', 'NMISS', 'NORMAL', 'NPV', 'N', 'OPEN', 'ORDINAL', 'PATHNAME', 'PDF', 'PEEKC', 'PEEK', 'PMF', 'POINT', 'POISSON', 'POKE', 'PROBBETA', 'PROBBNML', 'PROBCHI', 'PROBF', 'PROBGAM', - 'PROBHYPR', 'PROBIT', 'PROBNEGB', 'PROBNORM', 'PROBT', 'PUTN', 'PUTC', 'PUT', 'QTR', 'QUOTE', 'RANBIN', 'RANCAU', 'RANEXP', 'RANGAM', 'RANGE', 'RANK', 'RANNOR', 'RANPOI', 'RANTBL', 'RANTRI', 'RANUNI', 'REPEAT', 'RESOLVE', 'REVERSE', 'REWIND', 'RIGHT', 'ROUND', 'SAVING', 'SCAN', 'SDF', 'SECOND', 'SIGN', 'SINH', 'SIN', 'SKEWNESS', 'SOUNDEX', 'SPEDIS', 'SQRT', 'STDERR', 'STD', 'STFIPS', - 'STNAME', 'STNAMEL', 'SUBSTR', 'SUM', 'SYMGET', 'SYSGET', 'SYSMSG', 'SYSPROD', 'SYSRC', 'SYSTEM', 'TANH', 'TAN', 'TIMEPART', 'TIME', 'TINV', 'TNONCT', 'TODAY', 'TRANSLATE', 'TRANWRD', 'TRIGAMMA', 'TRIMN', 'TRIM', 'TRUNC', 'UNIFORM', 'UPCASE', 'USS', 'VARFMT', 'VARINFMT', 'VARLABEL', 'VARLEN', 'VARNAME', 'VARNUM', 'VARRAYX', 'VARRAY', 'VARTYPE', 'VAR', 'VERIFY', 'VFORMATX', - 'VFORMATDX', 'VFORMATD', 'VFORMATNX', 'VFORMATN', 'VFORMATWX', 'VFORMATW', 'VFORMAT', 'VINARRAYX', 'VINARRAY', 'VINFORMATX', 'VINFORMATDX', 'VINFORMATD', 'VINFORMATNX', 'VINFORMATN', 'VINFORMATWX', 'VINFORMATW', 'VINFORMAT', 'VLABELX', 'VLABEL', 'VLENGTHX', 'VLENGTH', 'VNAMEX', 'VNAME', 'VTYPEX', 'VTYPE', 'WEEKDAY', 'YEAR', 'YYQ', 'ZIPFIPS', 'ZIPNAME', 'ZIPNAMEL', - 'ZIPSTATE' ), 4 => array( 'ABORT', 'ARRAY', 'ATTRIB', 'BY', 'CALL', 'CARDS4', 'CATNAME', 'CONTINUE', 'DATALINES4', 'DELETE', 'DISPLAY', - 'DM', 'DROP', 'ENDSAS', 'FILENAME', 'FILE', 'FOOTNOTE', 'FORMAT', 'GOTO', 'INFILE', 'INFORMAT', 'INPUT', 'KEEP', 'LABEL', 'LEAVE', 'LENGTH', 'LIBNAME', 'LINK', 'LIST', 'LOSTCARD', 'MERGE', 'MISSING', 'MODIFY', 'OPTIONS', 'OUTPUT', 'PAGE', 'PUT', 'REDIRECT', 'REMOVE', 'RENAME', 'REPLACE', 'RETAIN', 'RETURN', 'SELECT', 'SET', 'SKIP', 'STARTSAS', 'STOP', 'TITLE', - 'UPDATE', 'WAITSAS', 'WHERE', 'WINDOW', 'X', 'SYSTASK', 'ADD', 'AND', 'ALTER', 'AS', 'CASCADE', 'CHECK', 'CREATE', 'DELETE', 'DESCRIBE', 'DISTINCT', 'DROP', 'FOREIGN', 'FROM', 'GROUP', 'HAVING', 'INDEX', 'INSERT', 'INTO', 'IN', 'KEY', 'LIKE', 'MESSAGE', 'MODIFY', 'MSGTYPE', 'NOT', 'NULL', 'ON', 'OR', 'ORDER', 'PRIMARY', 'REFERENCES', - 'RESET', 'RESTRICT', 'SELECT', 'SET', 'TABLE', 'UNIQUE', 'UPDATE', 'VALIDATE', 'VIEW', 'WHERE' ), 5 => array( 'DO', 'ELSE', 'END', 'IF', 'THEN', 'UNTIL', 'WHILE' - ), 6 => array( 'RUN', 'QUIT', 'DATA' ), 7 => array( - 'ERROR' ), 8 => array( 'WARNING' ), - 9 => array( 'NOTE' ) ), 'SYMBOLS' => array( - ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, 1 => false, - 2 => false, 3 => false, 4 => false, 5 => false, - 6 => false, 7 => false, 8 => false, 9 => false - ), 'STYLES' => array( 'KEYWORDS' => array( 1 => 'color: #0000ff;', - 2 => 'color: #0000ff;', 3 => 'color: #0000ff;', 4 => 'color: #0000ff;', 5 => 'color: #0000ff;', - 6 => 'color: #000080; font-weight: bold;', 7 => 'color: #ff0000;', 8 => 'color: #00ff00;', 9 => 'color: #0000ff;' - ), 'COMMENTS' => array( 1 => 'color: #006400; font-style: italic;', 'MULTI' => 'color: #006400; font-style: italic;' - ), 'ESCAPE_CHAR' => array( 0 => 'color: #000099; font-weight: bold;' ), 'BRACKETS' => array( - 0 => 'color: #66cc66;' ), 'STRINGS' => array( 0 => 'color: #a020f0;' - ), 'NUMBERS' => array( 0 => 'color: #2e8b57; font-weight: bold;' ), 'METHODS' => array( - ), 'SYMBOLS' => array( 0 => 'color: #66cc66;' ), 'SCRIPT' => array( - 0 => '', 1 => '', 2 => '', 3 => '' - ), 'REGEXPS' => array( 0 => 'color: #0000ff; font-weight: bold;', 1 => 'color: #000080; font-weight: bold;', - 2 => 'color: #006400; font-style: italic;', 3 => 'color: #006400; font-style: italic;', 4 => 'color: #006400; font-style: italic;', 5 => 'color: #ff0000; font-weight: bold;', - 6 => 'color: #00ff00; font-style: italic;', 7 => 'color: #0000ff; font-style: normal;', 8 => 'color: #b218b2; font-weight: bold;', 9 => 'color: #b218b2; font-weight: bold;' - ) ), 'URLS' => array( 1 => '', 2 => '', - 3 => '', 4 => '', 5 => '', 6 => '', - 7 => '', 8 => '', 9 => '' ), - 'OOLANG' => false, 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( - 0 => "&[a-zA-Z_][a-zA-Z0-9_]*", - 1 => array( + 1 => array(//Procedures GESHI_SEARCH => '(^\\s*)(PROC \\w+)', GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'im', GESHI_BEFORE => '\\1', GESHI_AFTER => '' ), - 2 => array( GESHI_SEARCH => '(^\\s*)(\\*.*;)', GESHI_REPLACE => '\\2', GESHI_MODIFIERS => 'im', - GESHI_BEFORE => '\\1', GESHI_AFTER => '' ), 3 => array( - GESHI_SEARCH => '(.*;\\s*)(\\*.*;)', GESHI_REPLACE => '\\2', GESHI_MODIFIERS => 'im', GESHI_BEFORE => '\\1', - GESHI_AFTER => '' ), 4 => array( GESHI_SEARCH => '(^\\s*)(%\\*.*;)', - GESHI_REPLACE => '\\2', GESHI_MODIFIERS => 'im', GESHI_BEFORE => '\\1', GESHI_AFTER => '' - ), - 5 => array( + 5 => array(//Error messages GESHI_SEARCH => '(^ERROR.*)', GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'im', GESHI_BEFORE => '', GESHI_AFTER => '' ), - - 6 => array( + 6 => array(//Warning messages GESHI_SEARCH => '(^WARNING.*)', GESHI_REPLACE => '\\1', GESHI_MODIFIERS => 'im', - GESHI_BEFORE => '', GESHI_AFTER => '' ), - 7 => array( - + 7 => array(//Notice messages GESHI_SEARCH => '(^NOTE.*)', GESHI_REPLACE => '\\1', GESHI_MODIFIERS => 'im', GESHI_BEFORE => '', - GESHI_AFTER => '' ), 8 => array( GESHI_SEARCH => '(^\\s*)(CARDS.*)(^\\s*;\\s*$)', - GESHI_REPLACE => '\\2', GESHI_MODIFIERS => 'sim', GESHI_BEFORE => '\\1', GESHI_AFTER => '\\3' - ), 9 => array( GESHI_SEARCH => '(^\\s*)(DATALINES.*)(^\\s*;\\s*$)', GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'sim', GESHI_BEFORE => '\\1', GESHI_AFTER => '\\3' ) - ), 'STRICT_MODE_APPLIES' => GESHI_MAYBE, 'SCRIPT_DELIMITERS' => array( ), 'HIGHLIGHT_STRICT_BLOCK' => array( - ) ); diff --git a/inc/geshi/scala.php b/inc/geshi/scala.php new file mode 100644 index 0000000000000000000000000000000000000000..8509f76bbe0efbb0c16d761d85ea2d59138d456e --- /dev/null +++ b/inc/geshi/scala.php @@ -0,0 +1,126 @@ +<?php +/************************************************************************************* + * scala.php + * ---------- + * Author: Franco Lombardo (franco@francolombardo.net) + * Copyright: (c) 2008 Franco Lombardo, Benny Baumann + * Release Version: 1.0.7.22 + * Date Started: 2008/02/08 + * + * Scala language file for GeSHi. + * + * CHANGES + * ------- + * 2008/02/08 (1.0.7.22) + * - First Release + * + * TODO (updated 2007/04/27) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + + +$language_data = array ( + 'LANG_NAME' => 'Scala', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'abstract', 'case', 'catch', 'class', 'def', + 'do', 'else', 'extends', 'false', 'final', + 'finally', 'for', 'forSome', 'if', 'implicit', + 'import', 'match', 'new', 'null', 'object', + 'override', 'package', 'private', 'protected', 'requires', + 'return', 'sealed', 'super', 'this', 'throw', + 'trait', 'try', 'true', 'type', 'val', + 'var', 'while', 'with', 'yield' + ), + 2 => array( + 'void', 'double', 'int', 'boolean', 'byte', 'short', 'long', 'char', 'float' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', + '_', ':', '=', '=>', '<<:', + '<%', '>:', '#', '@' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff; font-weight: bold;', + 2 => 'color: #9999cc; font-weight: bold;', + ), + 'COMMENTS' => array( + 1=> 'color: #008000; font-style: italic;', + 2=> 'color: #008000; font-style: italic;', + 'MULTI' => 'color: #00ff00; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #0000ff; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #F78811;' + ), + 'STRINGS' => array( + 0 => 'color: #6666FF;' + ), + 'NUMBERS' => array( + 0 => 'color: #F78811;' + ), + 'METHODS' => array( + 1 => 'color: #000000;', + 2 => 'color: #000000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000080;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => 'http://scala-lang.org', + 2 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/inc/geshi/scheme.php b/inc/geshi/scheme.php index 70be0cec1aa412342983e310e6b6b40b51d7da0e..967073f75d218d772f7c006d01a908723aa1da6c 100644 --- a/inc/geshi/scheme.php +++ b/inc/geshi/scheme.php @@ -4,7 +4,7 @@ * ---------- * Author: Jon Raphaelson (jonraphaelson@gmail.com) * Copyright: (c) 2005 Jon Raphaelson, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/08/30 * * Scheme language file for GeSHi. diff --git a/inc/geshi/sdlbasic.php b/inc/geshi/sdlbasic.php index f71721e5d91e4bd79ef1ae4cfb1dd8a658d8f447..e66a3f1b27128445b80952676c467376ad8647b0 100644 --- a/inc/geshi/sdlbasic.php +++ b/inc/geshi/sdlbasic.php @@ -4,7 +4,7 @@ * ------------ * Author: Roberto Rossi * Copyright: (c) 2005 Roberto Rossi (http://rsoftware.altervista.org) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/08/19 * * sdlBasic (http://sdlbasic.sf.net) language file for GeSHi. diff --git a/inc/geshi/smalltalk.php b/inc/geshi/smalltalk.php index 4e7e337ed812bcb20596afbc919ef72f8b5951bb..ce3c0d0f004b8e5a1b29c922e110ff30fe4884e7 100644 --- a/inc/geshi/smalltalk.php +++ b/inc/geshi/smalltalk.php @@ -4,7 +4,7 @@ * -------- * Author: Bananeweizen (Bananeweizen@gmx.de) * Copyright: (c) 2005 Bananeweizen (www.bananeweizen.de) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/03/27 * * Smalltalk language file for GeSHi. diff --git a/inc/geshi/smarty.php b/inc/geshi/smarty.php index 02613a0c4cf66f517d1a5ff40104a47f0219d11b..093527f40448cc076d052ddee8101c762b7561e5 100644 --- a/inc/geshi/smarty.php +++ b/inc/geshi/smarty.php @@ -4,7 +4,7 @@ * ---------- * Author: Alan Juden (alan@judenware.org) * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/07/10 * * Smarty template language file for GeSHi. diff --git a/inc/geshi/sql.php b/inc/geshi/sql.php index b21298e026757dfed8b652e5937966967127f11c..37731987604472800dbe765ef9c25f493fb80e01 100644 --- a/inc/geshi/sql.php +++ b/inc/geshi/sql.php @@ -4,13 +4,15 @@ * ------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/04 * * SQL language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added additional symbols for highlighting * 2004/11/27 (1.0.3) * - Added support for multiple object splitters * 2004/10/27 (1.0.2) @@ -83,7 +85,7 @@ $language_data = array ( ) ), 'SYMBOLS' => array( - '(', ')', '=', '<', '>', '|' + '(', ')', '=', '<', '>', '|', ',', '.', '+', '-', '*', '/' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, diff --git a/inc/geshi/tcl.php b/inc/geshi/tcl.php index 697ce8d50a7bcebd5e74e63dade8be9fca3771c6..60099e916b9fcd194549b62064ec3b066cf3f2e1 100644 --- a/inc/geshi/tcl.php +++ b/inc/geshi/tcl.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Reid van Melle (rvanmelle@gmail.com) * Copyright: (c) 2004 Reid van Melle (sorry@nowhere) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/05/05 * * TCL/iTCL language file for GeSHi. @@ -16,12 +16,14 @@ * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2006/05/05 (1.0.0) * - First Release * * TODO (updated 2006/05/05) * ------------------------- - * - Get TCL built-in special variables hilighted with a new color.. + * - Get TCL built-in special variables highlighted with a new color.. * currently, these are listed in //special variables in the keywords * section, but they get covered by the general REGEXP for symbols * - General cleanup, testing, and verification @@ -169,6 +171,7 @@ $language_data = array ( 1 => '::' ), 'REGEXPS' => array( + //Special variables 0 => '[\\$]+[a-zA-Z_][a-zA-Z0-9_]*', ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, diff --git a/inc/geshi/text.php b/inc/geshi/text.php index 83886964741b72b5cc4cb9949ac42db0fcdda59c..11f886c72fdee4490255ec73648815d785d5bc1d 100644 --- a/inc/geshi/text.php +++ b/inc/geshi/text.php @@ -4,7 +4,7 @@ * -------- * Author: Sean Hanna (smokingrope@gmail.com) * Copyright: (c) 2006 Sean Hanna - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 04/23/2006 * * Standard Text File (No Syntax Highlighting). @@ -12,7 +12,7 @@ * CHANGES * ------- * 04/23/2006 (0.5.0) - * - Syntax File Created + * - Syntax File Created * * 04/27/2006 (1.0.0) * - Documentation Cleaned Up @@ -40,17 +40,17 @@ * along with GeSHi; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - ************************************************************************************/ + $language_data = array ( 'LANG_NAME' => 'Text', - 'COMMENT_SINGLE' => array( ), - 'COMMENT_MULTI' => array( ), + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array(), 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( ), - 'SYMBOLS' => array( ), + 'KEYWORDS' => array(), + 'SYMBOLS' => array(), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false ), @@ -73,9 +73,11 @@ $language_data = array ( 'SCRIPT_DELIMITERS' => array( ), 'HIGHLIGHT_STRICT_BLOCK' => array( ) ); + if (isset($this) && is_a($this, 'GeSHi')) { $this->set_numbers_highlighting(false); $this->set_brackets_highlighting(false); $this->disable_highlighting(); } + ?> diff --git a/inc/geshi/thinbasic.php b/inc/geshi/thinbasic.php index aa79ec6314a0dc7700beed5a26d54ccdfbc674f9..bae281aaa18758a812549b5ccc6c96f7b1b52c36 100644 --- a/inc/geshi/thinbasic.php +++ b/inc/geshi/thinbasic.php @@ -4,7 +4,7 @@ * ------ * Author: Eros Olmi (eros.olmi@thinbasic.com) * Copyright: (c) 2006 Eros Olmi (http://www.thinbasic.com), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/05/12 * * thinBasic language file for GeSHi. @@ -36,7 +36,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ************************************************************************************/ - $language_data = array ( + +$language_data = array ( 'LANG_NAME' => 'thinBasic', 'COMMENT_SINGLE' => array(1 => "'"), 'COMMENT_MULTI' => array(), diff --git a/inc/geshi/tsql.php b/inc/geshi/tsql.php index af57a1365ba9d1ca0a0db9561d72e48e526d3863..130d16c7567d9c53bf4ab7d37aa3d2413b0ec7a5 100644 --- a/inc/geshi/tsql.php +++ b/inc/geshi/tsql.php @@ -4,7 +4,7 @@ * -------- * Author: Duncan Lock (dunc@dflock.co.uk) * Copyright: (c) 2006 Duncan Lock (http://dflock.co.uk/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/11/22 * * T-SQL language file for GeSHi. @@ -46,10 +46,6 @@ $language_data = array ( 'ESCAPE_CHAR' => '\\', 'KEYWORDS' => array( 1 => array( - /* - This will be highlighted in blue - */ - // Datatypes 'bigint', 'int', 'smallint', 'tinyint', 'bit', 'decimal', 'numeric', 'money', 'smallmoney', 'float', 'real', 'datetime', 'smalldatetime', 'char', 'varchar', diff --git a/inc/geshi/vb.php b/inc/geshi/vb.php index bbea1019eb50cebc7ebbc285c8e5590fde2ed936..e5a56bb5d6f42c2b2ebdb81454f718b453c2e112 100644 --- a/inc/geshi/vb.php +++ b/inc/geshi/vb.php @@ -4,7 +4,7 @@ * ------ * Author: Roberto Rossi (rsoftware@altervista.org) * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/08/30 * * Visual Basic language file for GeSHi. @@ -38,7 +38,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ************************************************************************************/ - $language_data = array ( + +$language_data = array ( 'LANG_NAME' => 'Visual Basic', 'COMMENT_SINGLE' => array(1 => "'"), 'COMMENT_MULTI' => array(), diff --git a/inc/geshi/vbnet.php b/inc/geshi/vbnet.php index c417fee66a78e05ba5b4eacbc4c6b9e4192942bc..88f401d34ed262cda27b61780e8c4f9d8dd87d81 100644 --- a/inc/geshi/vbnet.php +++ b/inc/geshi/vbnet.php @@ -4,7 +4,7 @@ * --------- * Author: Alan Juden (alan@judenware.org) * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/06/04 * * VB.NET language file for GeSHi. diff --git a/inc/geshi/verilog.php b/inc/geshi/verilog.php new file mode 100644 index 0000000000000000000000000000000000000000..e9661acc05f3420d35f2862b0e5f00341c136c9f --- /dev/null +++ b/inc/geshi/verilog.php @@ -0,0 +1,177 @@ +<?php +/** + * verilog.php + * ----------- + * Author: Günter Dannoritzer <dannoritzer@web.de> + * Copyright: (C) 2008 Guenter Dannoritzer + * Release Version: 1.0.7.22 + * Date Started: 2008/05/28 + * + * Verilog language file for GeSHi + * + * CHANGES + * ------- + * 2008/05/29 + * - added regular expression to find numbers of the form 4'b001xz + * - added regular expression to find values for `timescale command + * - extended macro keywords + * + * TODO (updated 2008/05/29) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'Verilog', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + // keywords + 1 => array('always', 'and', 'assign', 'begin', 'buf', 'bufif0', 'bufif1', 'case', + 'casex', 'casez', 'cmos', 'deassign', 'default', 'defparam', + 'disable', 'edge', 'else', 'end', 'endcase', 'endfunction', + 'endmodule', 'endprimitive', 'endspecify', 'endtable', 'endtask', + 'event', 'for', 'for', 'force', 'forever', 'function', 'highz0', + 'highz1', 'if', 'ifnone', 'initial', 'inout', 'input', 'integer', + 'join', 'large', 'macromodule', 'medium', 'module', 'nand', + 'negedge', 'nmos', 'nor', 'not', 'notif0', 'notif1', 'or', + 'output', 'parameter', 'pmos', 'posedge', 'primitive', 'pull0', + 'pull1', 'pulldown', 'pullup', 'rcmos', 'real', 'realtime', 'reg', + 'release', 'repeat', 'rnmos', 'rpmos', 'rtran', 'rtranif0', + 'rtranif1', 'scalared', 'small', 'specify', 'specparam', + 'strong0', 'strong1', 'supply0', 'supply1', 'table', 'task', + 'time', 'tran', 'tranif0', 'tranif1', 'tri', 'tri0', 'tri1', + 'triand', 'trior', 'trireg', 'vectored', 'wait', 'wand', 'weak0', + 'weak1', 'while', 'wire', 'wor', 'xnor', 'xor' + ), + // system tasks + 2 => array( + '$display', '$monitor', + '$dumpall', '$dumpfile', '$dumpflush', '$dumplimit', '$dumpoff', + '$dumpon', '$dumpvars', + '$fclose', '$fdisplay', '$fopen', + '$finish', '$fmonitor', '$fopen', '$fstrobe', '$fwrite', + '$fgetc', '$ungetc', '$fgets', '$fscanf', '$fread', '$ftell', + '$fseek', '$frewind', '$ferror', '$fflush', '$feof', + '$random', + '$readmemb', '$readmemh', '$readmemx', + '$signed', '$stime', '$stop', + '$strobe', '$time', '$unsigned', '$write' + ), + // macros + 3 => array( + '`default-net', '`define', + '`celldefine', '`default_nettype', '`else', '`elsif', '`endcelldefine', + '`endif', '`ifdef', '`ifndef', '`include', '`line', '`nounconnected_drive', + '`resetall', '`timescale', '`unconnected_drive', '`undef' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', + '^', '&', '|', '~', + '?', ':', + '#', '<<', '<<<', + '>', '<', '>=', '<=', + '@', ';', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #A52A2A; font-weight: bold;', + 2 => 'color: #9932CC;', + 3 => 'color: #008800;' + ), + 'COMMENTS' => array( + 1 => 'color: #00008B; font-style: italic;', + 2 => 'color: #00008B;', + 'MULTI' => 'color: #00008B; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #9F79EE' + ), + 'BRACKETS' => array( + 0 => 'color: #9F79EE;' + ), + 'STRINGS' => array( + 0 => 'color: FF00FF;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0055;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #5D478B;' + ), + 'REGEXPS' => array( + 0 => 'color: #ff0055;', + 1 => 'color: #ff0055;', + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '' + ), + 'REGEXPS' => array( + // numbers + 0 => "\d'[bdh][0-9_a-fA-FxXzZ]+", + // time -> 1, 10, or 100; s, ms, us, ns, ps, of fs + 1 => "1[0]{0,2}[munpf]?s" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + 1 => '' + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'TAB_WIDTH' => 4 +); + +?> + diff --git a/inc/geshi/vhdl.php b/inc/geshi/vhdl.php index 47d1eb735a4ece340d7e04c54a509f85158e8255..2a2bd39d5aeb05c9157fbdc3d4d51fbbe78985e3 100644 --- a/inc/geshi/vhdl.php +++ b/inc/geshi/vhdl.php @@ -4,13 +4,16 @@ * -------- * Author: Alexander 'E-Razor' Krause (admin@erazor-zone.de) * Copyright: (c) 2005 Alexander Krause - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2005/06/15 * * VHDL (VHSICADL, very high speed integrated circuit HDL) language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) + * - Optimized regexp group 0 somewhat * 2006/06/15 (1.0.0) * - First Release * @@ -122,11 +125,12 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( - 0 => '(\b(0x)[0-9a-fA-F]{2,}[hH]?|\b(0x)?[0-9a-fA-F]{2,}[hH])|'. - '(\b[0-9]{1,}((\.){1}[0-9]{1,}){0,1}(E)[\-]{0,1}[0-9]{1,})|'. - '(\b(ns))|'. - "('[0-9a-zA-Z]+)", - 1 => "\b(''[0-9]'')" + //Hex numbers and scientific notation for numbers + 0 => '(\b0x[0-9a-fA-F]+|\b\d[0-9a-fA-F]+[hH])|'. + '(\b\d+?(\.\d+?)?E[+\-]?\d+)|(\bns)|'. + "('[0-9a-zA-Z]+)", + //Number characters? + 1 => "\b(''\d'')" ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( diff --git a/inc/geshi/visualfoxpro.php b/inc/geshi/visualfoxpro.php index 7265342e0bb81ce131cd7428af0d9ed31376bfdf..a1e8474a31bdd73a3776de0bbe62fc1a65e3e119 100644 --- a/inc/geshi/visualfoxpro.php +++ b/inc/geshi/visualfoxpro.php @@ -4,13 +4,15 @@ * ---------------- * Author: Roberto Armellin (r.armellin@tin.it) * Copyright: (c) 2004 Roberto Armellin, Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/09/17 * * Visual FoxPro language file for GeSHi. * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Removed tab as a symbol char * 2004/11/27 (1.0.1) * - Added support for multiple object splitters * 2004/10/27 (1.0.0) @@ -383,7 +385,7 @@ $language_data = array ( 'Relation','Session','Shape','Spinner','TextBox' ,'Toolbar' ), ), - 'SYMBOLS' => array("!", "@", "$", "%", "(", ")", "-", "+", "=", "/", "{", "}", "[", "]", ":", ";", ",", " ", ".", "*", "&"), + 'SYMBOLS' => array("!", "@", "$", "%", "(", ")", "-", "+", "=", "/", "{", "}", "[", "]", ":", ";", ",", ".", "*", "&"), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => true, 1 => false, diff --git a/inc/geshi/winbatch.php b/inc/geshi/winbatch.php index 6228a79c939877f403125ec6c19ce969fd26aa9e..7453fea900e24fb5d96ef5f189008fb1473e8e51 100644 --- a/inc/geshi/winbatch.php +++ b/inc/geshi/winbatch.php @@ -4,7 +4,7 @@ * ------------ * Author: Craig Storey (storey.craig@gmail.com) * Copyright: (c) 2004 Craig Storey (craig.xcottawa.ca) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2006/05/19 * * WinBatch language file for GeSHi. @@ -15,6 +15,8 @@ * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2006/05/05 (1.0.0) * - First Release * @@ -354,7 +356,7 @@ $language_data = array ( ), 'OOLANG' => false, 'OBJECT_SPLITTER' => '', - 'REGEXPS' => array( + 'REGEXPS' => array(//Variable names 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" ), 'STRICT_MODE_APPLIES' => GESHI_MAYBE, diff --git a/inc/geshi/xml.php b/inc/geshi/xml.php index 3c38f9c02c980fb6dea7a654ca3a85be38d8954d..4b04b40c855858a0f135a2d9f24e76a217756735 100644 --- a/inc/geshi/xml.php +++ b/inc/geshi/xml.php @@ -4,13 +4,15 @@ * ------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2004/09/01 * * XML language file for GeSHi. Based on the idea/file by Christian Weiske * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2005/12/28 (1.0.2) * - Removed escape character for strings * 2004/11/27 (1.0.1) @@ -97,21 +99,21 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( - 0 => array( + 0 => array(//attribute names GESHI_SEARCH => '([a-z_\-:]+)(=)', GESHI_REPLACE => '\\1', GESHI_MODIFIERS => 'i', GESHI_BEFORE => '', GESHI_AFTER => '\\2' ), - 1 => array( + 1 => array(//Initial header line GESHI_SEARCH => '(<[/?|(\?xml)]?[a-z0-9_\-:]*(\??>)?)', GESHI_REPLACE => '\\1', GESHI_MODIFIERS => 'i', GESHI_BEFORE => '', GESHI_AFTER => '' ), - 2 => array( + 2 => array(//Tag end markers GESHI_SEARCH => '(([/|\?])?>)', GESHI_REPLACE => '\\1', GESHI_MODIFIERS => 'i', @@ -140,7 +142,7 @@ $language_data = array ( 2 => false, 3 => true ), - 'TAB_WIDTH' => 4 + 'TAB_WIDTH' => 2 ); ?> diff --git a/inc/geshi/xpp.php b/inc/geshi/xpp.php index 3bb06b997b76ef20eb4d2f4b1c44a7b20354eb43..1f997b21a5dd0bad6eabc4b1a3ad823564428cce 100644 --- a/inc/geshi/xpp.php +++ b/inc/geshi/xpp.php @@ -4,7 +4,7 @@ * ------- * Author: Simon Butcher (simon@butcher.name) * Copyright: (c) 2007 Simon Butcher (http://simon.butcher.name/) - * Release Version: 1.0.7.21 + * Release Version: 1.0.7.22 * Date Started: 2007/02/27 * * Axapta/Dynamics Ax X++ language file for GeSHi. diff --git a/inc/geshi/z80.php b/inc/geshi/z80.php index 7feb5cb81f73df471857a38fc3e36ec5c846c8b3..12d591ade062e45c181142076772db06cdecdc71 100644 --- a/inc/geshi/z80.php +++ b/inc/geshi/z80.php @@ -3,8 +3,8 @@ * z80.php * ------- * Author: Benny Baumann (BenBE@omorphia.de) - * Copyright: (c) 2007-2008 Benny Baumann (http://www.omorphia.de/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.7.21 + * Copyright: (c) 2007-2008 Benny Baumann (http://www.omorphia.de/) + * Release Version: 1.0.7.22 * Date Started: 2007/02/06 * * ZiLOG Z80 Assembler language file for GeSHi. @@ -13,6 +13,8 @@ * * CHANGES * ------- + * 2008/05/23 (1.0.7.22) + * - Added description of extra language features (SF#1970248) * 2007/06/03 (1.0.1) * - Fixed two typos in the language file * 2007/02/06 (1.0.0) @@ -121,9 +123,12 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( + //Hex numbers 0 => '0[0-9a-fA-F]{1,32}[hH]', - 1 => '\%[01]{1,64}[bB]', - 2 => '^[_a-zA-Z][_a-zA-Z0-9]{0,50}\:' + //Binary numbers + 1 => '\%[01]{1,64}|[01]{1,64}[bB]?', + //Labels + 2 => '^[_a-zA-Z][_a-zA-Z0-9]?\:' ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array(