]>
src.bluestatic.org Git - viewsvn.git/blob - includes/geshi/geshi/perl.php
2 /*************************************************************************************
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 $
12 * Perl language file for GeSHi.
17 * - Added support for multiple object splitters
21 * TODO (updated 2004/11/27)
22 * -------------------------
24 * * string comparison operators
26 *************************************************************************************
28 * This file is part of GeSHi.
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.
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.
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
44 ************************************************************************************/
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' => '\\',
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'
60 'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN',
61 'STDIN', 'STDOUT', 'STDERR'
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'
99 '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>'
101 'CASE_SENSITIVE' => array(
102 GESHI_COMMENTS
=> true,
109 1 => 'color: #b1b100;',
110 2 => 'color: #000000; font-weight: bold;',
111 3 => 'color: #000066;'
114 1 => 'color: #808080; font-style: italic;',
115 'MULTI' => 'color: #808080; font-style: italic;'
117 'ESCAPE_CHAR' => array(
118 0 => 'color: #000099; font-weight: bold;'
121 0 => 'color: #66cc66;'
124 0 => 'color: #ff0000;'
127 0 => 'color: #cc66cc;'
130 1 => 'color: #006600;',
131 2 => 'color: #006600;'
134 0 => 'color: #66cc66;'
137 0 => 'color: #0000ff;',
138 4 => 'color: #009999;',
144 3 => 'http://www.perldoc.com/perl5.6/pod/func/{FNAME}.html'
147 'OBJECT_SPLITTERS' => array(
152 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*',
153 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>',
155 'STRICT_MODE_APPLIES' => GESHI_NEVER
,
156 'SCRIPT_DELIMITERS' => array(
158 'HIGHLIGHT_STRICT_BLOCK' => array(