PageRenderTime 50ms CodeModel.GetById 46ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 1ms

/jEdit/tags/jedit-4-2-pre14/modes/redcode.xml

#
XML | 126 lines | 93 code | 22 blank | 11 comment | 0 complexity | 74b1db533d7a176bc8246b2baa087ea4 MD5 | raw file
  1<?xml version="1.0"?>
  2<!DOCTYPE MODE SYSTEM "xmode.dtd">
  3
  4<!--
  5
  6	redcode syntax highlighting file for jedit
  7
  8	Will Varfar, 2002
  9
 10-->
 11
 12<MODE>
 13
 14	<PROPS>
 15		<PROPERTY NAME="lineComment" VALUE=";" />
 16	</PROPS>
 17
 18	<RULES HIGHLIGHT_DIGITS="TRUE" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
 19
 20	    <EOL_SPAN TYPE="COMMENT2">;redcode</EOL_SPAN>
 21	    <EOL_SPAN TYPE="COMMENT2">;author</EOL_SPAN>
 22	    <EOL_SPAN TYPE="COMMENT2">;name</EOL_SPAN>
 23	    <EOL_SPAN TYPE="COMMENT2">;strategy</EOL_SPAN>
 24	    <EOL_SPAN TYPE="COMMENT2">;password</EOL_SPAN>
 25	    <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
 26
 27		<SEQ TYPE="KEYWORD3">.AB</SEQ> <!-- Instructions read the A-field of the A-instruction  and the B-field of the B-instruction and write to B-fields. -->
 28		<SEQ TYPE="KEYWORD3">.BA</SEQ> <!-- Instructions read the B-field of the A-instruction  and the A-field of the B-instruction and write to A-fields. -->
 29		<SEQ TYPE="KEYWORD3">.A</SEQ> <!--Instructions read and write A-fields. -->
 30		<SEQ TYPE="KEYWORD3">.B</SEQ> <!-- Instructions read and write B-fields. -->
 31		<SEQ TYPE="KEYWORD3">.F</SEQ> <!-- Instructions read both A- and B-fields of  the  the  A- and  B-instruction and write to both A- and B-fields (A to A and B to B). -->
 32		<SEQ TYPE="KEYWORD3">.X</SEQ> <!-- Instructions read both A- and B-fields of  the  the  A- and  B-instruction  and  write  to both A- and B-fields exchanging fields (A to B and B to A). -->
 33		<SEQ TYPE="KEYWORD3">.I</SEQ> <!-- Instructions read and write entire instructions. -->
 34
 35		<SEQ TYPE="OPERATOR">,</SEQ>
 36		<SEQ TYPE="OPERATOR">:</SEQ>
 37		<SEQ TYPE="OPERATOR">(</SEQ>
 38		<SEQ TYPE="OPERATOR">)</SEQ>
 39
 40		<!-- Arithmetic: -->
 41		<SEQ TYPE="OPERATOR">+</SEQ>   <!-- addition or unary plus -->
 42		<SEQ TYPE="OPERATOR">-</SEQ>   <!-- subtraction or unary minus -->
 43		<SEQ TYPE="OPERATOR">/</SEQ>   <!-- division -->
 44		<SEQ TYPE="OPERATOR">%</SEQ>   <!-- modulo (remainder of division) -->
 45
 46		<!-- Comparison (*): -->
 47		<SEQ TYPE="OPERATOR">==</SEQ>  <!-- equality -->
 48		<SEQ TYPE="OPERATOR">!=</SEQ>  <!-- inequality -->
 49		<SEQ TYPE="OPERATOR">&lt;=</SEQ>  <!-- less than or equal -->
 50		<SEQ TYPE="OPERATOR">&gt;=</SEQ>  <!-- greater than or equal -->
 51		<SEQ TYPE="OPERATOR">&lt;</SEQ>   <!-- less than -->
 52		<SEQ TYPE="OPERATOR">&gt;</SEQ>   <!-- greater than -->
 53
 54		<!-- Logical (*): -->
 55		<SEQ TYPE="OPERATOR">&amp;&amp;</SEQ>  <!-- and -->
 56		<SEQ TYPE="OPERATOR">||</SEQ>  <!-- or -->
 57		<SEQ TYPE="OPERATOR">!</SEQ>   <!-- unary negation -->
 58
 59		<!-- Assignment (*): -->
 60		<SEQ TYPE="OPERATOR">=</SEQ>   <!-- (to register variables a..z) -->
 61
 62
 63		<SEQ TYPE="LITERAL1">$</SEQ>
 64		<SEQ TYPE="LITERAL1">@</SEQ>
 65		<SEQ TYPE="LITERAL1">#</SEQ>
 66		<SEQ TYPE="LITERAL1">*</SEQ>
 67		<SEQ TYPE="LITERAL1">{</SEQ>
 68		<SEQ TYPE="LITERAL1">}</SEQ>
 69
 70		<KEYWORDS>
 71
 72			<LITERAL2>CORESIZE</LITERAL2> <!-- value of -s parameter (default: 8000) -->
 73			<LITERAL2>MAXPROCESSES</LITERAL2> <!-- value of -p parameter (default: 8000) -->
 74			<LITERAL2>MAXCYCLES</LITERAL2> <!-- value of -c parameter (default: 80000) -->
 75			<LITERAL2>MAXLENGTH</LITERAL2> <!-- value of -l parameter (default: 100) -->
 76			<LITERAL2>MINDISTANCE</LITERAL2> <!-- value of -d parameter (default: 100) -->
 77			<LITERAL2>ROUNDS</LITERAL2> <!-- (+) value of -r parameter (default: 1) -->
 78			<LITERAL2>PSPACESIZE</LITERAL2> <!-- (+) value of -S parameter (default: 1/16th CORESIZE) -->
 79			<LITERAL2>CURLINE</LITERAL2> <!-- current line in generated assembly (starts with 0) -->
 80			<LITERAL2>VERSION</LITERAL2> <!-- pMARS version ("60" is v0.6.0) -->
 81			<LITERAL2>WARRIORS</LITERAL2> <!-- number of warriors specified on command line -->
 82
 83			<KEYWORD1>DAT</KEYWORD1> <!-- terminate process -->
 84			<KEYWORD1>MOV</KEYWORD1> <!-- move from A to B -->
 85			<KEYWORD1>ADD</KEYWORD1> <!-- add A to B, store result in B -->
 86			<KEYWORD1>SUB</KEYWORD1> <!-- subtract A from B, store result in B -->
 87			<KEYWORD1>MUL</KEYWORD1> <!-- multiply A by B, store result in B -->
 88			<KEYWORD1>DIV</KEYWORD1> <!-- divide B by A, store result in B if A <> 0, else terminate -->
 89			<KEYWORD1>MOD</KEYWORD1> <!-- divide B by A, store remainder in B if A <> 0, else terminate -->
 90			<KEYWORD1>JMP</KEYWORD1> <!-- transfer execution to A -->
 91			<KEYWORD1>JMZ</KEYWORD1> <!-- transfer execution to A if B is zero -->
 92			<KEYWORD1>JMN</KEYWORD1> <!-- transfer execution to A if B is non-zero -->
 93			<KEYWORD1>DJN</KEYWORD1> <!-- decrement B, if B is non-zero, transfer execution to A -->
 94			<KEYWORD1>SPL</KEYWORD1> <!-- split off process to A -->
 95			<KEYWORD1>SLT</KEYWORD1> <!-- skip next instruction if A is less than B -->
 96			<KEYWORD1>CMP</KEYWORD1> <!-- same as SEQ -->
 97			<KEYWORD1>SEQ</KEYWORD1> <!-- (*) Skip next instruction if A is equal to B -->
 98			<KEYWORD1>SNE</KEYWORD1> <!-- (*) Skip next instruction if A is not equal to B -->
 99			<KEYWORD1>NOP</KEYWORD1> <!-- (*) No operation -->
