plugins/geshi/geshi/lua.php
author Dan
Fri, 29 May 2009 19:40:15 -0400
changeset 3 f3e2bbbd2155
parent 2 9e3258dfae15
permissions -rw-r--r--
Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     1
<?php
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     2
/*************************************************************************************
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     3
 * lua.php
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     4
 * -------
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     5
 * Author: Roberto Rossi (rsoftware@altervista.org)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     6
 * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
3
f3e2bbbd2155 Updated to latest GeSHi, 1.0.8.4, released May 23, 2009.
Dan
parents: 2
diff changeset
     7
 * Release Version: 1.0.8.4
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     8
 * Date Started: 2004/07/10
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     9
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    10
 * LUA language file for GeSHi.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    11
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    12
 * CHANGES
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    13
 * -------
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    14
 * 2005/08/26 (1.0.2)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    15
 *  -  Added support for objects and methods
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    16
 *  -  Removed unusable keywords
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    17
 * 2004/11/27 (1.0.1)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    18
 *  -  Added support for multiple object splitters
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    19
 * 2004/10/27 (1.0.0)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    20
 *  -  First Release
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    21
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    22
 * TODO (updated 2004/11/27)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    23
 * -------------------------
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    24
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    25
 *************************************************************************************
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    26
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    27
 *     This file is part of GeSHi.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    28
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    29
 *   GeSHi is free software; you can redistribute it and/or modify
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    30
 *   it under the terms of the GNU General Public License as published by
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    31
 *   the Free Software Foundation; either version 2 of the License, or
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    32
 *   (at your option) any later version.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    33
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    34
 *   GeSHi is distributed in the hope that it will be useful,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    35
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    36
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    37
 *   GNU General Public License for more details.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    38
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    39
 *   You should have received a copy of the GNU General Public License
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    40
 *   along with GeSHi; if not, write to the Free Software
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    41
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    42
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    43
 ************************************************************************************/
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    44
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    45
$language_data = array (
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    46
    'LANG_NAME' => 'Lua',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    47
    'COMMENT_SINGLE' => array(1 => "--"),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    48
    'COMMENT_MULTI' => array('--[[' => ']]'),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    49
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    50
    'QUOTEMARKS' => array("'", '"'),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    51
    'ESCAPE_CHAR' => '\\',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    52
    'KEYWORDS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    53
        1 => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    54
            'and','break','do','else','elseif','end','false','for','function','if',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    55
            'in','local','nil','not','or','repeat','return','then','true','until','while',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    56
            '_VERSION','assert','collectgarbage','dofile','error','gcinfo','loadfile','loadstring',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    57
            'print','tonumber','tostring','type','unpack',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    58
            '_ALERT','_ERRORMESSAGE','_INPUT','_PROMPT','_OUTPUT',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    59
            '_STDERR','_STDIN','_STDOUT','call','dostring','foreach','foreachi','getn','globals','newtype',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    60
            'rawget','rawset','require','sort','tinsert','tremove',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    61
            'abs','acos','asin','atan','atan2','ceil','cos','deg','exp',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    62
            'floor','format','frexp','gsub','ldexp','log','log10','max','min','mod','rad','random','randomseed',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    63
            'sin','sqrt','strbyte','strchar','strfind','strlen','strlower','strrep','strsub','strupper','tan',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    64
            'openfile','closefile','readfrom','writeto','appendto',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    65
            'remove','rename','flush','seek','tmpfile','tmpname','read','write',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    66
            'clock','date','difftime','execute','exit','getenv','setlocale','time',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    67
            '_G','getfenv','getmetatable','ipairs','loadlib','next','pairs','pcall',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    68
            'rawegal','setfenv','setmetatable','xpcall',
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    69
            'string.byte','string.char','string.dump','string.find','string.len',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    70
            'string.lower','string.rep','string.sub','string.upper','string.format','string.gfind','string.gsub',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    71
            'table.concat','table.foreach','table.foreachi','table.getn','table.sort','table.insert','table.remove','table.setn',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    72
            'math.abs','math.acos','math.asin','math.atan','math.atan2','math.ceil','math.cos','math.deg','math.exp',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    73
            'math.floor','math.frexp','math.ldexp','math.log','math.log10','math.max','math.min','math.mod',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    74
            'math.pi','math.rad','math.random','math.randomseed','math.sin','math.sqrt','math.tan',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    75
            'coroutine.create','coroutine.resume','coroutine.status',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    76
            'coroutine.wrap','coroutine.yield',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    77
            'io.close','io.flush','io.input','io.lines','io.open','io.output','io.read','io.tmpfile','io.type','io.write',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    78
            'io.stdin','io.stdout','io.stderr',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    79
            'os.clock','os.date','os.difftime','os.execute','os.exit','os.getenv','os.remove','os.rename',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    80
            'os.setlocale','os.time','os.tmpname',
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    81
            'string','table','math','coroutine','io','os','debug'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    82
            )
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    83
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    84
    'SYMBOLS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    85
        '(', ')', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '=', ';'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    86
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    87
    'CASE_SENSITIVE' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    88
        GESHI_COMMENTS => false,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    89
        1 => true
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    90
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    91
    'STYLES' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    92
        'KEYWORDS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    93
            1 => 'color: #b1b100;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    94
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    95
        'COMMENTS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    96
            1 => 'color: #808080; font-style: italic;',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    97
            'MULTI' => 'color: #808080; font-style: italic;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    98
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    99
        'ESCAPE_CHAR' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   100
            0 => 'color: #000099; font-weight: bold;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   101
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   102
        'BRACKETS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   103
            0 => 'color: #66cc66;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   104
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   105
        'STRINGS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   106
            0 => 'color: #ff0000;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   107
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   108
        'NUMBERS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   109
            0 => 'color: #cc66cc;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   110
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   111
        'METHODS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   112
            0 => 'color: #b1b100;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   113
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   114
        'SYMBOLS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   115
            0 => 'color: #66cc66;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   116
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   117
        'REGEXPS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   118
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   119
        'SCRIPT' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   120
            )
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   121
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   122
    'URLS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   123
        1 => ''
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   124
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   125
    'OOLANG' => false,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   126
    'OBJECT_SPLITTERS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   127
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   128
    'REGEXPS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   129
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   130
    'STRICT_MODE_APPLIES' => GESHI_NEVER,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   131
    'SCRIPT_DELIMITERS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   132
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   133
    'HIGHLIGHT_STRICT_BLOCK' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   134
        )
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   135
);
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   136
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   137
?>