[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/geshi/geshi/src/geshi/ -> upc.php (source)

   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.9.1
  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  
  41  $language_data = array (
  42      'LANG_NAME' => 'UPC',
  43      'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
  44      'COMMENT_MULTI' => array('/*' => '*/'),
  45      'COMMENT_REGEXP' => array(
  46          //Multiline-continued single-line comments
  47          1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
  48          //Multiline-continued preprocessor define
  49          2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m'
  50          ),
  51      'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  52      'QUOTEMARKS' => array("'", '"'),
  53      'ESCAPE_CHAR' => '',
  54      'ESCAPE_REGEXP' => array(
  55          //Simple Single Char Escapes
  56          1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i",
  57          //Hexadecimal Char Specs
  58          2 => "#\\\\x[\da-fA-F]{2}#",
  59          //Hexadecimal Char Specs
  60          3 => "#\\\\u[\da-fA-F]{4}#",
  61          //Hexadecimal Char Specs
  62          4 => "#\\\\U[\da-fA-F]{8}#",
  63          //Octal Char Specs
  64          5 => "#\\\\[0-7]{1,3}#"
  65          ),
  66      'NUMBERS' =>
  67          GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
  68          GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
  69          GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
  70      'KEYWORDS' => array(
  71          1 => array(
  72              'if', 'return', 'while', 'case', 'continue', 'default',
  73              'do', 'else', 'for', 'switch', 'goto',
  74  
  75              'upc_forall', 'upc_barrier', 'upc_notify', 'upc_wait', 'upc_fence'
  76              ),
  77          2 => array(
  78              'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline'
  79              ),
  80          3 => array(
  81              // assert.h
  82              'assert',
  83  
  84              //complex.h
  85              'cabs', 'cacos', 'cacosh', 'carg', 'casin', 'casinh', 'catan',
  86              'catanh', 'ccos', 'ccosh', 'cexp', 'cimag', 'cis', 'clog', 'conj',
  87              'cpow', 'cproj', 'creal', 'csin', 'csinh', 'csqrt', 'ctan', 'ctanh',
  88  
  89              //ctype.h
  90              'digittoint', 'isalnum', 'isalpha', 'isascii', 'isblank', 'iscntrl',
  91              'isdigit', 'isgraph', 'islower', 'isprint', 'ispunct', 'isspace',
  92              'isupper', 'isxdigit', 'toascii', 'tolower', 'toupper',
  93  
  94              //inttypes.h
  95              'imaxabs', 'imaxdiv', 'strtoimax', 'strtoumax', 'wcstoimax',
  96              'wcstoumax',
  97  
  98              //locale.h
  99              'localeconv', 'setlocale',
 100  
 101              //math.h
 102              'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'exp',
 103              'fabs', 'floor', 'frexp', 'ldexp', 'log', 'log10', 'modf', 'pow',
 104              'sin', 'sinh', 'sqrt', 'tan', 'tanh',
 105  
 106              //setjmp.h
 107              'longjmp', 'setjmp',
 108  
 109              //signal.h
 110              'raise',
 111  
 112              //stdarg.h
 113              'va_arg', 'va_copy', 'va_end', 'va_start',
 114  
 115              //stddef.h
 116              'offsetof',
 117  
 118              //stdio.h
 119              'clearerr', 'fclose', 'fdopen', 'feof', 'ferror', 'fflush', 'fgetc',
 120              'fgetpos', 'fgets', 'fopen', 'fprintf', 'fputc', 'fputchar',
 121              'fputs', 'fread', 'freopen', 'fscanf', 'fseek', 'fsetpos', 'ftell',
 122              'fwrite', 'getc', 'getch', 'getchar', 'gets', 'perror', 'printf',
 123              'putc', 'putchar', 'puts', 'remove', 'rename', 'rewind', 'scanf',
 124              'setbuf', 'setvbuf', 'snprintf', 'sprintf', 'sscanf', 'tmpfile',
 125              'tmpnam', 'ungetc', 'vfprintf', 'vfscanf', 'vprintf', 'vscanf',
 126              'vsprintf', 'vsscanf',
 127  
 128              //stdlib.h
 129              'abort', 'abs', 'atexit', 'atof', 'atoi', 'atol', 'bsearch',
 130              'calloc', 'div', 'exit', 'free', 'getenv', 'itoa', 'labs', 'ldiv',
 131              'ltoa', 'malloc', 'qsort', 'rand', 'realloc', 'srand', 'strtod',
 132              'strtol', 'strtoul', 'system',
 133  
 134              //string.h
 135              'memchr', 'memcmp', 'memcpy', 'memmove', 'memset', 'strcat',
 136              'strchr', 'strcmp', 'strcoll', 'strcpy', 'strcspn', 'strerror',
 137              'strlen', 'strncat', 'strncmp', 'strncpy', 'strpbrk', 'strrchr',
 138              'strspn', 'strstr', 'strtok', 'strxfrm',
 139  
 140              //time.h
 141              'asctime', 'clock', 'ctime', 'difftime', 'gmtime', 'localtime',
 142              'mktime', 'strftime', 'time',
 143  
 144              //wchar.h
 145              'btowc', 'fgetwc', 'fgetws', 'fputwc', 'fputws', 'fwide',
 146              'fwprintf', 'fwscanf', 'getwc', 'getwchar', 'mbrlen', 'mbrtowc',
 147              'mbsinit', 'mbsrtowcs', 'putwc', 'putwchar', 'swprintf', 'swscanf',
 148              'ungetwc', 'vfwprintf', 'vswprintf', 'vwprintf', 'wcrtomb',
 149              'wcscat', 'wcschr', 'wcscmp', 'wcscoll', 'wcscpy', 'wcscspn',
 150              'wcsftime', 'wcslen', 'wcsncat', 'wcsncmp', 'wcsncpy', 'wcspbrk',
 151              'wcsrchr', 'wcsrtombs', 'wcsspn', 'wcsstr', 'wcstod', 'wcstok',
 152              'wcstol', 'wcstoul', 'wcsxfrm', 'wctob', 'wmemchr', 'wmemcmp',
 153              'wmemcpy', 'wmemmove', 'wmemset', 'wprintf', 'wscanf',
 154  
 155              //wctype.h
 156              'iswalnum', 'iswalpha', 'iswcntrl', 'iswctype', 'iswdigit',
 157              'iswgraph', 'iswlower', 'iswprint', 'iswpunct', 'iswspace',
 158              'iswupper', 'iswxdigit', 'towctrans', 'towlower', 'towupper',
 159              'wctrans', 'wctype'
 160              ),
 161          4 => array(
 162              'auto', 'char', 'const', 'double',  'float', 'int', 'long',
 163              'register', 'short', 'signed', 'sizeof', 'static', 'struct',
 164              'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t',
 165  
 166              'int8', 'int16', 'int32', 'int64',
 167              'uint8', 'uint16', 'uint32', 'uint64',
 168  
 169              'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t',
 170              'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
 171  
 172              'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t',
 173              'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t',
 174  
 175              'int8_t', 'int16_t', 'int32_t', 'int64_t',
 176              'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
 177  
 178              'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t',
 179              'size_t', 'off_t',
 180  
 181              'upc_lock_t', 'shared', 'strict', 'relaxed', 'upc_blocksizeof',
 182              'upc_localsizeof', 'upc_elemsizeof'
 183              ),
 184          ),
 185      'SYMBOLS' => array(
 186          '(', ')', '{', '}', '[', ']',
 187          '+', '-', '*', '/', '%',
 188          '=', '<', '>',
 189          '!', '^', '&', '|',
 190          '?', ':',
 191          ';', ','
 192          ),
 193      'CASE_SENSITIVE' => array(
 194          GESHI_COMMENTS => false,
 195          1 => true,
 196          2 => true,
 197          3 => true,
 198          4 => true,
 199          ),
 200      'STYLES' => array(
 201          'KEYWORDS' => array(
 202              1 => 'color: #b1b100;',
 203              2 => 'color: #000000; font-weight: bold;',
 204              3 => 'color: #000066;',
 205              4 => 'color: #993333;'
 206              ),
 207          'COMMENTS' => array(
 208              1 => 'color: #666666; font-style: italic;',
 209              2 => 'color: #339933;',
 210              'MULTI' => 'color: #808080; font-style: italic;'
 211              ),
 212          'ESCAPE_CHAR' => array(
 213              0 => 'color: #000099; font-weight: bold;',
 214              1 => 'color: #000099; font-weight: bold;',
 215              2 => 'color: #660099; font-weight: bold;',
 216              3 => 'color: #660099; font-weight: bold;',
 217              4 => 'color: #660099; font-weight: bold;',
 218              5 => 'color: #006699; font-weight: bold;',
 219              'HARD' => '',
 220              ),
 221          'BRACKETS' => array(
 222              0 => 'color: #009900;'
 223              ),
 224          'STRINGS' => array(
 225              0 => 'color: #ff0000;'
 226              ),
 227          'NUMBERS' => array(
 228              0 => 'color: #0000dd;',
 229              GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
 230              GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
 231              GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
 232              GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
 233              GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
 234              GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
 235              GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
 236              ),
 237          'METHODS' => array(
 238              1 => 'color: #202020;',
 239              2 => 'color: #202020;'
 240              ),
 241          'SYMBOLS' => array(
 242              0 => 'color: #339933;'
 243              ),
 244          'REGEXPS' => array(
 245              ),
 246          'SCRIPT' => array(
 247              )
 248          ),
 249      'URLS' => array(
 250          1 => '',
 251          2 => '',
 252          3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html',
 253          4 => ''
 254          ),
 255      'OOLANG' => true,
 256      'OBJECT_SPLITTERS' => array(
 257          1 => '.',
 258          2 => '::'
 259          ),
 260      'REGEXPS' => array(
 261          ),
 262      'STRICT_MODE_APPLIES' => GESHI_NEVER,
 263      'SCRIPT_DELIMITERS' => array(
 264          ),
 265      'HIGHLIGHT_STRICT_BLOCK' => array(
 266          ),
 267      'TAB_WIDTH' => 4
 268  );