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.

307 lines
18KB

  1. <?php
  2. /*************************************************************************************
  3. * stonescript.php
  4. * --------
  5. * Author: Archimmersion ( based on ruby.php by Moises Deniz )
  6. * Copyright: (c) 2011 Archimmersion ( http://www.archimmersion.com )
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2011/03/30
  9. *
  10. * StoneScript language file for GeSHi.
  11. *
  12. * StonesCript is a Lua based script language for the ShiVa3D game engine ( http://www.stonetrip.com )
  13. *
  14. * More information can be found at http://www.stonetrip.com/developer/doc/api/introduction
  15. *
  16. * CHANGES
  17. * -------
  18. * 2011/04/18 (1.0.8.11)
  19. * - Initial release
  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' => 'StoneScript',
  42. 'COMMENT_SINGLE' => array(1 => "--"),
  43. 'COMMENT_MULTI' => array("--[[" => "]]"),
  44. 'COMMENT_REGEXP' => array(
  45. 4 => '/<<\s*?(\w+)\\n.*?\\n\\1(?![a-zA-Z0-9])/si',
  46. ),
  47. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  48. 'QUOTEMARKS' => array('"', '`','\''),
  49. 'ESCAPE_CHAR' => '\\',
  50. 'KEYWORDS' => array(
  51. // Blue - General Keywords
  52. 1 => array(
  53. 'and', 'begin', 'break', 'do', 'else', 'elseif', 'end',
  54. 'for', 'if', 'in', 'while', 'next', 'not', 'or', 'redo',
  55. 'then', 'unless', 'until', 'when', 'false', 'nil', 'self',
  56. 'true', 'local', 'this', 'return',
  57. ),
  58. // Dark Blue - Main API names
  59. 2 => array(
  60. 'animation', 'application', 'cache', 'camera', 'debug',
  61. 'dynamics', 'group', 'hashtable', 'hud', 'input', 'light',
  62. 'log', 'math', 'mesh', 'microphone', 'music', 'navigation',
  63. 'network', 'object', 'pixelmap', 'projector', 'scene',
  64. 'sensor', 'server', 'session', 'sfx', 'shape', 'sound',
  65. 'string', 'system', 'table', 'user', 'video', 'xml',
  66. // Plugin API names
  67. 'plasma', 'watersim',
  68. 'winDirectories',
  69. 'ActionSheet', 'Alert', 'Mail', 'Picker', 'StatusBar',
  70. ),
  71. // Constants
  72. // Can be commented out if performance is crucial -> then these keywords will appear in a slightly lighter color
  73. 3 => array(
  74. //Animation
  75. 'kPlaybackModeLoop', 'kPlaybackModeLoopMirrored', 'kPlaybackModeLoopReversed',
  76. 'kPlaybackModeOnce', 'kPlaybackModeOnceReversed',
  77. //Application - Environment
  78. 'kStatusLoading', 'kStatusReady', 'kStatusSaving', // 'kStatusNone'
  79. //Application - Options
  80. 'kOptionAudioMasterVolume', 'kOptionAutomaticVirtualKeyboard', 'kOptionDynamicShadowsBufferCount',
  81. 'kOptionDynamicShadowsBufferSize', 'kOptionDynamicShadowsConstantSampling', 'kOptionDynamicShadowsPCFSampleCount',
  82. 'kOptionDynamicShadowsQuality', 'kOptionDynamicShadowsScreenSpaceBlur', 'kOptionFullscreen',
  83. 'kOptionFullscreenHeight', 'kOptionFullscreenWidth', 'kOptionHardwareOcclusion',
  84. 'kOptionMaxEventBouncesPerFrame', 'kOptionNetworkStreams', 'kOptionNetworkStreamsUseBrowser',
  85. 'kOptionPrioritizeEventBounces', 'kOptionRenderingEnabled', 'kOptionShadersQuality',
  86. 'kOptionSwapInterval', 'kOptionTerrainsQuality', 'kOptionTexturesAnisotropyLevel',
  87. 'kOptionTexturesMipmapBias', 'kOptionTexturesQuality', 'kOptionViewportRotation',
  88. //Application - Resource Types
  89. 'kResourceTypeAnimBank', 'kResourceTypeFont', 'kResourceTypeHUD',
  90. 'kResourceTypeMaterial', 'kResourceTypeMesh', 'kResourceTypeParticle',
  91. 'kResourceTypePixelMap', 'kResourceTypeSoundBank', 'kResourceTypeTexture',
  92. 'kResourceTypeTextureClip', 'kResourceTypeTrail',
  93. //Cache
  94. 'kPropertyHeight', 'kPropertySize', 'kPropertyWidth',
  95. //Dynamics
  96. 'kAxisX', 'kAxisY', 'kAxisZ',
  97. 'kTypeBox', 'kTypeCapsule', 'kTypeSphere',
  98. //HUD
  99. 'kAddressingModeClamp', 'kAddressingModeRepeat', 'kAlignCenter', 'kAlignJustify','kAlignLeft', 'kAlignRight',
  100. 'kAlignTop', 'kBlendModeAdd', 'kBlendModeDefault', 'kBlendModeModulate', 'kCaseFixed', 'kCaseVariable',
  101. 'kCommandTypeCallAction', 'kCommandTypeCopyCheckStateToRegister', 'kCommandTypeCopyEditTextToRegister',
  102. 'kCommandTypeCopyListItemTextToRegister', 'kCommandTypeCopyListLastSelectedItemToRegister',
  103. 'kCommandTypeCopyProgressValueToRegister', 'kCommandTypeCopySliderValueToRegister', 'kCommandTypeCopyTagToRegister',
  104. 'kCommandTypeEnterModalMode', 'kCommandTypeInterpolateBackgroundColor', 'kCommandTypeInterpolateBorderColor',
  105. 'kCommandTypeInterpolateForegroundColor', 'kCommandTypeInterpolateHeight', 'kCommandTypeInterpolateOpacity',
  106. 'kCommandTypeInterpolatePosition', 'kCommandTypeInterpolateProgressValue', 'kCommandTypeInterpolateRotation',
  107. 'kCommandTypeInterpolateSize', 'kCommandTypeInterpolateWidth', 'kCommandTypeLeaveModalMode',
  108. 'kCommandTypeMatchScreenSpaceBottomLeftCorner', 'kCommandTypeMatchScreenSpaceBottomRightCorner',
  109. 'kCommandTypeMatchScreenSpaceCenter', 'kCommandTypeMatchScreenSpaceHeight', 'kCommandTypeMatchScreenSpaceTopLeftCorner',
  110. 'kCommandTypeMatchScreenSpaceTopRightCorner', 'kCommandTypeMatchScreenSpaceWidth', 'kCommandTypePauseMovie',
  111. 'kCommandTypePauseSound', 'kCommandTypePauseTimer', 'kCommandTypePlayMovie', 'kCommandTypePlaySound',
  112. 'kCommandTypePlaySoundLoop', 'kCommandTypeResumeSound', 'kCommandTypeSendEventToUser', 'kCommandTypeSetActive',
  113. 'kCommandTypeSetBackgroundColor', 'kCommandTypeSetBackgroundImage', 'kCommandTypeSetBackgroundImageUVOffset',
  114. 'kCommandTypeSetBackgroundImageUVScale', 'kCommandTypeSetBorderColor', 'kCommandTypeSetButtonText',
  115. 'kCommandTypeSetCheckState', 'kCommandTypeSetCheckText', 'kCommandTypeSetCursorPosition', 'kCommandTypeSetCursorVisible',
  116. 'kCommandTypeSetEditText', 'kCommandTypeSetFocus', 'kCommandTypeSetForegroundColor', 'kCommandTypeSetHeight',
  117. 'kCommandTypeSetLabelText', 'kCommandTypeSetOpacity', 'kCommandTypeSetPosition', 'kCommandTypeSetRotation',
  118. 'kCommandTypeSetSize', 'kCommandTypeSetVisible', 'kCommandTypeSetWidth', 'kCommandTypeSleep', 'kCommandTypeStartTimer',
  119. 'kCommandTypeStopAction', 'kCommandTypeStopMovie', 'kCommandTypeStopSound', 'kCommandTypeStopTimer',
  120. 'kComponentTypeButton', 'kComponentTypeCheck', 'kComponentTypeContainer', 'kComponentTypeEdit', 'kComponentTypeLabel',
  121. 'kComponentTypeList', 'kComponentTypeMovie', 'kComponentTypePicture', 'kComponentTypePixelMap', 'kComponentTypeProgress',
  122. 'kComponentTypeRenderMap', 'kComponentTypeSlider', 'kCursorShapeCross', 'kCursorShapeDefault', 'kCursorShapeHandPointing',
  123. 'kCursorShapeIBeam', 'kCursorShapeNone', 'kCursorShapeWaiting', 'kDirectionLeftToRight', 'kDirectionRightToLeft',
  124. 'kEncodingASCII', 'kEncodingUTF8', 'kEventTypeGainFocus', 'kEventTypeLooseFocus', 'kEventTypeMouseEnter',
  125. 'kEventTypeMouseLeave', 'kFillModeSolid', 'kInterpolatorTypeLinear', 'kInterpolatorTypePower2', 'kInterpolatorTypePower3',
  126. 'kInterpolatorTypePower4', 'kInterpolatorTypeRoot2', 'kInterpolatorTypeRoot3', 'kInterpolatorTypeRoot4',
  127. 'kInterpolatorTypeSpring1', 'kInterpolatorTypeSpring2', 'kInterpolatorTypeSpring3', 'kInterpolatorTypeSpring4',
  128. 'kInterpolatorTypeSpring5', 'kInterpolatorTypeSpring6',
  129. 'kOriginBottom', 'kOriginBottomLeft', 'kOriginBottomRight', 'kOriginCenter', 'kOriginLeft', 'kOriginRight',
  130. 'kOriginTop', 'kOriginTopLeft', 'kOriginTopRight', 'kProgressTypeBottomToTop', 'kProgressTypeLeftToRight',
  131. 'kProgressTypeRightToLeft', 'kProgressTypeTopToBottom', 'kRuntimeValueCallArgument0', 'kRuntimeValueCallArgument1',
  132. 'kRuntimeValueCallArgument2', 'kRuntimeValueCallArgument3', 'kRuntimeValueCurrentUser', 'kRuntimeValueCurrentUserMainCamera',
  133. 'kRuntimeValueRegister0', 'kRuntimeValueRegister1', 'kRuntimeValueRegister2', 'kRuntimeValueRegister3',
  134. 'kShapeTypeEllipsoid', 'kShapeTypeRectangle', 'kShapeTypeRoundRectangle', 'kSliderTypeBottomToTop',
  135. 'kSliderTypeLeftToRight', 'kSliderTypeRightToLeft', 'kSliderTypeTopToBottom', 'kWaveTypeConstant',
  136. 'kWaveTypeSawtooth', 'kWaveTypeSawtoothInv', 'kWaveTypeSinus', 'kWaveTypeSinusNoise', 'kWaveTypeSquare', 'kWaveTypeTriangle',
  137. //Input
  138. 'kJoypadTypeIPhone', 'kJoypadTypeNone', 'kJoypadTypePhone', 'kJoypadTypeStandard', 'kJoypadTypeWiimote',
  139. 'kKey0', 'kKey1', 'kKey2', 'kKey3', 'kKey4', 'kKey5', 'kKey6', 'kKey7', 'kKey8', 'kKey9', 'kKeyA', 'kKeyB',
  140. 'kKeyBackspace', 'kKeyC', 'kKeyD', 'kKeyDelete', 'kKeyDown', 'kKeyE', 'kKeyEnd', 'kKeyEscape', 'kKeyF',
  141. 'kKeyF1', 'kKeyF10', 'kKeyF11', 'kKeyF12', 'kKeyF2', 'kKeyF3', 'kKeyF4', 'kKeyF5', 'kKeyF6', 'kKeyF7',
  142. 'kKeyF8', 'kKeyF9', 'kKeyG', 'kKeyH', 'kKeyHome', 'kKeyI', 'kKeyInsert', 'kKeyJ', 'kKeyK', 'kKeyL',
  143. 'kKeyLAlt', 'kKeyLControl', 'kKeyLeft', 'kKeyLShift', 'kKeyM', 'kKeyN', 'kKeyO', 'kKeyP', 'kKeyPageDown',
  144. 'kKeyPageUp', 'kKeyQ', 'kKeyR', 'kKeyRAlt', 'kKeyRControl', 'kKeyReturn', 'kKeyRight', 'kKeyRShift',
  145. 'kKeyS', 'kKeySpace', 'kKeyT', 'kKeyTab', 'kKeyU', 'kKeyUp', 'kKeyV', 'kKeyW', 'kKeyX', 'kKeyY',
  146. 'kKeyZ', 'kJoypadButtonPSPCircle', 'kJoypadButtonPSPCross', 'kJoypadButtonPSPDown', 'kJoypadButtonPSPL',
  147. 'kJoypadButtonPSPLeft', 'kJoypadButtonPSPR', 'kJoypadButtonPSPRight', 'kJoypadButtonPSPSelect',
  148. 'kJoypadButtonPSPSquare', 'kJoypadButtonPSPStart', 'kJoypadButtonPSPTriangle', 'kJoypadButtonPSPUp',
  149. 'kJoypadTypePSP', 'kJoypadButtonWiimoteA', 'kJoypadButtonWiimoteB', 'kJoypadButtonWiimoteC',
  150. 'kJoypadButtonWiimoteDown', 'kJoypadButtonWiimoteHome', 'kJoypadButtonWiimoteLeft',
  151. 'kJoypadButtonWiimoteMinus', 'kJoypadButtonWiimoteOne', 'kJoypadButtonWiimotePlus',
  152. 'kJoypadButtonWiimoteRight', 'kJoypadButtonWiimoteTwo', 'kJoypadButtonWiimoteUp', 'kJoypadButtonWiimoteZ',
  153. //Light
  154. 'kTypeDirectional', 'kTypePoint',
  155. //Math
  156. 'kEpsilon', 'kInfinity', 'kPi',
  157. //Mesh
  158. 'kLockModeRead', 'kLockModeWrite', 'kLockReadWrite',
  159. //Network
  160. 'kBluetoothServerPort', 'kDefaultServerPort', 'kStatusAuthenticated', 'kStatusSearchFinished', // 'kStatusNone', 'kStatusPending',
  161. //Object
  162. 'kControllerTypeAI', 'kControllerTypeAnimation', 'kControllerTypeAny', 'kControllerTypeDynamics',
  163. 'kControllerTypeNavigation', 'kControllerTypeSound', 'kGlobalSpace', 'kLocalSpace', 'kParentSpace',
  164. 'kTransformOptionInheritsParentRotation', 'kTransformOptionInheritsParentScale', 'kTransformOptionInheritsParentTranslation',
  165. 'kTransformOptionTranslationAffectedByParentRotation', 'kTransformOptionTranslationAffectedByParentScale', 'kTypeCamera',
  166. 'kTypeCollider', 'kTypeDummy', 'kTypeGroup', 'kTypeLight', 'kTypeOccluder', 'kTypeProjector', 'kTypeReflector',
  167. 'kTypeSensor', 'kTypeSfx', 'kTypeShape',
  168. //Pixelmap
  169. 'kBlendModeDecal', 'kBlendModeReplace', 'kFillModeBrush', 'kFillModeNone', 'kPenModeBrush', // 'kFillModeSolid',
  170. 'kPenModeNone', 'kPenModeSolid',
  171. //Projector
  172. 'kMapTypeMovie', 'kMapTypePixelMap', 'kMapTypeRenderMap', 'kMapTypeTexture', 'kMapTypeTextureClip',
  173. //Scene
  174. 'kFilteringModeBilinear', 'kFilteringModeNearest', 'kFilteringModeTrilinear', // 'kAddressingModeClamp', 'kAddressingModeRepeat',
  175. 'kSkyBoxFaceBack', 'kSkyBoxFaceBottom', 'kSkyBoxFaceFront', 'kSkyBoxFaceLeft', 'kSkyBoxFaceRight', 'kSkyBoxFaceTop',
  176. //Sensor
  177. 'kShapeTypeBox', 'kShapeTypeSphere',
  178. //Server
  179. 'kStatusConnected', 'kStatusNone', 'kStatusPending',
  180. //Session - duplicate keywords
  181. //'kStatusConnected', 'kStatusNone', 'kStatusPending',
  182. //Shape
  183. 'kMapTypeUnknown', 'kCurveTypeBezier', 'kCurveTypeBSpline', 'kCurveTypeCatmullRom', 'kCurveTypePolyLine',
  184. // 'kMapTypeMovie', 'kMapTypePixelMap', 'kMapTypeRenderMap', 'kMapTypeTexture', 'kMapTypeTextureClip',
  185. //System
  186. 'kOSType3DS', 'kOSTypeBada', 'kOSTypeBrew', 'kOSTypePalm', 'kOSTypePS3',
  187. 'kClientTypeEditor', 'kClientTypeEmbedded', 'kClientTypeStandalone',
  188. 'kGPUCapabilityBloomFilterSupport', 'kGPUCapabilityContrastFilterSupport', 'kGPUCapabilityDepthBlurFilterSupport',
  189. 'kGPUCapabilityDistortionFilterSupport', 'kGPUCapabilityDynamicShadowsSupport', 'kGPUCapabilityHardwareOcclusionSupport',
  190. 'kGPUCapabilityHardwareRenderingSupport', 'kGPUCapabilityMonochromeFilterSupport', 'kGPUCapabilityMotionBlurFilterSupport',
  191. 'kGPUCapabilityPixelShaderSupport', 'kGPUCapabilityVelocityBlurFilterSupport', 'kGPUCapabilityVertexShaderSupport',
  192. 'kLanguageAlbanian', 'kLanguageArabic', 'kLanguageBulgarian', 'kLanguageCatalan', 'kLanguageCzech', 'kLanguageDanish',
  193. 'kLanguageDutch', 'kLanguageEnglish', 'kLanguageFinnish', 'kLanguageFrench', 'kLanguageGerman', 'kLanguageGreek',
  194. 'kLanguageHebrew', 'kLanguageHungarian', 'kLanguageIcelandic', 'kLanguageItalian', 'kLanguageJapanese', 'kLanguageKorean',
  195. 'kLanguageNorwegian', 'kLanguagePolish', 'kLanguagePortuguese', 'kLanguageRomanian', 'kLanguageRussian',
  196. 'kLanguageSerboCroatian', 'kLanguageSlovak', 'kLanguageSpanish', 'kLanguageSwedish', 'kLanguageThai',
  197. 'kLanguageTurkish', 'kLanguageUnknown', 'kLanguageUrdu', 'kOSTypeAndroid', 'kOSTypeAngstrom', 'kOSTypeIPhone',
  198. 'kOSTypeLinux', 'kOSTypeMac', 'kOSTypePSP', 'kOSTypeSymbian', 'kOSTypeWii', 'kOSTypeWindows', 'kOSTypeWindowsCE',
  199. ),
  200. // Not used yet
  201. 4 => array(
  202. 'dummycommand',
  203. ),
  204. ),
  205. 'SYMBOLS' => array(
  206. '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>',
  207. '+', '-', '=>', '<<'
  208. ),
  209. 'CASE_SENSITIVE' => array(
  210. GESHI_COMMENTS => false,
  211. 1 => false,
  212. 2 => false,
  213. 3 => false,
  214. 4 => true,
  215. ),
  216. 'STYLES' => array(
  217. 'KEYWORDS' => array(
  218. 1 => 'color:#0000FF; font-weight:bold;',
  219. 2 => 'color:#000088; font-weight:bold;',
  220. 3 => 'color:#C088C0; font-weight:bold;',
  221. 4 => 'color:#00FEFE; font-weight:bold;',
  222. ),
  223. 'COMMENTS' => array(
  224. 1 => 'color:#008000; font-style:italic;',
  225. 4 => 'color: #cc0000; font-style: italic;',
  226. 'MULTI' => 'color:#008000; font-style:italic;'
  227. ),
  228. 'ESCAPE_CHAR' => array(
  229. 0 => 'color:#000099;'
  230. ),
  231. 'BRACKETS' => array(
  232. 0 => 'color:#000000; font-weight:bold;'
  233. ),
  234. 'STRINGS' => array(
  235. 0 => 'color:#888800;'
  236. ),
  237. 'NUMBERS' => array(
  238. 0 => 'color:#AA0000;'
  239. ),
  240. // names after "."
  241. 'METHODS' => array(
  242. 1 => 'color:#FF00FF; font-weight:bold;'
  243. ),
  244. 'SYMBOLS' => array(
  245. 0 => 'color:#000000; font-weight:bold;'
  246. ),
  247. 'REGEXPS' => array(
  248. 0 => 'color:#ff6633; font-weight:bold;',
  249. 1 => 'color:#0066ff; font-weight:bold;',
  250. 2 => 'color:#6666ff; font-weight:bold;',
  251. 3 => 'color:#ff3333; font-weight:bold;'
  252. ),
  253. 'SCRIPT' => array(
  254. 0 => '',
  255. 1 => '',
  256. 2 => '',
  257. )
  258. ),
  259. 'URLS' => array(
  260. 1 => '',
  261. 2 => '',
  262. 3 => '',
  263. 4 => ''
  264. ),
  265. 'OOLANG' => true,
  266. 'OBJECT_SPLITTERS' => array(
  267. 1 => '.'
  268. ),
  269. 'REGEXPS' => array(
  270. 0 => array(//Variables
  271. GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)",
  272. GESHI_REPLACE => '\\2',
  273. GESHI_MODIFIERS => '',
  274. GESHI_BEFORE => '\\1',
  275. GESHI_AFTER => ''
  276. ),
  277. 1 => array(//Arrays
  278. GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)",
  279. GESHI_REPLACE => '\\2',
  280. GESHI_MODIFIERS => '',
  281. GESHI_BEFORE => '\\1',
  282. GESHI_AFTER => ''
  283. ),
  284. 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*",//Static OOP symbols
  285. 3 => array(
  286. GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)",
  287. GESHI_REPLACE => '\\2',
  288. GESHI_MODIFIERS => '',
  289. GESHI_BEFORE => '\\1',
  290. GESHI_AFTER => ''
  291. )
  292. ),
  293. 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
  294. 'SCRIPT_DELIMITERS' => array(
  295. 0 => array(
  296. '<%' => '%>'
  297. )
  298. ),
  299. 'HIGHLIGHT_STRICT_BLOCK' => array(
  300. 0 => true,
  301. ),
  302. 'TAB_WIDTH' => 2
  303. );
  304. ?>