📄 psvsql.pas
字号:
end;
function TpsvSQLRTF.Func37: TtkTokenKind;
begin
if KeyComp('LIKE') then Result := tkKey else
if KeyComp('BEGIN') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func39: TtkTokenKind;
begin
if KeyComp('FOR') then Result := tkKey else
if KeyComp('DEBUG') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func40: TtkTokenKind;
begin
if KeyComp('ANY') then Result := tkKey else
if KeyComp('TABLE') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func41: TtkTokenKind;
begin
if KeyComp('ELSE') then Result := tkKey else
if KeyComp('KEY') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func43: TtkTokenKind;
begin
if KeyComp('LEFT') then Result := tkKey else
if KeyComp('CAST') then Result := tkKey else
if KeyComp('PLAN') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func44: TtkTokenKind;
begin
if KeyComp('SET') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func47: TtkTokenKind;
begin
if KeyComp('THEN') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func48: TtkTokenKind;
begin
if KeyComp('MERGE') then Result := tkKey else
if KeyComp('DECLARE') then Result := tkKey else
if KeyComp('JOIN') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func49: TtkTokenKind;
begin
if KeyComp('SCHEMA') then Result := tkKey else
if KeyComp('ESCAPE') then Result := tkKey else
if KeyComp('NOT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func50: TtkTokenKind;
begin
if KeyComp('AFTER') then Result := tkKey else
if KeyComp('WHEN') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func51: TtkTokenKind;
begin
if KeyComp('DELETE') then Result := tkKey else
if KeyComp('FULL') then Result := tkKey else
if KeyComp('BEFORE') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func52: TtkTokenKind;
begin
if KeyComp('FROM') then Result := tkKey else
if KeyComp('SOME') then Result := tkKey else
if KeyComp('CREATE') then Result := tkKey else
if KeyComp('NAMES') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func53: TtkTokenKind;
begin
if KeyComp('DROP') then Result := tkKey else
if KeyComp('WAIT') then Result := tkKey else
if KeyComp('DATABASE') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func55: TtkTokenKind;
begin
if KeyComp('SHARED') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func56: TtkTokenKind;
begin
if KeyComp('DOMAIN') then Result := tkKey else
if KeyComp('INDEX') then Result := tkKey else
if KeyComp('LEVEL') then Result := tkKey else
if KeyComp('ALTER') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func57: TtkTokenKind;
begin
if KeyComp('WHILE') then Result := tkKey else
if KeyComp('AUTO') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func58: TtkTokenKind;
begin
if KeyComp('INTO') then Result := tkKey else
if KeyComp('EXIT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func59: TtkTokenKind;
begin
if KeyComp('VIEW') then Result := tkKey else
if KeyComp('NULL') then Result := tkKey else
if KeyComp('WHERE') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func60: TtkTokenKind;
begin
if KeyComp('ACTIVE') then Result := tkKey else
if KeyComp('ORDER') then Result := tkKey else
if KeyComp('BASE_NAME') then Result := tkKey else
if KeyComp('GRANT') then Result := tkKey else
if KeyComp('INNER') then Result := tkKey else
if KeyComp('WITH') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func61: TtkTokenKind;
begin
if KeyComp('HAVING') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func62: TtkTokenKind;
begin
if KeyComp('RIGHT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func63: TtkTokenKind;
begin
if KeyComp('USER') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func64: TtkTokenKind;
begin
if KeyComp('SELECT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func66: TtkTokenKind;
begin
if KeyComp('ONLY') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func67: TtkTokenKind;
begin
if KeyComp('RETAIN') then Result := tkKey else
if KeyComp('UPDATE') then Result := tkKey else
if KeyComp('WORK') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func69: TtkTokenKind;
begin
if KeyComp('DEFAULT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func70: TtkTokenKind;
begin
if KeyComp('FILTER') then Result := tkKey else
if KeyComp('SHADOW') then Result := tkKey else
if KeyComp('USING') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func73: TtkTokenKind;
begin
if KeyComp('UNION') then Result := tkKey else
if KeyComp('COUNT') then Result := tkKey else
if KeyComp('COMMIT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func74: TtkTokenKind;
begin
if KeyComp('ROLLBACK') then Result := tkKey else
if KeyComp('BETWEEN') then Result := tkKey else
if KeyComp('FOREIGN') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func76: TtkTokenKind;
begin
if KeyComp('ASCENDING') then Result := tkKey else
if KeyComp('REVOKE') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func77: TtkTokenKind;
begin
if KeyComp('GROUP') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func78: TtkTokenKind;
begin
if KeyComp('COLUMN') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func79: TtkTokenKind;
begin
if KeyComp('OUTER') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func83: TtkTokenKind;
begin
if KeyComp('EXECUTE') then Result := tkKey else
if KeyComp('INACTIVE') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func84: TtkTokenKind;
begin
if KeyComp('DESCENDING') then Result := tkKey else
if KeyComp('TRIGGER') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func85: TtkTokenKind;
begin
if KeyComp('INSERT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func87: TtkTokenKind;
begin
if KeyComp('UNIQUE') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func91: TtkTokenKind;
begin
if KeyComp('EXTRACT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func94: TtkTokenKind;
begin
if KeyComp('CURSOR') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func96: TtkTokenKind;
begin
if KeyComp('EXISTS') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func97: TtkTokenKind;
begin
if KeyComp('PARAMETER') then Result := tkKey else
if KeyComp('COMPUTED') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func98: TtkTokenKind;
begin
if KeyComp('DISTINCT') then Result := tkKey else
if KeyComp('SUSPEND') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func99: TtkTokenKind;
begin
if KeyComp('EXTERNAL') then Result := tkKey else
if KeyComp('CURRENT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func100: TtkTokenKind;
begin
if KeyComp('PRIMARY') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func102: TtkTokenKind;
begin
if KeyComp('FUNCTION') then Result := tkKey else
if KeyComp('COMMITTED') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func103: TtkTokenKind;
begin
if KeyComp('GENERATOR') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func105: TtkTokenKind;
begin
if KeyComp('PROCEDURE') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func106: TtkTokenKind;
begin
if KeyComp('CONTAINING') then Result := tkKey else
if KeyComp('PROTECTED') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func111: TtkTokenKind;
begin
if KeyComp('EXCEPTION') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func112: TtkTokenKind;
begin
if KeyComp('SNAPSHOT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func114: TtkTokenKind;
begin
if KeyComp('ISOLATION') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func115: TtkTokenKind;
begin
if KeyComp('PASSWORD') then Result := tkKey else
if KeyComp('RETURNS') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func116: TtkTokenKind;
begin
if KeyComp('CONDITIONAL') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func117: TtkTokenKind;
begin
if KeyComp('POSITION') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func122: TtkTokenKind;
begin
if KeyComp('PRIVILEGES') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func133: TtkTokenKind;
begin
if KeyComp('CONSTRAINT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func134: TtkTokenKind;
begin
if KeyComp('TRANSACTION') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func137: TtkTokenKind;
begin
if KeyComp('UNCOMMITTED') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.Func156: TtkTokenKind;
begin
if KeyComp('ENTRY_POINT') then Result := tkKey else Result := tkIdentifier;
end;
function TpsvSQLRTF.AltFunc: TtkTokenKind;
begin
Result := tkIdentifier;
end;
function TpsvSQLRTF.IdentKind(MayBe: PChar): TtkTokenKind;
var
HashKey: Integer;
begin
fToIdent := MayBe;
HashKey := KeyHash(MayBe);
if HashKey < 157 then Result := fIdentFuncTable[HashKey] else Result := tkIdentifier;
end;
procedure TpsvSQLRTF.MakeMethodTables;
var
I: Char;
begin
for I := #0 to #255 do
case I of
'&': fProcTable[I] := AndSymbolProc;
'\': fProcTable[I] := BackslashProc;
#13: fProcTable[I] := CRProc;
':': fProcTable[I] := ColonProc;
',': fProcTable[I] := CommaProc;
'#': fProcTable[I] := CommentProc;
'=': fProcTable[I] := EqualProc;
'>': fProcTable[I] := GreaterProc;
'A'..'Z', 'a'..'z', '_': fProcTable[I] := IdentProc;
#10: fProcTable[I] := LFProc;
'<': fProcTable[I] := LowerProc;
'-': fProcTable[I] := MinusProc;
#0: fProcTable[I] := NullProc;
'0'..'9', '.': fProcTable[I] := NumberProc;
'|': fProcTable[I] := OrSymbolProc;
'+': fProcTable[I] := PlusProc;
'?': fProcTable[I] := QuestionProc;
')': fProcTable[I] := RoundCloseProc;
'(': fProcTable[I] := RoundOpenProc;
';': fProcTable[I] := SemiColonProc;
'/': fProcTable[I] := SlashProc;
#1..#9, #11, #12, #14..#32: fProcTable[I] := SpaceProc;
']': fProcTable[I] := SquareCloseProc;
'[': fProcTable[I] := SquareOpenProc;
'*': fProcTable[I] := StarProc;
#34: fProcTable[I] := StringInterpProc;
#39: fProcTable[I] := StringLiteralProc;
'^': fProcTable[I] := XOrSymbolProc;
else fProcTable[I] := UnknownProc;
end;
end;
constructor TpsvSQLRTF.Create;
begin
inherited Create;
InitIdent;
MakeMethodTables;
CreateColorTable([clNavy, clBlack, clBlack, clBlack, clBlack, clBlue, clBlack]);
end; { Create }
procedure TpsvSQLRTF.SetLine(NewValue : string; LineNumber : Integer);
begin
fLine := PChar(NewValue);
Run := 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -