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