
Description="Inno Setup"

Categories = {"config", "script"}


Digits=[[ (?:0x|0X|\$)[0-9a-fA-F]+|\d*[\.\_]?\d+(?:[eE][\-\+]\d+)?[lLuUbfdm]* ]]

Keywords={
  { Id=1,
    List={"Compression", "DiskClusterSize", "DiskSliceSize", "DiskSpanning",
        "Encryption", "InternalCompressLevel", "MergeDuplicateFiles",
        "OutputBaseFilename", "OutputDir", "ReserveBytes", "SlicesPerDisk",
        "SolidCompression", "SourceDir", "UseSetupLdr", "VersionInfoCompany",
        "VersionInfoDescription", "VersionInfoTextVersion", "VersionInfoVersion",
        "AllowCancelDuringInstall", "AllowNoIcons", "AllowRootDirectory",
        "AllowUNCPath", "AlwaysRestart", "AlwaysShowComponentsList",
        "AlwaysShowDirOnReadyPage", "AlwaysShowGroupOnReadyPage",
        "AlwaysUsePersonalGroup", "AppendDefaultDirName", "AppendDefaultGroupName",
        "AppComments", "AppContact", "AppId", "AppModifyPath", "AppMutex", "AppName",
        "AppPublisher", "AppPublisherURL", "AppReadmeFile", "AppSupportURL",
        "AppUpdatesURL", "AppVersion", "AppVerName", "ChangesAssociations",
        "CreateAppDir", "CreateUninstallRegKey", "DefaultDirName", "DefaultGroupName",
        "DefaultUserInfoName", "DefaultUserInfoOrg", "DefaultUserInfoSerial",
        "DirExistsWarning", "DisableDirPage", "DisableFinishedPage",
        "DisableProgramGroupPage", "DisableReadyMemo", "DisableReadyPage",
        "DisableStartupPrompt", "EnableDirDoesntExistWarning", "ExtraDiskSpaceRequired",
        "InfoAfterFile", "InfoBeforeFile", "LanguageDetectionMethod", "LicenseFile",
        "MinVersion", "OnlyBelowVersion", "Password", "PrivilegesRequired",
        "RestartIfNeededByRun", "ShowLanguageDialog", "TimeStampRounding",
        "TimeStampsInUTC", "TouchDate", "TouchTime", "Uninstallable",
        "UninstallDisplayIcon", "UninstallDisplayName", "UninstallFilesDir",
        "UninstallLogMode", "UninstallRestartComputer", "UpdateUninstallLogAppName",
        "UsePreviousAppDir", "UsePreviousGroup", "UsePreviousSetupType",
        "UsePreviousTasks", "UsePreviousUserInfo", "UserInfoPage", "AppCopyright",
        "BackColor", "BackColor2", "BackColorDirection", "BackSolid",
        "FlatComponentsList", "SetupIconFile", "ShowComponentSizes",
        "ShowTasksTreeLines", "UninstallStyle", "WindowShowCaption",
        "WindowStartMaximized", "WindowResizable", "WindowVisible",
        "WizardImageBackColor", "WizardImageFile", "WizardImageStretch",
        "WizardSmallImageBackColor", "WizardSmallImageFile", "UninstallIconFile", "",
        "cdecl", "class", "const", "constructor", "destructor", "dispid",
        "dispinterface", "div", "do", "downto", "dynamic", "else", "end", "except",
        "export", "exports", "external", "far", "file", "finalization", "finally",
        "for", "forward", "function", "goto", "if", "implementation", "in",
        "initialization", "inherited", "inline", "interface", "is", "label", "library",
        "message", "mod", "near", "nil", "not", "object", "of", "or", "out", "override",
        "packed", "pascal", "private", "procedure", "program", "property", "protected",
        "public", "published", "raise", "record", "register", "repeat",
        "resourcestring", "safecall", "set", "shl", "shr", "stdcall", "string", "then",
        "threadvar", "to", "try", "type", "unit", "until", "uses", "var", "virtual",
        "while", "with", "xor"},
  },
  { Id=2,
    List={"AfterInstall", "Attribs", "BeforeInstall", "Check", "Comment",
        "Components", "CopyMode", "Description", "DestDir", "DestName", "Excludes",
        "ExtraDiskSpaceRequired", "Filename", "Flags", "FontInstall",
        "GroupDescription", "HotKey", "IconFilename", "IconIndex", "InfoBeforeFile",
        "InfoAfterFile", "Key", "MessagesFile", "Name", "Parameters", "Permissions",
        "Root", "RunOnceId", "Section", "Source", "StatusMsg", "String", "Subkey",
        "Tasks", "Type", "Types", "ValueType", "ValueName", "ValueData", "WorkingDir",
        "", "true", "false", "cardinal", "longint", "byte", "word", "single", "double",
        "int64"},
  },
  { Id=3,
    List={"allowunsafefiles", "checkedonce", "closeonexit", "compact",
        "comparetimestamp", "confirmoverwrite", "createkeyifdoesntexist",
        "createonlyiffileexists", "createvalueifdoesntexist", "deleteafterinstall",
        "deletekey", "deletevalue", "desktopicon", "dirifempty",
        "disablenouninstallwarning", "dontcloseonexit", "dontcopy", "dontcreatekey",
        "dontinheritcheck", "dontverifychecksum", "exclusive", "external", "files",
        "filesandordirs", "fixed", "fontisnttruetype", "full", "ignoreversion",
        "iscustom", "isreadme", "hidden", "hidewizard", "modify", "nocompression",
        "noencryption", "noerror", "noregerror", "nowait", "onlyifdestfileexists",
        "onlyifdoesntexist", "overwritereadonly", "postinstall", "preservestringtype",
        "promptifolder", "quicklaunchicon", "read", "readonly", "readexec",
        "recursesubdirs", "regserver", "regtypelib", "replacesameversion", "restart",
        "restartreplace", "runhidden", "runmaximized", "runminimized", "sharedfile",
        "shellexec", "skipifnotsilent", "skipifsilent", "skipifdoesntexist",
        "skipifsourcedoesntexist", "sortfilesbyextension", "system", "touch",
        "unchecked", "uninsalwaysuninstall", "uninsclearvalue", "uninsdeleteentry",
        "uninsdeletekey", "uninsdeletekeyifempty", "uninsdeletesection",
        "uninsdeletesectionifempty", "uninsdeletevalue", "uninsneveruninstall",
        "uninsremovereadonly", "uninsrestartdelete", "useapppaths", "waituntilidle"},
  },
  { Id=4,
    Regex=[[ ^\[\w+\] ]],
  },

-- pascal stuff:
  { Id=1,
    List= {"absolute", "abstract", "and", "array", "as", "asm", "assembler", "automated", "begin", "case",
        "cdecl", "class", "const", "constructor", "destructor", "dispid", "dispinterface", "div", "do", "downto",
        "dynamic", "else", "end", "except", "export", "exports", "external", "far", "file", "finalization", "finally",
        "for", "forward", "function", "goto", "if", "implementation", "in", "initialization", "inherited", "inline",
        "interface", "is", "label", "library", "message", "mod", "near", "nil", "not", "object", "of", "or", "out",
        "override", "packed", "pascal", "private", "procedure", "program", "property", "protected", "public", "published",
        "raise", "record", "register", "repeat", "resourcestring", "safecall", "set", "shl", "shr", "stdcall", "string",
        "then", "threadvar", "to", "try", "type", "unit", "until", "uses", "var", "virtual", "while", "with", "xor" }
  },
  { Id=2,
    List= {"boolean", "char", "integer", "pointer", "real", "text", "true", "false", "cardinal", "longint", "byte",
            "word", "single", "double", "int64" }
  },
  { Id=3,
    List= { "if", "else", "then", "downto", "do", "for", "repeat", "while", "to", "until", "with"}
  },
  { Id=4,
    Regex= [[ (\w+)\s*\( ]]
  }
}


Strings={
  Delimiter=[["|']],
}

IgnoreCase=true

Comments={
  { Block=false,
    Delimiter= { "^;" }
  },
  { Block=true,
    Nested=false,
    Delimiter= { [[\{]],[[\}]],}
  },
  { Block=true,
    Nested=false,
    Delimiter= { [[\(\*]],[[\*\)]],}
  }

}

Operators=[[\(|\)|\[|\]|\,|\;|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\@|\.|\^]]
