// Copyright (C) 2009 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.



/**
 * @fileoverview
 * Registers a language handler for various flavors of basic.
 *
 *
 * To use, include prettify.js and this file in your HTML page.
 * Then put your code in an HTML tag like
 *      <pre class="prettyprint lang-vb"></pre>
 *
 *
 * http://msdn.microsoft.com/en-us/library/aa711638(VS.71).aspx defines the
 * visual basic grammar lexical grammar.
 *
 * @author mikesamuel@gmail.com
 */

PR.registerLangHandler(
    PR.createSimpleLexer(
        [
         // Whitespace
         [PR.PR_PLAIN,       /^[\t\n\r \xA0\u2028\u2029]+/, null, '\t\n\r \xA0\u2028\u2029'],
         // A double quoted string with quotes escaped by doubling them.
         // A single character can be suffixed with C.
         [PR.PR_STRING,      /^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i, null,
          '"\u201C\u201D'],
         // A comment starts with a single quote and runs until the end of the
         // line.
         [PR.PR_COMMENT,     /^[\`][^\r\n\u2028\u2029]*/, null, '\`\'\u2018\u2019']
        ],
        [
         //[PR.PR_KEYWORD, /^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, null],
         [PR.PR_KEYWORD, /^(?:as|type|endtype|integer|float|string|#INCLUDE|#INSERT|#CONSTANT|#OPTION_EXPLICIT|not|and|or|xor|dim|undim|do|exit|loop|end|if|then|else|elseif|endif|repeat|until|for|to|next|while|endwhile|step|goto|gosub|return|select|case default|case|endcase|endselect|function|exitfunction|endfunction|inc|dec|global|CreateText|DeleteText|CreateAdvert|CreateAdvertEx|DeleteAdvert|RequestAdvertRefresh|SetAdMobDetails|SetAdvertLocation|SetAdvertLocationEx|SetAdvertPosition|SetAdvertVisible|SetInneractiveDetails|CreatePhysicsForce|DeletePhysicsForce|SetPhysicsForcePosition|SetPhysicsForcePower|SetPhysicsForceRange|AddZipEntry|CloseZip|CreateZip|ExtractZip|DeleteNetworkClient|GetNetworkClientDisconnected|GetNetworkClientFloat|GetNetworkClientInteger|GetNetworkClientName|GetNetworkClientPing|GetNetworkClientUserData|GetNetworkFirstClient|GetNetworkMyClientID|GetNetworkNextClient|GetNetworkNumClients|GetNetworkServerID|SetNetworkClientUserData|SetNetworkLocalFloat|SetNetworkLocalInteger|OpenToWrite|WriteByte|WriteFloat|WriteInteger|WriteLine|WriteString|ClearDepthBuffer|ClearScreen|EnableClearColor|EnableClearDepth|GetDeviceHeight|GetDeviceWidth|GetDisplayAspect|GetOrientation|GetPolygonsDrawn|GetResumed|GetScreenBoundsBottom|GetScreenBoundsLeft|GetScreenBoundsRight|GetScreenBoundsTop|GetVerticesProcessed|GetViewOffsetX|GetViewOffsetY|GetViewZoom|GetVirtualHeight|GetVirtualWidth|Render|Render2DBack|Render2DFront|Render3D|ScreenFPS|ScreenToWorldX|ScreenToWorldY|SetBorderColor|SetClearColor|SetDisplayAspect|SetIntendedDeviceSize|SetOrientationAllowed|SetResolutionMode|SetScissor|SetSyncRate|SetTransitionMode|SetVSync|SetViewOffset|SetViewZoom|SetViewZoomMode|SetVirtualResolution|Swap|Sync|UpdateDeviceSize|WorldToScreenX|WorldToScreenY|GetInAppPurchaseAvailable|GetInAppPurchaseState|InAppPurchaseActivate|InAppPurchaseAddProductID|InAppPurchaseRestore|InAppPurchaseSetTitle|InAppPurchaseSetup|CreateImageFromMemblock|CreateMemblock|CreateMemblockFromImage|DeleteMemblock|GetMemblockByte|GetMemblockExists|GetMemblockFloat|GetMemblockInt|GetMemblockShort|GetMemblockSize|SetMemblockByte|SetMemblockFloat|SetMemblockInt|SetMemblockShort|DeleteSound|LoadSound|PlaySound|StopSound|Asc|Bin|Chr|CountStringTokens|GetStringToken|Hex|Left|Len|Lower|Mid|Right|Spaces|Str|Upper|Val|ValFloat|SetPhysicsGravity|SetPhysicsMaxPolygonPoints|SetPhysicsScale|SetPhysicsWallBottom|SetPhysicsWallLeft|SetPhysicsWallRight|SetPhysicsWallTop|StepPhysics|Update|Update2D|Update3D|DeleteVideo|GetVideoDuration|GetVideoHeight|GetVideoPlaying|GetVideoPosition|GetVideoWidth|LoadVideo|PauseVideo|PlayVideo|SetVideoDimensions|SetVideoVolume|StopVideo|GameCenterAchievementsReset|GameCenterAchievementsShow|GameCenterLogin|GameCenterSetup|GameCenterShowLeaderBoard|GameCenterSubmitAchievement|GameCenterSubmitScore|GetGameCenterExists|GetGameCenterLoggedIn|GetContactSpriteID1|GetContactSpriteID2|GetContactWorldX|GetContactWorldY|GetFirstContact|GetNextContact|GetSpriteContactSpriteID2|GetSpriteContactWorldX|GetSpriteContactWorldY|GetSpriteFirstContact|GetSpriteNextContact|FixTextToScreen|GetTextCharAngle|GetTextCharAngleRad|GetTextCharColorAlpha|GetTextCharColorBlue|GetTextCharColorGreen|GetTextCharColorRed|GetTextCharX|GetTextCharY|GetTextColorAlpha|GetTextColorBlue|GetTextColorGreen|GetTextColorRed|GetTextDepth|GetTextExists|GetTextHitTest|GetTextLength|GetTextLineSpacing|GetTextSize|GetTextSpacing|GetTextString|GetTextTotalHeight|GetTextTotalWidth|GetTextVisible|GetTextX|GetTextY|Print|PrintC|SetPrintColor|SetPrintSize|SetPrintSpacing|SetTextAlignment|SetTextCharAngle|SetTextCharAngleRad|SetTextCharColor|SetTextCharColorAlpha|SetTextCharColorBlue|SetTextCharColorGreen|SetTextCharColorRed|SetTextCharPosition|SetTextCharX|SetTextCharY|SetTextColor|SetTextColorAlpha|SetTextColorBlue|SetTextColorGreen|SetTextColorRed|SetTextDefaultExtendedFontImage|SetTextDefaultFontImage|SetTextDefaultMagFilter|SetTextDefaultMinFilter|SetTextDepth|SetTextExtendedFontImage|SetTextFontImage|SetTextLineSpacing|SetTextMaxWidth|SetTextPosition|SetTextScissor|SetTextSize|SetTextSpacing|SetTextString|SetTextVisible|SetTextX|SetTextY|FileEOF|OpenToRead|ReadByte|ReadFloat|ReadInteger|ReadLine|ReadString|GetDirectionAngle|GetDirectionSpeed|GetDirectionX|GetDirectionY|GetRayCastFraction|GetRayCastNormalX|GetRayCastNormalY|GetRayCastSpriteID|GetRayCastX|GetRayCastY|PhysicsRayCast|PhysicsRayCastCategory|PhysicsRayCastGroup|SpriteRayCast|SpriteRayCastCategory|SpriteRayCastGroup|SpriteRayCastSingle|CreateBroadcastListener|DeleteBroadcastListener|GetBroadcastMessage|DownloadExpansionFile|GetAppName|GetDeviceLanguage|GetDeviceName|GetExpansionFileProgress|GetExpansionFileState|GetFrameTime|GetMilliseconds|GetSeconds|HTTPDecode|HTTPEncode|Message|ResetTimer|SetDefaultMagFilter|SetDefaultMinFilter|SetDefaultWrapU|SetDefaultWrapV|SetExpansionFileVersion|SetGenerateMipmaps|SetSortCreated|SetSortDepth|SetSortTextures|SetSortTransparentDepth|SetWindowTitle|Sha1|Sleep|Timer|GetCameraAngleX|GetCameraAngleY|GetCameraAngleZ|GetCameraQuatW|GetCameraQuatX|GetCameraQuatY|GetCameraQuatZ|GetCameraX|GetCameraY|GetCameraZ|MoveCameraLocalX|MoveCameraLocalY|MoveCameraLocalZ|RotateCameraGlobalX|RotateCameraGlobalY|RotateCameraGlobalZ|RotateCameraLocalX|RotateCameraLocalY|RotateCameraLocalZ|SetCameraFOV|SetCameraLookAt|SetCameraPosition|SetCameraRange|SetCameraRotation|SetCameraRotationQuat|AddSpriteAnimationFrame|ClearSpriteAnimationFrames|GetSpriteCurrentFrame|GetSpriteFrameCount|PlaySprite|ResumeSprite|SetSpriteAnimation|SetSpriteFrame|SetSpriteSpeed|StopSprite|DrawSprite|FixSpriteToScreen|GetSpriteActive|GetSpriteAngle|GetSpriteAngleRad|GetSpriteColorAlpha|GetSpriteColorBlue|GetSpriteColorGreen|GetSpriteColorRed|GetSpriteDepth|GetSpriteExists|GetSpriteGroup|GetSpriteHeight|GetSpriteHit|GetSpriteHitCategory|GetSpriteHitGroup|GetSpriteHitTest|GetSpriteImageID|GetSpritePixelFromX|GetSpritePixelFromY|GetSpritePlaying|GetSpriteVisible|GetSpriteWidth|GetSpriteX|GetSpriteXByOffset|GetSpriteXFromPixel|GetSpriteXFromWorld|GetSpriteY|GetSpriteYByOffset|GetSpriteYFromPixel|GetSpriteYFromWorld|GetWorldXFromSprite|GetWorldYFromSprite|ResetSpriteUV|SetSpriteActive|SetSpriteAngle|SetSpriteAngleRad|SetSpriteColor|SetSpriteColorAlpha|SetSpriteColorBlue|SetSpriteColorGreen|SetSpriteColorRed|SetSpriteDepth|SetSpriteFlip|SetSpriteImage|SetSpriteOffset|SetSpritePosition|SetSpritePositionByOffset|SetSpriteScale|SetSpriteScaleByOffset|SetSpriteScissor|SetSpriteSize|SetSpriteSnap|SetSpriteTransparency|SetSpriteUV|SetSpriteUVBorder|SetSpriteUVOffset|SetSpriteUVScale|SetSpriteVisible|SetSpriteX|SetSpriteY|CopyImage|DeleteAllImages|DeleteImage|GetImage|GetImageExists|GetImageFilename|GetImageHeight|GetImageWidth|LoadImage|LoadSubImage|PrintImage|SaveImage|SetImageMagFilter|SetImageMask|SetImageMinFilter|SetImageSavePixels|SetImageTransparentColor|SetImageWrapU|SetImageWrapV|ClearLightPoints|CreateLightPoint|DeleteLightPoint|GetLightPointExists|SetLightPointColor|SetLightPointPosition|SetLightPointRadius|GetDrawingSetupTime|GetDrawingTime|GetLoadedImages|GetManagedSpriteCount|GetManagedSpriteDrawCalls|GetManagedSpriteDrawnCount|GetManagedSpriteSortedCount|GetParticleDrawnPointCount|GetParticleDrawnQuadCount|GetPhysicsTime|GetPixelsDrawn|GetUnassignedImageFileName|GetUnassignedImages|GetUpdateTime|RateApp|GetNotification|GetNotificationData|GetNotificationType|NotificationCreate|NotificationReset|SetNotificationImage|SetNotificationText|ClearLightDirectionals|CreateLightDirectional|DeleteLightDirectional|GetLightDirectionalExists|SetLightDirectionalColor|SetLightDirectionalDirection|CreateDistanceJoint|CreateGearJoint|CreateLineJoint|CreateMouseJoint|CreatePrismaticJoint|CreatePulleyJoint|CreatePulleyJoint2|CreateRevoluteJoint|CreateWeldJoint|DeleteJoint|FinishPulleyJoint|GetJointExists|GetJointReactionForceX|GetJointReactionForceY|GetJointReactionTorque|SetJointLimitOff|SetJointLimitOn|SetJointMotorOff|SetJointMotorOn|SetJointMouseTarget|CloseNetwork|HostNetwork|IsNetworkActive|JoinNetwork|SetNetworkLatency|SetNetworkNoMoreClients|ACos|ACosRad|ASin|ASinRad|ATan|ATan2|ATan2Rad|ATanFull|ATanFullRad|ATanRad|Abs|Ceil|Cos|CosRad|FMod|Floor|Mod|Random|RandomSign|Round|SetRandomSeed|Sin|SinRad|Sqrt|Tan|TanRad|Trunc|LoadShader|SetShaderConstantByName|CompleteRawJoystickDetection|GetJoystickExists|GetRawAccelX|GetRawAccelY|GetRawAccelZ|GetRawFirstTouchEvent|GetRawJoystickButtonPressed|GetRawJoystickButtonReleased|GetRawJoystickButtonState|GetRawJoystickExists|GetRawJoystickRX|GetRawJoystickRY|GetRawJoystickRZ|GetRawJoystickX|GetRawJoystickY|GetRawJoystickZ|GetRawKeyPressed|GetRawKeyReleased|GetRawKeyState|GetRawLastKey|GetRawMouseLeftPressed|GetRawMouseLeftReleased|GetRawMouseLeftState|GetRawMouseMiddlePressed|GetRawMouseMiddleReleased|GetRawMouseMiddleState|GetRawMouseRightPressed|GetRawMouseRightReleased|GetRawMouseRightState|GetRawMouseWheel|GetRawMouseWheelDelta|GetRawMouseX|GetRawMouseY|GetRawNextTouchEvent|GetRawTouchCount|GetRawTouchCurrentX|GetRawTouchCurrentY|GetRawTouchLastX|GetRawTouchLastY|GetRawTouchReleased|GetRawTouchStartX|GetRawTouchStartY|GetRawTouchTime|GetRawTouchType|GetRawTouchValue|SetRawJoystickDeadZone|SetRawTouchValue|AddSpriteShapeBox|AddSpriteShapeCircle|AddSpriteShapePolygon|CalculateSpritePhysicsCOM|ClearSpriteShapes|GetPhysicsCollision|GetPhysicsCollisionWorldX|GetPhysicsCollisionWorldY|GetPhysicsCollisionX|GetPhysicsCollisionY|GetSpritePhysicsAngularVelocity|GetSpritePhysicsMass|GetSpritePhysicsVelocityX|GetSpritePhysicsVelocityY|SetSpriteCategoryBit|SetSpriteCategoryBits|SetSpriteCollideBit|SetSpriteCollideBits|SetSpriteGroup|SetSpritePhysicsAngularDamping|SetSpritePhysicsAngularImpulse|SetSpritePhysicsAngularVelocity|SetSpritePhysicsCOM|SetSpritePhysicsCanRotate|SetSpritePhysicsDamping|SetSpritePhysicsDelete|SetSpritePhysicsForce|SetSpritePhysicsFriction|SetSpritePhysicsImpulse|SetSpritePhysicsIsBullet|SetSpritePhysicsIsSensor|SetSpritePhysicsMass|SetSpritePhysicsOff|SetSpritePhysicsOn|SetSpritePhysicsRestitution|SetSpritePhysicsTorque|SetSpritePhysicsVelocity|SetSpriteShape|SetSpriteShapeBox|SetSpriteShapeCircle|SetSpriteShapePolygon|GetPointerPressed|GetPointerReleased|GetPointerState|GetPointerX|GetPointerY|TwitterMessage|TwitterSetup|GetMusicExists|GetMusicPlaying|PauseMusic|PlayMusic|ResumeMusic|SetMusicFileVolume|SetMusicSystemVolume|StopMusic|GetCapturedImage|IsCapturingImage|ShowImageCaptureScreen|SetGlobal3DDepth|DeleteFolder|GetCurrentDir|GetFirstFile|GetFirstFolder|GetFolder|GetNextFile|GetNextFolder|MakeFolder|SetCurrentDir|SetFolder|GetChosenImage|IsChoosingImage|ShowChooseImageScreen|DrawLine|ChooseRawFile|CloseFile|DeleteFile|FileIsOpen|GetFileExists|GetFileSize|GetReadPath|GetWritePath|SetRawWritePath|IsSoundRecording|RecordSound|StopSoundRecording|AddNetworkMessageFloat|AddNetworkMessageInteger|AddNetworkMessageString|CreateNetworkMessage|DeleteNetworkMessage|GetNetworkMessage|GetNetworkMessageFloat|GetNetworkMessageFromClient|GetNetworkMessageFromIP|GetNetworkMessageInteger|GetNetworkMessageString|SendNetworkMessage|GetLastChar|GetTextInput|GetTextInputCancelled|GetTextInputCompleted|GetTextInputState|SetCursorBlinkTime|SetTextInputMaxChars|StartTextInput|StopTextInput|GetPushNotificationToken|PushNotificationSetup|AddVirtualJoystick|DeleteVirtualJoystick|GetVirtualJoystickExists|GetVirtualJoystickX|GetVirtualJoystickY|SetVirtualJoystickActive|SetVirtualJoystickAlpha|SetVirtualJoystickDeadZone|SetVirtualJoystickImageInner|SetVirtualJoystickImageOuter|SetVirtualJoystickPosition|SetVirtualJoystickSize|SetVirtualJoystickVisible|GetButtonPressed|GetButtonReleased|GetButtonState|GetJoystickX|GetJoystickY|SetJoystickDeadZone|SetJoystickScreenPosition|CreateParticles|DeleteParticles|DeleteMusic|LoadMusic|GetAccelerometerExists|GetCameraExists|GetCompassExists|GetGeolocationExists|GetGyrometerExists|GetInclinometerExists|GetKeyboardExists|GetLightSensorExists|GetMouseExists|GetMultiTouchExists|GetNFCExists|GetOrientationSensorExists|GetRawCompassNorth|GetRawFirstNFCDevice|GetRawGeoCity|GetRawGeoCountry|GetRawGeoLatitude|GetRawGeoLongitude|GetRawGeoPostalCode|GetRawGeoState|GetRawGyroVelocityX|GetRawGyroVelocityY|GetRawGyroVelocityZ|GetRawInclinoPitch|GetRawInclinoRoll|GetRawInclinoYaw|GetRawLightLevel|GetRawNFCCount|GetRawNFCData|GetRawNFCDataState|GetRawNFCName|GetRawNextNFCDevice|GetRawOrientationW|GetRawOrientationX|GetRawOrientationY|GetRawOrientationZ|SendRawNFCData|SetRawMousePosition|SetRawMouseVisible|CloseHTTPConnection|CreateHTTPConnection|DeleteHTTPConnection|GetHTTPFile|GetHTTPFileComplete|GetHTTPFileProgress|GetHTTPResponse|GetHTTPResponseReady|GetInternetState|OpenBrowser|SendHTTPFile|SendHTTPRequest|SendHTTPRequestASync|SetHTTPHost|GetCurrentDate|GetCurrentTime|GetDayOfWeek|GetDaysFromUnix|GetHoursFromUnix|GetLeapYear|GetMinutesFromUnix|GetMonthFromUnix|GetSecondsFromUnix|GetUnixFromDate|GetYearFromUnix|FacebookDestroyLikeButton|FacebookDownloadFriendsPhoto|FacebookGetFriends|FacebookGetFriendsCount|FacebookGetFriendsID|FacebookGetFriendsName|FacebookGetFriendsState|FacebookGetUserID|FacebookGetUserName|FacebookInviteFriend|FacebookLogin|FacebookLogout|FacebookPostOnFriendsWall|FacebookPostOnMyWall|FacebookSetup|FacebookShowLikeButton|GetFacebookDownloadFile|GetFacebookDownloadState|GetFacebookLoggedIn|CreateEditBox|DeleteEditBox|FixEditBoxToScreen|GetCurrentEditBox|GetEditBoxActive|GetEditBoxChanged|GetEditBoxExists|GetEditBoxHasFocus|GetEditBoxHeight|GetEditBoxLines|GetEditBoxText|GetEditBoxVisible|GetEditBoxWidth|GetEditBoxX|GetEditBoxY|SetEditBoxActive|SetEditBoxBackgroundColor|SetEditBoxBackgroundImage|SetEditBoxBorderColor|SetEditBoxBorderImage|SetEditBoxBorderSize|SetEditBoxCursorBlinkTime|SetEditBoxCursorColor|SetEditBoxCursorWidth|SetEditBoxDepth|SetEditBoxExtendedFontImage|SetEditBoxFocus|SetEditBoxFontImage|SetEditBoxMaxChars|SetEditBoxMaxLines|SetEditBoxMultiLine|SetEditBoxPasswordMode|SetEditBoxPosition|SetEditBoxScissor|SetEditBoxSize|SetEditBoxText|SetEditBoxTextColor|SetEditBoxTextSize|SetEditBoxUseAlternateInput|SetEditBoxVisible|SetEditBoxWrapMode|AddParticlesColorKeyFrame|AddParticlesForce|ClearParticlesColors|ClearParticlesForces|FixParticlesToScreen|GetParticlesActive|GetParticlesAngle|GetParticlesAngleRad|GetParticlesDepth|GetParticlesDirectionX|GetParticlesDirectionY|GetParticlesExists|GetParticlesFrequency|GetParticlesLife|GetParticlesMaxReached|GetParticlesSize|GetParticlesVisible|GetParticlesX|GetParticlesY|ResetParticleCount|SetParticlesActive|SetParticlesAngle|SetParticlesAngleRad|SetParticlesColorInterpolation|SetParticlesDepth|SetParticlesDirection|SetParticlesFrequency|SetParticlesImage|SetParticlesLife|SetParticlesMax|SetParticlesPosition|SetParticlesSize|SetParticlesStartZone|SetParticlesVelocityRange|SetParticlesVisible|UpdateParticles|DecodeQRCode|EncodeQRCode|CloneObject|CreateObjectBox|CreateObjectCone|CreateObjectCylinder|CreateObjectPlane|CreateObjectSphere|DeleteObject|Get3DVectorXFromScreen|Get3DVectorYFromScreen|Get3DVectorZFromScreen|GetObjectAngleX|GetObjectAngleY|GetObjectAngleZ|GetObjectCullMode|GetObjectDepthReadMode|GetObjectDepthWrite|GetObjectExists|GetObjectInScreen|GetObjectQuatW|GetObjectQuatX|GetObjectQuatY|GetObjectQuatZ|GetObjectRayCastBounceX|GetObjectRayCastBounceY|GetObjectRayCastBounceZ|GetObjectRayCastDistance|GetObjectRayCastHitID|GetObjectRayCastNormalX|GetObjectRayCastNormalY|GetObjectRayCastNormalZ|GetObjectRayCastNumHits|GetObjectRayCastSlideX|GetObjectRayCastSlideY|GetObjectRayCastSlideZ|GetObjectRayCastX|GetObjectRayCastY|GetObjectRayCastZ|GetObjectTransparency|GetObjectVisible|GetObjectX|GetObjectY|GetObjectZ|GetScreenXFrom3D|GetScreenYFrom3D|InstanceObject|LoadObject|MoveObjectLocalX|MoveObjectLocalY|MoveObjectLocalZ|ObjectRayCast|ObjectSphereCast|ObjectSphereSlide|RotateObjectGlobalX|RotateObjectGlobalY|RotateObjectGlobalZ|RotateObjectLocalX|RotateObjectLocalY|RotateObjectLocalZ|SetObjectCollisionMode|SetObjectColor|SetObjectCullMode|SetObjectDepthReadMode|SetObjectDepthWrite|SetObjectImage|SetObjectLightMode|SetObjectLookAt|SetObjectPosition|SetObjectRotation|SetObjectRotationQuat|SetObjectScale|SetObjectShader|SetObjectTransparency|SetObjectVisible|GetSpriteCollision|GetSpriteDistance|GetSpriteDistancePoint1X|GetSpriteDistancePoint1Y|GetSpriteDistancePoint2X|GetSpriteDistancePoint2Y|GetSpriteInBox|GetSpriteInCircle|AddVirtualButton|DeleteVirtualButton|GetVirtualButtonExists|GetVirtualButtonPressed|GetVirtualButtonReleased|GetVirtualButtonState|SetButtonScreenPosition|SetVirtualButtonActive|SetVirtualButtonAlpha|SetVirtualButtonColor|SetVirtualButtonImageDown|SetVirtualButtonImageUp|SetVirtualButtonPosition|SetVirtualButtonSize|SetVirtualButtonText|SetVirtualButtonVisible|GetPhysicsIslandCount|GetPhysicsSolveTime|SetPhysicsCCD|SetPhysicsDebugOff|SetPhysicsDebugOn|SetPhysicsSleeping|SetPhysicsThreading|GetErrorOccurred|GetLastError|Log|SetErrorMode|CloneSprite|CreateDummySprite|CreateSprite|DeleteAllSprites|DeleteAllText|DeleteSprite|LoadSprite|GetSoundExists|GetSoundInstances|GetSoundsPlaying|SetSoundSystemVolume)\b/i, null],
         // A second comment form
         [PR.PR_COMMENT, /^REM [^\r\n\u2028\u2029]*/i],
         [PR.PR_COMMENT, /^\/\/[^\r\n\u2028\u2029]*/i],
         [PR.PR_COMMENT, /^remstart[\s\S]*?(?:remend|$)/i],
         [PR.PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/i],
         // A boolean, numeric, or date literal.
         //[PR.PR_LITERAL, /^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],
         [PR.PR_LITERAL, /^[0-9]+/i],
         // An identifier?
         [PR.PR_PLAIN, /^(?:(?:[a-z]|_\w)(\w|(\$|#))*|\[(?:[a-z]|_\w)(\w|(\$|#))*\])/i],
         // A run of punctuation
         [PR.PR_PUNCTUATION,
          /^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],
         // Square brackets
         [PR.PR_PUNCTUATION, /^(?:\[|\])/]
        ]),
    ['agk']);
