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.

270 lines
9.9KB

  1. <?php
  2. /*************************************************************************************
  3. * upc.php
  4. * -----
  5. * Author: Viraj Sinha (viraj@indent.com)
  6. * Contributors:
  7. * - Nigel McNie (nigel@geshi.org)
  8. * - Jack Lloyd (lloyd@randombit.net)
  9. * - Michael Mol (mikemol@gmail.com)
  10. * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
  11. * Release Version: 1.0.8.11
  12. * Date Started: 2004/06/04
  13. *
  14. * UPC language file for GeSHi.
  15. *
  16. * CHANGES
  17. * -------
  18. * 2011/06/14 (1.0.8.11)
  19. * - This file is a revision of c.php with UPC keywords added
  20. *
  21. *************************************************************************************
  22. *
  23. * This file is part of GeSHi.
  24. *
  25. * GeSHi is free software; you can redistribute it and/or modify
  26. * it under the terms of the GNU General Public License as published by
  27. * the Free Software Foundation; either version 2 of the License, or
  28. * (at your option) any later version.
  29. *
  30. * GeSHi is distributed in the hope that it will be useful,
  31. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  32. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  33. * GNU General Public License for more details.
  34. *
  35. * You should have received a copy of the GNU General Public License
  36. * along with GeSHi; if not, write to the Free Software
  37. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  38. *
  39. ************************************************************************************/
  40. $language_data = array (
  41. 'LANG_NAME' => 'UPC',
  42. 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
  43. 'COMMENT_MULTI' => array('/*' => '*/'),
  44. 'COMMENT_REGEXP' => array(
  45. //Multiline-continued single-line comments
  46. 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
  47. //Multiline-continued preprocessor define
  48. 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m'
  49. ),
  50. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  51. 'QUOTEMARKS' => array("'", '"'),
  52. 'ESCAPE_CHAR' => '',
  53. 'ESCAPE_REGEXP' => array(
  54. //Simple Single Char Escapes
  55. 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i",
  56. //Hexadecimal Char Specs
  57. 2 => "#\\\\x[\da-fA-F]{2}#",
  58. //Hexadecimal Char Specs
  59. 3 => "#\\\\u[\da-fA-F]{4}#",
  60. //Hexadecimal Char Specs
  61. 4 => "#\\\\U[\da-fA-F]{8}#",
  62. //Octal Char Specs
  63. 5 => "#\\\\[0-7]{1,3}#"
  64. ),
  65. 'NUMBERS' =>
  66. GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
  67. GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
  68. GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
  69. 'KEYWORDS' => array(
  70. 1 => array(
  71. 'if', 'return', 'while', 'case', 'continue', 'default',
  72. 'do', 'else', 'for', 'switch', 'goto',
  73. 'upc_forall', 'upc_barrier', 'upc_notify', 'upc_wait', 'upc_fence'
  74. ),
  75. 2 => array(
  76. 'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline'
  77. ),
  78. 3 => array(
  79. // assert.h
  80. 'assert',
  81. //complex.h
  82. 'cabs', 'cacos', 'cacosh', 'carg', 'casin', 'casinh', 'catan',
  83. 'catanh', 'ccos', 'ccosh', 'cexp', 'cimag', 'cis', 'clog', 'conj',
  84. 'cpow', 'cproj', 'creal', 'csin', 'csinh', 'csqrt', 'ctan', 'ctanh',
  85. //ctype.h
  86. 'digittoint', 'isalnum', 'isalpha', 'isascii', 'isblank', 'iscntrl',
  87. 'isdigit', 'isgraph', 'islower', 'isprint', 'ispunct', 'isspace',
  88. 'isupper', 'isxdigit', 'toascii', 'tolower', 'toupper',
  89. //inttypes.h
  90. 'imaxabs', 'imaxdiv', 'strtoimax', 'strtoumax', 'wcstoimax',
  91. 'wcstoumax',
  92. //locale.h
  93. 'localeconv', 'setlocale',
  94. //math.h
  95. 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'exp',
  96. 'fabs', 'floor', 'frexp', 'ldexp', 'log', 'log10', 'modf', 'pow',
  97. 'sin', 'sinh', 'sqrt', 'tan', 'tanh',
  98. //setjmp.h
  99. 'longjmp', 'setjmp',
  100. //signal.h
  101. 'raise',
  102. //stdarg.h
  103. 'va_arg', 'va_copy', 'va_end', 'va_start',
  104. //stddef.h
  105. 'offsetof',
  106. //stdio.h
  107. 'clearerr', 'fclose', 'fdopen', 'feof', 'ferror', 'fflush', 'fgetc',
  108. 'fgetpos', 'fgets', 'fopen', 'fprintf', 'fputc', 'fputchar',
  109. 'fputs', 'fread', 'freopen', 'fscanf', 'fseek', 'fsetpos', 'ftell',
  110. 'fwrite', 'getc', 'getch', 'getchar', 'gets', 'perror', 'printf',
  111. 'putc', 'putchar', 'puts', 'remove', 'rename', 'rewind', 'scanf',
  112. 'setbuf', 'setvbuf', 'snprintf', 'sprintf', 'sscanf', 'tmpfile',
  113. 'tmpnam', 'ungetc', 'vfprintf', 'vfscanf', 'vprintf', 'vscanf',
  114. 'vsprintf', 'vsscanf',
  115. //stdlib.h
  116. 'abort', 'abs', 'atexit', 'atof', 'atoi', 'atol', 'bsearch',
  117. 'calloc', 'div', 'exit', 'free', 'getenv', 'itoa', 'labs', 'ldiv',
  118. 'ltoa', 'malloc', 'qsort', 'rand', 'realloc', 'srand', 'strtod',
  119. 'strtol', 'strtoul', 'system',
  120. //string.h
  121. 'memchr', 'memcmp', 'memcpy', 'memmove', 'memset', 'strcat',
  122. 'strchr', 'strcmp', 'strcoll', 'strcpy', 'strcspn', 'strerror',
  123. 'strlen', 'strncat', 'strncmp', 'strncpy', 'strpbrk', 'strrchr',
  124. 'strspn', 'strstr', 'strtok', 'strxfrm',
  125. //time.h
  126. 'asctime', 'clock', 'ctime', 'difftime', 'gmtime', 'localtime',
  127. 'mktime', 'strftime', 'time',
  128. //wchar.h
  129. 'btowc', 'fgetwc', 'fgetws', 'fputwc', 'fputws', 'fwide',
  130. 'fwprintf', 'fwscanf', 'getwc', 'getwchar', 'mbrlen', 'mbrtowc',
  131. 'mbsinit', 'mbsrtowcs', 'putwc', 'putwchar', 'swprintf', 'swscanf',
  132. 'ungetwc', 'vfwprintf', 'vswprintf', 'vwprintf', 'wcrtomb',
  133. 'wcscat', 'wcschr', 'wcscmp', 'wcscoll', 'wcscpy', 'wcscspn',
  134. 'wcsftime', 'wcslen', 'wcsncat', 'wcsncmp', 'wcsncpy', 'wcspbrk',
  135. 'wcsrchr', 'wcsrtombs', 'wcsspn', 'wcsstr', 'wcstod', 'wcstok',
  136. 'wcstol', 'wcstoul', 'wcsxfrm', 'wctob', 'wmemchr', 'wmemcmp',
  137. 'wmemcpy', 'wmemmove', 'wmemset', 'wprintf', 'wscanf',
  138. //wctype.h
  139. 'iswalnum', 'iswalpha', 'iswcntrl', 'iswctype', 'iswdigit',
  140. 'iswgraph', 'iswlower', 'iswprint', 'iswpunct', 'iswspace',
  141. 'iswupper', 'iswxdigit', 'towctrans', 'towlower', 'towupper',
  142. 'wctrans', 'wctype'
  143. ),
  144. 4 => array(
  145. 'auto', 'char', 'const', 'double', 'float', 'int', 'long',
  146. 'register', 'short', 'signed', 'sizeof', 'static', 'struct',
  147. 'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t',
  148. 'int8', 'int16', 'int32', 'int64',
  149. 'uint8', 'uint16', 'uint32', 'uint64',
  150. 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t',
  151. 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
  152. 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t',
  153. 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t',
  154. 'int8_t', 'int16_t', 'int32_t', 'int64_t',
  155. 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
  156. 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t',
  157. 'size_t', 'off_t',
  158. 'upc_lock_t', 'shared', 'strict', 'relaxed', 'upc_blocksizeof',
  159. 'upc_localsizeof', 'upc_elemsizeof'
  160. ),
  161. ),
  162. 'SYMBOLS' => array(
  163. '(', ')', '{', '}', '[', ']',
  164. '+', '-', '*', '/', '%',
  165. '=', '<', '>',
  166. '!', '^', '&', '|',
  167. '?', ':',
  168. ';', ','
  169. ),
  170. 'CASE_SENSITIVE' => array(
  171. GESHI_COMMENTS => false,
  172. 1 => true,
  173. 2 => true,
  174. 3 => true,
  175. 4 => true,
  176. ),
  177. 'STYLES' => array(
  178. 'KEYWORDS' => array(
  179. 1 => 'color: #b1b100;',
  180. 2 => 'color: #000000; font-weight: bold;',
  181. 3 => 'color: #000066;',
  182. 4 => 'color: #993333;'
  183. ),
  184. 'COMMENTS' => array(
  185. 1 => 'color: #666666; font-style: italic;',
  186. 2 => 'color: #339933;',
  187. 'MULTI' => 'color: #808080; font-style: italic;'
  188. ),
  189. 'ESCAPE_CHAR' => array(
  190. 0 => 'color: #000099; font-weight: bold;',
  191. 1 => 'color: #000099; font-weight: bold;',
  192. 2 => 'color: #660099; font-weight: bold;',
  193. 3 => 'color: #660099; font-weight: bold;',
  194. 4 => 'color: #660099; font-weight: bold;',
  195. 5 => 'color: #006699; font-weight: bold;',
  196. 'HARD' => '',
  197. ),
  198. 'BRACKETS' => array(
  199. 0 => 'color: #009900;'
  200. ),
  201. 'STRINGS' => array(
  202. 0 => 'color: #ff0000;'
  203. ),
  204. 'NUMBERS' => array(
  205. 0 => 'color: #0000dd;',
  206. GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
  207. GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
  208. GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
  209. GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
  210. GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
  211. GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
  212. GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
  213. ),
  214. 'METHODS' => array(
  215. 1 => 'color: #202020;',
  216. 2 => 'color: #202020;'
  217. ),
  218. 'SYMBOLS' => array(
  219. 0 => 'color: #339933;'
  220. ),
  221. 'REGEXPS' => array(
  222. ),
  223. 'SCRIPT' => array(
  224. )
  225. ),
  226. 'URLS' => array(
  227. 1 => '',
  228. 2 => '',
  229. 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html',
  230. 4 => ''
  231. ),
  232. 'OOLANG' => true,
  233. 'OBJECT_SPLITTERS' => array(
  234. 1 => '.',
  235. 2 => '::'
  236. ),
  237. 'REGEXPS' => array(
  238. ),
  239. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  240. 'SCRIPT_DELIMITERS' => array(
  241. ),
  242. 'HIGHLIGHT_STRICT_BLOCK' => array(
  243. ),
  244. 'TAB_WIDTH' => 4
  245. );
  246. ?>