+++ /dev/null
-/***************************************************************************\r
- * (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG.\r
- *\r
- * You may choose any license of the current release or any future release\r
- * of editarea to use, modify and/or redistribute this file.\r
- *\r
- * This language specification file supports for syntax checking on\r
- * a large subset of Perl 5.x.\r
- * The basic common syntax of Perl is fully supported, but as for\r
- * the highlighting of built-in operations, it's mainly designed\r
- * to support for hightlighting Perl code in a Safe environment (compartment)\r
- * as used by CoMaNet for evaluation of administrative scripts. This Safe\r
- * compartment basically allows for all of Opcode's :default operations,\r
- * but little others. See http://perldoc.perl.org/Opcode.html to learn\r
- * more.\r
- ***************************************************************************/\r
-\r
-editAreaLoader.load_syntax["perl"] = {\r
-\r
- 'COMMENT_SINGLE' : {1 : '#'},\r
- 'QUOTEMARKS' : {1: "'", 2: '"'},\r
- 'KEYWORD_CASE_SENSITIVE' : true,\r
- 'KEYWORDS' :\r
- {\r
- 'core' :\r
- [ "if", "else", "elsif", "while", "for", "each", "foreach",\r
- "next", "last", "goto", "exists", "delete", "undef",\r
- "my", "our", "local", "use", "require", "package", "keys", "values",\r
- "sub", "bless", "ref", "return" ],\r
- 'functions' :\r
- [\r
- //from :base_core\r
- "int", "hex", "oct", "abs", "substr", "vec", "study", "pos",\r
- "length", "index", "rindex", "ord", "chr", "ucfirst", "lcfirst",\r
- "uc", "lc", "quotemeta", "chop", "chomp", "split", "list", "splice",\r
- "push", "pop", "shift", "unshift", "reverse", "and", "or", "dor",\r
- "xor", "warn", "die", "prototype",\r
- //from :base_mem\r
- "concat", "repeat", "join", "range",\r
- //none from :base_loop, as we'll see them as basic statements...\r
- //from :base_orig\r
- "sprintf", "crypt", "tie", "untie", "select", "localtime", "gmtime",\r
- //others\r
- "print", "open", "close"\r
- ]\r
- },\r
- 'OPERATORS' :\r
- [ '+', '-', '/', '*', '=', '<', '>', '!', '||', '.', '&&',\r
- ' eq ', ' ne ', '=~' ],\r
- 'DELIMITERS' :\r
- [ '(', ')', '[', ']', '{', '}' ],\r
- 'REGEXPS' :\r
- {\r
- 'packagedecl' : { 'search': '(package )([^ \r\n\t#;]*)()',\r
- 'class' : 'scopingnames',\r
- 'modifiers' : 'g', 'execute' : 'before' },\r
- 'subdecl' : { 'search': '(sub )([^ \r\n\t#]*)()',\r
- 'class' : 'scopingnames',\r
- 'modifiers' : 'g', 'execute' : 'before' },\r
- 'scalars' : { 'search': '()(\\\$[a-zA-Z0-9_:]*)()',\r
- 'class' : 'vars',\r
- 'modifiers' : 'g', 'execute' : 'after' },\r
- 'arrays' : { 'search': '()(@[a-zA-Z0-9_:]*)()',\r
- 'class' : 'vars',\r
- 'modifiers' : 'g', 'execute' : 'after' },\r
- 'hashs' : { 'search': '()(%[a-zA-Z0-9_:]*)()',\r
- 'class' : 'vars',\r
- 'modifiers' : 'g', 'execute' : 'after' },\r
- },\r
-\r
- 'STYLES' :\r
- {\r
- 'COMMENTS': 'color: #AAAAAA;',\r
- 'QUOTESMARKS': 'color: #DC0000;',\r
- 'KEYWORDS' :\r
- {\r
- 'core' : 'color: #8aca00;',\r
- 'functions' : 'color: #2B60FF;'\r
- },\r
- 'OPERATORS' : 'color: #8aca00;',\r
- 'DELIMITERS' : 'color: #0038E1;',\r
- 'REGEXPS':\r
- {\r
- 'scopingnames' : 'color: #ff0000;',\r
- 'vars' : 'color: #00aaaa;',\r
- }\r
- } //'STYLES'\r
-};\r