plugins/geshi/geshi/applescript.php
author Dan
Fri, 29 May 2009 19:30:59 -0400
changeset 2 9e3258dfae15
parent 0 441963e5b07a
child 3 f3e2bbbd2155
permissions -rwxr-xr-x
Updated GeSHi. w00t.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     1
<?php
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     2
/*************************************************************************************
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     3
 * applescript.php
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     4
 * --------
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     5
 * Author: Stephan Klimek (http://www.initware.org)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     6
 * Copyright: Stephan Klimek (http://www.initware.org)
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
     7
 * Release Version: 1.0.8.2
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     8
 * Date Started: 2005/07/20
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     9
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    10
 * AppleScript language file for GeSHi.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    11
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    12
 * CHANGES
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    13
 * -------
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    14
 * 2008/05/23 (1.0.7.22)
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    15
 *  -  Added description of extra language features (SF#1970248)
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    16
 *
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    17
 * TODO
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    18
 * -------------------------
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    19
 * URL settings to references
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    20
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    21
 **************************************************************************************
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    22
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    23
 *     This file is part of GeSHi.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    24
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    25
 *   GeSHi is free software; you can redistribute it and/or modify
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    26
 *   it under the terms of the GNU General Public License as published by
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    27
 *   the Free Software Foundation; either version 2 of the License, or
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    28
 *   (at your option) any later version.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    29
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    30
 *   GeSHi is distributed in the hope that it will be useful,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    31
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    32
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    33
 *   GNU General Public License for more details.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    34
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    35
 *   You should have received a copy of the GNU General Public License
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    36
 *   along with GeSHi; if not, write to the Free Software
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    37
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    38
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    39
 ************************************************************************************/
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    40
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    41
$language_data = array (
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    42
    'LANG_NAME' => 'AppleScript',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    43
    'COMMENT_SINGLE' => array(1 => '--'),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    44
    'COMMENT_MULTI' => array( '(*' => '*)'),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    45
    'COMMENT_REGEXP' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    46
        2 => '/(?<=[a-z])\'/i',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    47
        3 => '/(?<![a-z])\'.*?\'/i',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    48
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    49
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    50
    'QUOTEMARKS' => array('"'),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    51
    'ESCAPE_CHAR' => '\\',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    52
    'KEYWORDS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    53
        1 => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    54
            'script','property','prop','end','to','set','global','local','on','of',
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    55
            'in','given','with','without','return','continue','tell','if','then','else','repeat',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    56
            'times','while','until','from','exit','try','error','considering','ignoring','timeout',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    57
            'transaction','my','get','put','into','is'
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    58
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    59
        2 => array(
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    60
            'each','some','every','whose','where','id','index','first','second','third','fourth',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    61
            'fifth','sixth','seventh','eighth','ninth','tenth','last','front','back','st','nd',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    62
            'rd','th','middle','named','through','thru','before','after','beginning','the'
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    63
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    64
        3 => array(
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    65
            'close','copy','count','delete','duplicate','exists','launch','make','move','open',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    66
            'print','quit','reopen','run','save','saving',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    67
            'it','me','version','pi','result','space','tab','anything','case','diacriticals','expansion',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    68
            'hyphens','punctuation','bold','condensed','expanded','hidden','italic','outline','plain',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    69
            'shadow','strikethrough','subscript','superscript','underline','ask','no','yes','false',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    70
            'true','weekday','monday','mon','tuesday','tue','wednesday','wed','thursday','thu','friday',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    71
            'fri','saturday','sat','sunday','sun','month','january','jan','february','feb','march',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    72
            'mar','april','apr','may','june','jun','july','jul','august','aug','september',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    73
            'sep','october','oct','november','nov','december','dec','minutes','hours',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    74
            'days','weeks','div','mod','and','not','or','as','contains','equal','equals','isnt'
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    75
            )
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    76
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    77
    'SYMBOLS' => array(
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    78
        ')','+','-','^','*','/','&','<','>=','<','<=','=','�'
2
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    79
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    80
    'CASE_SENSITIVE' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    81
        GESHI_COMMENTS => false,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    82
        1 => false,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    83
        2 => false,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    84
        3 => false,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    85
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    86
    'STYLES' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    87
        'KEYWORDS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    88
            1 => 'color: #b1b100;',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    89
            2 => 'color: #000000; font-weight: bold;',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    90
            3 => 'color: #000066;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    91
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    92
        'COMMENTS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    93
            1 => 'color: #808080; font-style: italic;',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    94
            2 => '',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    95
            3 => 'color: #ff0000;',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    96
            'MULTI' => 'color: #808080; font-style: italic;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    97
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    98
        'ESCAPE_CHAR' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
    99
            0 => 'color: #000099; font-weight: bold;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   100
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   101
        'BRACKETS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   102
            0 => 'color: #66cc66;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   103
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   104
        'STRINGS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   105
            0 => 'color: #ff0000;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   106
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   107
        'NUMBERS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   108
            0 => 'color: #cc66cc;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   109
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   110
        'METHODS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   111
            1 => 'color: #006600;',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   112
            2 => 'color: #006600;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   113
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   114
        'SYMBOLS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   115
            0 => 'color: #66cc66;'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   116
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   117
        'REGEXPS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   118
            0 => 'color: #0000ff;',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   119
            4 => 'color: #009999;',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   120
            ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   121
        'SCRIPT' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   122
            )
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   123
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   124
    'URLS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   125
        1 => '',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   126
        2 => '',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   127
        3 => ''
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   128
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   129
    'OOLANG' => true,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   130
    'OBJECT_SPLITTERS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   131
        1 => ',+-=&lt;&gt;/?^&amp;*'
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   132
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   133
    'REGEXPS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   134
        //Variables
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   135
        0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   136
        //File descriptors
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   137
        4 => '&lt;[a-zA-Z_][a-zA-Z0-9_]*&gt;',
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   138
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   139
    'STRICT_MODE_APPLIES' => GESHI_NEVER,
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   140
    'SCRIPT_DELIMITERS' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   141
        ),
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   142
    'HIGHLIGHT_STRICT_BLOCK' => array(
9e3258dfae15 Updated GeSHi. w00t.
Dan
parents: 0
diff changeset
   143
        )
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   144
);
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   145
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   146
?>