Merge branch 'master' of git://factorcode.org/git/factor
[factor/jcg.git] / basis / xmode / xmode.dtd
blobd96df445fa4cf1cd58396c4b8df7f2b77e9768b3
1 <!-- Syntax tokens -->
2 <!ENTITY % token_values "NULL | COMMENT1 | COMMENT2 | COMMENT3 | COMMENT4 |
3 DIGIT | FUNCTION | INVALID | KEYWORD1 | KEYWORD2 | KEYWORD3 | KEYWORD4 |
4 LABEL | LITERAL1 | LITERAL2 | LITERAL3 | LITERAL4 | MARKUP | OPERATOR" >
5 <!ENTITY % tokens "( %token_values; )" >
7 <!-- Entities for attributes shared by multiple rules -->
8 <!ENTITY % att-bool '( TRUE | FALSE ) #IMPLIED' >
9 <!ENTITY % att-type 'TYPE %tokens; #IMPLIED' >
10 <!ENTITY % att-position-mix 'AT_LINE_START %att-bool;
11 AT_WHITESPACE_END %att-bool;
12 AT_WORD_START %att-bool; ' >
13 <!ENTITY % att-match-type 'MATCH_TYPE ( %token_values; | CONTEXT | RULE ) #IMPLIED' >
14 <!ENTITY % att-delegate 'DELEGATE CDATA #IMPLIED' >
15 <!ENTITY % att-span-mix 'NO_LINE_BREAK %att-bool;
16 NO_WORD_BREAK %att-bool;
17 NO_ESCAPE %att-bool; '>
18 <!ENTITY % att-hash-char 'HASH_CHAR CDATA #IMPLIED
19 HASH_CHARS CDATA #IMPLIED' >
21 <!-- MODE element -->
22 <!ELEMENT MODE ( PROPS?, RULES* ) >
24 <!-- MODE children -->
25 <!-- PROPS element -->
26 <!ELEMENT PROPS ( PROPERTY+ ) >
28 <!-- PROPS children -->
29 <!ELEMENT PROPERTY EMPTY >
30 <!ATTLIST PROPERTY
31 NAME CDATA #REQUIRED
32 VALUE CDATA #REQUIRED >
34 <!-- RULES element -->
35 <!ELEMENT RULES ( PROPS?, ( IMPORT | TERMINATE | SEQ | SEQ_REGEXP | SPAN
36 | SPAN_REGEXP | EOL_SPAN | EOL_SPAN_REGEXP | MARK_PREVIOUS
37 | MARK_FOLLOWING )*, KEYWORDS? ) >
39 <!-- RULES attributes -->
40 <!ATTLIST RULES
41 SET CDATA #IMPLIED
42 IGNORE_CASE %att-bool;
43 HIGHLIGHT_DIGITS %att-bool;
44 DIGIT_RE CDATA #IMPLIED
45 ESCAPE CDATA #IMPLIED
46 DEFAULT %tokens; #IMPLIED
47 NO_WORD_SEP CDATA #IMPLIED >
49 <!-- IMPORT element -->
50 <!ELEMENT IMPORT EMPTY >
51 <!ATTLIST IMPORT DELEGATE CDATA #REQUIRED >
53 <!-- TERMINATE element -->
54 <!ELEMENT TERMINATE EMPTY >
55 <!ATTLIST TERMINATE AT_CHAR CDATA #REQUIRED >
57 <!-- SEQ element -->
58 <!ELEMENT SEQ ( #PCDATA ) >
60 <!-- SEQ attributes -->
61 <!ATTLIST SEQ
62 %att-type;
63 %att-position-mix;
64 %att-delegate; >
66 <!-- SEQ_REGEXP element -->
67 <!ELEMENT SEQ_REGEXP ( #PCDATA ) >
69 <!-- SEQ_REGEXP attributes -->
70 <!ATTLIST SEQ_REGEXP
71 %att-hash-char;
72 %att-type;
73 %att-position-mix;
74 %att-delegate; >
76 <!-- SPAN element -->
77 <!ELEMENT SPAN ( BEGIN, END ) >
79 <!-- SPAN attributes -->
80 <!ATTLIST SPAN
81 %att-type;
82 %att-position-mix;
83 %att-span-mix;
84 %att-match-type;
85 %att-delegate; >
87 <!-- SPAN_REGEXP element -->
88 <!ELEMENT SPAN_REGEXP ( BEGIN, END ) >
90 <!-- SPAN_REGEXP attributes -->
91 <!ATTLIST SPAN_REGEXP
92 %att-hash-char;
93 %att-type;
94 %att-position-mix;
95 %att-span-mix;
96 %att-match-type;
97 %att-delegate; >
99 <!-- SPAN and SPAN_REGEXP children -->
100 <!ELEMENT BEGIN ( #PCDATA ) >
101 <!ATTLIST BEGIN %att-position-mix; >
102 <!ELEMENT END ( #PCDATA ) >
103 <!ATTLIST END %att-position-mix; >
105 <!-- EOL_SPAN element -->
106 <!ELEMENT EOL_SPAN ( #PCDATA ) >
108 <!-- EOL_SPAN attributes -->
109 <!ATTLIST EOL_SPAN
110 %att-type;
111 %att-position-mix;
112 %att-match-type;
113 %att-delegate; >
115 <!-- EOL_SPAN_REGEXP element -->
116 <!ELEMENT EOL_SPAN_REGEXP ( #PCDATA ) >
118 <!-- EOL_SPAN_REGEXP attributes -->
119 <!ATTLIST EOL_SPAN_REGEXP
120 %att-hash-char;
121 %att-type;
122 %att-position-mix;
123 %att-match-type;
124 %att-delegate; >
126 <!-- MARK_FOLLOWING element -->
127 <!ELEMENT MARK_FOLLOWING ( #PCDATA ) >
129 <!-- MARK_FOLLOWING attributes -->
130 <!ATTLIST MARK_FOLLOWING
131 %att-type;
132 %att-position-mix;
133 %att-match-type; >
135 <!-- MARK_PREVIOUS element -->
136 <!ELEMENT MARK_PREVIOUS ( #PCDATA ) >
138 <!-- MARK_PREVIOUS attributes -->
139 <!ATTLIST MARK_PREVIOUS
140 %att-type;
141 %att-position-mix;
142 %att-match-type; >
144 <!-- KEYWORDS element -->
145 <!ELEMENT KEYWORDS (%tokens;)+ >
147 <!-- KEYWORDS children -->
148 <!ELEMENT COMMENT1 ( #PCDATA ) >
149 <!ELEMENT COMMENT2 ( #PCDATA ) >
150 <!ELEMENT COMMENT3 ( #PCDATA ) >
151 <!ELEMENT COMMENT4 ( #PCDATA ) >
152 <!ELEMENT DIGIT ( #PCDATA ) >
153 <!ELEMENT FUNCTION ( #PCDATA ) >
154 <!ELEMENT KEYWORD1 ( #PCDATA ) >
155 <!ELEMENT KEYWORD2 ( #PCDATA ) >
156 <!ELEMENT KEYWORD3 ( #PCDATA ) >
157 <!ELEMENT KEYWORD4 ( #PCDATA ) >
158 <!ELEMENT LABEL ( #PCDATA ) >
159 <!ELEMENT LITERAL1 ( #PCDATA ) >
160 <!ELEMENT LITERAL2 ( #PCDATA ) >
161 <!ELEMENT LITERAL3 ( #PCDATA ) >
162 <!ELEMENT LITERAL4 ( #PCDATA ) >
163 <!ELEMENT MARKUP ( #PCDATA ) >
164 <!ELEMENT NULL ( #PCDATA ) >
165 <!ELEMENT OPERATOR ( #PCDATA ) >
166 <!ELEMENT INVALID ( #PCDATA ) >