inno = {}

require("eu_sci")
require("eu_core")

function inno.init_after_callback(p)
  local pnode = eu_core.ffi.cast("void *", p)
  local res = eu_core.euapi.on_doc_init_after_scilexer(pnode, "inno")      -- enable inno lex
  if (res == 0) then
    eu_core.euapi.on_doc_enable_foldline(pnode)                            -- enable fold line
  end
  return res
end

function inno.get_styles()
  local style_t = {
    [SCE_INNO_COMMENT] = 0xC0C0C0,
    [SCE_INNO_COMMENT_PASCAL] = 0xC0C0C0,
    -- 区段关键字加上粗体
    [SCE_INNO_SECTION] = 0x00B050 + SCE_BOLD_FONT,
    [SCE_INNO_KEYWORD] = 0x00B050,
    [SCE_INNO_KEYWORD_USER] = 0x00B050,
    [SCE_INNO_PREPROC] = 0x00B050,
    [SCE_INNO_KEYWORD_PASCAL] = 0xBBBB00 + SCE_BOLD_FONT,
    [SCE_INNO_STRING_DOUBLE] = 0xC080FF,
    [SCE_INNO_STRING_SINGLE] = 0xC080FF,
  }
  return style_t
end

function inno.get_keywords()
  local keywords0_set = "setup code components custommessages dirs files ini icons installdelete langoptions languages messages registry run setuptasks types uninstalldelete uninstallrun"
  local keywords1_set = "aslrcompatible additionalicons addonhostprogramnotfound allowcancelduringinstall allownetworkdrive allownoicons allowrootdirectory allowuncpath alwaysrestart alwaysshowcomponentslist alwaysshowdironreadypage alwaysshowgrouponreadypage alwaysusepersonalgroup appcomments appcontact appcopyright appid appmodifypath appmutex appname apppublisher apppublisherurl appreadmefile appsupportphone appsupporturl appupdatesurl appusermodelid appusermodeltoastactivatorclsid appvername appversion appenddefaultdirname appenddefaultgroupname architecturesallowed architecturesinstallin64bitmode assocfileextension associngfileextension attribs autostartprogram autostartprogramgroupdescription backcolor backcolor2 backcolordirection backsolid beveledlabel changesassociations changesenvironment check closeapplications closeapplicationsfilter comment components compression compressionthreads copymode copyrightfontname copyrightfontsize createappdir createdesktopicon createquicklaunchicon createuninstallregkey depcompatible defaultdialogfontname defaultdirname defaultgroupname defaultuserinfoname defaultuserinfoorg defaultuserinfoserial description destdir destname dialogfontname dialogfontsize direxistswarning disabledirpage disablefinishedpage disableprogramgrouppage disablereadymemo disablereadypage disablestartupprompt disablewelcomepage diskclustersize diskslicesize diskspanning enabledirdoesntexistwarning encryption excludes externalsize extradiskspacerequired filename flags flatcomponentslist fontinstall groupdescription helptextnote hotkey iconfilename iconindex infoafterfile infobeforefile internalcompresslevel key lzmaalgorithm lzmablocksize lzmadictionarysize lzmamatchfinder lzmanumblockthreads lzmanumfastbytes lzmauseseparateprocess languagecodepage languagedetectionmethod languageid languagename languages launchprogram licensefile mergeduplicatefiles messagesfile minversion missingmessageswarning missingrunonceidswarning name nameandversion notrecognizedmessageswarning onlybelowversion output outputbasefilename outputdir outputmanifestfile parameters password permissions privilegesrequired privilegesrequiredoverridesallowed programontheweb reservebytes restartapplications restartifneededbyrun righttoleft root runonceid section setupiconfile setuplogging setupmutex showcomponentsizes showlanguagedialog showtaskstreelines signtool signtoolminimumtimebetween signtoolretrycount signtoolretrydelay signtoolrunminimized signeduninstaller signeduninstallerdir slicesperdisk solidcompression source sourcedir statusmsg string strongassemblyname subkey terminalservicesaware timestamprounding timestampsinutc titlefontname titlefontsize touchdate touchtime type types uninstalldisplayicon uninstalldisplayname uninstalldisplaysize uninstallfilesdir uninstalllogmode uninstallprogram uninstallrestartcomputer uninstallable updateuninstalllogappname usepreviousappdir usepreviousgroup usepreviouslanguage usepreviousprivigeles useprevioussetuptype useprevioustasks useprevioususerinfo usesetupldr useduserareaswarning userinfopage valuedata valuename verb versioninfocompany versioninfocopyright versioninfodescription versioninfooriginalfilename versioninfoproductname versioninfoproducttextversion versioninfoproductversion versioninfotextversion versioninfoversion welcomefontname welcomefontsize windowresizable windowshowcaption windowstartmaximized windowvisible wizardimagealphaformat wizardimagefile wizardimagestretch wizardresizable wizardsizepercent wizardsmallimagefile wizardstyle workingdir"
  local keywords2_set = "app autoappdata autocf autocf32 autocf64 autodesktop autodocs autofonts autopf autopf32 autopf64 autoprograms autostartmenu autostartup autotemplates cf cf32 cf64 cm cmd code commonappdata commoncf commoncf32 commoncf64 commondesktop commondocs commonfonts commonpf commonpf32 commonpf64 commonprograms commonstartmenu commonstartup commontemplates computername dao dotnet40 dotnet4032 dotnet4064 drive fonts group groupname hwnd ini language localappdata log param pf pf32 pf64 reg sd sendto src srcexe sys sysnative sysuserinfoname sysuserinfoorg syswow64 tmp uninstallexe userappdata usercf userdesktop userdocs userfavorites userfonts userinfoname userinfoorg userinfoserial username userpf userprograms usersavedgames usersendto userstartmenu userstartup usertemplates win wizardhwnd and not or private protected public append define dim elif else emit endif endsub error expr file for if ifdef ifexist ifndef ifnexist include insert pragma preproc redim sub undef any func int str void"
  local keywords3_set = "__COUNTER__ __FILE__ __INCLUDE__ __LINE__ __OPT_X__ __WIN32__ COMPANY_NAME CompilerPath faAnyFile faArchive faDirectory faHidden False faReadOnly faSymLink faSysFile faVolumeID FILE_DESCRIPTION FILE_VERSION FIND_AND FIND_BEGINS FIND_CASESENSITIVE FIND_CONTAINS FIND_ENDS FIND_MATCH FIND_NOT FIND_OR FIND_SENSITIVE FIND_TRIM HKCC HKCC64 HKCR HKCR64 HKCU HKCU64 HKEY_CLASSES_ROOT HKEY_CLASSES_ROOT_64 HKEY_CURRENT_CONFIG HKEY_CURRENT_CONFIG_64 HKEY_CURRENT_USER HKEY_CURRENT_USER_64 HKEY_LOCAL_MACHINE HKEY_LOCAL_MACHINE_64 HKEY_USERS HKEY_USERS_64 HKLM HKLM64 HKU HKU64 INTERNAL_NAME ISPP_INVOKED ISPPCC_INVOKED LEGAL_COPYRIGHT MaxInt MinInt NewLine No NULL ORIGINAL_FILENAME PREPROCVER PRODUCT_NAME PRODUCT_VERSION SourcePath SW_HIDE SW_MAX SW_MAXIMIZE SW_MINIMIZE SW_NORMAL SW_RESTORE SW_SHOW SW_SHOWDEFAULT SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE SW_SHOWNORMAL Tab True TYPE_ARRAY TYPE_ERROR TYPE_FUNC TYPE_INTEGER TYPE_MACRO TYPE_NULL TYPE_STRING UNICODE Ver WINDOWS Yes"
  local keywords4_set = "and begin break case class const constructor continue do downto else end event except external finally for function if interface not of or procedure property read record repeat then to try type until uses var while with write msgbox"
  local keywords5_set = "AnsiString Boolean Byte Char Directory HBITMAP IDispatch Int64 Integer IUnknown Longint String TAlign TAlignment TAlphaFormat TAnchorKind TAnchors TBevel TBevelKind TBevelShape TBevelStyle TBevelWidth TBitmap TBitmapImage TBorderIcon TBorderIcons TBorderStyle TBorderWidth TBrush TBrushStyle TButton TButtonControl TCanvas TCheckBox TCheckBoxState TCheckItemOperation TCloseAction TCloseEvent TCloseQueryEvent TColor TComboBox TComboBoxStyle TComponent TConstraintSize TControl TCustomCheckBox TCustomComboBox TCustomControl TCustomEdit TCustomFolderTreeView TCustomLabel TCustomListBox TCustomMemo TCustomPanel TDownloadWizardPage TDuplicates TEdit TEditCharCase TEShiftState TFileStream TFolderRenameEvent TFolderTreeView TFont TFontStyle TFontStyles TForm TFormBorderStyle TFormStyle TGraphic TGraphicControl TGraphicsObject THandleStream TInputDirWizardPage TInputFileWizardPage TInputOptionWizardPage TInputQueryWizardPage TKeyEvent TKeyPressEvent TLabel TListBox TListBoxStyle TMainForm TMemo TNewButton TNewCheckBox TNewCheckListBox TNewComboBox TNewEdit TNewListBox TNewMemo TNewNotebook TNewNotebookPage TNewProgressBar TNewProgressBarState TNewProgressBarStyle TNewRadioButton TNewStaticText TNotebook TNotifyEvent TObject TOutputMarqueeProgressWizardPage TOutputMsgMemoWizardPage TOutputMsgWizardPage TOutputProgressWizardPage TPanel TPanelBevel TPasswordEdit TPen TPenMode TPenStyle TPersistent TPosition TRadioButton TRichEditViewer TScrollBarInc TScrollBarKind TScrollingWinControl TScrollStyle TSetupForm TSetupStep TShiftState TSizeConstraints TStartMenuFolderTreeView TStream TStringList TStrings TStringStream TUIStateForm TUninstallProgressForm TUninstallStep TWinControl TWizardForm TWizardPage TWizardPageButtonEvent TWizardPageCancelEvent TWizardPageNotifyEvent TWizardPageShouldSkipEvent Word"
  return keywords0_set,keywords1_set,keywords2_set,keywords3_set,keywords4_set,keywords5_set
