diff options
Diffstat (limited to 'plugins/wp-syntax/geshi/geshi/j.php')
-rw-r--r-- | plugins/wp-syntax/geshi/geshi/j.php | 73 |
1 files changed, 18 insertions, 55 deletions
diff --git a/plugins/wp-syntax/geshi/geshi/j.php b/plugins/wp-syntax/geshi/geshi/j.php index 184385b3..5565bb49 100644 --- a/plugins/wp-syntax/geshi/geshi/j.php +++ b/plugins/wp-syntax/geshi/geshi/j.php @@ -4,13 +4,15 @@ * -------- * Author: Ric Sherlock (tikkanz@gmail.com) * Copyright: (c) 2009 Ric Sherlock - * Release Version: 1.0.8.9 + * Release Version: 1.0.8.11 * Date Started: 2009/11/10 * * J language file for GeSHi. * * CHANGES * ------- + * 2010/07/18 (1.0.8.10) + * - Infinity and negative infinity recognized as numbers * 2010/03/01 (1.0.8.8) * - Add support for label_xyz. and goto_xyz. * - Fix highlighting of for_i. @@ -29,7 +31,6 @@ * 2009/11/12 (1.0.0) * - First Release * - * * TODO (updated 2010/01/27) * ------------------------- * * combine keyword categories by using conditional regex statement in PARSER CONTROL? @@ -53,7 +54,7 @@ * ************************************************************************************/ -$language_data = array ( +$language_data = array( 'LANG_NAME' => 'J', 'COMMENT_SINGLE' => array(), 'COMMENT_MULTI' => array(), @@ -69,12 +70,7 @@ $language_data = array ( 'HARDESCAPE' => array("'"), 'HARDCHAR' => "'", 'NUMBERS' => array( - //Some instances of infinity are not correctly handled by GeSHi NUMBERS currently - //There are two solutions labelled "infinity Method A" and "infinity Method B" - //infinity Method B - requires following adjustment to line 3349 of geshi.php - // preg_match('#\d#' becomes preg_match('#[\d_]#' - 0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?)(?![\w\.\:])', //infinity Method A - //0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?|__?)(?![\w\.\:])', //infinity Method B + 0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?|__?)(?![\w\.\:])', ), 'KEYWORDS' => array( //Control words @@ -87,40 +83,6 @@ $language_data = array ( 2 => array( 'm', 'n', 'u', 'v', 'x', 'y' ), -/* -Commented out for now due to conflicts with Lang Check - //Primitives beginning with a symbol (except . or :) - 6 => array( - '=', '<', '<.', '<:', //verbs - '_:','>', '>.', '>:', - '+', '+.', '+:', '*', '*.', '*:', '-', '-.', '-:', '%', '%.', '%:', - '^', '^.', '$', '$.', '$:', '~.', '~:', '\|', '|.', '|:', - ',', ',.', ',:', ';', ';:', '#', '#.', '#:', '!', '/:', '\:', - '[', '[:', ']', '{', '{.', '{:', '{::', '}.', '}:', - '".', '":', '?', '?.', - '~', '\/;', '\\', '/.', '\\.', '}', //adverbs - '^:', ';.', '!.', '!:', //conj - '"', '`', '`:', '@', '@.', '@:', - '&', '&.', '&:', '&.:', - '_.', //nouns - '=.', '=:', //other - ), - //Primitives beginning with a letter or number - 7 => array( - 'A.', 'c.', 'C.', 'e.', 'E.', //verbs - 'i.', 'i:', 'I.', 'j.', 'L.', 'o.', - 'p.', 'p..', 'p:', 'q:', 'r.', 's:', 'u:', 'x:', - '_9:', '_8:', '_7:', '_6:', '_5:', '_4:', '_3:', '_2:', '_1:', - '0:', '1:', '2:', '3:', '4:', '5:', '6:', '7:', '8:', '9:', - 'b.', 'f.', 'M.', 't.', 't:', //adverbs - 'd.', 'D.', 'D:', 'H.', 'L:', 'S:', 'T.', //conj - 'a.', 'a:', //nouns - ), - //Primitives beginning with symbol . or : - 8 => array( - '..', '.:', '.', ':.', '::', ':', //conj - ), -*/ ), 'SYMBOLS' => array( //Punctuation @@ -132,17 +94,17 @@ Commented out for now due to conflicts with Lang Check GESHI_COMMENTS => false, 1 => true, 2 => true, -// 6 => true, -// 7 => true, -// 8 => true, + //6 => true, + //7 => true, + //8 => true, ), 'STYLES' => array( 'KEYWORDS' => array( 1 => 'color: #0000ff; font-weight: bold;', 2 => 'color: #0000cc; font-weight: bold;', -// 6 => 'color: #000000; font-weight: bold;', -// 7 => 'color: #000000; font-weight: bold;', -// 8 => 'color: #000000; font-weight: bold;', + //6 => 'color: #000000; font-weight: bold;', + //7 => 'color: #000000; font-weight: bold;', + //8 => 'color: #000000; font-weight: bold;', ), 'COMMENTS' => array( 1 => 'color: #666666; font-style: italic;', @@ -171,7 +133,6 @@ Commented out for now due to conflicts with Lang Check ), 'REGEXPS' => array( 0 => 'color: #0000ff; font-weight: bold;', //for_xyz. - same as kw1 - 1 => 'color: #009999; font-weight: bold;' //infinity - same as nu0 ), 'SCRIPT' => array( ) @@ -179,16 +140,15 @@ Commented out for now due to conflicts with Lang Check 'URLS' => array( 1 => '', //'http://www.jsoftware.com/help/dictionary/ctrl.htm', 2 => '', -// 6 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', -// 7 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', -// 8 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', + //6 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', + //7 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', + //8 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', ), 'OOLANG' => false, 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( 0 => '\b(for|goto|label)_[a-zA-Z]\w*\.', //for_xyz. - should be kw1 - 1 => '\b__?(?![\w\.\:])' //infinity - should be nu0 ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( @@ -199,6 +159,9 @@ Commented out for now due to conflicts with Lang Check 'ENABLE_FLAGS' => array( 'BRACKETS' => GESHI_NEVER, ), + 'NUMBERS' => array( + 'PRECHECK_RX' => '#[\d_]#', // underscore is valid number + ), 'KEYWORDS' => array( //Control words 2 => array( @@ -224,4 +187,4 @@ Commented out for now due to conflicts with Lang Check ) ); -?>
\ No newline at end of file +?> |