100			<KEYWORD1>LDP</KEYWORD1> <!-- (+) Load P-space cell A into core address B -->
101			<KEYWORD1>STP</KEYWORD1> <!-- (+) Store A-number into P-space cell B -->
102
103			<KEYWORD2>EQU</KEYWORD2>
104			<KEYWORD2>ORG</KEYWORD2>
105			<KEYWORD2>FOR</KEYWORD2>
106			<KEYWORD2>ROF</KEYWORD2>
107			<KEYWORD2>END</KEYWORD2>
108			<KEYWORD2>PIN</KEYWORD2>
109			<KEYWORD2>CORESIZE</KEYWORD2> <!-- value of -s parameter (default: 8000) -->
110			<KEYWORD2>MAXPROCESSES</KEYWORD2> <!-- value of -p parameter (default: 8000) -->
111			<KEYWORD2>MAXCYCLES</KEYWORD2> <!-- value of -c parameter (default: 80000) -->
112			<KEYWORD2>MAXLENGTH</KEYWORD2> <!-- value of -l parameter (default: 100) -->
113			<KEYWORD2>MINDISTANCE</KEYWORD2> <!-- value of -d parameter (default: 100) -->
114			<KEYWORD2>ROUNDS</KEYWORD2> <!-- (+) value of -r parameter (default: 1) -->
115			<KEYWORD2>PSPACESIZE</KEYWORD2> <!-- (+) value of -S parameter (default: 1/16th CORESIZE) -->
116			<KEYWORD2>CURLINE</KEYWORD2> <!-- current line in generated assembly (starts with 0) -->
117			<KEYWORD2>VERSION</KEYWORD2> <!-- pMARS version ("60" is v0.6.0) -->
118			<KEYWORD2>WARRIORS</KEYWORD2> <!-- number of warriors specified on command line -->
119
120		</KEYWORDS>
121
122	</RULES>
123
124</MODE>
125
126