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.

245 lines
11KB

  1. <?php
  2. /*************************************************************************************
  3. * cobol.php
  4. * ----------
  5. * Author: BenBE (BenBE@omorphia.org)
  6. * Copyright: (c) 2007-2008 BenBE (http://www.omorphia.de/)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2007/07/02
  9. *
  10. * COBOL language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. *
  15. * TODO (updated 2007/07/02)
  16. * -------------------------
  17. *
  18. *************************************************************************************
  19. *
  20. * This file is part of GeSHi.
  21. *
  22. * GeSHi is free software; you can redistribute it and/or modify
  23. * it under the terms of the GNU General Public License as published by
  24. * the Free Software Foundation; either version 2 of the License, or
  25. * (at your option) any later version.
  26. *
  27. * GeSHi is distributed in the hope that it will be useful,
  28. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  29. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  30. * GNU General Public License for more details.
  31. *
  32. * You should have received a copy of the GNU General Public License
  33. * along with GeSHi; if not, write to the Free Software
  34. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  35. *
  36. ************************************************************************************/
  37. $language_data = array (
  38. 'LANG_NAME' => 'COBOL',
  39. 'COMMENT_SINGLE' => array(),
  40. 'COMMENT_MULTI' => array(),
  41. 'COMMENT_REGEXP' => array(1 => '/^\*.*?$/m'),
  42. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  43. 'QUOTEMARKS' => array('"', "'"),
  44. 'ESCAPE_CHAR' => '\\',
  45. 'NUMBERS' =>
  46. GESHI_NUMBER_INT_BASIC |
  47. GESHI_NUMBER_FLT_NONSCI |
  48. GESHI_NUMBER_FLT_SCI_SHORT |
  49. GESHI_NUMBER_FLT_SCI_ZERO,
  50. 'KEYWORDS' => array(
  51. 1 => array( //Compiler Directives
  52. 'ANSI', 'BLANK', 'NOBLANK', 'CALL-SHARED', 'CANCEL', 'NOCANCEL',
  53. 'CHECK', 'CODE', 'NOCODE', 'COLUMNS', 'COMPACT', 'NOCOMPACT',
  54. 'COMPILE', 'CONSULT', 'NOCONSULT', 'CROSSREF', 'NOCROSSREF',
  55. 'DIAGNOSE-74', 'NODIAGNOSE-74', 'DIAGNOSE-85', 'NODIAGNOSE-85',
  56. 'DIAGNOSEALL', 'NODIAGNOSEALL', 'ENDIF', 'ENDUNIT', 'ENV',
  57. 'ERRORFILE', 'ERRORS', 'FIPS', 'NOFIPS', 'FMAP', 'HEADING', 'HEAP',
  58. 'HIGHPIN', 'HIGHREQUESTERS', 'ICODE', 'NOICODE', 'IF', 'IFNOT',
  59. 'INNERLIST', 'NOINNERLIST', 'INSPECT', 'NOINSPECT', 'LARGEDATA',
  60. 'LD', 'LESS-CODE', 'LIBRARY', 'LINES', 'LIST', 'NOLIST', 'LMAP',
  61. 'NOLMAP', 'MAIN', 'MAP', 'NOMAP', 'NLD', 'NONSTOP', 'NON-SHARED',
  62. 'OPTIMIZE', 'PERFORM-TRACE', 'PORT', 'NOPORT', 'RESETTOG',
  63. 'RUNNABLE', 'RUNNAMED', 'SAVE', 'SAVEABEND', 'NOSAVEABEND',
  64. 'SEARCH', 'NOSEARCH', 'SECTION', 'SETTOG', 'SHARED', 'SHOWCOPY',
  65. 'NOSHOWCOPY', 'SHOWFILE', 'NOSHOWFILE', 'SOURCE', 'SQL', 'NOSQL',
  66. 'SQLMEM', 'SUBSET', 'SUBTYPE', 'SUPPRESS', 'NOSUPPRESS', 'SYMBOLS',
  67. 'NOSYMBOLS', 'SYNTAX', 'TANDEM', 'TRAP2', 'NOTRAP2', 'TRAP2-74',
  68. 'NOTRAP2-74', 'UL', 'WARN', 'NOWARN'
  69. ),
  70. 2 => array( //Statement Keywords
  71. 'ACCEPT', 'ADD', 'TO', 'GIVING', 'CORRESPONDING', 'ALTER', 'CALL',
  72. 'CHECKPOINT', 'CLOSE', 'COMPUTE', 'CONTINUE', 'COPY',
  73. 'DELETE', 'DISPLAY', 'DIVIDE', 'INTO', 'REMAINDER', 'ENTER',
  74. 'COBOL', 'EVALUATE', 'EXIT', 'GO', 'INITIALIZE',
  75. 'TALLYING', 'REPLACING', 'CONVERTING', 'LOCKFILE', 'MERGE', 'MOVE',
  76. 'MULTIPLY', 'OPEN', 'PERFORM', 'TIMES',
  77. 'UNTIL', 'VARYING', 'RETURN',
  78. ),
  79. 3 => array( //Reserved in some contexts
  80. 'ACCESS', 'ADDRESS', 'ADVANCING', 'AFTER', 'ALL',
  81. 'ALPHABET', 'ALPHABETIC', 'ALPHABETIC-LOWER', 'ALPHABETIC-UPPER',
  82. 'ALPHANUMERIC', 'ALPHANUMERIC-EDITED', 'ALSO', 'ALTERNATE',
  83. 'AND', 'ANY', 'APPROXIMATE', 'AREA', 'AREAS', 'ASCENDING', 'ASSIGN',
  84. 'AT', 'AUTHOR', 'BEFORE', 'BINARY', 'BLOCK', 'BOTTOM', 'BY',
  85. 'CD', 'CF', 'CH', 'CHARACTER', 'CHARACTERS',
  86. 'CHARACTER-SET', 'CLASS', 'CLOCK-UNITS',
  87. 'CODE-SET', 'COLLATING', 'COLUMN', 'COMMA',
  88. 'COMMON', 'COMMUNICATION', 'COMP', 'COMP-3', 'COMP-5',
  89. 'COMPUTATIONAL', 'COMPUTATIONAL-3', 'COMPUTATIONAL-5',
  90. 'CONFIGURATION', 'CONTAINS', 'CONTENT', 'CONTROL',
  91. 'CONTROLS', 'CORR', 'COUNT',
  92. 'CURRENCY', 'DATA', 'DATE', 'DATE-COMPILED', 'DATE-WRITTEN', 'DAY',
  93. 'DAY-OF-WEEK', 'DE', 'DEBUG-CONTENTS', 'DEBUG-ITEM', 'DEBUG-LINE',
  94. 'DEBUG-SUB-2', 'DEBUG-SUB-3', 'DEBUGGING', 'DECIMAL-POINT',
  95. 'DECLARATIVES', 'DEBUG-NAME', 'DEBUG-SUB-1', 'DELIMITED',
  96. 'DELIMITER', 'DEPENDING', 'DESCENDING', 'DESTINATION', 'DETAIL',
  97. 'DISABLE', 'DIVISION', 'DOWN', 'DUPLICATES',
  98. 'DYNAMIC', 'EGI', 'ELSE', 'EMI', 'ENABLE', 'END', 'END-ADD',
  99. 'END-COMPUTE', 'END-DELETE', 'END-DIVIDE', 'END-EVALUATE', 'END-IF',
  100. 'END-MULTIPLY', 'END-OF-PAGE', 'END-PERFORM', 'END-READ',
  101. 'END-RECEIVE', 'END-RETURN', 'END-REWRITE', 'END-SEARCH',
  102. 'END-START', 'END-STRING', 'END-SUBTRACT', 'END-UNSTRING',
  103. 'END-WRITE', 'EOP', 'EQUAL', 'ERROR', 'ESI',
  104. 'EVERY', 'EXCEPTION', 'EXCLUSIVE', 'EXTEND',
  105. 'EXTENDED-STORAGE', 'EXTERNAL', 'FALSE', 'FD', 'FILE',
  106. 'FILE-CONTROL', 'FILLER', 'FINAL', 'FIRST', 'FOOTING', 'FOR',
  107. 'FROM', 'FUNCTION', 'GENERATE', 'GENERIC', 'GLOBAL',
  108. 'GREATER', 'GROUP', 'GUARDIAN-ERR', 'HIGH-VALUE',
  109. 'HIGH-VALUES', 'I-O', 'I-O-CONTROL', 'IDENTIFICATION', 'IN',
  110. 'INDEX', 'INDEXED', 'INDICATE', 'INITIAL', 'INITIATE',
  111. 'INPUT', 'INPUT-OUTPUT', 'INSTALLATION',
  112. 'INVALID', 'IS', 'JUST', 'JUSTIFIED', 'KEY', 'LABEL', 'LAST',
  113. 'LEADING', 'LEFT', 'LESS', 'LIMIT', 'LIMITS', 'LINAGE',
  114. 'LINAGE-COUNTER', 'LINE', 'LINE-COUNTER', 'LINKAGE', 'LOCK',
  115. 'LOW-VALUE', 'LOW-VALUES', 'MEMORY', 'MESSAGE',
  116. 'MODE', 'MODULES', 'MULTIPLE', 'NATIVE',
  117. 'NEGATIVE', 'NEXT', 'NO', 'NOT', 'NULL', 'NULLS', 'NUMBER',
  118. 'NUMERIC', 'NUMERIC-EDITED', 'OBJECT-COMPUTER', 'OCCURS', 'OF',
  119. 'OFF', 'OMITTED', 'ON', 'OPTIONAL', 'OR', 'ORDER',
  120. 'ORGANIZATION', 'OTHER', 'OUTPUT', 'OVERFLOW', 'PACKED-DECIMAL',
  121. 'PADDING', 'PAGE', 'PAGE-COUNTER', 'PF', 'PH', 'PIC',
  122. 'PICTURE', 'PLUS', 'POINTER', 'POSITION', 'POSITIVE', 'PRINTING',
  123. 'PROCEDURE', 'PROCEDURES', 'PROCEED', 'PROGRAM', 'PROGRAM-ID',
  124. 'PROGRAM-STATUS', 'PROGRAM-STATUS-1', 'PROGRAM-STATUS-2', 'PROMPT',
  125. 'PROTECTED', 'PURGE', 'QUEUE', 'QUOTE', 'QUOTES', 'RD',
  126. 'RECEIVE', 'RECEIVE-CONTROL', 'RECORD', 'RECORDS',
  127. 'REDEFINES', 'REEL', 'REFERENCE', 'REFERENCES', 'RELATIVE',
  128. 'REMOVAL', 'RENAMES', 'REPLACE',
  129. 'REPLY', 'REPORT', 'REPORTING', 'REPORTS', 'RERUN',
  130. 'RESERVE', 'RESET', 'REVERSED', 'REWIND', 'REWRITE', 'RF',
  131. 'RH', 'RIGHT', 'ROUNDED', 'RUN', 'SAME', 'SD',
  132. 'SECURITY', 'SEGMENT', 'SEGMENT-LIMIT', 'SELECT', 'SEND',
  133. 'SENTENCE', 'SEPARATE', 'SEQUENCE', 'SEQUENTIAL', 'SET',
  134. 'SIGN', 'SIZE', 'SORT', 'SORT-MERGE', 'SOURCE-COMPUTER',
  135. 'SPACE', 'SPACES', 'SPECIAL-NAMES', 'STANDARD', 'STANDARD-1',
  136. 'STANDARD-2', 'START', 'STARTBACKUP', 'STATUS', 'STOP', 'STRING',
  137. 'SUB-QUEUE-1', 'SUB-QUEUE-2', 'SUB-QUEUE-3', 'SUBTRACT',
  138. 'SYMBOLIC', 'SYNC', 'SYNCDEPTH', 'SYNCHRONIZED',
  139. 'TABLE', 'TAL', 'TAPE', 'TERMINAL', 'TERMINATE', 'TEST',
  140. 'TEXT', 'THAN', 'THEN', 'THROUGH', 'THRU', 'TIME',
  141. 'TOP', 'TRAILING', 'TRUE', 'TYPE', 'UNIT', 'UNLOCK', 'UNLOCKFILE',
  142. 'UNLOCKRECORD', 'UNSTRING', 'UP', 'UPON', 'USAGE', 'USE',
  143. 'USING', 'VALUE', 'VALUES', 'WHEN', 'WITH', 'WORDS',
  144. 'WORKING-STORAGE', 'WRITE', 'ZERO', 'ZEROES'
  145. ),
  146. 4 => array( //Standard functions
  147. 'ACOS', 'ANNUITY', 'ASIN', 'ATAN', 'CHAR', 'COS', 'CURRENT-DATE',
  148. 'DATE-OF-INTEGER', 'DAY-OF-INTEGER', 'FACTORIAL', 'INTEGER',
  149. 'INTEGER-OF-DATE', 'INTEGER-OF-DAY', 'INTEGER-PART', 'LENGTH',
  150. 'LOG', 'LOG10', 'LOWER-CASE', 'MAX', 'MEAN', 'MEDIAN', 'MIDRANGE',
  151. 'MIN', 'MOD', 'NUMVAL', 'NUMVAL-C', 'ORD', 'ORD-MAX', 'ORD-MIN',
  152. 'PRESENT-VALUE', 'RANDOM', 'RANGE', 'REM', 'REVERSE', 'SIN', 'SQRT',
  153. 'STANDARD-DEVIATION', 'SUM', 'TAN', 'UPPER-CASE', 'VARIANCE',
  154. 'WHEN-COMPILED'
  155. ),
  156. 5 => array( //Privileged Built-in Functions
  157. '#IN', '#OUT', '#TERM', '#TEMP', '#DYNAMIC', 'COBOL85^ARMTRAP',
  158. 'COBOL85^COMPLETION', 'COBOL_COMPLETION_', 'COBOL_CONTROL_',
  159. 'COBOL_GETENV_', 'COBOL_PUTENV_', 'COBOL85^RETURN^SORT^ERRORS',
  160. 'COBOL_RETURN_SORT_ERRORS_', 'COBOL85^REWIND^SEQUENTIAL',
  161. 'COBOL_REWIND_SEQUENTIAL_', 'COBOL85^SET^SORT^PARAM^TEXT',
  162. 'COBOL_SET_SORT_PARAM_TEXT_', 'COBOL85^SET^SORT^PARAM^VALUE',
  163. 'COBOL_SET_SORT_PARAM_VALUE_', 'COBOL_SET_MAX_RECORD_',
  164. 'COBOL_SETMODE_', 'COBOL85^SPECIAL^OPEN', 'COBOL_SPECIAL_OPEN_',
  165. 'COBOLASSIGN', 'COBOL_ASSIGN_', 'COBOLFILEINFO', 'COBOL_FILE_INFO_',
  166. 'COBOLSPOOLOPEN', 'CREATEPROCESS', 'ALTERPARAMTEXT',
  167. 'CHECKLOGICALNAME', 'CHECKMESSAGE', 'DELETEASSIGN', 'DELETEPARAM',
  168. 'DELETESTARTUP', 'GETASSIGNTEXT', 'GETASSIGNVALUE', 'GETBACKUPCPU',
  169. 'GETPARAMTEXT', 'GETSTARTUPTEXT', 'PUTASSIGNTEXT', 'PUTASSIGNVALUE',
  170. 'PUTPARAMTEXT', 'PUTSTARTUPTEXT'
  171. )
  172. ),
  173. 'SYMBOLS' => array(
  174. //Avoid having - in identifiers marked as symbols
  175. ' + ', ' - ', ' * ', ' / ', ' ** ',
  176. '.', ',',
  177. '=',
  178. '(', ')', '[', ']'
  179. ),
  180. 'CASE_SENSITIVE' => array(
  181. GESHI_COMMENTS => false,
  182. 1 => false,
  183. 2 => false,
  184. 3 => false,
  185. 4 => false,
  186. 5 => false
  187. ),
  188. 'STYLES' => array(
  189. 'KEYWORDS' => array(
  190. 1 => 'color: #000080; font-weight: bold;',
  191. 2 => 'color: #000000; font-weight: bold;',
  192. 3 => 'color: #008000; font-weight: bold;',
  193. 4 => 'color: #000080;',
  194. 5 => 'color: #008000;',
  195. ),
  196. 'COMMENTS' => array(
  197. 1 => 'color: #a0a0a0; font-style: italic;',
  198. 'MULTI' => 'color: #a0a0a0; font-style: italic;'
  199. ),
  200. 'ESCAPE_CHAR' => array(
  201. 0 => 'color: #000099; font-weight: bold;'
  202. ),
  203. 'BRACKETS' => array(
  204. 0 => 'color: #339933;'
  205. ),
  206. 'STRINGS' => array(
  207. 0 => 'color: #ff0000;'
  208. ),
  209. 'NUMBERS' => array(
  210. 0 => 'color: #993399;'
  211. ),
  212. 'METHODS' => array(
  213. 1 => 'color: #202020;'
  214. ),
  215. 'SYMBOLS' => array(
  216. 0 => 'color: #000066;'
  217. ),
  218. 'REGEXPS' => array(
  219. ),
  220. 'SCRIPT' => array(
  221. )
  222. ),
  223. 'URLS' => array(
  224. 1 => '',
  225. 2 => '',
  226. 3 => '',
  227. 4 => '',
  228. 5 => ''
  229. ),
  230. 'OOLANG' => false,
  231. 'OBJECT_SPLITTERS' => array(
  232. ),
  233. 'REGEXPS' => array(
  234. ),
  235. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  236. 'SCRIPT_DELIMITERS' => array(
  237. ),
  238. 'HIGHLIGHT_STRICT_BLOCK' => array(
  239. ),
  240. 'TAB_WIDTH' => 4
  241. );
  242. ?>