end

function inno.get_autocomplete()
  local autocomplete_set = "Setup Code Components CustomMessages Dirs Files INI Icons InstallDelete LangOptions Languages Messages Registry Run SetupTasks Types UninstallDelete UninstallRun ASLRCompatible AdditionalIcons AddonHostProgramNotFound AllowCancelDuringInstall AllowNetworkDrive AllowNoIcons AllowRootDirectory AllowUNCPath AlwaysRestart AlwaysShowComponentsList AlwaysShowDirOnReadyPage AlwaysShowGroupOnReadyPage AlwaysUsePersonalGroup AppComments AppContact AppCopyright AppId AppModifyPath AppMutex AppName AppPublisher AppPublisherURL AppReadmeFile AppSupportPhone AppSupportURL AppUpdatesURL AppUserModelID AppUserModelToastActivatorCLSID AppVerName AppVersion AppendDefaultDirName AppendDefaultGroupName ArchitecturesAllowed ArchitecturesInstallIn64BitMode AssocFileExtension AssocingFileExtension Attribs AutoStartProgram AutoStartProgramGroupDescription BackColor BackColor2 BackColorDirection BackSolid BeveledLabel ChangesAssociations ChangesEnvironment Check CloseApplications CloseApplicationsFilter Comment Components Compression CompressionThreads CopyMode CopyrightFontName CopyrightFontSize CreateAppDir CreateDesktopIcon CreateQuickLaunchIcon CreateUninstallRegKey DEPCompatible DefaultDialogFontName DefaultDirName DefaultGroupName DefaultUserInfoName DefaultUserInfoOrg DefaultUserInfoSerial Description DestDir DestName DialogFontName DialogFontSize DirExistsWarning DisableDirPage DisableFinishedPage DisableProgramGroupPage DisableReadyMemo DisableReadyPage DisableStartupPrompt DisableWelcomePage DiskClusterSize DiskSliceSize DiskSpanning EnableDirDoesntExistWarning Encryption Excludes ExternalSize ExtraDiskSpaceRequired Filename Flags FlatComponentsList FontInstall GroupDescription HelpTextNote HotKey IconFilename IconIndex InfoAfterFile InfoBeforeFile InternalCompressLevel Key LZMAAlgorithm LZMABlockSize LZMADictionarySize LZMAMatchFinder LZMANumBlockThreads LZMANumFastBytes LZMAUseSeparateProcess LanguageCodePage LanguageDetectionMethod LanguageID LanguageName Languages LaunchProgram LicenseFile MergeDuplicateFiles MessagesFile MinVersion MissingMessagesWarning MissingRunOnceIdsWarning Name NameAndVersion NotRecognizedMessagesWarning OnlyBelowVersion Output OutputBaseFilename OutputDir OutputManifestFile Parameters Password Permissions PrivilegesRequired PrivilegesRequiredOverridesAllowed ProgramOnTheWeb ReserveBytes RestartApplications RestartIfNeededByRun RightToLeft Root RunOnceId Section SetupIconFile SetupLogging SetupMutex ShowComponentSizes ShowLanguageDialog ShowTasksTreeLines SignTool SignToolMinimumTimeBetween SignToolRetryCount SignToolRetryDelay SignToolRunMinimized SignedUninstaller SignedUninstallerDir SlicesPerDisk SolidCompression Source SourceDir StatusMsg String StrongAssemblyName Subkey TerminalServicesAware TimeStampRounding TimeStampsInUTC TitleFontName TitleFontSize TouchDate TouchTime Type Types UninstallDisplayIcon UninstallDisplayName UninstallDisplaySize UninstallFilesDir UninstallLogMode UninstallProgram UninstallRestartComputer Uninstallable UpdateUninstallLogAppName UsePreviousAppDir UsePreviousGroup UsePreviousLanguage UsePreviousPrivigeles UsePreviousSetupType UsePreviousTasks UsePreviousUserInfo UseSetupLdr UsedUserAreasWarning UserInfoPage ValueData ValueName Verb VersionInfoCompany VersionInfoCopyright VersionInfoDescription VersionInfoOriginalFileName VersionInfoProductName VersionInfoProductTextVersion VersionInfoProductVersion VersionInfoTextVersion VersionInfoVersion WelcomeFontName WelcomeFontSize WindowResizable WindowShowCaption WindowStartMaximized WindowVisible WizardImageAlphaFormat WizardImageFile WizardImageStretch WizardResizable WizardSizePercent WizardSmallImageFile WizardStyle WorkingDir app autoappdata autocf autocf32 autocf64 autodesktop autodocs autofonts autopf autopf32 autopf64 autoprograms autostartmenu autostartup autotemplates cf cf32 cf64 cm cmd code commonappdata commoncf commoncf32 commoncf64 commondesktop commondocs commonfonts commonpf commonpf32 commonpf64 commonprograms commonstartmenu commonstartup commontemplates computername dao dotnet40 dotnet4032 dotnet4064 drive fonts group groupname hwnd ini language localappdata log param pf pf32 pf64 reg sd sendto src srcexe sys sysnative sysuserinfoname sysuserinfoorg syswow64 tmp uninstallexe userappdata usercf userdesktop userdocs userfavorites userfonts userinfoname userinfoorg userinfoserial username userpf userprograms usersavedgames usersendto userstartmenu userstartup usertemplates win wizardhwnd and not or private protected public append define dim elif else emit endif endsub error expr file for if ifdef ifexist ifndef ifnexist include insert pragma preproc redim sub undef any func int str void __COUNTER__ __FILE__ __INCLUDE__ __LINE__ __OPT_X__ __WIN32__ COMPANY_NAME CompilerPath faAnyFile faArchive faDirectory faHidden False faReadOnly faSymLink faSysFile faVolumeID FILE_DESCRIPTION FILE_VERSION FIND_AND FIND_BEGINS FIND_CASESENSITIVE FIND_CONTAINS FIND_ENDS FIND_MATCH FIND_NOT FIND_OR FIND_SENSITIVE FIND_TRIM HKCC HKCC64 HKCR HKCR64 HKCU HKCU64 HKEY_CLASSES_ROOT HKEY_CLASSES_ROOT_64 HKEY_CURRENT_CONFIG HKEY_CURRENT_CONFIG_64 HKEY_CURRENT_USER HKEY_CURRENT_USER_64 HKEY_LOCAL_MACHINE HKEY_LOCAL_MACHINE_64 HKEY_USERS HKEY_USERS_64 HKLM HKLM64 HKU HKU64 INTERNAL_NAME ISPP_INVOKED ISPPCC_INVOKED LEGAL_COPYRIGHT MaxInt MinInt NewLine No NULL ORIGINAL_FILENAME PREPROCVER PRODUCT_NAME PRODUCT_VERSION SourcePath SW_HIDE SW_MAX SW_MAXIMIZE SW_MINIMIZE SW_NORMAL SW_RESTORE SW_SHOW SW_SHOWDEFAULT SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE SW_SHOWNORMAL Tab True TYPE_ARRAY TYPE_ERROR TYPE_FUNC TYPE_INTEGER TYPE_MACRO TYPE_NULL TYPE_STRING UNICODE Ver WINDOWS Yes and begin break case class const constructor continue do downto else end event except external finally for function if interface not of or procedure property read record repeat then to try type until uses var while with write AnsiString Boolean Byte Char Directory HBITMAP IDispatch Int64 Integer IUnknown Longint String TAlign TAlignment TAlphaFormat TAnchorKind TAnchors TBevel TBevelKind TBevelShape TBevelStyle TBevelWidth TBitmap TBitmapImage TBorderIcon TBorderIcons TBorderStyle TBorderWidth TBrush TBrushStyle TButton TButtonControl TCanvas TCheckBox TCheckBoxState TCheckItemOperation TCloseAction TCloseEvent TCloseQueryEvent TColor TComboBox TComboBoxStyle TComponent TConstraintSize TControl TCustomCheckBox TCustomComboBox TCustomControl TCustomEdit TCustomFolderTreeView TCustomLabel TCustomListBox TCustomMemo TCustomPanel TDownloadWizardPage TDuplicates TEdit TEditCharCase TEShiftState TFileStream TFolderRenameEvent TFolderTreeView TFont TFontStyle TFontStyles TForm TFormBorderStyle TFormStyle TGraphic TGraphicControl TGraphicsObject THandleStream TInputDirWizardPage TInputFileWizardPage TInputOptionWizardPage TInputQueryWizardPage TKeyEvent TKeyPressEvent TLabel TListBox TListBoxStyle TMainForm TMemo TNewButton TNewCheckBox TNewCheckListBox TNewComboBox TNewEdit TNewListBox TNewMemo TNewNotebook TNewNotebookPage TNewProgressBar TNewProgressBarState TNewProgressBarStyle TNewRadioButton TNewStaticText TNotebook TNotifyEvent TObject TOutputMarqueeProgressWizardPage TOutputMsgMemoWizardPage TOutputMsgWizardPage TOutputProgressWizardPage TPanel TPanelBevel TPasswordEdit TPen TPenMode TPenStyle TPersistent TPosition TRadioButton TRichEditViewer TScrollBarInc TScrollBarKind TScrollingWinControl TScrollStyle TSetupForm TSetupStep TShiftState TSizeConstraints TStartMenuFolderTreeView TStream TStringList TStrings TStringStream TUIStateForm TUninstallProgressForm TUninstallStep TWinControl TWizardForm TWizardPage TWizardPageButtonEvent TWizardPageCancelEvent TWizardPageNotifyEvent TWizardPageShouldSkipEvent Word MsgBox"
  return autocomplete_set
