C#, Inno Script, Autohotkey lexers

All questions regarding lexer highlighting schemes are discussed here...
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

OK, it seems to be fine.

The Inno Setup script has built-in functions and variables, contants in the

Code: Select all

 section. Is it possible to highlight them?
I would provide the lists.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

it is possible, via "Pascal script" sublexer, let's do it.
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

Hello!
The lists for the Inno Setup lexer (better later than never):
(https://www.jrsoftware.org/ishelp/, Pascal scripting ...)

event function and procedures:

Code: Select all

BackButtonClick
CheckPassword
CheckSerial
GetCustomSetupExitCode
InitializeSetup
InitializeUninstall
NeedRestart
NextButtonClick
PrepareToInstall
ShouldSkipPage
UninstallNeedRestart
UpdateReadyMemo
CancelButtonClick
CurInstallProgressChanged
CurPageChanged
CurStepChanged
CurUninstallStepChanged
DeinitializeSetup
DeinitializeUninstall
InitializeUninstallProgressForm
InitializeWizard
RegisterExtraCloseApplicationsResources
RegisterPreviousData
support functions and procedures:

Code: Select all

ActiveLanguage
AddBackslash
AddPeriod
AddQuotes
AnsiLowercase
AnsiUppercase
BrowseForFolder
CallDLLProc
CastIntegerToString
CastStringToInteger
ChangeFileExt
CharLength
CheckForMutexes
Chr
CompareStr
CompareText
ConvertPercentStr
Copy
CreateComObject
CreateCustomForm
CreateCustomPage
CreateDir
CreateInputDirPage
CreateInputFilePage
CreateInputOptionPage
CreateInputQueryPage
CreateOleObject
CreateOutputMsgMemoPage
CreateOutputMsgPage
CreateOutputProgressPage
CreateShellLink
CurrentFilename
CurrentSourceFilename
CustomMessage
DecrementSharedCount
DeleteFile
DelTree
DirExists
DLLGetLastError
EnableFsRedirection
Exec
ExecAsOriginalUser
ExitSetupMsgBox
ExpandConstant
ExpandConstantEx
ExpandFileName
ExpandUNCFileName
ExtractFileDir
ExtractFileDrive
ExtractFileExt
ExtractFileName
ExtractFilePath
ExtractRelativePath
ExtractTemporaryFiles
FileCopy
FileExists
FileOrDirExists
FileSearch
FileSize
FindFirst
FindNext
FindWindowByClassName
FindWindowByWindowName
FloatToStr
FmtMessage
FontExists
ForceDirectories
Format
FreeDLL
GenerateUniqueName
GetActiveOleObject
GetArrayLength
GetCmdTail
GetComputerNameString
GetCurrentDir
GetDateTimeString
GetEnv
GetExceptionMessage
GetIniBool
GetIniInt
GetIniString
GetMD5OfFile
GetMD5OfString
GetMD5OfUnicodeString
GetOpenFileName
GetOpenFileNameMulti
GetPreviousData
GetSaveFileName
GetSHA1OfFile
GetSHA1OfString
GetSHA1OfUnicodeString
GetShellFolder
GetShellFolderByCSIDL
GetShortName
GetSpaceOnDisk
GetSpaceOnDisk64
GetSystemDir
GetSysWow64Dir
GetTempDir
GetUILanguage
GetUserNameString
GetVersionNumbers
GetVersionNumbersString
GetWinDir
GetWindowsVersion
GetWindowsVersionString
IDispatchInvoke
IniKeyExists
InstallOnThisVersion
IntToStr
Is64BitInstallMode
IsAdminLoggedOn
IsARM64
IsComponentSelected
IsIA64
IsIniSectionEmpty
IsPowerUserLoggedOn
IsProtectedSystemFile
IsTaskSelected
IsUninstaller
IsWildcard
IsWin64
IsX64
IsX86
Length
LoadDLL
LoadStringFromFile
LoadStringsFromFile
Lowercase
MinimizePathName
ModifyPifFile
MsgBox
Null
Ord
PageFromID
PageIndexFromID
ParamCount
ParamStr
Pos
PostBroadcastMessage
PostMessage
ProcessorArchitecture
Random
RegDeleteKeyIfEmpty
RegDeleteKeyIncludingSubkeys
RegDeleteValue
RegGetSubkeyNames
RegGetValueNames
RegisterExtraCloseApplicationsResource
RegisterWindowMessage
RegKeyExists
RegQueryBinaryValue
RegQueryDWordValue
RegQueryMultiStringValue
RegQueryStringValue
RegValueExists
RegWriteBinaryValue
RegWriteDWordValue
RegWriteExpandStringValue
RegWriteMultiStringValue
RegWriteStringValue
RemoveBackslash
RemoveBackslashUnlessRoot
RemoveDir
RemoveQuotes
RenameFile
RmSessionStarted
SaveStringsToFile
SaveStringsToUTF8File
SaveStringToFile
ScaleX
ScaleY
SelectDisk
SendBroadcastMessage
SendBroadcastNotifyMessage
SendMessage
SendNotifyMessage
SetCurrentDir
SetIniBool
SetIniInt
SetIniString
SetNTFSCompression
SetPreviousData
SetupMessage
ShellExec
ShellExecAsOriginalUser
StringChange
StringChangeEx
StringOfChar
StringToGUID
StrToFloat
StrToInt
StrToInt64
StrToInt64Def
StrToIntDef
SuppressibleMsgBox
SysErrorMessage
Terminated
Trim
TrimLeft
TrimRight
Unassigned
UninstallSilent
UnpinShellLink
UnregisterServer
UnregisterTypeLibrary
Uppercase
VarIsClear
VarIsEmpty
VarIsNull
VarType
WildcardMatch
WizardDirValue
WizardGroupValue
WizardNoIcons
WizardSelectedComponents
WizardSelectedTasks
WizardSetupType
WizardSilent
Abort
Beep
BringToFrontAndRestore
CharToOemBuff
CoFreeUnusedLibraries
CreateMutex
DelayDeleteFile
Delete
DeleteIniEntry
DeleteIniSection
ExtractTemporaryFile
FindClose
GetWindowsVersionEx
IncrementSharedCount
Insert
Log
MakePendingFileRenameOperationsChecksum
OemToCharBuff
OleCheck
RaiseException
RegisterServer
RegisterTypeLibrary
RestartReplace
SetArrayLength
SetLength
ShowExceptionMessage
Sleep
UnloadDLL
UnregisterFont
support classes:

Code: Select all

TAlphaBitmap
TBevel
TBitmap
TBitmapImage
TBrush
TButton
TButtonControl
TCanvas
TCheckBox
TComboBox
TComponent
TControl
TCustomCheckBox
TCustomComboBox
TCustomControl
TCustomEdit
TCustomFolderTreeView
TCustomLabel
TCustomListBox
TCustomMemo
TCustomPanel
TEdit
TFileStream
TFolderTreeView
TFont
TForm
TGraphic
TGraphicControl
TGraphicsObject
THandleStream
TInputDirWizardPage
TInputFileWizardPage
TInputOptionWizardPage
TInputQueryWizardPage
TLabel
TListBox
TMainForm
TMemo
TNewButton
TNewCheckBox
TNewCheckListBox
TNewComboBox
TNewEdit
TNewListBox
TNewMemo
TNewNotebook
TNewNotebookPage
TNewProgressBar
TNewRadioButton
TNewStaticText
TObject
TOutputMsgMemoWizardPage
TOutputMsgWizardPage
TOutputProgressWizardPage
TPanel
TPasswordEdit
TPen
TPersistent
TRadioButton
TRichEditViewer
TScrollingWinControl
TSetupForm
TStartMenuFolderTreeView
TStream
TStringList
TStrings
TStringStream
TUIStateForm
TUninstallProgressForm
TWinControl
TWizardForm
TWizardPage
enumerated values, constants, ...

Code: Select all

alNone, alTop, alBottom, alLeft, alRight, alClient
taLeftJustify, taRightJustify, taCenter
afIgnored, afDefined, afPremultiplied
bsBox, bsFrame, bsTopLine, bsBottomLine, bsLeftLine, bsRightLine, bsSpacer
bsLowered, bsRaised
biSystemMenu, biMinimize, biMaximize, biHelp
bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross
cbUnchecked, cbChecked, cbGrayed
coUncheck, coCheck, coCheckWithChildren
caNone, caHide, caFree, caMinimize
csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable
ecNormal, ecUpperCase, ecLowerCase
ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble
fsBold, fsItalic, fsUnderline, fsStrikeOut
bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin
lbStandard, lbOwnerDrawFixed, lbOwnerDrawVariable
npbsNormal, npbsError, npbsPaused
npbstNormal, npbstMarquee
bvNone, bvLowered, bvRaised, bvSpace
pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor
psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame
poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly, poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter
sbHorizontal, sbVertical
ssNone, ssHorizontal, ssVertical, ssBoth

ssInstall, ssPostInstall, ssDone
wpWelcome, wpLicense, wpPassword, wpInfoBefore, wpUserInfo, wpSelectDir, wpSelectComponents, wpSelectProgramGroup, wpSelectTasks, wpReady, wpPreparing, wpInstalling, wpInfoAfter, wpFinished
mbInformation, mbConfirmation, mbError, mbCriticalError

MB_OK, MB_OKCANCEL, MB_ABORTRETRYIGNORE, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_SETFOREGROUND
IDOK, IDCANCEL, IDABORT, IDRETRY, IDIGNORE, IDYES, IDNO
SW_SHOW, SW_SHOWNORMAL, SW_SHOWMAXIMIZED, SW_SHOWMINIMIZED, SW_SHOWMINNOACTIVE, SW_HIDE

sfDesktop, sfStartMenu, sfPrograms, sfStartup, sfSendTo, sfFonts, sfAppData, sfDocs, sfTemplates, sfFavorites, sfLocalAppData
srNo, srYes, srUnknown

HKEY_CLASSES_ROOT, HKEY_CLASSES_ROOT_32, HKEY_CLASSES_ROOT_64,
HKEY_CURRENT_USER, HKEY_CURRENT_USER_32, HKEY_CURRENT_USER_64,
HKEY_LOCAL_MACHINE, HKEY_LOCAL_MACHINE_32, HKEY_LOCAL_MACHINE_64,
HKEY_USERS, HKEY_USERS_32, HKEY_USERS_64,
HKEY_PERFORMANCE_DATA,
HKEY_CURRENT_CONFIG, HKEY_CURRENT_CONFIG_32, HKEY_CURRENT_CONFIG_64,
HKEY_DYN_DATA,
HKCR, HKCR32, HKCR64, HKCU, HKCU32, HKCU64, HKLM, HKLM32, HKLM64, HKU, HKU32, HKU64, HKCC, HKCC32, HKCC64
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Added all these items, lexer is updated, pls test.
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

Thanks, it's working well.

There are some issues and missed keywords for the AHK lexer:
object related: get set this value
switch statement related: case default
if statement related: is
function definition related: byref local
missing functions (https://www.autohotkey.com/boards/viewt ... 86&t=72459): OnExit() OnClipboardChange()
The directives ("#...") do not need to start at the beginning of the line, there may be spaces/tabs before them.
https://i.imgur.com/UvK2W6n.png
The code tree displays only the labels ("label_name:"). The functions are missing.
There are more issues (registry keys, variable names, "special" string format, statement options/parameters, ...), I will post about them.
Thank you!
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Fixed all (except 'more issues'). added funcs to code tree.
Pls test.
Attachments
ahk.png
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

Inno Setup Script (Pascal Script):
(maybe the types in different style not as the keywords ...)
Missing types: cardinal, integer, boolean, pchar, char, single, extended, int64
Missing keywords: result, exit, break, true, false, external
(edited break added)
Thanks!
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Hilited as type: result (it's not a keyword in pascal)
Hilited as keyword: exit, break, external
Hilited as consts: true, false

Lexer update in next 10min.
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

Thank you!
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Inno 6.0 has many changes, so I welcome reports about them, new words etc
https://jrsoftware.org/isdl.php
Post Reply