KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

214 lines
10KB

  1. <?php
  2. /*************************************************************************************
  3. * gambas.php
  4. * ---------
  5. * Author: Jesus Guardon (jguardon@telefonica.net)
  6. * Copyright: (c) 2009 Jesus Guardon (http://gambas-es.org),
  7. * Benny Baumann (http://qbnz.com/highlighter)
  8. * Release Version: 1.0.8.11
  9. * Date Started: 2004/08/20
  10. *
  11. * GAMBAS language file for GeSHi.
  12. * GAMBAS Official Site: http://gambas.sourceforge.net
  13. *
  14. * CHANGES
  15. * -------
  16. * 2009/09/26 (1.0.1)
  17. * - Splitted dollar-ended keywords in another group to match with or without '$'
  18. * - Modified URL for object/components keywords search through Google "I'm feeling lucky"
  19. * 2009/09/23 (1.0.0)
  20. * - Initial release
  21. *
  22. * TODO (updated 2009/09/26)
  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' => 'GAMBAS',
  46. 'COMMENT_SINGLE' => array(1 => "'"),
  47. 'COMMENT_MULTI' => array(),
  48. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  49. 'QUOTEMARKS' => array('"'),
  50. 'ESCAPE_CHAR' => '\\',
  51. 'NUMBERS' =>
  52. GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX |
  53. GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
  54. 'KEYWORDS' => array(
  55. //keywords
  56. 1 => array(
  57. 'APPEND', 'AS', 'BREAK', 'BYREF', 'CASE', 'CATCH', 'CLASS', 'CLOSE', 'CONST', 'CONTINUE', 'COPY',
  58. 'CREATE', 'DEBUG', 'DEC', 'DEFAULT', 'DIM', 'DO', 'EACH', 'ELSE', 'END', 'ENDIF', 'ERROR', 'EVENT', 'EXEC',
  59. 'EXPORT', 'EXTERN', 'FALSE', 'FINALLY', 'FLUSH', 'FOR', 'FUNCTION', 'GOTO', 'IF', 'IN', 'INC', 'INHERITS',
  60. 'INPUT', 'FROM', 'IS', 'KILL', 'LAST', 'LIBRARY', 'LIKE', 'LINE INPUT', 'LINK', 'LOCK', 'LOOP', 'ME',
  61. 'MKDIR', 'MOVE', 'NEW', 'NEXT', 'NULL', 'OPEN', 'OPTIONAL', 'OUTPUT', 'PIPE', 'PRINT', 'PRIVATE',
  62. 'PROCEDURE', 'PROPERTY', 'PUBLIC', 'QUIT', 'RAISE', 'RANDOMIZE', 'READ', 'REPEAT', 'RETURN', 'RMDIR',
  63. 'SEEK', 'SELECT', 'SHELL', 'SLEEP', 'STATIC', 'STEP', 'STOP', 'SUB', 'SUPER', 'SWAP', 'THEN', 'TO',
  64. 'TRUE', 'TRY', 'UNLOCK', 'UNTIL', 'WAIT', 'WATCH', 'WEND', 'WHILE', 'WITH', 'WRITE'
  65. ),
  66. //functions
  67. 2 => array(
  68. 'Abs', 'Access', 'Acos', 'Acosh', 'Alloc', 'Ang', 'Asc', 'ASin', 'ASinh', 'Asl', 'Asr', 'Assign', 'Atan',
  69. 'ATan2', 'ATanh',
  70. 'BChg', 'BClr', 'Bin', 'BSet', 'BTst',
  71. 'CBool', 'Cbr', 'CByte', 'CDate', 'CFloat', 'Choose', 'Chr', 'CInt', 'CLong', 'Comp', 'Conv', 'Cos',
  72. 'Cosh', 'CShort', 'CSng', 'CStr',
  73. 'DateAdd', 'DateDiff', 'Day', 'DConv', 'Deg', 'DFree', 'Dir',
  74. 'Eof', 'Eval', 'Exist', 'Exp', 'Exp10', 'Exp2', 'Expm',
  75. 'Fix', 'Format', 'Frac', 'Free',
  76. 'Hex', 'Hour', 'Hyp',
  77. 'Iif', 'InStr', 'Int', 'IsAscii', 'IsBlank', 'IsBoolean', 'IsByte', 'IsDate', 'IsDigit', 'IsDir',
  78. 'IsFloat', 'IsHexa', 'IsInteger', 'IsLCase', 'IsLetter', 'IsLong', 'IsNull', 'IsNumber', 'IsObject',
  79. 'IsPunct', 'IsShort', 'IsSingle', 'IsSpace', 'IsString', 'IsUCase', 'IsVariant',
  80. 'LCase', 'Left', 'Len', 'Lof', 'Log', 'Log10', 'Log2', 'Logp', 'Lsl', 'Lsr', 'LTrim',
  81. 'Mag', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'Now', 'Quote',
  82. 'Rad', 'RDir', 'Realloc', 'Replace', 'Right', 'RInStr', 'Rnd', 'Rol', 'Ror', 'Round', 'RTrim',
  83. 'Scan', 'SConv', 'Second', 'Seek', 'Sgn', 'Shl', 'Shr', 'Sin', 'Sinh', 'Space', 'Split', 'Sqr',
  84. 'Stat', 'Str', 'StrPtr', 'Subst',
  85. 'Tan', 'Tanh', 'Temp$', 'Time', 'Timer', 'Tr', 'Trim', 'TypeOf',
  86. 'UCase', 'Unquote', 'Val', 'VarPtr', 'Week', 'WeekDay', 'Year'
  87. ),
  88. //string functions
  89. 3 => array(
  90. 'Bin$', 'Chr$', 'Conv$', 'DConv$', 'Format$', 'Hex$', 'LCase$', 'Left$', 'LTrim$', 'Mid$', 'Quote$',
  91. 'Replace$', 'Right$', 'SConv$', 'Space$', 'Str$', 'String$', 'Subst$', 'Tr$', 'Trim$', 'UCase$',
  92. 'Unquote$'
  93. ),
  94. //datatypes
  95. 4 => array(
  96. 'Boolean', 'Byte', 'Short', 'Integer', 'Long', 'Single', 'Float', 'Date', 'String', 'Variant', 'Object',
  97. 'Pointer', 'File'
  98. ),
  99. //operators
  100. 5 => array(
  101. 'AND', 'DIV', 'MOD', 'NOT', 'OR', 'XOR'
  102. ),
  103. //objects/classes
  104. 6 => array(
  105. 'Application', 'Array', 'Byte[]', 'Collection', 'Component', 'Enum', 'Observer', 'Param', 'Process',
  106. 'Stream', 'System', 'User', 'Chart', 'Compress', 'Crypt', 'Blob', 'Connection', 'DB', 'Database',
  107. 'DatabaseUser', 'Field', 'Index', 'Result', 'ResultField', 'Table', 'DataBrowser', 'DataCombo',
  108. 'DataControl', 'DataSource', 'DataView', 'Desktop', 'DesktopFile', 'Balloon', 'ColorButton',
  109. 'ColorChooser', 'DateChooser', 'DirChooser', 'DirView', 'Expander', 'FileChooser', 'FileView',
  110. 'FontChooser', 'InputBox', 'ListContainer', 'SidePanel', 'Stock', 'TableView', 'ToolPanel', 'ValueBox',
  111. 'Wizard', 'Dialog', 'ToolBar', 'WorkSpace', 'DnsClient', 'SerialPort', 'ServerSocket', 'Socket',
  112. 'UdpSocket', 'FtpClient', 'HttpClient', 'SmtpClient', 'Regexp', 'Action', 'Button', 'CheckBox',
  113. 'ColumnView', 'ComboBox', 'Draw', 'Container', 'Control', 'Cursor', 'DrawingArea', 'Embedder',
  114. 'Font', 'Form', 'Frame', 'GridView', 'HBox', 'HPanel', 'HSplit', 'IconView', 'Image', 'Key', 'Label',
  115. 'Line', 'ListBox', 'ListView', 'Menu', 'Message', 'Mouse', 'MovieBox', 'Panel', 'Picture', 'PictureBox',
  116. 'ProgressBar', 'RadioButton', 'ScrollBar', 'ScrollView', 'Separator', 'Slider', 'SpinBox', 'TabStrip',
  117. 'TextArea', 'TextBox', 'TextLabel', 'ToggleButton', 'TrayIcon', 'TreeView', 'VBox', 'VPanel', 'VSplit',
  118. 'Watcher', 'Window', 'Dial', 'Editor', 'LCDNumber', 'Printer', 'TextEdit', 'WebBrowser', 'GLarea',
  119. 'Report', 'ReportCloner', 'ReportContainer', 'ReportControl', 'ReportDrawing', 'ReportField', 'ReportHBox',
  120. 'ReportImage', 'ReportLabel', 'ReportSection', 'ReportSpecialField', 'ReportTextLabel', 'ReportVBox',
  121. 'CDRom', 'Channel', 'Music', 'Sound', 'Settings', 'VideoDevice', 'Vb', 'CGI', 'HTML', 'Request', 'Response',
  122. 'Session', 'XmlDocument', 'XmlNode', 'XmlReader', 'XmlReaderNodeType', 'XmlWriter', 'RpcArray', 'RpcClient',
  123. 'RpcFunction', 'RpcServer', 'RpcStruct', 'RpcType', 'XmlRpc', 'Xslt'
  124. ),
  125. //constants
  126. 7 => array(
  127. 'Pi'
  128. ),
  129. ),
  130. 'SYMBOLS' => array(
  131. '&', '&=', '&/', '*', '*=', '+', '+=', '-', '-=', '//', '/', '/=', '=', '==', '\\', '\\=',
  132. '^', '^=', '[', ']', '{', '}', '<', '>', '<>', '<=', '>='
  133. ),
  134. 'CASE_SENSITIVE' => array(
  135. GESHI_COMMENTS => false,
  136. 1 => false,
  137. 2 => false,
  138. 3 => false,
  139. 4 => false,
  140. 5 => false,
  141. 6 => false,
  142. 7 => false,
  143. ),
  144. 'STYLES' => array(
  145. 'KEYWORDS' => array(
  146. 1 => 'color: #0600FF; font-weight: bold;', // Keywords
  147. 2 => 'color: #8B1433;', // Functions
  148. 3 => 'color: #8B1433;', // String Functions
  149. 4 => 'color: #0600FF;', // Data Types
  150. 5 => 'color: #1E90FF;', // Operators
  151. 6 => 'color: #0600FF;', // Objects/Components
  152. 7 => 'color: #0600FF;' // Constants
  153. ),
  154. 'COMMENTS' => array(
  155. 1 => 'color: #1A5B1A; font-style: italic;',
  156. 'MULTI' => 'color: #1A5B1A; font-style: italic;'
  157. ),
  158. 'ESCAPE_CHAR' => array(
  159. 0 => 'color: #008080;'
  160. ),
  161. 'BRACKETS' => array(
  162. 0 => 'color: #612188;'
  163. ),
  164. 'STRINGS' => array(
  165. 0 => 'color: #7E4B05;'
  166. ),
  167. 'NUMBERS' => array(
  168. 0 => 'color: #FF0000;',
  169. GESHI_NUMBER_INT_BASIC => 'color: #FF0000;'
  170. ),
  171. 'METHODS' => array(
  172. 1 => 'color: #0000FF;'
  173. ),
  174. 'SYMBOLS' => array(
  175. 0 => 'color: #6132B2;'
  176. ),
  177. 'REGEXPS' => array(
  178. //3 => 'color: #8B1433;' //fakes '$' colour matched by REGEXP
  179. ),
  180. 'SCRIPT' => array(
  181. )
  182. ),
  183. 'URLS' => array(
  184. 1 => 'http://gambasdoc.org/help/lang/{FNAMEL}',
  185. 2 => 'http://gambasdoc.org/help/lang/{FNAMEL}',
  186. 3 => 'http://www.google.com/search?hl=en&amp;q={FNAMEL}+site:http://gambasdoc.org/help/lang/&amp;btnI=I%27m%20Feeling%20Lucky',
  187. 4 => 'http://gambasdoc.org/help/lang/type/{FNAMEL}',
  188. 5 => 'http://gambasdoc.org/help/lang/{FNAMEL}',
  189. 6 => 'http://www.google.com/search?hl=en&amp;q={FNAMEL}+site:http://gambasdoc.org/&amp;btnI=I%27m%20Feeling%20Lucky',
  190. 7 => 'http://gambasdoc.org/help/lang/{FNAMEL}'
  191. ),
  192. 'OOLANG' => true,
  193. 'OBJECT_SPLITTERS' => array(
  194. 1 =>'.'
  195. ),
  196. 'REGEXPS' => array(
  197. //3 => "\\$(?!\\w)" //matches '$' at the end of Keyword
  198. ),
  199. 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
  200. 'SCRIPT_DELIMITERS' => array(
  201. ),
  202. 'HIGHLIGHT_STRICT_BLOCK' => array(
  203. ),
  204. 'PARSER_CONTROL' => array(
  205. 'KEYWORDS' => array(
  206. 2 => array(
  207. 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_\|%\\-&;\$])"
  208. )
  209. )
  210. )
  211. );
  212. ?>