ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
mmix.php
Go to the documentation of this file.
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.9.0
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 
42 $language_data = array (
43  'LANG_NAME' => 'MMIX',
44  'COMMENT_SINGLE' => array(1 => ';', 2 => '%'),
45  'COMMENT_MULTI' => array(),
46  //Line address prefix suppression
47  'COMMENT_REGEXP' => array(
48  3 => "/^\s*(?!\s)[^\w].*$/m",
49  4 => "/^\s*[0-9a-f]{12,16}+(?:\s+[0-9a-f]+(?:\.{3}[0-9a-f]{2,})?)?:/mi"
50  ),
51  'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
52  'QUOTEMARKS' => array("'", '"'),
53  'ESCAPE_CHAR' => '',
54  'NUMBERS' => array(
55  1 => '(?<![\d\$#\w])[\da-fA-F]+(?!\w)',
56  2 => '#[\da-fA-F]+',
57  3 => '\$\d+'
58  ),
59  'KEYWORDS' => array(
60  /*CPU*/
61  1 => array(
62  '16ADDU','2ADDU','4ADDU','8ADDU','ADD','ADDU','AND','ANDN','ANDNH',
63  'ANDNL','ANDNMH','ANDNML','BDIF','BEV','BN','BNN','BNP','BNZ','BOD',
64  'BP','BZ','CMP','CMPU','CSEV','CSN','CSNN','CSNP','CSNZ','CSOD',
65  'CSP','CSWAP','CSZ','DIV','DIVU','FADD','FCMP','FCMPE','FDIV',
66  'FEQL','FEQLE','FINT','FIX','FIXU','FLOT','FLOTU','FMUL','FREM',
67  'FSQRT','FSUB','FUN','FUNE','GET','GETA','GO','INCH','INCL','INCMH',
68  'INCML','JMP','LDA','LDB','LDBU','LDHT','LDO','LDOU','LDSF','LDT',
69  'LDTU','LDUNC','LDVTS','LDW','LDWU','MOR','MUL','MULU','MUX','MXOR',
70  'NAND','NEG','NEGU','NOR','NXOR','ODIF','OR','ORH','ORL','ORMH',
71  'ORML','ORN','PBEV','PBN','PBNN','PBNP','PBNZ','PBOD','PBP','PBZ',
72  'POP','PREGO','PRELD','PREST','PUSHGO','PUSHJ','PUT','RESUME','SADD',
73  'SAVE','SETH','SETL','SETMH','SETML','SFLOT','SFLOTU','SL','SLU',
74  'SR','SRU','STB','STBU','STCO','STHT','STO','STOU','STSF','STT',
75  'STTU','STUNC','STW','STWU','SUB','SUBU','SWYM','SYNC','SYNCD',
76  'SYNCID','TDIF','TRAP','TRIP','UNSAVE','WDIF','XOR','ZSEV','ZSN',
77  'ZSNN','ZSNP','ZSNZ','ZSOD','ZSP','ZSZ'
78  ),
79  2 => array(
80  'BSPEC','BYTE','ESPEC','GREG','IS','LOC','LOCAL','OCTA',
81  'PREFIX','SET','TETRA','WYDE'
82  ),
83  /*registers*/
84  3 => array(
85  'rA','rB','rC','rD','rE','rF','rG','rH','rI','rJ','rK','rL','rM',
86  'rN','rO','rP','rQ','rR','rS','rT','rU','rV','rW','rX','rY','rZ',
87  'rBB','rTT','rWW','rXX','rYY','rZZ'
88  ),
89 // /*Directive*/
90 // 4 => array(
91 // ),
92 // /*Operands*/
93 // 5 => array(
94 // )
95  ),
96  'SYMBOLS' => array(
97  '[', ']', '(', ')',
98  '+', '-', '*', '/', '%',
99  '.', ',', ';', ':',
100  '<<','>>'
101  ),
102  'CASE_SENSITIVE' => array(
103  GESHI_COMMENTS => false,
104  1 => true,
105  2 => false,
106  3 => true,
107 // 4 => false,
108 // 5 => false
109  ),
110  'STYLES' => array(
111  'KEYWORDS' => array(
112  1 => 'color: #00007f; font-weight: bold;',
113  2 => 'color: #0000ff; font-weight: bold;',
114  3 => 'color: #00007f;',
115 // 4 => 'color: #000000; font-weight: bold;',
116 // 5 => 'color: #000000; font-weight: bold;'
117  ),
118  'COMMENTS' => array(
119  1 => 'color: #666666; font-style: italic;',
120  2 => 'color: #666666; font-style: italic;',
121  3 => 'color: #666666; font-style: italic;',
122  4 => 'color: #adadad; font-style: italic;',
123  ),
124  'ESCAPE_CHAR' => array(
125  0 => 'color: #000099; font-weight: bold;'
126  ),
127  'BRACKETS' => array(
128  0 => 'color: #009900; font-weight: bold;'
129  ),
130  'STRINGS' => array(
131  0 => 'color: #7f007f;'
132  ),
133  'NUMBERS' => array(
134  0 => 'color: #0000ff;',
135  1 => 'color: #0000ff;',
136  2 => 'color: #0000ff;',
137  3 => 'color: #00007f;'
138  ),
139  'METHODS' => array(
140  ),
141  'SYMBOLS' => array(
142  0 => 'color: #339933;'
143  ),
144  'REGEXPS' => array(
145 // 0 => 'color: #0000ff;',
146 // 1 => 'color: #0000ff;'
147  ),
148  'SCRIPT' => array(
149  )
150  ),
151  'URLS' => array(
152  1 => '',
153  2 => '',
154  3 => '',
155 // 4 => '',
156 // 5 => ''
157  ),
158 /*
159  'NUMBERS' =>
160  GESHI_NUMBER_BIN_PREFIX_PERCENT |
161  GESHI_NUMBER_BIN_SUFFIX |
162  GESHI_NUMBER_HEX_PREFIX |
163  GESHI_NUMBER_HEX_SUFFIX |
164  GESHI_NUMBER_OCT_SUFFIX |
165  GESHI_NUMBER_INT_BASIC |
166  GESHI_NUMBER_FLT_NONSCI |
167  GESHI_NUMBER_FLT_NONSCI_F |
168  GESHI_NUMBER_FLT_SCI_ZERO,
169 */
170  'OOLANG' => false,
171  'OBJECT_SPLITTERS' => array(
172  ),
173  'REGEXPS' => array(
174  //Hex numbers
175 // 0 => /* */ "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))(?:[0-9][0-9a-fA-F]{0,31}[hH]|0x[0-9a-fA-F]{1,32})(?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))",
176  //Binary numbers
177 // 1 => "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))[01]{1,64}[bB](?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))"
178  ),
179  'STRICT_MODE_APPLIES' => GESHI_NEVER,
180  'SCRIPT_DELIMITERS' => array(
181  ),
182  'HIGHLIGHT_STRICT_BLOCK' => array(
183  ),
184  'TAB_WIDTH' => 8,
185  'PARSER_CONTROL' => array(
186  'KEYWORDS' => array(
187  'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\#>|^])",
188  'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%])"
189  )
190  )
191 );
const GESHI_COMMENTS
Used in language files to mark comments.
Definition: geshi.php:149
$language_data
Definition: mmix.php:42
const GESHI_NEVER
#+ private
Definition: geshi.php:123
const GESHI_CAPS_NO_CHANGE
Lowercase keywords found.
Definition: geshi.php:94