1/**
2 * SyntaxHighlighter
3 * http://alexgorbatchev.com/SyntaxHighlighter
4 *
5 * SyntaxHighlighter is donationware. If you are using it, please donate.
6 * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 *
8 * @version
9 * 3.0.90 (Sat, 18 Jun 2016 21:01:41 GMT)
10 *
11 * @copyright
12 * Copyright (C) 2004-2013 Alex Gorbatchev.
13 *
14 * @license
15 * Dual licensed under the MIT and GPL licenses.
16 */
17;(function()
18{
19	// CommonJS
20	SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
21
22	function Brush()
23	{
24		// Contributed by David Simmons-Duffin and Marty Kube
25
26		var funcs =
27			'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' +
28			'chroot close closedir connect cos crypt defined delete each endgrent ' +
29			'endhostent endnetent endprotoent endpwent endservent eof exec exists ' +
30			'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' +
31			'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' +
32			'getnetbyname getnetent getpeername getpgrp getppid getpriority ' +
33			'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' +
34			'getservbyname getservbyport getservent getsockname getsockopt glob ' +
35			'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' +
36			'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' +
37			'oct open opendir ord pack pipe pop pos print printf prototype push ' +
38			'quotemeta rand read readdir readline readlink readpipe recv rename ' +
39			'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' +
40			'semget semop send setgrent sethostent setnetent setpgrp setpriority ' +
41			'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' +
42			'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' +
43			'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' +
44			'system syswrite tell telldir time times tr truncate uc ucfirst umask ' +
45			'undef unlink unpack unshift utime values vec wait waitpid warn write ' +
46			// feature
47			'say';
48
49		var keywords =
50			'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' +
51			'for foreach goto if import last local my next no our package redo ref ' +
52			'require return sub tie tied unless untie until use wantarray while ' +
53			// feature
54			'given when default ' +
55			// Try::Tiny
56			'try catch finally ' +
57			// Moose
58			'has extends with before after around override augment';
59
60		this.regexList = [
61			{ regex: /(<<|&lt;&lt;)((\w+)|(['"])(.+?)\4)[\s\S]+?\n\3\5\n/g,	css: 'string' },	// here doc (maybe html encoded)
62			{ regex: /#.*$/gm,										css: 'comments' },
63			{ regex: /^#!.*\n/g,									css: 'preprocessor' },	// shebang
64			{ regex: /-?\w+(?=\s*=(>|&gt;))/g,	css: 'string' }, // fat comma
65
66			// is this too much?
67			{ regex: /\bq[qwxr]?\([\s\S]*?\)/g,	css: 'string' }, // quote-like operators ()
68			{ regex: /\bq[qwxr]?\{[\s\S]*?\}/g,	css: 'string' }, // quote-like operators {}
69			{ regex: /\bq[qwxr]?\[[\s\S]*?\]/g,	css: 'string' }, // quote-like operators []
70			{ regex: /\bq[qwxr]?(<|&lt;)[\s\S]*?(>|&gt;)/g,	css: 'string' }, // quote-like operators <>
71			{ regex: /\bq[qwxr]?([^\w({<[])[\s\S]*?\1/g,	css: 'string' }, // quote-like operators non-paired
72
73			{ regex: SyntaxHighlighter.regexLib.doubleQuotedString,	css: 'string' },
74			{ regex: SyntaxHighlighter.regexLib.singleQuotedString,	css: 'string' },
75			// currently ignoring single quote package separator and utf8 names
76			{ regex: /(?:&amp;|[$@%*]|\$#)\$?[a-zA-Z_](\w+|::)*/g,   		css: 'variable' },
77			{ regex: /\b__(?:END|DATA)__\b[\s\S]*$/g,				css: 'comments' },
78
79			// don't capture the newline after =cut so that =cut\n\n=head1 will start a new pod section
80			{ regex: /(^|\n)=\w[\s\S]*?(\n=cut\s*(?=\n)|$)/g,		css: 'comments' },		// pod
81
82			{ regex: new RegExp(this.getKeywords(funcs), 'gm'),		css: 'functions' },
83			{ regex: new RegExp(this.getKeywords(keywords), 'gm'),	css: 'keyword' }
84		];
85
86		this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
87	}
88
89	Brush.prototype	= new SyntaxHighlighter.Highlighter();
90	Brush.aliases		= ['perl', 'Perl', 'pl'];
91
92	SyntaxHighlighter.brushes.Perl = Brush;
93
94	// CommonJS
95	typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
96})();
97