A tumblelog CMS built on AJAX, PHP and MySQL.

lua.php 5.5KB

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