fork
This commit is contained in:
23
langs/delphi/delphi.txt
Normal file
23
langs/delphi/delphi.txt
Normal file
@ -0,0 +1,23 @@
|
||||
### DELPHI LANGUAGE ###
|
||||
|
||||
# ELEMENT_NAME [optional-css-class] REGULAR_EXPRESSION
|
||||
|
||||
NAME Delphi/Pascal
|
||||
VERSION 1.0.0
|
||||
|
||||
COMMENT (?default)
|
||||
STRING (?default)
|
||||
|
||||
NOTATION \@[\w-]+
|
||||
STATEMENT \b(?alt:statement.txt)\b
|
||||
RESERVED (?default)|\b(?alt:reserved.txt)\b
|
||||
TYPE (?default)|\b(?alt:type.txt)\b
|
||||
MODIFIER \b(?alt:modifier.txt)\b
|
||||
|
||||
ENTITY (?default)|\b[a-z_]\w+\s*\|\s*[a-z_]\w+\b\s+(?=\b[a-z_]\w+\b)
|
||||
VARIABLE (?default)
|
||||
GENERIC:ENTITY <\w+>
|
||||
IDENTIFIER (?default)
|
||||
CONSTANT (?default)
|
||||
OPERATOR \b(?alt:operator.txt)\b
|
||||
SYMBOL (?default)
|
20
langs/delphi/modifier.txt
Normal file
20
langs/delphi/modifier.txt
Normal file
@ -0,0 +1,20 @@
|
||||
property
|
||||
virtual
|
||||
extern
|
||||
stdcall
|
||||
override
|
||||
overload
|
||||
reintroduce
|
||||
interface
|
||||
public
|
||||
private
|
||||
protected
|
||||
implementation
|
||||
const
|
||||
constructor
|
||||
destructor
|
||||
uses
|
||||
unit
|
||||
initialization
|
||||
class
|
||||
end.
|
25
langs/delphi/operator.txt
Normal file
25
langs/delphi/operator.txt
Normal file
@ -0,0 +1,25 @@
|
||||
# Grouped operators
|
||||
and
|
||||
not
|
||||
or
|
||||
div
|
||||
mod
|
||||
:=
|
||||
<>
|
||||
<=
|
||||
>=
|
||||
|
||||
# Single operators
|
||||
%
|
||||
^
|
||||
~
|
||||
&
|
||||
|
|
||||
!
|
||||
=
|
||||
<
|
||||
>
|
||||
+
|
||||
-
|
||||
*
|
||||
/
|
314
langs/delphi/reserved.txt
Normal file
314
langs/delphi/reserved.txt
Normal file
@ -0,0 +1,314 @@
|
||||
# Functions
|
||||
Abs
|
||||
Addr
|
||||
AnsiCompareStr
|
||||
AnsiCompareText
|
||||
AnsiContainsStr
|
||||
AnsiContainsText
|
||||
AnsiEndsStr
|
||||
AnsiIndexStr
|
||||
AnsiLeftStr
|
||||
AnsiLowerCase
|
||||
AnsiMatchStr
|
||||
AnsiMidStr
|
||||
AnsiPos
|
||||
AnsiReplaceStr
|
||||
AnsiReverseString
|
||||
AnsiRightStr
|
||||
AnsiStartsStr
|
||||
AnsiUpperCase
|
||||
ArcCos
|
||||
ArcSin
|
||||
ArcTan
|
||||
Assigned
|
||||
BeginThread
|
||||
Bounds
|
||||
CelsiusToFahrenheit
|
||||
ChangeFileExt
|
||||
Convert
|
||||
CompareStr
|
||||
CompareText
|
||||
CompareValue
|
||||
Concat
|
||||
Convert
|
||||
Copy
|
||||
Cos
|
||||
CreateDir
|
||||
CurrToStr
|
||||
CurrToStrF
|
||||
Date
|
||||
DateTimeToFileDate
|
||||
DateTimeToStr
|
||||
DateToStr
|
||||
DayOfTheMonth
|
||||
DayOfTheWeek
|
||||
DayOfTheYear
|
||||
DayOfWeek
|
||||
DaysBetween
|
||||
DaysInAMonth
|
||||
DaysInAYear
|
||||
DaySpan
|
||||
DegToRad
|
||||
DeleteFile
|
||||
DirectoryExists
|
||||
DiskFree
|
||||
DiskSize
|
||||
DupeString
|
||||
EncodeDate
|
||||
EncodeDateTime
|
||||
EncodeTime
|
||||
EndOfADay
|
||||
EndOfAMonth
|
||||
Eof
|
||||
Eoln
|
||||
Exp
|
||||
ExtractFileDir
|
||||
ExtractFileDrive
|
||||
ExtractFileExt
|
||||
ExtractFileName
|
||||
ExtractFilePath
|
||||
FahrenheitToCelsius
|
||||
FileAge
|
||||
FileDateToDateTime
|
||||
FileExists
|
||||
FileGetAttr
|
||||
FilePos
|
||||
FileSearch
|
||||
FileSetAttr
|
||||
FileSetDate
|
||||
FileSize
|
||||
FindClose
|
||||
FindCmdLineSwitch
|
||||
FindFirst
|
||||
FindNext
|
||||
FloatToStr
|
||||
FloatToStrF
|
||||
ForceDirectories
|
||||
Format
|
||||
FormatCurr
|
||||
FormatDateTime
|
||||
FormatFloat
|
||||
Frac
|
||||
GetCurrentDir
|
||||
GetLastError
|
||||
GetMem
|
||||
Hi
|
||||
High
|
||||
IncDay
|
||||
IncHour
|
||||
IncMillisecond
|
||||
IncMinute
|
||||
IncMonth
|
||||
IncSecond
|
||||
IncYear
|
||||
InputBox
|
||||
InputQuery
|
||||
Int
|
||||
IntToHex
|
||||
IntToStr
|
||||
IOResult
|
||||
IsInfinite
|
||||
IsLeapYear
|
||||
IsMultiThread
|
||||
IsNaN
|
||||
LastDelimiter
|
||||
Length
|
||||
Ln
|
||||
Lo
|
||||
Log10
|
||||
Low
|
||||
LowerCase
|
||||
Max
|
||||
Mean
|
||||
MessageDlg
|
||||
MessageDlgPos
|
||||
Min
|
||||
MonthOfTheYear
|
||||
Now
|
||||
Odd
|
||||
Ord
|
||||
ParamCount
|
||||
ParamStr
|
||||
Pi
|
||||
Point
|
||||
PointsEqual
|
||||
Pos
|
||||
Pred
|
||||
Printer
|
||||
PromptForFileName
|
||||
PtInRect
|
||||
RadToDeg
|
||||
Random
|
||||
RandomRange
|
||||
RecodeDate
|
||||
RecodeTime
|
||||
Rect
|
||||
RemoveDir
|
||||
RenameFile
|
||||
Round
|
||||
SeekEof
|
||||
SeekEoln
|
||||
SelectDirectory
|
||||
SetCurrentDir
|
||||
Sin
|
||||
SizeOf
|
||||
Slice
|
||||
Sqr
|
||||
Sqrt
|
||||
StringOfChar
|
||||
StringReplace
|
||||
StringToWideChar
|
||||
StrScan
|
||||
StrToCurr
|
||||
StrToDate
|
||||
StrToDateTime
|
||||
StrToFloat
|
||||
StrToInt
|
||||
StrToInt64
|
||||
StrToInt64Def
|
||||
StrToIntDef
|
||||
StrToTime
|
||||
StuffString
|
||||
Succ
|
||||
Sum
|
||||
Tan
|
||||
Time
|
||||
TimeToStr
|
||||
Tomorrow
|
||||
Trim
|
||||
TrimLeft
|
||||
TrimRight
|
||||
Trunc
|
||||
UpCase
|
||||
UpperCase
|
||||
VarType
|
||||
WideCharToString
|
||||
WrapText
|
||||
Yesterday
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# working on these
|
||||
absolute
|
||||
abstract
|
||||
and
|
||||
Application
|
||||
as
|
||||
asm
|
||||
assembler
|
||||
at
|
||||
automated
|
||||
case
|
||||
cdecl
|
||||
class
|
||||
comp
|
||||
const
|
||||
constructor
|
||||
contains
|
||||
default
|
||||
deprecated
|
||||
destructor
|
||||
dispid
|
||||
dispinterface
|
||||
div
|
||||
do
|
||||
downto
|
||||
dynamic
|
||||
else
|
||||
end
|
||||
except
|
||||
Exception
|
||||
export
|
||||
exports
|
||||
external
|
||||
false
|
||||
far
|
||||
file
|
||||
final
|
||||
finalization
|
||||
finally
|
||||
for
|
||||
forward
|
||||
function
|
||||
goto
|
||||
if
|
||||
implementation
|
||||
implements
|
||||
in
|
||||
index
|
||||
inherited
|
||||
initialization
|
||||
inline
|
||||
interface
|
||||
is
|
||||
label
|
||||
library
|
||||
local
|
||||
message
|
||||
mod
|
||||
name
|
||||
near
|
||||
nil
|
||||
null
|
||||
nodefault
|
||||
not
|
||||
of
|
||||
on
|
||||
or
|
||||
out
|
||||
overload
|
||||
override
|
||||
package
|
||||
packed
|
||||
pascal
|
||||
platform
|
||||
private
|
||||
procedure
|
||||
program
|
||||
property
|
||||
protected
|
||||
public
|
||||
published
|
||||
raise
|
||||
read
|
||||
readonly
|
||||
record
|
||||
register
|
||||
reintroduce
|
||||
remove
|
||||
repeat
|
||||
requires
|
||||
resident
|
||||
resourcestring
|
||||
safecall
|
||||
Self
|
||||
set
|
||||
shl
|
||||
shr
|
||||
static
|
||||
stdcall
|
||||
stored
|
||||
strictprivate
|
||||
strictprotected
|
||||
then
|
||||
threadvar
|
||||
to
|
||||
true
|
||||
try
|
||||
type
|
||||
unit
|
||||
unsafe
|
||||
until
|
||||
uses
|
||||
var
|
||||
varargs
|
||||
virtual
|
||||
while
|
||||
with
|
||||
write
|
||||
writeonly
|
||||
xor
|
26
langs/delphi/statement.txt
Normal file
26
langs/delphi/statement.txt
Normal file
@ -0,0 +1,26 @@
|
||||
begin
|
||||
continue
|
||||
switch
|
||||
break
|
||||
result
|
||||
finally
|
||||
raise
|
||||
while
|
||||
then
|
||||
case
|
||||
else
|
||||
goto
|
||||
and
|
||||
for
|
||||
try
|
||||
xor
|
||||
not
|
||||
end
|
||||
as
|
||||
do
|
||||
if
|
||||
or
|
||||
in
|
||||
is
|
||||
to
|
||||
downto
|
72
langs/delphi/type.txt
Normal file
72
langs/delphi/type.txt
Normal file
@ -0,0 +1,72 @@
|
||||
Byte
|
||||
PByte
|
||||
ShortInt
|
||||
PShortInt
|
||||
Word
|
||||
PWord
|
||||
SmallInt
|
||||
PSmallInt
|
||||
Cardinal
|
||||
PCardinal
|
||||
LongWord
|
||||
PLongWord
|
||||
Integer
|
||||
PInteger
|
||||
LongInt
|
||||
PLongint
|
||||
UInt64
|
||||
PUInt64
|
||||
Int64
|
||||
PInt64
|
||||
Single
|
||||
PSingle
|
||||
TSingleRec
|
||||
Double
|
||||
PDouble
|
||||
TDoubleRec
|
||||
Extended
|
||||
Real
|
||||
AnsiChar
|
||||
PAnsiChar
|
||||
Char
|
||||
PChar
|
||||
WideChar
|
||||
PWideChar
|
||||
AnsiString
|
||||
PAnsiString
|
||||
RawByteString
|
||||
PRawByteString
|
||||
UnicodeString
|
||||
PUnicodeString
|
||||
String
|
||||
PString
|
||||
ShortString
|
||||
PShortString
|
||||
WideString
|
||||
PWideString
|
||||
TextFile
|
||||
Text
|
||||
Boolean
|
||||
PBoolean
|
||||
ByteBool
|
||||
WordBool
|
||||
PWordBool
|
||||
LongBool
|
||||
PLongBool
|
||||
Array
|
||||
Record
|
||||
Variant
|
||||
PVariant
|
||||
Pointer
|
||||
PPointer
|
||||
Currency
|
||||
PCurrency
|
||||
tstringlist
|
||||
tstrings
|
||||
tobject
|
||||
tdatetime
|
||||
tdate
|
||||
ttime
|
||||
PTextBuff
|
||||
Byte
|
||||
Cardinal
|
Reference in New Issue
Block a user