Copying geshi 1.0.7.5 to viewsvn/includes/geshi
[viewsvn.git] / includes / geshi / geshi / perl.php
1 <?php
2 /*************************************************************************************
3 * perl.php
4 * --------
5 * Author: Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com)
6 * Copyright: (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/)
7 * Release Version: 1.0.7.5
8 * CVS Revision Version: $Revision: 1.5 $
9 * Date Started: 2004/08/20
10 * Last Modified: $Date: 2005/10/22 07:52:59 $
11 *
12 * Perl language file for GeSHi.
13 *
14 * CHANGES
15 * -------
16 * 2004/11/27 (1.0.1)
17 * - Added support for multiple object splitters
18 * 2004/08/20 (1.0.0)
19 * - First Release
20 *
21 * TODO (updated 2004/11/27)
22 * -------------------------
23 * * LABEL:
24 * * string comparison operators
25 *
26 *************************************************************************************
27 *
28 * This file is part of GeSHi.
29 *
30 * GeSHi is free software; you can redistribute it and/or modify
31 * it under the terms of the GNU General Public License as published by
32 * the Free Software Foundation; either version 2 of the License, or
33 * (at your option) any later version.
34 *
35 * GeSHi is distributed in the hope that it will be useful,
36 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 * GNU General Public License for more details.
39 *
40 * You should have received a copy of the GNU General Public License
41 * along with GeSHi; if not, write to the Free Software
42 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
43 *
44 ************************************************************************************/
45
46 $language_data = array (
47 'LANG_NAME' => 'Perl',
48 'COMMENT_SINGLE' => array(1 => '#'),
49 'COMMENT_MULTI' => array( '=pod' => '=cut'),
50 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
51 'QUOTEMARKS' => array("'", '"'),
52 'ESCAPE_CHAR' => '\\',
53 'KEYWORDS' => array(
54 1 => array(
55 'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my',
56 'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our',
57 'reset', 'continue','and', 'cmp', 'ne'
58 ),
59 2 => array(
60 'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN',
61 'STDIN', 'STDOUT', 'STDERR'
62 ),
63 3 => array(
64 'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless',
65 'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr',
66 'chroot', 'close', 'closedir', 'connect', 'continue', 'cos',
67 'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die',
68 'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent',
69 'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit',
70 'exp', 'fcntl', 'fileno', 'flock', 'fork', 'format', 'formline',
71 'getc', 'getgrent', 'getgrgid', 'getgrnam', 'gethostbyaddr',
72 'gethostbyname', 'gethostent', 'getlogin', 'getnetbyaddr', 'getnetbyname',
73 'getnetent', 'getpeername', 'getpgrp', 'getppid', 'getpriority',
74 'getprotobyname', 'getprotobynumber', 'getprotoent', 'getpwent',
75 'getpwnam', 'getpwuid', 'getservbyname', 'getservbyport', 'getservent',
76 'getsockname', 'getsockopt', 'glob', 'gmtime', 'goto', 'grep',
77 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill',
78 'last', 'lc', 'lcfirst', 'length', 'link', 'listen', 'local',
79 'localtime', 'log', 'lstat', 'm', 'map', 'mkdir', 'msgctl', 'msgget',
80 'msgrcv', 'msgsnd', 'my', 'next', 'no', 'oct', 'open', 'opendir',
81 'ord', 'our', 'pack', 'package', 'pipe', 'pop', 'pos', 'print',
82 'printf', 'prototype', 'push', 'qq', 'qr', 'quotemeta', 'qw',
83 'qx', 'q', 'rand', 'read', 'readdir', 'readline', 'readlink', 'readpipe',
84 'recv', 'redo', 'ref', 'rename', 'require', 'return',
85 'reverse', 'rewinddir', 'rindex', 'rmdir', 's', 'scalar', 'seek',
86 'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent',
87 'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent',
88 'setpwent', 'setservent', 'setsockopt', 'shift', 'shmctl', 'shmget',
89 'shmread', 'shmwrite', 'shutdown', 'sin', 'sleep', 'socket', 'socketpair',
90 'sort', 'splice', 'split', 'sprintf', 'sqrt', 'srand', 'stat',
91 'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread',
92 'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied',
93 'time', 'times', 'tr', 'truncate', 'uc', 'ucfirst', 'umask', 'undef',
94 'unlink', 'unpack', 'unshift', 'untie', 'utime', 'values',
95 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', 'y'
96 )
97 ),
98 'SYMBOLS' => array(
99 '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>'
100 ),
101 'CASE_SENSITIVE' => array(
102 GESHI_COMMENTS => true,
103 1 => true,
104 2 => true,
105 3 => true,
106 ),
107 'STYLES' => array(
108 'KEYWORDS' => array(
109 1 => 'color: #b1b100;',
110 2 => 'color: #000000; font-weight: bold;',
111 3 => 'color: #000066;'
112 ),
113 'COMMENTS' => array(
114 1 => 'color: #808080; font-style: italic;',
115 'MULTI' => 'color: #808080; font-style: italic;'
116 ),
117 'ESCAPE_CHAR' => array(
118 0 => 'color: #000099; font-weight: bold;'
119 ),
120 'BRACKETS' => array(
121 0 => 'color: #66cc66;'
122 ),
123 'STRINGS' => array(
124 0 => 'color: #ff0000;'
125 ),
126 'NUMBERS' => array(
127 0 => 'color: #cc66cc;'
128 ),
129 'METHODS' => array(
130 1 => 'color: #006600;',
131 2 => 'color: #006600;'
132 ),
133 'SYMBOLS' => array(
134 0 => 'color: #66cc66;'
135 ),
136 'REGEXPS' => array(
137 0 => 'color: #0000ff;',
138 4 => 'color: #009999;',
139 ),
140 'SCRIPT' => array(
141 )
142 ),
143 'URLS' => array(
144 3 => 'http://www.perldoc.com/perl5.6/pod/func/{FNAME}.html'
145 ),
146 'OOLANG' => true,
147 'OBJECT_SPLITTERS' => array(
148 1 => '-&gt;',
149 2 => '::'
150 ),
151 'REGEXPS' => array(
152 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*',
153 4 => '&lt;[a-zA-Z_][a-zA-Z0-9_]*&gt;',
154 ),
155 'STRICT_MODE_APPLIES' => GESHI_NEVER,
156 'SCRIPT_DELIMITERS' => array(
157 ),
158 'HIGHLIGHT_STRICT_BLOCK' => array(
159 )
160 );
161
162 ?>