]> git.mxchange.org Git - friendica.git/blob - library/Text_Highlighter/Text/Highlighter/JAVASCRIPT.php
Merge pull request #2615 from rabuzarus/1606-texthighlight
[friendica.git] / library / Text_Highlighter / Text / Highlighter / JAVASCRIPT.php
1 <?php
2 /**
3  * Auto-generated class. JAVASCRIPT 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: javascript.xml
19  * @author Andrey Demenev <demenev@gmail.com>
20  *
21  */
22
23 /**
24  * @ignore
25  */
26
27 require_once 'Text/Highlighter.php';
28
29 /**
30  * Auto-generated class. JAVASCRIPT syntax highlighting
31  *
32  * @author Andrey Demenev <demenev@gmail.com>
33  * @category   Text
34  * @package    Text_Highlighter
35  * @copyright  2004-2006 Andrey Demenev
36  * @license    http://www.php.net/license/3_0.txt  PHP License
37  * @version    Release: 0.7.0
38  * @link       http://pear.php.net/package/Text_Highlighter
39  */
40 class  Text_Highlighter_JAVASCRIPT extends Text_Highlighter
41 {
42     var $_language = 'javascript';
43
44     /**
45      * PHP4 Compatible Constructor
46      *
47      * @param array  $options
48      * @access public
49      */
50     function Text_Highlighter_JAVASCRIPT($options=array())
51     {
52         $this->__construct($options);
53     }
54
55
56     /**
57      *  Constructor
58      *
59      * @param array  $options
60      * @access public
61      */
62     function __construct($options=array())
63     {
64
65         $this->_options = $options;
66         $this->_regs = array (
67             -1 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)\\/\\*)|((?i)")|((?i)\')|((?i)\\/\\/)|((?i)[a-z_]\\w*)|((?i)0x\\d*|\\d*\\.?\\d+)/',
68             0 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)\\/\\*)|((?i)")|((?i)\')|((?i)\\/\\/)|((?i)[a-z_]\\w*)|((?i)0x\\d*|\\d*\\.?\\d+)/',
69             1 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)\\/\\*)|((?i)")|((?i)\')|((?i)\\/\\/)|((?i)[a-z_]\\w*)|((?i)0x\\d*|\\d*\\.?\\d+)/',
70             2 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)\\/\\*)|((?i)")|((?i)\')|((?i)\\/\\/)|((?i)[a-z_]\\w*)|((?i)0x\\d*|\\d*\\.?\\d+)/',
71             3 => '/((?i)((https?|ftp):\\/\\/[\\w\\?\\.\\-\\&=\\/%+]+)|(^|[\\s,!?])www\\.\\w+\\.\\w+[\\w\\?\\.\\&=\\/%+]*)|((?i)\\w+[\\.\\w\\-]+@(\\w+[\\.\\w\\-])+)|((?i)\\b(note|fixme):)|((?i)\\$\\w+:.+\\$)/',
72             4 => '/((?i)\\\\\\\\|\\\\"|\\\\\'|\\\\`|\\\\t|\\\\n|\\\\r)/',
73             5 => '/((?i)\\\\\\\\|\\\\"|\\\\\'|\\\\`)/',
74             6 => '/((?i)((https?|ftp):\\/\\/[\\w\\?\\.\\-\\&=\\/%+]+)|(^|[\\s,!?])www\\.\\w+\\.\\w+[\\w\\?\\.\\&=\\/%+]*)|((?i)\\w+[\\.\\w\\-]+@(\\w+[\\.\\w\\-])+)|((?i)\\b(note|fixme):)|((?i)\\$\\w+:.+\\$)/',
75         );
76         $this->_counts = array (
77             -1 =>
78             array (
79                 0 => 0,
80                 1 => 0,
81                 2 => 0,
82                 3 => 0,
83                 4 => 0,
84                 5 => 0,
85                 6 => 0,
86                 7 => 0,
87                 8 => 0,
88             ),
89             0 =>
90             array (
91                 0 => 0,
92                 1 => 0,
93                 2 => 0,
94                 3 => 0,
95                 4 => 0,
96                 5 => 0,
97                 6 => 0,
98                 7 => 0,
99                 8 => 0,
100             ),
101             1 =>
102             array (
103                 0 => 0,
104                 1 => 0,
105                 2 => 0,
106                 3 => 0,
107                 4 => 0,
108                 5 => 0,
109                 6 => 0,
110                 7 => 0,
111                 8 => 0,
112             ),
113             2 =>
114             array (
115                 0 => 0,
116                 1 => 0,
117                 2 => 0,
118                 3 => 0,
119                 4 => 0,
120                 5 => 0,
121                 6 => 0,
122                 7 => 0,
123                 8 => 0,
124             ),
125             3 =>
126             array (
127                 0 => 3,
128                 1 => 1,
129                 2 => 1,
130                 3 => 0,
131             ),
132             4 =>
133             array (
134                 0 => 0,
135             ),
136             5 =>
137             array (
138                 0 => 0,
139             ),
140             6 =>
141             array (
142                 0 => 3,
143                 1 => 1,
144                 2 => 1,
145                 3 => 0,
146             ),
147         );
148         $this->_delim = array (
149             -1 =>
150             array (
151                 0 => 'brackets',
152                 1 => 'brackets',
153                 2 => 'brackets',
154                 3 => 'comment',
155                 4 => 'quotes',
156                 5 => 'quotes',
157                 6 => 'comment',
158                 7 => '',
159                 8 => '',
160             ),
161             0 =>
162             array (
163                 0 => 'brackets',
164                 1 => 'brackets',
165                 2 => 'brackets',
166                 3 => 'comment',
167                 4 => 'quotes',
168                 5 => 'quotes',
169                 6 => 'comment',
170                 7 => '',
171                 8 => '',
172             ),
173             1 =>
174             array (
175                 0 => 'brackets',
176                 1 => 'brackets',
177                 2 => 'brackets',
178                 3 => 'comment',
179                 4 => 'quotes',
180                 5 => 'quotes',
181                 6 => 'comment',
182                 7 => '',
183                 8 => '',
184             ),
185             2 =>
186             array (
187                 0 => 'brackets',
188                 1 => 'brackets',
189                 2 => 'brackets',
190                 3 => 'comment',
191                 4 => 'quotes',
192                 5 => 'quotes',
193                 6 => 'comment',
194                 7 => '',
195                 8 => '',
196             ),
197             3 =>
198             array (
199                 0 => '',
200                 1 => '',
201                 2 => '',
202                 3 => '',
203             ),
204             4 =>
205             array (
206                 0 => '',
207             ),
208             5 =>
209             array (
210                 0 => '',
211             ),
212             6 =>
213             array (
214                 0 => '',
215                 1 => '',
216                 2 => '',
217                 3 => '',
218             ),
219         );
220         $this->_inner = array (
221             -1 =>
222             array (
223                 0 => 'code',
224                 1 => 'code',
225                 2 => 'code',
226                 3 => 'comment',
227                 4 => 'string',
228                 5 => 'string',
229                 6 => 'comment',
230                 7 => 'identifier',
231                 8 => 'number',
232             ),
233             0 =>
234             array (
235                 0 => 'code',
236                 1 => 'code',
237                 2 => 'code',
238                 3 => 'comment',
239                 4 => 'string',
240                 5 => 'string',
241                 6 => 'comment',
242                 7 => 'identifier',
243                 8 => 'number',
244             ),
245             1 =>
246             array (
247                 0 => 'code',
248                 1 => 'code',
249                 2 => 'code',
250                 3 => 'comment',
251                 4 => 'string',
252                 5 => 'string',
253                 6 => 'comment',
254                 7 => 'identifier',
255                 8 => 'number',
256             ),
257             2 =>
258             array (
259                 0 => 'code',
260                 1 => 'code',
261                 2 => 'code',
262                 3 => 'comment',
263                 4 => 'string',
264                 5 => 'string',
265                 6 => 'comment',
266                 7 => 'identifier',
267                 8 => 'number',
268             ),
269             3 =>
270             array (
271                 0 => 'url',
272                 1 => 'url',
273                 2 => 'inlinedoc',
274                 3 => 'inlinedoc',
275             ),
276             4 =>
277             array (
278                 0 => 'special',
279             ),
280             5 =>
281             array (
282                 0 => 'special',
283             ),
284             6 =>
285             array (
286                 0 => 'url',
287                 1 => 'url',
288                 2 => 'inlinedoc',
289                 3 => 'inlinedoc',
290             ),
291         );
292         $this->_end = array (
293             0 => '/(?i)\\}/',
294             1 => '/(?i)\\)/',
295             2 => '/(?i)\\]/',
296             3 => '/(?i)\\*\\//',
297             4 => '/(?i)"/',
298             5 => '/(?i)\'/',
299             6 => '/(?mi)$/',
300         );
301         $this->_states = array (
302             -1 =>
303             array (
304                 0 => 0,
305                 1 => 1,
306                 2 => 2,
307                 3 => 3,
308                 4 => 4,
309                 5 => 5,
310                 6 => 6,
311                 7 => -1,
312                 8 => -1,
313             ),
314             0 =>
315             array (
316                 0 => 0,
317                 1 => 1,
318                 2 => 2,
319                 3 => 3,
320                 4 => 4,
321                 5 => 5,
322                 6 => 6,
323                 7 => -1,
324                 8 => -1,
325             ),
326             1 =>
327             array (
328                 0 => 0,
329                 1 => 1,
330                 2 => 2,
331                 3 => 3,
332                 4 => 4,
333                 5 => 5,
334                 6 => 6,
335                 7 => -1,
336                 8 => -1,
337             ),
338             2 =>
339             array (
340                 0 => 0,
341                 1 => 1,
342                 2 => 2,
343                 3 => 3,
344                 4 => 4,
345                 5 => 5,
346                 6 => 6,
347                 7 => -1,
348                 8 => -1,
349             ),
350             3 =>
351             array (
352                 0 => -1,
353                 1 => -1,
354                 2 => -1,
355                 3 => -1,
356             ),
357             4 =>
358             array (
359                 0 => -1,
360             ),
361             5 =>
362             array (
363                 0 => -1,
364             ),
365             6 =>
366             array (
367                 0 => -1,
368                 1 => -1,
369                 2 => -1,
370                 3 => -1,
371             ),
372         );
373         $this->_keywords = array (
374             -1 =>
375             array (
376                 0 => -1,
377                 1 => -1,
378                 2 => -1,
379                 3 => -1,
380                 4 => -1,
381                 5 => -1,
382                 6 => -1,
383                 7 =>
384                 array (
385                     'builtin' => '/^(String|Array|RegExp|Function|Math|Number|Date|Image|window|document|navigator|onAbort|onBlur|onChange|onClick|onDblClick|onDragDrop|onError|onFocus|onKeyDown|onKeyPress|onKeyUp|onLoad|onMouseDown|onMouseOver|onMouseOut|onMouseMove|onMouseUp|onMove|onReset|onResize|onSelect|onSubmit|onUnload)$/',
386                     'reserved' => '/^(break|continue|do|while|export|for|in|if|else|import|return|label|switch|case|var|with|delete|new|this|typeof|void|abstract|boolean|byte|catch|char|class|const|debugger|default|double|enum|extends|false|final|finally|float|function|implements|goto|instanceof|int|interface|long|native|null|package|private|protected|public|short|static|super|synchronized|throw|throws|transient|true|try|volatile)$/',
387                 ),
388                 8 =>
389                 array (
390                 ),
391             ),
392             0 =>
393             array (
394                 0 => -1,
395                 1 => -1,
396                 2 => -1,
397                 3 => -1,
398                 4 => -1,
399                 5 => -1,
400                 6 => -1,
401                 7 =>
402                 array (
403                     'builtin' => '/^(String|Array|RegExp|Function|Math|Number|Date|Image|window|document|navigator|onAbort|onBlur|onChange|onClick|onDblClick|onDragDrop|onError|onFocus|onKeyDown|onKeyPress|onKeyUp|onLoad|onMouseDown|onMouseOver|onMouseOut|onMouseMove|onMouseUp|onMove|onReset|onResize|onSelect|onSubmit|onUnload)$/',
404                     'reserved' => '/^(break|continue|do|while|export|for|in|if|else|import|return|label|switch|case|var|with|delete|new|this|typeof|void|abstract|boolean|byte|catch|char|class|const|debugger|default|double|enum|extends|false|final|finally|float|function|implements|goto|instanceof|int|interface|long|native|null|package|private|protected|public|short|static|super|synchronized|throw|throws|transient|true|try|volatile)$/',
405                 ),
406                 8 =>
407                 array (
408                 ),
409             ),
410             1 =>
411             array (
412                 0 => -1,
413                 1 => -1,
414                 2 => -1,
415                 3 => -1,
416                 4 => -1,
417                 5 => -1,
418                 6 => -1,
419                 7 =>
420                 array (
421                     'builtin' => '/^(String|Array|RegExp|Function|Math|Number|Date|Image|window|document|navigator|onAbort|onBlur|onChange|onClick|onDblClick|onDragDrop|onError|onFocus|onKeyDown|onKeyPress|onKeyUp|onLoad|onMouseDown|onMouseOver|onMouseOut|onMouseMove|onMouseUp|onMove|onReset|onResize|onSelect|onSubmit|onUnload)$/',
422                     'reserved' => '/^(break|continue|do|while|export|for|in|if|else|import|return|label|switch|case|var|with|delete|new|this|typeof|void|abstract|boolean|byte|catch|char|class|const|debugger|default|double|enum|extends|false|final|finally|float|function|implements|goto|instanceof|int|interface|long|native|null|package|private|protected|public|short|static|super|synchronized|throw|throws|transient|true|try|volatile)$/',
423                 ),
424                 8 =>
425                 array (
426                 ),
427             ),
428             2 =>
429             array (
430                 0 => -1,
431                 1 => -1,
432                 2 => -1,
433                 3 => -1,
434                 4 => -1,
435                 5 => -1,
436                 6 => -1,
437                 7 =>
438                 array (
439                     'builtin' => '/^(String|Array|RegExp|Function|Math|Number|Date|Image|window|document|navigator|onAbort|onBlur|onChange|onClick|onDblClick|onDragDrop|onError|onFocus|onKeyDown|onKeyPress|onKeyUp|onLoad|onMouseDown|onMouseOver|onMouseOut|onMouseMove|onMouseUp|onMove|onReset|onResize|onSelect|onSubmit|onUnload)$/',
440                     'reserved' => '/^(break|continue|do|while|export|for|in|if|else|import|return|label|switch|case|var|with|delete|new|this|typeof|void|abstract|boolean|byte|catch|char|class|const|debugger|default|double|enum|extends|false|final|finally|float|function|implements|goto|instanceof|int|interface|long|native|null|package|private|protected|public|short|static|super|synchronized|throw|throws|transient|true|try|volatile)$/',
441                 ),
442                 8 =>
443                 array (
444                 ),
445             ),
446             3 =>
447             array (
448                 0 =>
449                 array (
450                 ),
451                 1 =>
452                 array (
453                 ),
454                 2 =>
455                 array (
456                 ),
457                 3 =>
458                 array (
459                 ),
460             ),
461             4 =>
462             array (
463                 0 =>
464                 array (
465                 ),
466             ),
467             5 =>
468             array (
469                 0 =>
470                 array (
471                 ),
472             ),
473             6 =>
474             array (
475                 0 =>
476                 array (
477                 ),
478                 1 =>
479                 array (
480                 ),
481                 2 =>
482                 array (
483                 ),
484                 3 =>
485                 array (
486                 ),
487             ),
488         );
489         $this->_parts = array (
490             0 =>
491             array (
492                 0 => NULL,
493                 1 => NULL,
494                 2 => NULL,
495                 3 => NULL,
496                 4 => NULL,
497                 5 => NULL,
498                 6 => NULL,
499                 7 => NULL,
500                 8 => NULL,
501             ),
502             1 =>
503             array (
504                 0 => NULL,
505                 1 => NULL,
506                 2 => NULL,
507                 3 => NULL,
508                 4 => NULL,
509                 5 => NULL,
510                 6 => NULL,
511                 7 => NULL,
512                 8 => NULL,
513             ),
514             2 =>
515             array (
516                 0 => NULL,
517                 1 => NULL,
518                 2 => NULL,
519                 3 => NULL,
520                 4 => NULL,
521                 5 => NULL,
522                 6 => NULL,
523                 7 => NULL,
524                 8 => NULL,
525             ),
526             3 =>
527             array (
528                 0 => NULL,
529                 1 => NULL,
530                 2 => NULL,
531                 3 => NULL,
532             ),
533             4 =>
534             array (
535                 0 => NULL,
536             ),
537             5 =>
538             array (
539                 0 => NULL,
540             ),
541             6 =>
542             array (
543                 0 => NULL,
544                 1 => NULL,
545                 2 => NULL,
546                 3 => NULL,
547             ),
548         );
549         $this->_subst = array (
550             -1 =>
551             array (
552                 0 => false,
553                 1 => false,
554                 2 => false,
555                 3 => false,
556                 4 => false,
557                 5 => false,
558                 6 => false,
559                 7 => false,
560                 8 => false,
561             ),
562             0 =>
563             array (
564                 0 => false,
565                 1 => false,
566                 2 => false,
567                 3 => false,
568                 4 => false,
569                 5 => false,
570                 6 => false,
571                 7 => false,
572                 8 => false,
573             ),
574             1 =>
575             array (
576                 0 => false,
577                 1 => false,
578                 2 => false,
579                 3 => false,
580                 4 => false,
581                 5 => false,
582                 6 => false,
583                 7 => false,
584                 8 => false,
585             ),
586             2 =>
587             array (
588                 0 => false,
589                 1 => false,
590                 2 => false,
591                 3 => false,
592                 4 => false,
593                 5 => false,
594                 6 => false,
595                 7 => false,
596                 8 => false,
597             ),
598             3 =>
599             array (
600                 0 => false,
601                 1 => false,
602                 2 => false,
603                 3 => false,
604             ),
605             4 =>
606             array (
607                 0 => false,
608             ),
609             5 =>
610             array (
611                 0 => false,
612             ),
613             6 =>
614             array (
615                 0 => false,
616                 1 => false,
617                 2 => false,
618                 3 => false,
619             ),
620         );
621         $this->_conditions = array (
622         );
623         $this->_kwmap = array (
624             'builtin' => 'builtin',
625             'reserved' => 'reserved',
626         );
627         $this->_defClass = 'code';
628         $this->_checkDefines();
629     }
630
631 }