PageRenderTime 52ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/include/geshi/geshi/lb.php

https://github.com/Bigjoos/U-232-V3
PHP | 158 lines | 112 code | 2 blank | 44 comment | 0 complexity | 9a891aaf6eee87cc98fd3ca1a5b0717e MD5 | raw file
  1. <?php
  2. /*************************************************************************************
  3. * lb.php
  4. * --------
  5. * Author: Chris Iverson (cj.no.one@gmail.com)
  6. * Copyright: (c) 2010 Chris Iverson
  7. * Release Version: 1.0.8.9
  8. * Date Started: 2010/07/18
  9. *
  10. * Liberty BASIC language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2010/07/22
  15. * - First Release
  16. *
  17. * TODO (updated 2010/07/22)
  18. * -------------------------
  19. * Prevent highlighting numbers in handle names(constants beginning with #)
  20. * Allow number highlighting after a single period(e.g. .9 = 0.9, should be
  21. * highlighted
  22. * Prevent highlighting keywords within branch labels(within brackets)
  23. *
  24. *************************************************************************************
  25. *
  26. * This file is part of GeSHi.
  27. *
  28. * GeSHi is free software; you can redistribute it and/or modify
  29. * it under the terms of the GNU General Public License as published by
  30. * the Free Software Foundation; either version 2 of the License, or
  31. * (at your option) any later version.
  32. *
  33. * GeSHi is distributed in the hope that it will be useful,
  34. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  35. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  36. * GNU General Public License for more details.
  37. *
  38. * You should have received a copy of the GNU General Public License
  39. * along with GeSHi; if not, write to the Free Software
  40. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  41. *
  42. ************************************************************************************/
  43. $language_data = array(
  44. 'LANG_NAME' => 'Liberty BASIC',
  45. 'COMMENT_SINGLE' => array(1 => '\''),
  46. 'COMMENT_MULTI' => array(),
  47. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  48. 'QUOTEMARKS' => array('"'),
  49. 'ESCAPE_CHAR' => '',
  50. 'KEYWORDS' => array(
  51. 1 => array(
  52. 'and', 'append', 'as', 'beep', 'bmpbutton', 'bmpsave', 'boolean',
  53. 'button', 'byref', 'call', 'callback', 'calldll', 'callfn', 'case',
  54. 'checkbox', 'close', 'cls', 'colordialog', 'combobox', 'confirm',
  55. 'cursor', 'data', 'dialog', 'dim', 'dll', 'do', 'double', 'dump',
  56. 'dword', 'else', 'end', 'error', 'exit', 'field', 'filedialog',
  57. 'files', 'fontdialog', 'for', 'function', 'get', 'gettrim',
  58. 'global', 'gosub', 'goto', 'graphicbox', 'graphics', 'groupbox',
  59. 'if', 'input', 'kill', 'let', 'line', 'listbox', 'loadbmp',
  60. 'locate', 'long', 'loop', 'lprint', 'mainwin', 'maphandle', 'menu',
  61. 'mod', 'name', 'next', 'nomainwin', 'none', 'notice', 'on',
  62. 'oncomerror', 'or', 'open', 'out', 'output', 'password', 'playmidi',
  63. 'playwave', 'popupmenu', 'print', 'printerdialog', 'prompt', 'ptr',
  64. 'put', 'radiobutton', 'random', 'randomize', 'read', 'readjoystick',
  65. 'redim', 'rem', 'restore', 'resume', 'return', 'run', 'scan',
  66. 'seek', 'select', 'short', 'sort', 'statictext', 'stop', 'stopmidi',
  67. 'struct', 'stylebits', 'sub', 'text', 'textbox', 'texteditor',
  68. 'then', 'timer', 'titlebar', 'to', 'trace', 'ulong', 'unloadbmp',
  69. 'until', 'ushort', 'void', 'wait', 'window', 'wend', 'while',
  70. 'word', 'xor'
  71. ),
  72. 2 => array(
  73. 'abs', 'acs', 'asc', 'asn', 'atn', 'chr$', 'cos', 'date$',
  74. 'dechex$', 'eof', 'eval', 'eval$', 'exp', 'hbmp', 'hexdec', 'hwnd',
  75. 'inp', 'input$', 'inputto$', 'instr', 'int', 'left$', 'len', 'lof',
  76. 'log', 'lower$', 'max', 'midipos', 'mid$', 'min', 'mkdir', 'not',
  77. 'right$', 'rmdir', 'rnd', 'sin', 'space$', 'sqr', 'str$', 'tab',
  78. 'tan', 'time$', 'trim$', 'txcount', 'upper$', 'using', 'val',
  79. 'winstring', 'word$'
  80. ),
  81. 3 => array(
  82. 'BackgroundColor$', 'ComboboxColor$', 'CommandLine$', 'DefaultDir$',
  83. 'DisplayHeight', 'DisplayWidth', 'Drives$', 'Err', 'Err$',
  84. 'ForegroundColor$', 'Inkey$', 'Joy1x', 'Joy1y', 'Joy1z',
  85. 'Joy1button1', 'Joy1button2', 'Joy2x', 'Joy2y', 'Joy2z',
  86. 'Joy2button1', 'Joy2button2', 'ListboxColor$', 'Platform$',
  87. 'PrintCollate', 'PrintCopies', 'PrinterFont$', 'PrinterName$',
  88. 'TextboxColor$', 'TexteditorColor$', 'Version$', 'WindowHeight',
  89. 'WindowWidth', 'UpperLeftX', 'UpperLeftY'
  90. )
  91. ),
  92. 'SYMBOLS' => array(
  93. 1 => array(
  94. '(', ')', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', ':', ',', '#'
  95. )
  96. ),
  97. 'CASE_SENSITIVE' => array(
  98. GESHI_COMMENTS => false,
  99. 1 => false,
  100. 2 => false,
  101. 3 => true
  102. ),
  103. 'STYLES' => array(
  104. 'KEYWORDS' => array(
  105. 1 => 'color: #0000FF;',
  106. 2 => 'color: #AD0080;',
  107. 3 => 'color: #008080;'
  108. ),
  109. 'COMMENTS' => array(
  110. 1 => 'color: #666666; font-style: italic;',
  111. 'MULTI' => 'color: #666666; font-style: italic;'
  112. ),
  113. 'ESCAPE_CHAR' => array(
  114. 0 => 'color: #000099; font-weight: bold;'
  115. ),
  116. 'BRACKETS' => array(
  117. 0 => 'color: #009900;'
  118. ),
  119. 'STRINGS' => array(
  120. 0 => 'color: #008000;'
  121. ),
  122. 'NUMBERS' => array(
  123. 0 => 'color: #FF0000;',
  124. ),
  125. 'METHODS' => array(
  126. 0 => 'color: #004000;'
  127. ),
  128. 'SYMBOLS' => array(
  129. 1 => 'color: #339933;'
  130. ),
  131. 'REGEXPS' => array(),
  132. 'SCRIPT' => array()
  133. ),
  134. 'URLS' => array(
  135. 1 => '',
  136. 2 => '',
  137. 3 => ''
  138. ),
  139. 'OOLANG' => false,
  140. 'OBJECT_SPLITTERS' => array(),
  141. 'REGEXPS' => array(),
  142. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  143. 'SCRIPT_DELIMITERS' => array(),
  144. 'HIGHLIGHT_STRICT_BLOCK' => array(),
  145. 'PARSER_CONTROL' => array(
  146. 'KEYWORDS' => array(
  147. 2 => array(
  148. //In LB, the second keyword list is a list of built-in functions,
  149. //and their names should not be highlighted unless being used
  150. //as a function name.
  151. 'DISALLOWED_AFTER' => '(?=\s*\()'
  152. )
  153. )
  154. )
  155. );
  156. ?>