📄 perl.php
字号:
<?php/** * Auto-generated class. PERL syntax highlighting * * This highlighter is EXPERIMENTAL, so that it may work incorrectly. * Most rules were created by Mariusz Jakubowski, and extended by me. * My knowledge of Perl is poor, and Perl syntax seems too * complicated to me. * * PHP version 4 and 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @copyright 2004 Andrey Demenev * @license http://www.php.net/license/3_0.txt PHP License * @link http://pear.php.net/package/Text_Highlighter * @category Text * @package Text_Highlighter * @version generated from: : perl.xml 21 2005-02-04 07:08:05Z andrey * @author Mariusz 'kg' Jakubowski <kg@alternatywa.info> * @author Andrey Demenev <demenev@gmail.com> * *//** * @ignore */require_once 'Text/Highlighter.php';/** * Auto-generated class. PERL syntax highlighting * * @author Mariusz 'kg' Jakubowski <kg@alternatywa.info> * @author Andrey Demenev <demenev@gmail.com> * @category Text * @package Text_Highlighter * @copyright 2004 Andrey Demenev * @license http://www.php.net/license/3_0.txt PHP License * @version Release: @package_version@ * @link http://pear.php.net/package/Text_Highlighter */class Text_Highlighter_PERL extends Text_Highlighter{ var $_language = 'perl'; /** * PHP4 Compatible Constructor * * @param array $options * @access public */ function Text_Highlighter_PERL($options=array()) { $this->__construct($options); } /** * Constructor * * @param array $options * @access public */ function __construct($options=array()) { $this->_options = $options; $this->_regs = array ( -1 => '/((?m)^(#!)(.*))|((?m)^=\\w+)|(\\{)|(\\()|(\\[)|((use)\\s+([\\w:]*))|([& ](\\w{2,}::)+\\w{2,})|((?Us)\\b(q[wq]\\s*((\\{)|(\\()|(\\[)|(\\<)|([\\W\\S])))(?=(.*)((?(3)\\})(?(4)\\))(?(5)\\])(?(6)\\>)(?(7)\\7))))|((?Us)\\b(q\\s*((\\{)|(\\()|(\\[)|(\\<)|([\\W\\S])))(?=(.*)((?(3)\\})(?(4)\\))(?(5)\\])(?(6)\\>)(?(7)\\7))))|(#.*)|((?x)(s|tr) ([|#~`!@$%^&*-+=\\\\;:\'",.\\/?]) ((\\\\.|[^\\\\])*?) (\\2)((\\\\.|[^\\\\])*?)(\\2[ecgimosx]*))|((?x)(m) ([|#~`!@$%^&*-+=\\\\;:\'",.\\/?]) ((\\\\.|[^\\\\])*?) (\\2[ecgimosx]*))|( \\/)|(\\$#?[1-9\'`@!])|((?i)(\\$#?|[@%*])([a-z1-9_]+::)*([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)\\$([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)(&|\\w+)\'[\\w_\']+\\b)|((?i)(\\{)([a-z1-9]+)(\\}))|((?i)[\\$@%]#?\\{[a-z1-9]+\\})|(`)|(\')|(")|((?i)[a-z_]\\w*)|(\\d*\\.?\\d+)/', 0 => '//', 1 => '/((?m)^(#!)(.*))|((?m)^=\\w+)|(\\{)|(\\()|(\\[)|((use)\\s+([\\w:]*))|([& ](\\w{2,}::)+\\w{2,})|((?Us)\\b(q[wq]\\s*((\\{)|(\\()|(\\[)|(\\<)|([\\W\\S])))(?=(.*)((?(3)\\})(?(4)\\))(?(5)\\])(?(6)\\>)(?(7)\\7))))|((?Us)\\b(q\\s*((\\{)|(\\()|(\\[)|(\\<)|([\\W\\S])))(?=(.*)((?(3)\\})(?(4)\\))(?(5)\\])(?(6)\\>)(?(7)\\7))))|(#.*)|((?x)(s|tr) ([|#~`!@$%^&*-+=\\\\;:\'",.\\/?]) ((\\\\.|[^\\\\])*?) (\\2)((\\\\.|[^\\\\])*?)(\\2[ecgimosx]*))|((?x)(m) ([|#~`!@$%^&*-+=\\\\;:\'",.\\/?]) ((\\\\.|[^\\\\])*?) (\\2[ecgimosx]*))|( \\/)|(\\$#?[1-9\'`@!])|((?i)(\\$#?|[@%*])([a-z1-9_]+::)*([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)\\$([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)(&|\\w+)\'[\\w_\']+\\b)|((?i)(\\{)([a-z1-9]+)(\\}))|((?i)[\\$@%]#?\\{[a-z1-9]+\\})|(`)|(\')|(")|((?i)[a-z_]\\w*)|(\\d*\\.?\\d+)/', 2 => '/((?m)^(#!)(.*))|((?m)^=\\w+)|(\\{)|(\\()|(\\[)|((use)\\s+([\\w:]*))|([& ](\\w{2,}::)+\\w{2,})|((?Us)\\b(q[wq]\\s*((\\{)|(\\()|(\\[)|(\\<)|([\\W\\S])))(?=(.*)((?(3)\\})(?(4)\\))(?(5)\\])(?(6)\\>)(?(7)\\7))))|((?Us)\\b(q\\s*((\\{)|(\\()|(\\[)|(\\<)|([\\W\\S])))(?=(.*)((?(3)\\})(?(4)\\))(?(5)\\])(?(6)\\>)(?(7)\\7))))|(#.*)|((?x)(s|tr) ([|#~`!@$%^&*-+=\\\\;:\'",.\\/?]) ((\\\\.|[^\\\\])*?) (\\2)((\\\\.|[^\\\\])*?)(\\2[ecgimosx]*))|((?x)(m) ([|#~`!@$%^&*-+=\\\\;:\'",.\\/?]) ((\\\\.|[^\\\\])*?) (\\2[ecgimosx]*))|( \\/)|((?i)([a-z1-9_]+)(\\s*=>))|(\\$#?[1-9\'`@!])|((?i)(\\$#?|[@%*])([a-z1-9_]+::)*([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)\\$([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)(&|\\w+)\'[\\w_\']+\\b)|((?i)(\\{)([a-z1-9]+)(\\}))|((?i)[\\$@%]#?\\{[a-z1-9]+\\})|(`)|(\')|(")|((?i)[a-z_]\\w*)|(\\d*\\.?\\d+)/', 3 => '/((?m)^(#!)(.*))|((?m)^=\\w+)|(\\{)|(\\()|(\\[)|((use)\\s+([\\w:]*))|([& ](\\w{2,}::)+\\w{2,})|((?Us)\\b(q[wq]\\s*((\\{)|(\\()|(\\[)|(\\<)|([\\W\\S])))(?=(.*)((?(3)\\})(?(4)\\))(?(5)\\])(?(6)\\>)(?(7)\\7))))|((?Us)\\b(q\\s*((\\{)|(\\()|(\\[)|(\\<)|([\\W\\S])))(?=(.*)((?(3)\\})(?(4)\\))(?(5)\\])(?(6)\\>)(?(7)\\7))))|(#.*)|((?x)(s|tr) ([|#~`!@$%^&*-+=\\\\;:\'",.\\/?]) ((\\\\.|[^\\\\])*?) (\\2)((\\\\.|[^\\\\])*?)(\\2[ecgimosx]*))|((?x)(m) ([|#~`!@$%^&*-+=\\\\;:\'",.\\/?]) ((\\\\.|[^\\\\])*?) (\\2[ecgimosx]*))|( \\/)|(\\$#?[1-9\'`@!])|((?i)(\\$#?|[@%*])([a-z1-9_]+::)*([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)\\$([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)(&|\\w+)\'[\\w_\']+\\b)|((?i)(\\{)([a-z1-9]+)(\\}))|((?i)[\\$@%]#?\\{[a-z1-9]+\\})|(`)|(\')|(")|((?i)[a-z_]\\w*)|(\\d*\\.?\\d+)/', 4 => '/(\\$#?[1-9\'`@!])|((?i)\\$([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)[\\$@%]#?\\{[a-z1-9]+\\})|(\\\\[\\\\"\'`tnr\\$\\{@])/', 5 => '/(\\\\\\\\|\\\\"|\\\\\'|\\\\`)/', 6 => '/(\\\\\\/)/', 7 => '/(\\$#?[1-9\'`@!])|((?i)\\$([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)[\\$@%]#?\\{[a-z1-9]+\\})|(\\\\\\\\|\\\\"|\\\\\'|\\\\`)/', 8 => '/(\\\\\\\\|\\\\"|\\\\\'|\\\\`)/', 9 => '/(\\$#?[1-9\'`@!])|((?i)\\$([a-z1-9_]+|\\^(?-i)[A-Z]?(?i)))|((?i)[\\$@%]#?\\{[a-z1-9]+\\})|(\\\\[\\\\"\'`tnr\\$\\{@])/', ); $this->_counts = array ( -1 => array ( 0 => 2, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 2, 6 => 1, 7 => 9, 8 => 9, 9 => 0, 10 => 8, 11 => 5, 12 => 0, 13 => 0, 14 => 3, 15 => 1, 16 => 1, 17 => 3, 18 => 0, 19 => 0, 20 => 0, 21 => 0, 22 => 0, 23 => 0, ), 0 => array ( ), 1 => array ( 0 => 2, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 2, 6 => 1, 7 => 9, 8 => 9, 9 => 0, 10 => 8, 11 => 5, 12 => 0, 13 => 0, 14 => 3, 15 => 1, 16 => 1, 17 => 3, 18 => 0, 19 => 0, 20 => 0, 21 => 0, 22 => 0, 23 => 0, ), 2 => array ( 0 => 2, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 2, 6 => 1, 7 => 9, 8 => 9, 9 => 0, 10 => 8, 11 => 5, 12 => 0, 13 => 2, 14 => 0, 15 => 3, 16 => 1, 17 => 1, 18 => 3, 19 => 0, 20 => 0, 21 => 0, 22 => 0, 23 => 0, 24 => 0, ), 3 => array ( 0 => 2, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 2, 6 => 1, 7 => 9, 8 => 9, 9 => 0, 10 => 8, 11 => 5, 12 => 0, 13 => 0, 14 => 3, 15 => 1, 16 => 1, 17 => 3, 18 => 0, 19 => 0, 20 => 0, 21 => 0, 22 => 0, 23 => 0, ), 4 => array ( 0 => 0, 1 => 1, 2 => 0, 3 => 0, ), 5 => array ( 0 => 0, ), 6 => array ( 0 => 0, ), 7 => array ( 0 => 0, 1 => 1, 2 => 0, 3 => 0, ), 8 => array ( 0 => 0, ), 9 => array ( 0 => 0, 1 => 1, 2 => 0, 3 => 0, ), ); $this->_delim = array ( -1 => array ( 0 => '', 1 => 'comment', 2 => 'brackets', 3 => 'brackets', 4 => 'brackets', 5 => '', 6 => '', 7 => 'quotes', 8 => 'quotes', 9 => '', 10 => '', 11 => '', 12 => 'quotes', 13 => '', 14 => '', 15 => '', 16 => '', 17 => '', 18 => '', 19 => 'quotes', 20 => 'quotes', 21 => 'quotes', 22 => '', 23 => '', ), 0 => array ( ), 1 => array ( 0 => '', 1 => 'comment', 2 => 'brackets', 3 => 'brackets', 4 => 'brackets', 5 => '', 6 => '', 7 => 'quotes', 8 => 'quotes', 9 => '', 10 => '', 11 => '', 12 => 'quotes', 13 => '', 14 => '', 15 => '', 16 => '', 17 => '', 18 => '', 19 => 'quotes', 20 => 'quotes', 21 => 'quotes', 22 => '', 23 => '', ), 2 => array ( 0 => '', 1 => 'comment', 2 => 'brackets', 3 => 'brackets', 4 => 'brackets', 5 => '', 6 => '', 7 => 'quotes', 8 => 'quotes', 9 => '', 10 => '', 11 => '', 12 => 'quotes', 13 => '', 14 => '', 15 => '', 16 => '', 17 => '', 18 => '', 19 => '', 20 => 'quotes', 21 => 'quotes', 22 => 'quotes', 23 => '', 24 => '', ), 3 => array ( 0 => '', 1 => 'comment', 2 => 'brackets', 3 => 'brackets', 4 => 'brackets', 5 => '', 6 => '', 7 => 'quotes', 8 => 'quotes', 9 => '', 10 => '', 11 => '', 12 => 'quotes', 13 => '', 14 => '', 15 => '', 16 => '', 17 => '', 18 => '', 19 => 'quotes', 20 => 'quotes', 21 => 'quotes', 22 => '', 23 => '', ), 4 => array ( 0 => '', 1 => '', 2 => '', 3 => '', ), 5 => array ( 0 => '', ), 6 => array ( 0 => '', ), 7 => array ( 0 => '', 1 => '', 2 => '', 3 => '', ), 8 => array ( 0 => '', ), 9 => array ( 0 => '', 1 => '', 2 => '', 3 => '', ), ); $this->_inner = array ( -1 => array ( 0 => 'special', 1 => 'comment', 2 => 'code', 3 => 'code', 4 => 'code', 5 => 'special', 6 => 'special', 7 => 'string', 8 => 'string', 9 => 'comment', 10 => 'string', 11 => 'string', 12 => 'string', 13 => 'var', 14 => 'var', 15 => 'var', 16 => 'var', 17 => 'var', 18 => 'var', 19 => 'string', 20 => 'string', 21 => 'string', 22 => 'identifier', 23 => 'number', ), 0 => array ( ), 1 => array ( 0 => 'special', 1 => 'comment', 2 => 'code', 3 => 'code', 4 => 'code', 5 => 'special', 6 => 'special', 7 => 'string', 8 => 'string', 9 => 'comment', 10 => 'string', 11 => 'string', 12 => 'string', 13 => 'var', 14 => 'var', 15 => 'var', 16 => 'var', 17 => 'var', 18 => 'var', 19 => 'string', 20 => 'string', 21 => 'string', 22 => 'identifier', 23 => 'number', ), 2 => array ( 0 => 'special', 1 => 'comment', 2 => 'code', 3 => 'code', 4 => 'code', 5 => 'special', 6 => 'special', 7 => 'string', 8 => 'string', 9 => 'comment', 10 => 'string', 11 => 'string',
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -