[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

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

   1  <?php
   2  /*************************************************************************************
   3   * dcpu16.php
   4   * -------
   5   * Author: Benny Baumann (BenBE@omorphia.de)
   6   * Copyright: (c) 2007-2014 Benny Baumann (http://geshi.org/)
   7   * Release Version: 1.0.9.1
   8   * Date Started: 2012/04/12
   9   *
  10   * DCPU/16 Assembly language file for GeSHi.
  11   * Syntax definition based on http://0x10c.com/doc/dcpu-16.txt
  12   *
  13   * CHANGES
  14   * -------
  15   * 2012/04/12 (1.0.0)
  16   *   -  First Release
  17   *
  18   * TODO (updated 2012/04/12)
  19   * -------------------------
  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' => 'DCPU-16 Assembly',
  43      'COMMENT_SINGLE' => array(1 => ';'),
  44      'COMMENT_MULTI' => array(),
  45      'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  46      'QUOTEMARKS' => array("'", '"'),
  47      'ESCAPE_CHAR' => '',
  48      'NUMBERS' => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_HEX_PREFIX,
  49      'KEYWORDS' => array(
  50          /*CPU*/
  51          1 => array(
  52              'set','add','sub','mul','div','mod','shl','shr','and','bor','xor',
  53              'ife','ifn','ifg','ifb',
  54              'jsr'
  55              ),
  56          /*registers*/
  57          2 => array(
  58              'a','b','c','x','y','z','i','j',
  59              'pc','sp','o',
  60              'pop','peek','push' //Special cases with DCPU-16
  61              ),
  62          ),
  63      'SYMBOLS' => array(
  64          '[', ']', '+', '-', ','
  65          ),
  66      'CASE_SENSITIVE' => array(
  67          GESHI_COMMENTS => false,
  68          1 => false,
  69          2 => false,
  70          ),
  71      'STYLES' => array(
  72          'KEYWORDS' => array(
  73              1 => 'color: #000088; font-weight:bold;',
  74              2 => 'color: #0000ff;'
  75              ),
  76          'COMMENTS' => array(
  77              1 => 'color: #adadad; font-style: italic;',
  78              ),
  79          'ESCAPE_CHAR' => array(
  80              0 => 'color: #000099; font-weight: bold;'
  81              ),
  82          'BRACKETS' => array(
  83              0 => 'color: #000088;'
  84              ),
  85          'STRINGS' => array(
  86              0 => 'color: #7f007f;'
  87              ),
  88          'NUMBERS' => array(
  89              0 => 'color: #880000;'
  90              ),
  91          'METHODS' => array(
  92              ),
  93          'SYMBOLS' => array(
  94              0 => 'color: #008000;'
  95              ),
  96          'REGEXPS' => array(
  97              2 => 'color: #993333;'
  98              ),
  99          'SCRIPT' => array(
 100              )
 101          ),
 102      'URLS' => array(
 103          1 => 'http://0x10c.com/doc/dcpu-16.txt',
 104          2 => ''
 105          ),
 106      'OOLANG' => false,
 107      'OBJECT_SPLITTERS' => array(
 108          ),
 109      'REGEXPS' => array(
 110          //Hex numbers
 111          //0 => '0[0-9a-fA-F]{1,32}[hH]',
 112          //Binary numbers
 113          //1 => '\%[01]{1,64}|[01]{1,64}[bB]?(?![^<]*>)',
 114          //Labels
 115          2 => '^:[_a-zA-Z][_a-zA-Z0-9]?(?=\s|$)'
 116          ),
 117      'STRICT_MODE_APPLIES' => GESHI_NEVER,
 118      'SCRIPT_DELIMITERS' => array(
 119          ),
 120      'HIGHLIGHT_STRICT_BLOCK' => array(
 121          ),
 122      'TAB_WIDTH' => 4,
 123      'PARSER_CONTROL' => array(
 124          'KEYWORDS' => array(
 125              'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\#\/])",
 126              'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_\|%\\-])"
 127              )
 128          )
 129  );