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.

193 lines
6.6KB

  1. <?php
  2. /*************************************************************************************
  3. * mmix.php
  4. * -------
  5. * Author: Benny Baumann (BenBE@geshi.org)
  6. * Copyright: (c) 2009 Benny Baumann (http://qbnz.com/highlighter/)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2009/10/16
  9. *
  10. * MMIX Assembler language file for GeSHi.
  11. *
  12. * This is an implementation of the MMIX language as designed by Donald E. Knuth
  13. *
  14. * CHANGES
  15. * -------
  16. * 2004/08/05 (1.0.8.6)
  17. * - First Release
  18. *
  19. * TODO (updated 2009/10/16)
  20. * -------------------------
  21. *
  22. *************************************************************************************
  23. *
  24. * This file is part of GeSHi.
  25. *
  26. * GeSHi is free software; you can redistribute it and/or modify
  27. * it under the terms of the GNU General Public License as published by
  28. * the Free Software Foundation; either version 2 of the License, or
  29. * (at your option) any later version.
  30. *
  31. * GeSHi is distributed in the hope that it will be useful,
  32. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  34. * GNU General Public License for more details.
  35. *
  36. * You should have received a copy of the GNU General Public License
  37. * along with GeSHi; if not, write to the Free Software
  38. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  39. *
  40. ************************************************************************************/
  41. $language_data = array (
  42. 'LANG_NAME' => 'MMIX',
  43. 'COMMENT_SINGLE' => array(1 => ';', 2 => '%'),
  44. 'COMMENT_MULTI' => array(),
  45. //Line address prefix suppression
  46. 'COMMENT_REGEXP' => array(
  47. 3 => "/^\s*(?!\s)[^\w].*$/m",
  48. 4 => "/^\s*[0-9a-f]{12,16}+(?:\s+[0-9a-f]+(?:\.{3}[0-9a-f]{2,})?)?:/mi"
  49. ),
  50. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  51. 'QUOTEMARKS' => array("'", '"'),
  52. 'ESCAPE_CHAR' => '',
  53. 'NUMBERS' => array(
  54. 1 => '(?<![\d\$#\w])[\da-fA-F]+(?!\w)',
  55. 2 => '#[\da-fA-F]+',
  56. 3 => '\$\d+'
  57. ),
  58. 'KEYWORDS' => array(
  59. /*CPU*/
  60. 1 => array(
  61. '16ADDU','2ADDU','4ADDU','8ADDU','ADD','ADDU','AND','ANDN','ANDNH',
  62. 'ANDNL','ANDNMH','ANDNML','BDIF','BEV','BN','BNN','BNP','BNZ','BOD',
  63. 'BP','BZ','CMP','CMPU','CSEV','CSN','CSNN','CSNP','CSNZ','CSOD',
  64. 'CSP','CSWAP','CSZ','DIV','DIVU','FADD','FCMP','FCMPE','FDIV',
  65. 'FEQL','FEQLE','FINT','FIX','FIXU','FLOT','FLOTU','FMUL','FREM',
  66. 'FSQRT','FSUB','FUN','FUNE','GET','GETA','GO','INCH','INCL','INCMH',
  67. 'INCML','JMP','LDA','LDB','LDBU','LDHT','LDO','LDOU','LDSF','LDT',
  68. 'LDTU','LDUNC','LDVTS','LDW','LDWU','MOR','MUL','MULU','MUX','MXOR',
  69. 'NAND','NEG','NEGU','NOR','NXOR','ODIF','OR','ORH','ORL','ORMH',
  70. 'ORML','ORN','PBEV','PBN','PBNN','PBNP','PBNZ','PBOD','PBP','PBZ',
  71. 'POP','PREGO','PRELD','PREST','PUSHGO','PUSHJ','PUT','RESUME','SADD',
  72. 'SAVE','SETH','SETL','SETMH','SETML','SFLOT','SFLOTU','SL','SLU',
  73. 'SR','SRU','STB','STBU','STCO','STHT','STO','STOU','STSF','STT',
  74. 'STTU','STUNC','STW','STWU','SUB','SUBU','SWYM','SYNC','SYNCD',
  75. 'SYNCID','TDIF','TRAP','TRIP','UNSAVE','WDIF','XOR','ZSEV','ZSN',
  76. 'ZSNN','ZSNP','ZSNZ','ZSOD','ZSP','ZSZ'
  77. ),
  78. 2 => array(
  79. 'BSPEC','BYTE','ESPEC','GREG','IS','LOC','LOCAL','OCTA',
  80. 'PREFIX','SET','TETRA','WYDE'
  81. ),
  82. /*registers*/
  83. 3 => array(
  84. 'rA','rB','rC','rD','rE','rF','rG','rH','rI','rJ','rK','rL','rM',
  85. 'rN','rO','rP','rQ','rR','rS','rT','rU','rV','rW','rX','rY','rZ',
  86. 'rBB','rTT','rWW','rXX','rYY','rZZ'
  87. ),
  88. // /*Directive*/
  89. // 4 => array(
  90. // ),
  91. // /*Operands*/
  92. // 5 => array(
  93. // )
  94. ),
  95. 'SYMBOLS' => array(
  96. '[', ']', '(', ')',
  97. '+', '-', '*', '/', '%',
  98. '.', ',', ';', ':',
  99. '<<','>>'
  100. ),
  101. 'CASE_SENSITIVE' => array(
  102. GESHI_COMMENTS => false,
  103. 1 => true,
  104. 2 => false,
  105. 3 => true,
  106. // 4 => false,
  107. // 5 => false
  108. ),
  109. 'STYLES' => array(
  110. 'KEYWORDS' => array(
  111. 1 => 'color: #00007f; font-weight: bold;',
  112. 2 => 'color: #0000ff; font-weight: bold;',
  113. 3 => 'color: #00007f;',
  114. // 4 => 'color: #000000; font-weight: bold;',
  115. // 5 => 'color: #000000; font-weight: bold;'
  116. ),
  117. 'COMMENTS' => array(
  118. 1 => 'color: #666666; font-style: italic;',
  119. 2 => 'color: #666666; font-style: italic;',
  120. 3 => 'color: #666666; font-style: italic;',
  121. 4 => 'color: #adadad; font-style: italic;',
  122. ),
  123. 'ESCAPE_CHAR' => array(
  124. 0 => 'color: #000099; font-weight: bold;'
  125. ),
  126. 'BRACKETS' => array(
  127. 0 => 'color: #009900; font-weight: bold;'
  128. ),
  129. 'STRINGS' => array(
  130. 0 => 'color: #7f007f;'
  131. ),
  132. 'NUMBERS' => array(
  133. 0 => 'color: #0000ff;',
  134. 1 => 'color: #0000ff;',
  135. 2 => 'color: #0000ff;',
  136. 3 => 'color: #00007f;'
  137. ),
  138. 'METHODS' => array(
  139. ),
  140. 'SYMBOLS' => array(
  141. 0 => 'color: #339933;'
  142. ),
  143. 'REGEXPS' => array(
  144. // 0 => 'color: #0000ff;',
  145. // 1 => 'color: #0000ff;'
  146. ),
  147. 'SCRIPT' => array(
  148. )
  149. ),
  150. 'URLS' => array(
  151. 1 => '',
  152. 2 => '',
  153. 3 => '',
  154. // 4 => '',
  155. // 5 => ''
  156. ),
  157. /*
  158. 'NUMBERS' =>
  159. GESHI_NUMBER_BIN_PREFIX_PERCENT |
  160. GESHI_NUMBER_BIN_SUFFIX |
  161. GESHI_NUMBER_HEX_PREFIX |
  162. GESHI_NUMBER_HEX_SUFFIX |
  163. GESHI_NUMBER_OCT_SUFFIX |
  164. GESHI_NUMBER_INT_BASIC |
  165. GESHI_NUMBER_FLT_NONSCI |
  166. GESHI_NUMBER_FLT_NONSCI_F |
  167. GESHI_NUMBER_FLT_SCI_ZERO,
  168. */
  169. 'OOLANG' => false,
  170. 'OBJECT_SPLITTERS' => array(
  171. ),
  172. 'REGEXPS' => array(
  173. //Hex numbers
  174. // 0 => /* */ "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))(?:[0-9][0-9a-fA-F]{0,31}[hH]|0x[0-9a-fA-F]{1,32})(?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))",
  175. //Binary numbers
  176. // 1 => "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))[01]{1,64}[bB](?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))"
  177. ),
  178. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  179. 'SCRIPT_DELIMITERS' => array(
  180. ),
  181. 'HIGHLIGHT_STRICT_BLOCK' => array(
  182. ),
  183. 'TAB_WIDTH' => 8,
  184. 'PARSER_CONTROL' => array(
  185. 'KEYWORDS' => array(
  186. 'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\#>|^])",
  187. 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%])"
  188. )
  189. )
  190. );
  191. ?>