File geshi/geshi/perl.php

Last commit: Fri Nov 23 00:12:00 2007 +0100	dankert	Farbige Darstellung von Code-Bl?cken mit Hilfe der Bibliothek GESHI.
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.20 8 * Date Started: 2004/08/20 9 * 10 * Perl language file for GeSHi. 11 * 12 * CHANGES 13 * ------- 14 * 2006/01/05 (1.0.2) 15 * - Used hardescape feature for ' strings (Cliff Stanford) 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 'HARDQUOTE' => array("'", "'"), // An optional 2-element array defining the beginning and end of a hard-quoted string 53 'HARDESCAPE' => array('\\\'', "\\\\"), // Things that must still be escaped inside a hard-quoted string 54 // If HARDQUOTE is defined, HARDESCAPE must be defined 55 // This will not work unless the first character of each element is either in the 56 // QUOTEMARKS array or is the ESCAPE_CHAR 57 'ESCAPE_CHAR' => '\\', 58 'KEYWORDS' => array( 59 1 => array( 60 'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my', 61 'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our', 62 'reset', 'continue','and', 'cmp', 'ne' 63 ), 64 2 => array( 65 'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN', 66 'STDIN', 'STDOUT', 'STDERR' 67 ), 68 3 => array( 69 'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless', 70 'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr', 71 'chroot', 'close', 'closedir', 'connect', 'continue', 'cos', 72 'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die', 73 'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent', 74 'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit', 75 'exp', 'fcntl', 'fileno', 'flock', 'fork', 'format', 'formline', 76 'getc', 'getgrent', 'getgrgid', 'getgrnam', 'gethostbyaddr', 77 'gethostbyname', 'gethostent', 'getlogin', 'getnetbyaddr', 'getnetbyname', 78 'getnetent', 'getpeername', 'getpgrp', 'getppid', 'getpriority', 79 'getprotobyname', 'getprotobynumber', 'getprotoent', 'getpwent', 80 'getpwnam', 'getpwuid', 'getservbyname', 'getservbyport', 'getservent', 81 'getsockname', 'getsockopt', 'glob', 'gmtime', 'goto', 'grep', 82 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill', 83 'last', 'lc', 'lcfirst', 'length', 'link', 'listen', 'local', 84 'localtime', 'log', 'lstat', 'm', 'map', 'mkdir', 'msgctl', 'msgget', 85 'msgrcv', 'msgsnd', 'my', 'next', 'no', 'oct', 'open', 'opendir', 86 'ord', 'our', 'pack', 'package', 'pipe', 'pop', 'pos', 'print', 87 'printf', 'prototype', 'push', 'qq', 'qr', 'quotemeta', 'qw', 88 'qx', 'q', 'rand', 'read', 'readdir', 'readline', 'readlink', 'readpipe', 89 'recv', 'redo', 'ref', 'rename', 'require', 'return', 90 'reverse', 'rewinddir', 'rindex', 'rmdir', 's', 'scalar', 'seek', 91 'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent', 92 'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent', 93 'setpwent', 'setservent', 'setsockopt', 'shift', 'shmctl', 'shmget', 94 'shmread', 'shmwrite', 'shutdown', 'sin', 'sleep', 'socket', 'socketpair', 95 'sort', 'splice', 'split', 'sprintf', 'sqrt', 'srand', 'stat', 96 'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread', 97 'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied', 98 'time', 'times', 'tr', 'truncate', 'uc', 'ucfirst', 'umask', 'undef', 99 'unlink', 'unpack', 'unshift', 'untie', 'utime', 'values', 100 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', 'y' 101 ) 102 ), 103 'SYMBOLS' => array( 104 '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>' 105 ), 106 'CASE_SENSITIVE' => array( 107 GESHI_COMMENTS => true, 108 1 => true, 109 2 => true, 110 3 => true, 111 ), 112 'STYLES' => array( 113 'KEYWORDS' => array( 114 1 => 'color: #b1b100;', 115 2 => 'color: #000000; font-weight: bold;', 116 3 => 'color: #000066;' 117 ), 118 'COMMENTS' => array( 119 1 => 'color: #808080; font-style: italic;', 120 'MULTI' => 'color: #808080; font-style: italic;' 121 ), 122 'ESCAPE_CHAR' => array( 123 0 => 'color: #000099; font-weight: bold;' 124 ), 125 'BRACKETS' => array( 126 0 => 'color: #66cc66;' 127 ), 128 'STRINGS' => array( 129 0 => 'color: #ff0000;' 130 ), 131 'NUMBERS' => array( 132 0 => 'color: #cc66cc;' 133 ), 134 'METHODS' => array( 135 1 => 'color: #006600;', 136 2 => 'color: #006600;' 137 ), 138 'SYMBOLS' => array( 139 0 => 'color: #66cc66;' 140 ), 141 'REGEXPS' => array( 142 0 => 'color: #0000ff;', 143 4 => 'color: #009999;', 144 ), 145 'SCRIPT' => array( 146 ) 147 ), 148 'URLS' => array( 149 3 => 'http://perldoc.perl.org/functions/{FNAME}.html' 150 ), 151 'OOLANG' => true, 152 'OBJECT_SPLITTERS' => array( 153 1 => '-&gt;', 154 2 => '::' 155 ), 156 'REGEXPS' => array( 157 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', 158 4 => '&lt;[a-zA-Z_][a-zA-Z0-9_]*&gt;', 159 ), 160 'STRICT_MODE_APPLIES' => GESHI_NEVER, 161 'SCRIPT_DELIMITERS' => array( 162 ), 163 'HIGHLIGHT_STRICT_BLOCK' => array( 164 ) 165 ); 166 167 ?>
Download geshi/geshi/perl.php
History Fri, 23 Nov 2007 00:12:00 +0100 dankert Farbige Darstellung von Code-Bl?cken mit Hilfe der Bibliothek GESHI.