1: <?php
2: /**
3: * Auto-generated class. DTD syntax highlighting
4: *
5: * PHP version 4 and 5
6: *
7: * LICENSE: This source file is subject to version 3.0 of the PHP license
8: * that is available through the world-wide-web at the following URI:
9: * http://www.php.net/license/3_0.txt. If you did not receive a copy of
10: * the PHP License and are unable to obtain it through the web, please
11: * send a note to license@php.net so we can mail you a copy immediately.
12: *
13: * @copyright 2004-2006 Andrey Demenev
14: * @license http://www.php.net/license/3_0.txt PHP License
15: * @link http://pear.php.net/package/Text_Highlighter
16: * @category Text
17: * @package Text_Highlighter
18: * @version generated from: : dtd.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
19: * @author Andrey Demenev <demenev@gmail.com>
20: *
21: */
22:
23: /**
24: * Auto-generated class. DTD syntax highlighting
25: *
26: * @author Andrey Demenev <demenev@gmail.com>
27: * @category Text
28: * @package Text_Highlighter
29: * @copyright 2004-2006 Andrey Demenev
30: * @license http://www.php.net/license/3_0.txt PHP License
31: * @version Release: 0.7.1
32: * @link http://pear.php.net/package/Text_Highlighter
33: */
34: class Text_Highlighter_DTD extends Text_Highlighter
35: {
36: var $_language = 'dtd';
37:
38: /**
39: * Constructor
40: *
41: * @param array $options
42: * @access public
43: */
44: function __construct($options=array())
45: {
46:
47: $this->_options = $options;
48: $this->_regs = array (
49: -1 => '/(\\<!--)|(\\<\\!\\[)|((\\&|\\%)[\\w\\-\\.]+;)/',
50: 0 => '//',
51: 1 => '/(\\<!--)|(\\<)|(#PCDATA\\b)|((\\&|\\%)[\\w\\-\\.]+;)|((?i)[a-z][a-z\\d\\-\\,:]+)/',
52: 2 => '/(\\<!--)|(\\()|(\')|(")|((?<=\\<)!(ENTITY|ATTLIST|ELEMENT|NOTATION)\\b)|(\\s(#(IMPLIED|REQUIRED|FIXED))|CDATA|ENTITY|NOTATION|NMTOKENS?|PUBLIC|SYSTEM\\b)|(#PCDATA\\b)|((\\&|\\%)[\\w\\-\\.]+;)|((?i)[a-z][a-z\\d\\-\\,:]+)/',
53: 3 => '/(\\()|((\\&|\\%)[\\w\\-\\.]+;)|((?i)[a-z][a-z\\d\\-\\,:]+)/',
54: 4 => '/((\\&|\\%)[\\w\\-\\.]+;)/',
55: 5 => '/((\\&|\\%)[\\w\\-\\.]+;)/',
56: );
57: $this->_counts = array (
58: -1 =>
59: array (
60: 0 => 0,
61: 1 => 0,
62: 2 => 1,
63: ),
64: 0 =>
65: array (
66: ),
67: 1 =>
68: array (
69: 0 => 0,
70: 1 => 0,
71: 2 => 0,
72: 3 => 1,
73: 4 => 0,
74: ),
75: 2 =>
76: array (
77: 0 => 0,
78: 1 => 0,
79: 2 => 0,
80: 3 => 0,
81: 4 => 1,
82: 5 => 2,
83: 6 => 0,
84: 7 => 1,
85: 8 => 0,
86: ),
87: 3 =>
88: array (
89: 0 => 0,
90: 1 => 1,
91: 2 => 0,
92: ),
93: 4 =>
94: array (
95: 0 => 1,
96: ),
97: 5 =>
98: array (
99: 0 => 1,
100: ),
101: );
102: $this->_delim = array (
103: -1 =>
104: array (
105: 0 => 'comment',
106: 1 => 'brackets',
107: 2 => '',
108: ),
109: 0 =>
110: array (
111: ),
112: 1 =>
113: array (
114: 0 => 'comment',
115: 1 => 'brackets',
116: 2 => '',
117: 3 => '',
118: 4 => '',
119: ),
120: 2 =>
121: array (
122: 0 => 'comment',
123: 1 => 'brackets',
124: 2 => 'quotes',
125: 3 => 'quotes',
126: 4 => '',
127: 5 => '',
128: 6 => '',
129: 7 => '',
130: 8 => '',
131: ),
132: 3 =>
133: array (
134: 0 => 'brackets',
135: 1 => '',
136: 2 => '',
137: ),
138: 4 =>
139: array (
140: 0 => '',
141: ),
142: 5 =>
143: array (
144: 0 => '',
145: ),
146: );
147: $this->_inner = array (
148: -1 =>
149: array (
150: 0 => 'comment',
151: 1 => 'code',
152: 2 => 'special',
153: ),
154: 0 =>
155: array (
156: ),
157: 1 =>
158: array (
159: 0 => 'comment',
160: 1 => 'code',
161: 2 => 'reserved',
162: 3 => 'special',
163: 4 => 'identifier',
164: ),
165: 2 =>
166: array (
167: 0 => 'comment',
168: 1 => 'code',
169: 2 => 'string',
170: 3 => 'string',
171: 4 => 'var',
172: 5 => 'reserved',
173: 6 => 'reserved',
174: 7 => 'special',
175: 8 => 'identifier',
176: ),
177: 3 =>
178: array (
179: 0 => 'code',
180: 1 => 'special',
181: 2 => 'identifier',
182: ),
183: 4 =>
184: array (
185: 0 => 'special',
186: ),
187: 5 =>
188: array (
189: 0 => 'special',
190: ),
191: );
192: $this->_end = array (
193: 0 => '/--\\>/',
194: 1 => '/\\]\\]\\>/',
195: 2 => '/\\>/',
196: 3 => '/\\)/',
197: 4 => '/\'/',
198: 5 => '/"/',
199: );
200: $this->_states = array (
201: -1 =>
202: array (
203: 0 => 0,
204: 1 => 1,
205: 2 => -1,
206: ),
207: 0 =>
208: array (
209: ),
210: 1 =>
211: array (
212: 0 => 0,
213: 1 => 2,
214: 2 => -1,
215: 3 => -1,
216: 4 => -1,
217: ),
218: 2 =>
219: array (
220: 0 => 0,
221: 1 => 3,
222: 2 => 4,
223: 3 => 5,
224: 4 => -1,
225: 5 => -1,
226: 6 => -1,
227: 7 => -1,
228: 8 => -1,
229: ),
230: 3 =>
231: array (
232: 0 => 3,
233: 1 => -1,
234: 2 => -1,
235: ),
236: 4 =>
237: array (
238: 0 => -1,
239: ),
240: 5 =>
241: array (
242: 0 => -1,
243: ),
244: );
245: $this->_keywords = array (
246: -1 =>
247: array (
248: 0 => -1,
249: 1 => -1,
250: 2 =>
251: array (
252: ),
253: ),
254: 0 =>
255: array (
256: ),
257: 1 =>
258: array (
259: 0 => -1,
260: 1 => -1,
261: 2 =>
262: array (
263: ),
264: 3 =>
265: array (
266: ),
267: 4 =>
268: array (
269: ),
270: ),
271: 2 =>
272: array (
273: 0 => -1,
274: 1 => -1,
275: 2 => -1,
276: 3 => -1,
277: 4 =>
278: array (
279: ),
280: 5 =>
281: array (
282: ),
283: 6 =>
284: array (
285: ),
286: 7 =>
287: array (
288: ),
289: 8 =>
290: array (
291: ),
292: ),
293: 3 =>
294: array (
295: 0 => -1,
296: 1 =>
297: array (
298: ),
299: 2 =>
300: array (
301: ),
302: ),
303: 4 =>
304: array (
305: 0 =>
306: array (
307: ),
308: ),
309: 5 =>
310: array (
311: 0 =>
312: array (
313: ),
314: ),
315: );
316: $this->_parts = array (
317: 0 =>
318: array (
319: ),
320: 1 =>
321: array (
322: 0 => NULL,
323: 1 => NULL,
324: 2 => NULL,
325: 3 => NULL,
326: 4 => NULL,
327: ),
328: 2 =>
329: array (
330: 0 => NULL,
331: 1 => NULL,
332: 2 => NULL,
333: 3 => NULL,
334: 4 => NULL,
335: 5 => NULL,
336: 6 => NULL,
337: 7 => NULL,
338: 8 => NULL,
339: ),
340: 3 =>
341: array (
342: 0 => NULL,
343: 1 => NULL,
344: 2 => NULL,
345: ),
346: 4 =>
347: array (
348: 0 => NULL,
349: ),
350: 5 =>
351: array (
352: 0 => NULL,
353: ),
354: );
355: $this->_subst = array (
356: -1 =>
357: array (
358: 0 => false,
359: 1 => false,
360: 2 => false,
361: ),
362: 0 =>
363: array (
364: ),
365: 1 =>
366: array (
367: 0 => false,
368: 1 => false,
369: 2 => false,
370: 3 => false,
371: 4 => false,
372: ),
373: 2 =>
374: array (
375: 0 => false,
376: 1 => false,
377: 2 => false,
378: 3 => false,
379: 4 => false,
380: 5 => false,
381: 6 => false,
382: 7 => false,
383: 8 => false,
384: ),
385: 3 =>
386: array (
387: 0 => false,
388: 1 => false,
389: 2 => false,
390: ),
391: 4 =>
392: array (
393: 0 => false,
394: ),
395: 5 =>
396: array (
397: 0 => false,
398: ),
399: );
400: $this->_conditions = array (
401: );
402: $this->_kwmap = array (
403: );
404: $this->_defClass = 'code';
405: $this->_checkDefines();
406: }
407:
408: }