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.

dcpu16.php 3.9KB

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