Rev 1 |
|
Rev 3 |
Line 2... |
|
Line 2... |
/************************************************************************************* |
|
/************************************************************************************* |
* perl.php |
|
* perl.php |
* -------- |
|
* -------- |
* Author: Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com) |
|
* Author: Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com) |
* Copyright: (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/) |
|
* Copyright: (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/) |
* Release Version: 1.0.8.1 |
|
* Release Version: 1.0.8.3 |
* Date Started: 2004/08/20 |
|
* Date Started: 2004/08/20 |
* |
|
* |
* Perl language file for GeSHi. |
|
* Perl language file for GeSHi. |
* |
|
* |
* CHANGES |
|
* CHANGES |
Line 70... |
|
Line 70... |
//Regular expression match variables |
|
//Regular expression match variables |
3 => '/\$\d+/', |
|
3 => '/\$\d+/', |
//Heredoc |
|
//Heredoc |
4 => '/<<\s*?([\'"]?)([a-zA-Z0-9]+)\1;[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', |
|
4 => '/<<\s*?([\'"]?)([a-zA-Z0-9]+)\1;[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', |
//Predefined variables |
|
//Predefined variables |
5 => '/\$(\^[a-zA-Z]?|[\$`\'&_\.,+\-~:\\\\\/"\|%=\?!@<>\(\)\[\]])|@_/', |
|
5 => '/\$(\^[a-zA-Z]?|[\*\$`\'&_\.,+\-~:;\\\\\/"\|%=\?!@#<>\(\)\[\]])(?!\w)|@[_+\-]|%[!]|\$(?=\{)/', |
), |
|
), |
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
|
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
'QUOTEMARKS' => array('"','`'), |
|
'QUOTEMARKS' => array('"','`'), |
'HARDQUOTE' => array("'", "'"), // An optional 2-element array defining the beginning and end of a hard-quoted string |
|
'HARDQUOTE' => array("'", "'"), // An optional 2-element array defining the beginning and end of a hard-quoted string |
'HARDESCAPE' => array('\\\'',), |
|
'HARDESCAPE' => array('\\\'',), |
Line 84... |
|
Line 84... |
// QUOTEMARKS array or is the ESCAPE_CHAR |
|
// QUOTEMARKS array or is the ESCAPE_CHAR |
'ESCAPE_CHAR' => '\\', |
|
'ESCAPE_CHAR' => '\\', |
'KEYWORDS' => array( |
|
'KEYWORDS' => array( |
1 => array( |
|
1 => array( |
'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my', |
|
'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my', |
'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our', |
|
'xor', 'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our', |
'reset', 'continue', 'cmp', 'ne' |
|
'reset', 'continue', 'cmp', 'ne', 'eq', 'lt', 'gt', 'le', 'ge', |
), |
|
), |
2 => array( |
|
2 => array( |
'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN', |
|
'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN', |
'STDIN', 'STDOUT', 'STDERR' |
|
'STDIN', 'STDOUT', 'STDERR', 'ARGV', 'ARGVOUT' |
), |
|
), |
3 => array( |
|
3 => array( |
'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless', |
|
'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless', |
'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr', |
|
'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr', |
'chroot', 'close', 'closedir', 'connect', 'cos', |
|
'chroot', 'close', 'closedir', 'connect', 'cos', |
Line 128... |
|
Line 128... |
'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', 'y' |
|
'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', 'y' |
) |
|
) |
), |
|
), |
'SYMBOLS' => array( |
|
'SYMBOLS' => array( |
'<', '>', '=', |
|
'<', '>', '=', |
'!', '@', '~', '&', '|', |
|
'!', '@', '~', '&', '|', '^', |
'+','-', '*', '/', '%', |
|
'+','-', '*', '/', '%', |
',', ';', '?', ':' |
|
',', ';', '?', '.', ':' |
), |
|
), |
'CASE_SENSITIVE' => array( |
|
'CASE_SENSITIVE' => array( |
GESHI_COMMENTS => false, |
|
GESHI_COMMENTS => false, |
1 => true, |
|
1 => true, |
2 => true, |
|
2 => true, |
Line 192... |
|
Line 192... |
1 => '->', |
|
1 => '->', |
2 => '::' |
|
2 => '::' |
), |
|
), |
'REGEXPS' => array( |
|
'REGEXPS' => array( |
//Variable |
|
//Variable |
0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', |
|
0 => '(?:\$[\$#]?|\\\\(?:[@%*]?|\\\\*\$|&)|%[$]?|@[$]?|\*[$]?|&[$]?)[a-zA-Z_][a-zA-Z0-9_]*', |
//File Descriptor |
|
//File Descriptor |
4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', |
|
4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', |
), |
|
), |
'STRICT_MODE_APPLIES' => GESHI_NEVER, |
|
'STRICT_MODE_APPLIES' => GESHI_NEVER, |
'SCRIPT_DELIMITERS' => array( |
|
'SCRIPT_DELIMITERS' => array( |
Line 209... |
|
Line 209... |
) |
|
) |
) |
|
) |
); |
|
); |
|
|
|
?> |
|
?> |
|
|
|