KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

applescript.php 6.2KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <?php
  2. /*************************************************************************************
  3. * applescript.php
  4. * --------
  5. * Author: Stephan Klimek (http://www.initware.org)
  6. * Copyright: Stephan Klimek (http://www.initware.org)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2005/07/20
  9. *
  10. * AppleScript language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2008/05/23 (1.0.7.22)
  15. * - Added description of extra language features (SF#1970248)
  16. *
  17. * TODO
  18. * -------------------------
  19. * URL settings to references
  20. *
  21. **************************************************************************************
  22. *
  23. * This file is part of GeSHi.
  24. *
  25. * GeSHi is free software; you can redistribute it and/or modify
  26. * it under the terms of the GNU General Public License as published by
  27. * the Free Software Foundation; either version 2 of the License, or
  28. * (at your option) any later version.
  29. *
  30. * GeSHi is distributed in the hope that it will be useful,
  31. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  32. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  33. * GNU General Public License for more details.
  34. *
  35. * You should have received a copy of the GNU General Public License
  36. * along with GeSHi; if not, write to the Free Software
  37. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  38. *
  39. ************************************************************************************/
  40. $language_data = array (
  41. 'LANG_NAME' => 'AppleScript',
  42. 'COMMENT_SINGLE' => array(1 => '--'),
  43. 'COMMENT_MULTI' => array( '(*' => '*)'),
  44. 'COMMENT_REGEXP' => array(
  45. 2 => '/(?<=[a-z])\'/i',
  46. 3 => '/(?<![a-z])\'.*?\'/i',
  47. ),
  48. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  49. 'QUOTEMARKS' => array('"'),
  50. 'ESCAPE_CHAR' => '\\',
  51. 'KEYWORDS' => array(
  52. 1 => array(
  53. 'application','close','count','delete','duplicate','exists','launch','make','move','open',
  54. 'print','quit','reopen','run','save','saving', 'idle', 'path to', 'number', 'alias', 'list', 'text', 'string',
  55. 'integer', 'it','me','version','pi','result','space','tab','anything','case','diacriticals','expansion',
  56. 'hyphens','punctuation','bold','condensed','expanded','hidden','italic','outline','plain',
  57. 'shadow','strikethrough','subscript','superscript','underline','ask','no','yes','false', 'id',
  58. 'true','weekday','monday','mon','tuesday','tue','wednesday','wed','thursday','thu','friday',
  59. 'fri','saturday','sat','sunday','sun','month','january','jan','february','feb','march',
  60. 'mar','april','apr','may','june','jun','july','jul','august','aug','september', 'quote', 'do JavaScript',
  61. 'sep','october','oct','november','nov','december','dec','minutes','hours', 'name', 'default answer',
  62. 'days','weeks', 'folder', 'folders', 'file', 'files', 'window', 'eject', 'disk', 'reveal', 'sleep',
  63. 'shut down', 'restart', 'display dialog', 'buttons', 'invisibles', 'item', 'items', 'delimiters', 'offset of',
  64. 'AppleScript\'s', 'choose file', 'choose folder', 'choose from list', 'beep', 'contents', 'do shell script',
  65. 'paragraph', 'paragraphs', 'missing value', 'quoted form', 'desktop', 'POSIX path', 'POSIX file',
  66. 'activate', 'document', 'adding', 'receiving', 'content', 'new', 'properties', 'info for', 'bounds',
  67. 'selection', 'extension', 'into', 'onto', 'by', 'between', 'against', 'set the clipboard to', 'the clipboard'
  68. ),
  69. 2 => array(
  70. 'each','some','every','whose','where','index','first','second','third','fourth',
  71. 'fifth','sixth','seventh','eighth','ninth','tenth','last','front','back','st','nd',
  72. 'rd','th','middle','named','through','thru','before','after','beginning','the', 'as',
  73. 'div','mod','and','not','or','contains','equal','equals','isnt', 'less', 'greater'
  74. ),
  75. 3 => array(
  76. 'script','property','prop','end','to','set','global','local','on','of',
  77. 'in','given','with','without','return','continue','tell','if','then','else','repeat',
  78. 'times','while','until','from','exit','try','error','considering','ignoring','timeout',
  79. 'transaction','my','get','put','is', 'copy'
  80. )
  81. ),
  82. 'SYMBOLS' => array(
  83. ')','+','-','^','*','/','&','<','>=','<','<=','=','�'
  84. ),
  85. 'CASE_SENSITIVE' => array(
  86. GESHI_COMMENTS => false,
  87. 1 => false,
  88. 2 => false,
  89. 3 => false,
  90. ),
  91. 'STYLES' => array(
  92. 'KEYWORDS' => array(
  93. 1 => 'color: #0066ff;',
  94. 2 => 'color: #ff0033;',
  95. 3 => 'color: #ff0033; font-weight: bold;'
  96. ),
  97. 'COMMENTS' => array(
  98. 1 => 'color: #808080; font-style: italic;',
  99. 2 => '',
  100. 3 => 'color: #ff0000;',
  101. 'MULTI' => 'color: #808080; font-style: italic;'
  102. ),
  103. 'ESCAPE_CHAR' => array(
  104. 0 => 'color: #000000; font-weight: bold;'
  105. ),
  106. 'BRACKETS' => array(
  107. 0 => 'color: #000000;'
  108. ),
  109. 'STRINGS' => array(
  110. 0 => 'color: #009900;'
  111. ),
  112. 'NUMBERS' => array(
  113. 0 => 'color: #000000;'
  114. ),
  115. 'METHODS' => array(
  116. 1 => 'color: #006600;',
  117. 2 => 'color: #006600;'
  118. ),
  119. 'SYMBOLS' => array(
  120. 0 => 'color: #000000;'
  121. ),
  122. 'REGEXPS' => array(
  123. 0 => 'color: #339933;',
  124. 4 => 'color: #0066ff;',
  125. ),
  126. 'SCRIPT' => array(
  127. )
  128. ),
  129. 'URLS' => array(
  130. 1 => '',
  131. 2 => '',
  132. 3 => ''
  133. ),
  134. 'OOLANG' => true,
  135. 'OBJECT_SPLITTERS' => array(
  136. 1 => ',+-=&lt;&gt;/?^&amp;*'
  137. ),
  138. 'REGEXPS' => array(
  139. //Variables
  140. 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*',
  141. //File descriptors
  142. 4 => '&lt;[a-zA-Z_][a-zA-Z0-9_]*&gt;',
  143. ),
  144. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  145. 'SCRIPT_DELIMITERS' => array(
  146. ),
  147. 'HIGHLIGHT_STRICT_BLOCK' => array(
  148. ),
  149. 'PARSER_CONTROL' => array(
  150. 'KEYWORDS' => array(
  151. 'SPACE_AS_WHITESPACE' => true
  152. )
  153. )
  154. );
  155. ?>