end

function inno.get_reqular()
  local symbol_reqular_exp = "^\\[([_a-zA-Z]+[_a-zA-Z0-9]*)\\][\\s\\r\\n]*"
  return symbol_reqular_exp
end

function inno.create_bakup(path)
  local inno_code = {
    "user_inno = {}\n",
    "\n",
    "require(\"eu_sci\")\n",
    "require(\"eu_core\")\n",
    "\n",
    "function user_inno.init_after_callback(p)\n",
    "  local pnode = eu_core.ffi.cast(\"void *\", p)\n",
    "  local res = eu_core.euapi.on_doc_init_after_scilexer(pnode, \"inno\")  -- enable inno lex\n",
    "  if (res == 0) then\n",
    "    eu_core.euapi.on_doc_enable_foldline(pnode)                           -- enable fold line\n",
    "  end\n",
    "  return res\n",
    "end\n",
    "\n",
    "function user_inno.get_styles()\n",
    "  local style_t = {\n",
    "    [SCE_INNO_COMMENT] = 0xC0C0C0,\n",
    "    [SCE_INNO_COMMENT_PASCAL] = 0xC0C0C0,\n",
    "    -- 区段关键字加上粗体\n",
    "    [SCE_INNO_SECTION] = 0x00B050 + SCE_BOLD_FONT,\n",
    "    [SCE_INNO_KEYWORD] = 0x00B050,\n",
    "    [SCE_INNO_KEYWORD_USER] = 0x00B050,\n",
    "    [SCE_INNO_PREPROC] = 0x00B050,\n",
    "    [SCE_INNO_KEYWORD_PASCAL] = 0xBBBB00 + SCE_BOLD_FONT,\n",
    "    [SCE_INNO_STRING_DOUBLE] = 0xC080FF,\n",
    "    [SCE_INNO_STRING_SINGLE] = 0xC080FF,\n",
    "  }\n",
    "  return style_t\n",
    "end\n",
    "\n",
    "function user_inno.get_keywords()\n",
    "  local keywords0_set = \"setup code components custommessages dirs files ini icons installdelete langoptions languages messages registry run setuptasks types uninstalldelete uninstallrun\"\n",
    "  local keywords1_set = \"aslrcompatible additionalicons addonhostprogramnotfound allowcancelduringinstall allownetworkdrive allownoicons allowrootdirectory allowuncpath alwaysrestart alwaysshowcomponentslist alwaysshowdironreadypage alwaysshowgrouponreadypage alwaysusepersonalgroup appcomments appcontact appcopyright appid appmodifypath appmutex appname apppublisher apppublisherurl appreadmefile appsupportphone appsupporturl appupdatesurl appusermodelid appusermodeltoastactivatorclsid appvername appversion appenddefaultdirname appenddefaultgroupname architecturesallowed architecturesinstallin64bitmode assocfileextension associngfileextension attribs autostartprogram autostartprogramgroupdescription backcolor backcolor2 backcolordirection backsolid beveledlabel changesassociations changesenvironment check closeapplications closeapplicationsfilter comment components compression compressionthreads copymode copyrightfontname copyrightfontsize createappdir createdesktopicon createquicklaunchicon createuninstallregkey depcompatible defaultdialogfontname defaultdirname defaultgroupname defaultuserinfoname defaultuserinfoorg defaultuserinfoserial description destdir destname dialogfontname dialogfontsize direxistswarning disabledirpage disablefinishedpage disableprogramgrouppage disablereadymemo disablereadypage disablestartupprompt disablewelcomepage diskclustersize diskslicesize diskspanning enabledirdoesntexistwarning encryption excludes externalsize extradiskspacerequired filename flags flatcomponentslist fontinstall groupdescription helptextnote hotkey iconfilename iconindex infoafterfile infobeforefile internalcompresslevel key lzmaalgorithm lzmablocksize lzmadictionarysize lzmamatchfinder lzmanumblockthreads lzmanumfastbytes lzmauseseparateprocess languagecodepage languagedetectionmethod languageid languagename languages launchprogram licensefile mergeduplicatefiles messagesfile minversion missingmessageswarning missingrunonceidswarning name nameandversion notrecognizedmessageswarning onlybelowversion output outputbasefilename outputdir outputmanifestfile parameters password permissions privilegesrequired privilegesrequiredoverridesallowed programontheweb reservebytes restartapplications restartifneededbyrun righttoleft root runonceid section setupiconfile setuplogging setupmutex showcomponentsizes showlanguagedialog showtaskstreelines signtool signtoolminimumtimebetween signtoolretrycount signtoolretrydelay signtoolrunminimized signeduninstaller signeduninstallerdir slicesperdisk solidcompression source sourcedir statusmsg string strongassemblyname subkey terminalservicesaware timestamprounding timestampsinutc titlefontname titlefontsize touchdate touchtime type types uninstalldisplayicon uninstalldisplayname uninstalldisplaysize uninstallfilesdir uninstalllogmode uninstallprogram uninstallrestartcomputer uninstallable updateuninstalllogappname usepreviousappdir usepreviousgroup usepreviouslanguage usepreviousprivigeles useprevioussetuptype useprevioustasks useprevioususerinfo usesetupldr useduserareaswarning userinfopage valuedata valuename verb versioninfocompany versioninfocopyright versioninfodescription versioninfooriginalfilename versioninfoproductname versioninfoproducttextversion versioninfoproductversion versioninfotextversion versioninfoversion welcomefontname welcomefontsize windowresizable windowshowcaption windowstartmaximized windowvisible wizardimagealphaformat wizardimagefile wizardimagestretch wizardresizable wizardsizepercent wizardsmallimagefile wizardstyle workingdir\"\n",
    "  local keywords2_set = \"app autoappdata autocf autocf32 autocf64 autodesktop autodocs autofonts autopf autopf32 autopf64 autoprograms autostartmenu autostartup autotemplates cf cf32 cf64 cm cmd code commonappdata commoncf commoncf32 commoncf64 commondesktop commondocs commonfonts commonpf commonpf32 commonpf64 commonprograms commonstartmenu commonstartup commontemplates computername dao dotnet40 dotnet4032 dotnet4064 drive fonts group groupname hwnd ini language localappdata log param pf pf32 pf64 reg sd sendto src srcexe sys sysnative sysuserinfoname sysuserinfoorg syswow64 tmp uninstallexe userappdata usercf userdesktop userdocs userfavorites userfonts userinfoname userinfoorg userinfoserial username userpf userprograms usersavedgames usersendto userstartmenu userstartup usertemplates win wizardhwnd and not or private protected public append define dim elif else emit endif endsub error expr file for if ifdef ifexist ifndef ifnexist include insert pragma preproc redim sub undef any func int str void\"\n",
    "  local keywords3_set = \"__COUNTER__ __FILE__ __INCLUDE__ __LINE__ __OPT_X__ __WIN32__ COMPANY_NAME CompilerPath faAnyFile faArchive faDirectory faHidden False faReadOnly faSymLink faSysFile faVolumeID FILE_DESCRIPTION FILE_VERSION FIND_AND FIND_BEGINS FIND_CASESENSITIVE FIND_CONTAINS FIND_ENDS FIND_MATCH FIND_NOT FIND_OR FIND_SENSITIVE FIND_TRIM HKCC HKCC64 HKCR HKCR64 HKCU HKCU64 HKEY_CLASSES_ROOT HKEY_CLASSES_ROOT_64 HKEY_CURRENT_CONFIG HKEY_CURRENT_CONFIG_64 HKEY_CURRENT_USER HKEY_CURRENT_USER_64 HKEY_LOCAL_MACHINE HKEY_LOCAL_MACHINE_64 HKEY_USERS HKEY_USERS_64 HKLM HKLM64 HKU HKU64 INTERNAL_NAME ISPP_INVOKED ISPPCC_INVOKED LEGAL_COPYRIGHT MaxInt MinInt NewLine No NULL ORIGINAL_FILENAME PREPROCVER PRODUCT_NAME PRODUCT_VERSION SourcePath SW_HIDE SW_MAX SW_MAXIMIZE SW_MINIMIZE SW_NORMAL SW_RESTORE SW_SHOW SW_SHOWDEFAULT SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE SW_SHOWNORMAL Tab True TYPE_ARRAY TYPE_ERROR TYPE_FUNC TYPE_INTEGER TYPE_MACRO TYPE_NULL TYPE_STRING UNICODE Ver WINDOWS Yes\"\n",
    "  local keywords4_set = \"and begin break case class const constructor continue do downto else end event except external finally for function if interface not of or procedure property read record repeat then to try type until uses var while with write msgbox\"\n",
    "  local keywords5_set = \"AnsiString Boolean Byte Char Directory HBITMAP IDispatch Int64 Integer IUnknown Longint String TAlign TAlignment TAlphaFormat TAnchorKind TAnchors TBevel TBevelKind TBevelShape TBevelStyle TBevelWidth TBitmap TBitmapImage TBorderIcon TBorderIcons TBorderStyle TBorderWidth TBrush TBrushStyle TButton TButtonControl TCanvas TCheckBox TCheckBoxState TCheckItemOperation TCloseAction TCloseEvent TCloseQueryEvent TColor TComboBox TComboBoxStyle TComponent TConstraintSize TControl TCustomCheckBox TCustomComboBox TCustomControl TCustomEdit TCustomFolderTreeView TCustomLabel TCustomListBox TCustomMemo TCustomPanel TDownloadWizardPage TDuplicates TEdit TEditCharCase TEShiftState TFileStream TFolderRenameEvent TFolderTreeView TFont TFontStyle TFontStyles TForm TFormBorderStyle TFormStyle TGraphic TGraphicControl TGraphicsObject THandleStream TInputDirWizardPage TInputFileWizardPage TInputOptionWizardPage TInputQueryWizardPage TKeyEvent TKeyPressEvent TLabel TListBox TListBoxStyle TMainForm TMemo TNewButton TNewCheckBox TNewCheckListBox TNewComboBox TNewEdit TNewListBox TNewMemo TNewNotebook TNewNotebookPage TNewProgressBar TNewProgressBarState TNewProgressBarStyle TNewRadioButton TNewStaticText TNotebook TNotifyEvent TObject TOutputMarqueeProgressWizardPage TOutputMsgMemoWizardPage TOutputMsgWizardPage TOutputProgressWizardPage TPanel TPanelBevel TPasswordEdit TPen TPenMode TPenStyle TPersistent TPosition TRadioButton TRichEditViewer TScrollBarInc TScrollBarKind TScrollingWinControl TScrollStyle TSetupForm TSetupStep TShiftState TSizeConstraints TStartMenuFolderTreeView TStream TStringList TStrings TStringStream TUIStateForm TUninstallProgressForm TUninstallStep TWinControl TWizardForm TWizardPage TWizardPageButtonEvent TWizardPageCancelEvent TWizardPageNotifyEvent TWizardPageShouldSkipEvent Word\"\n",
    "  return keywords0_set,keywords1_set,keywords2_set,keywords3_set,keywords4_set,keywords5_set\n",
    "end\n",
    "\n",
    "function user_inno.get_autocomplete()\n",
    "  local autocomplete_set = \"Setup Code Components CustomMessages Dirs Files INI Icons InstallDelete LangOptions Languages Messages Registry Run SetupTasks Types UninstallDelete UninstallRun ASLRCompatible AdditionalIcons AddonHostProgramNotFound AllowCancelDuringInstall AllowNetworkDrive AllowNoIcons AllowRootDirectory AllowUNCPath AlwaysRestart AlwaysShowComponentsList AlwaysShowDirOnReadyPage AlwaysShowGroupOnReadyPage AlwaysUsePersonalGroup AppComments AppContact AppCopyright AppId AppModifyPath AppMutex AppName AppPublisher AppPublisherURL AppReadmeFile AppSupportPhone AppSupportURL AppUpdatesURL AppUserModelID AppUserModelToastActivatorCLSID AppVerName AppVersion AppendDefaultDirName AppendDefaultGroupName ArchitecturesAllowed ArchitecturesInstallIn64BitMode AssocFileExtension AssocingFileExtension Attribs AutoStartProgram AutoStartProgramGroupDescription BackColor BackColor2 BackColorDirection BackSolid BeveledLabel ChangesAssociations ChangesEnvironment Check CloseApplications CloseApplicationsFilter Comment Components Compression CompressionThreads CopyMode CopyrightFontName CopyrightFontSize CreateAppDir CreateDesktopIcon CreateQuickLaunchIcon CreateUninstallRegKey DEPCompatible DefaultDialogFontName DefaultDirName DefaultGroupName DefaultUserInfoName DefaultUserInfoOrg DefaultUserInfoSerial Description DestDir DestName DialogFontName DialogFontSize DirExistsWarning DisableDirPage DisableFinishedPage DisableProgramGroupPage DisableReadyMemo DisableReadyPage DisableStartupPrompt DisableWelcomePage DiskClusterSize DiskSliceSize DiskSpanning EnableDirDoesntExistWarning Encryption Excludes ExternalSize ExtraDiskSpaceRequired Filename Flags FlatComponentsList FontInstall GroupDescription HelpTextNote HotKey IconFilename IconIndex InfoAfterFile InfoBeforeFile InternalCompressLevel Key LZMAAlgorithm LZMABlockSize LZMADictionarySize LZMAMatchFinder LZMANumBlockThreads LZMANumFastBytes LZMAUseSeparateProcess LanguageCodePage LanguageDetectionMethod LanguageID LanguageName Languages LaunchProgram LicenseFile MergeDuplicateFiles MessagesFile MinVersion MissingMessagesWarning MissingRunOnceIdsWarning Name NameAndVersion NotRecognizedMessagesWarning OnlyBelowVersion Output OutputBaseFilename OutputDir OutputManifestFile Parameters Password Permissions PrivilegesRequired PrivilegesRequiredOverridesAllowed ProgramOnTheWeb ReserveBytes RestartApplications RestartIfNeededByRun RightToLeft Root RunOnceId Section SetupIconFile SetupLogging SetupMutex ShowComponentSizes ShowLanguageDialog ShowTasksTreeLines SignTool SignToolMinimumTimeBetween SignToolRetryCount SignToolRetryDelay SignToolRunMinimized SignedUninstaller SignedUninstallerDir SlicesPerDisk SolidCompression Source SourceDir StatusMsg String StrongAssemblyName Subkey TerminalServicesAware TimeStampRounding TimeStampsInUTC TitleFontName TitleFontSize TouchDate TouchTime Type Types UninstallDisplayIcon UninstallDisplayName UninstallDisplaySize UninstallFilesDir UninstallLogMode UninstallProgram UninstallRestartComputer Uninstallable UpdateUninstallLogAppName UsePreviousAppDir UsePreviousGroup UsePreviousLanguage UsePreviousPrivigeles UsePreviousSetupType UsePreviousTasks UsePreviousUserInfo UseSetupLdr UsedUserAreasWarning UserInfoPage ValueData ValueName Verb VersionInfoCompany VersionInfoCopyright VersionInfoDescription VersionInfoOriginalFileName VersionInfoProductName VersionInfoProductTextVersion VersionInfoProductVersion VersionInfoTextVersion VersionInfoVersion WelcomeFontName WelcomeFontSize WindowResizable WindowShowCaption WindowStartMaximized WindowVisible WizardImageAlphaFormat WizardImageFile WizardImageStretch WizardResizable WizardSizePercent WizardSmallImageFile WizardStyle WorkingDir app autoappdata autocf autocf32 autocf64 autodesktop autodocs autofonts autopf autopf32 autopf64 autoprograms autostartmenu autostartup autotemplates cf cf32 cf64 cm cmd code commonappdata commoncf commoncf32 commoncf64 commondesktop commondocs commonfonts commonpf commonpf32 commonpf64 commonprograms commonstartmenu commonstartup commontemplates computername dao dotnet40 dotnet4032 dotnet4064 drive fonts group groupname hwnd ini language localappdata log param pf pf32 pf64 reg sd sendto src srcexe sys sysnative sysuserinfoname sysuserinfoorg syswow64 tmp uninstallexe userappdata usercf userdesktop userdocs userfavorites userfonts userinfoname userinfoorg userinfoserial username userpf userprograms usersavedgames usersendto userstartmenu userstartup usertemplates win wizardhwnd and not or private protected public append define dim elif else emit endif endsub error expr file for if ifdef ifexist ifndef ifnexist include insert pragma preproc redim sub undef any func int str void __COUNTER__ __FILE__ __INCLUDE__ __LINE__ __OPT_X__ __WIN32__ COMPANY_NAME CompilerPath faAnyFile faArchive faDirectory faHidden False faReadOnly faSymLink faSysFile faVolumeID FILE_DESCRIPTION FILE_VERSION FIND_AND FIND_BEGINS FIND_CASESENSITIVE FIND_CONTAINS FIND_ENDS FIND_MATCH FIND_NOT FIND_OR FIND_SENSITIVE FIND_TRIM HKCC HKCC64 HKCR HKCR64 HKCU HKCU64 HKEY_CLASSES_ROOT HKEY_CLASSES_ROOT_64 HKEY_CURRENT_CONFIG HKEY_CURRENT_CONFIG_64 HKEY_CURRENT_USER HKEY_CURRENT_USER_64 HKEY_LOCAL_MACHINE HKEY_LOCAL_MACHINE_64 HKEY_USERS HKEY_USERS_64 HKLM HKLM64 HKU HKU64 INTERNAL_NAME ISPP_INVOKED ISPPCC_INVOKED LEGAL_COPYRIGHT MaxInt MinInt NewLine No NULL ORIGINAL_FILENAME PREPROCVER PRODUCT_NAME PRODUCT_VERSION SourcePath SW_HIDE SW_MAX SW_MAXIMIZE SW_MINIMIZE SW_NORMAL SW_RESTORE SW_SHOW SW_SHOWDEFAULT SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE SW_SHOWNORMAL Tab True TYPE_ARRAY TYPE_ERROR TYPE_FUNC TYPE_INTEGER TYPE_MACRO TYPE_NULL TYPE_STRING UNICODE Ver WINDOWS Yes and begin break case class const constructor continue do downto else end event except external finally for function if interface not of or procedure property read record repeat then to try type until uses var while with write AnsiString Boolean Byte Char Directory HBITMAP IDispatch Int64 Integer IUnknown Longint String TAlign TAlignment TAlphaFormat TAnchorKind TAnchors TBevel TBevelKind TBevelShape TBevelStyle TBevelWidth TBitmap TBitmapImage TBorderIcon TBorderIcons TBorderStyle TBorderWidth TBrush TBrushStyle TButton TButtonControl TCanvas TCheckBox TCheckBoxState TCheckItemOperation TCloseAction TCloseEvent TCloseQueryEvent TColor TComboBox TComboBoxStyle TComponent TConstraintSize TControl TCustomCheckBox TCustomComboBox TCustomControl TCustomEdit TCustomFolderTreeView TCustomLabel TCustomListBox TCustomMemo TCustomPanel TDownloadWizardPage TDuplicates TEdit TEditCharCase TEShiftState TFileStream TFolderRenameEvent TFolderTreeView TFont TFontStyle TFontStyles TForm TFormBorderStyle TFormStyle TGraphic TGraphicControl TGraphicsObject THandleStream TInputDirWizardPage TInputFileWizardPage TInputOptionWizardPage TInputQueryWizardPage TKeyEvent TKeyPressEvent TLabel TListBox TListBoxStyle TMainForm TMemo TNewButton TNewCheckBox TNewCheckListBox TNewComboBox TNewEdit TNewListBox TNewMemo TNewNotebook TNewNotebookPage TNewProgressBar TNewProgressBarState TNewProgressBarStyle TNewRadioButton TNewStaticText TNotebook TNotifyEvent TObject TOutputMarqueeProgressWizardPage TOutputMsgMemoWizardPage TOutputMsgWizardPage TOutputProgressWizardPage TPanel TPanelBevel TPasswordEdit TPen TPenMode TPenStyle TPersistent TPosition TRadioButton TRichEditViewer TScrollBarInc TScrollBarKind TScrollingWinControl TScrollStyle TSetupForm TSetupStep TShiftState TSizeConstraints TStartMenuFolderTreeView TStream TStringList TStrings TStringStream TUIStateForm TUninstallProgressForm TUninstallStep TWinControl TWizardForm TWizardPage TWizardPageButtonEvent TWizardPageCancelEvent TWizardPageNotifyEvent TWizardPageShouldSkipEvent Word MsgBox\"\n",
    "  return autocomplete_set\n",
    "end\n",
    "\n",
    "function user_inno.get_reqular()\n",
    "  local symbol_reqular_exp = \"^\\\\[([_a-zA-Z]+[_a-zA-Z0-9]*)\\\\][\\\\s\\\\r\\\\n]*\"\n",
    "  return symbol_reqular_exp\n",
    "end\n",
    "\n",
    "return user_inno",
  }
  local shell_code = table.concat(inno_code)
  eu_core.save_file(path, shell_code)
  shell_code = nil
  inno_code = nil
end

return inno