⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 synhighlighterdml.pas

📁 用delphi写的delphi源代码 用delphi写的delphi源代码 用delphi写的delphi源代码 用delphi写的delphi源代码
💻 PAS
📖 第 1 页 / 共 4 页
字号:
  fIdentFuncTable[156] := Func156;
  fIdentFuncTable[157] := Func157;
  fIdentFuncTable[163] := Func163;
  fIdentFuncTable[164] := Func164;
  fIdentFuncTable[166] := Func166;
  fIdentFuncTable[169] := Func169;
  fIdentFuncTable[173] := Func173;
  fIdentFuncTable[174] := Func174;
  fIdentFuncTable[175] := Func175;
  fIdentFuncTable[176] := Func176;
  fIdentFuncTable[178] := Func178;
  fIdentFuncTable[179] := Func179;
  fIdentFuncTable[182] := Func182;
  fIdentFuncTable[183] := Func183;
  fIdentFuncTable[184] := Func184;
  fIdentFuncTable[185] := Func185;
  fIdentFuncTable[187] := Func187;
  fIdentFuncTable[188] := Func188;
  fIdentFuncTable[203] := Func203;
  fIdentFuncTable[206] := Func206;
  fIdentFuncTable[216] := Func216;
  fIdentFuncTable[219] := Func219;
  fIdentFuncTable[221] := Func221;
  fIdentFuncTable[232] := Func232;
  fIdentFuncTable[234] := Func234;
  fIdentFuncTable[235] := Func235;
  fIdentFuncTable[243] := Func243;
  fIdentFuncTable[244] := Func244;
  fIdentFuncTable[255] := Func255;
  fIdentFuncTable[313] := Func313;
  fIdentFuncTable[327] := Func327;
end;

function TSynDmlSyn.IsQuali: boolean;
begin
  Result:= False;
  if Run > 0 then
    if fLine[Run-1]= '/' then Result:= True;
end;

function TSynDmlSyn.IsSpecial: boolean;
begin
  Result:= False;
  if Run > 0 then
    if fLine[Run-1]= '%' then Result:= True;
end;

function TSynDmlSyn.KeyHash(ToHash: PChar): Integer;
begin
  Result := 0;
  while ToHash^ in ['a'..'z', 'A'..'Z', '_'] do
  begin
    inc(Result, mHashTable[ToHash^]);
    inc(ToHash);
  end;
  if ToHash^ in ['_', '0'..'9'] then inc(ToHash);
  fStringLen := ToHash - fToIdent;
end; { KeyHash }

function TSynDmlSyn.KeyComp(const aKey: String): Boolean;
var
  I: Integer;
begin
  Temp := fToIdent;
  if Length(aKey) = fStringLen then
  begin
    Result := True;
    for i := 1 to fStringLen do
    begin
      if mHashTable[Temp^] <> mHashTable[aKey[i]] then
      begin
        Result := False;
        break;
      end;
      inc(Temp);
    end;
  end else Result := False;
end; { KeyComp }

function TSynDmlSyn.Func9: TtkTokenKind;
begin
  if KeyComp('Add') then
  begin
    if IsSpecial then Result := tkSpecial
    else begin
      Result := tkKey;
      fRange := rsAdd;
    end;
  end else
    Result := tkIdentifier;
end;

function TSynDmlSyn.Func15: TtkTokenKind;
begin
  if KeyComp('If') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func17: TtkTokenKind;
begin
  if KeyComp('Back') and IsQuali then Result := tkQualifier else
    Result := tkIdentifier;
end;

function TSynDmlSyn.Func19: TtkTokenKind;
begin
  if KeyComp('Dcl') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func22: TtkTokenKind;
begin
  if KeyComp('Abs') then Result := tkFunction else Result := tkIdentifier;
end;

function TSynDmlSyn.Func23: TtkTokenKind;
begin
  if KeyComp('In') and (fRange = rsFind) then
  begin
    Result := tkKey;
    fRange:= rsUnKnown;
  end else Result := tkIdentifier;
end;

function TSynDmlSyn.Func24: TtkTokenKind;
begin
  if KeyComp('Cli') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func26: TtkTokenKind;
begin
  if KeyComp('Mid') then Result := tkFunction else Result := tkIdentifier;
end;

function TSynDmlSyn.Func27: TtkTokenKind;
begin
  if KeyComp('Base') and IsQuali then Result := tkQualifier else
    Result := tkIdentifier;
end;

function TSynDmlSyn.Func28: TtkTokenKind;
begin
  if KeyComp('Tag') and IsQuali then Result := tkQualifier else
    if KeyComp('Case') then Result := tkKey else
      if KeyComp('Call') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func29: TtkTokenKind;
begin
  if KeyComp('Chr') then Result := tkFunction else
    if KeyComp('Ceil') then Result := tkFunction else Result := tkIdentifier;
end;

function TSynDmlSyn.Func30: TtkTokenKind;
begin
  if KeyComp('Check') and IsQuali then Result := tkQualifier else
    if KeyComp('Col') then begin
      if IsQuali then Result := tkQualifier else
        if IsSpecial then Result := tkSpecial else Result := tkIdentifier;
    end else
      if KeyComp('Date') then Result := tkFunction else Result := tkIdentifier;
end;

function TSynDmlSyn.Func31: TtkTokenKind;
begin
  if KeyComp('Len') then begin
    if IsQuali then Result := tkQualifier else Result := tkFunction;
  end else
    if KeyComp('Dir') then Result := tkKey else
      if KeyComp('Bell') and IsQuali then Result := tkQualifier else
        Result := tkIdentifier;
end;

function TSynDmlSyn.Func32: TtkTokenKind;
begin
  if KeyComp('Mod') then Result := tkFunction else
    if KeyComp('Load') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func33: TtkTokenKind;
begin
  if KeyComp('Find') then
  begin
    Result := tkKey;
    fRange := rsFind;
  end else Result := tkIdentifier;
end;

function TSynDmlSyn.Func34: TtkTokenKind;
begin
  if KeyComp('Log') then begin
    if IsQuali then Result := tkQualifier else Result := tkFunction;
  end else if KeyComp('Batch') and IsQuali then Result := tkQualifier else
    if KeyComp('Log10') then Result := tkFunction else
      Result := tkIdentifier;
end;

function TSynDmlSyn.Func35: TtkTokenKind;
begin
  if KeyComp('Tan') then Result := tkFunction else
    if KeyComp('To') and (fRange=rsAdd) then
    begin
      Result := tkKey;
      fRange := rsUnKnown;
    end else
      if KeyComp('Mail') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func36: TtkTokenKind;
begin
  if KeyComp('Atan2') then Result := tkFunction else
    if KeyComp('Atan') then Result := tkFunction else Result := tkIdentifier;
end;

function TSynDmlSyn.Func37: TtkTokenKind;
begin
  if KeyComp('Break') and IsQuali then Result := tkQualifier else
    if KeyComp('Break0') and IsQuali then Result := tkQualifier else
      if KeyComp('Cos') then Result := tkFunction else Result := tkIdentifier;
end;

function TSynDmlSyn.Func38: TtkTokenKind;
begin
  if KeyComp('Acos') then Result := tkFunction else
    if KeyComp('Edit') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func40: TtkTokenKind;
begin
  if KeyComp('Line') then Result := tkKey else
    if KeyComp('Table') and IsQuali then Result := tkQualifier else
      Result := tkIdentifier;
end;

function TSynDmlSyn.Func41: TtkTokenKind;
begin
  if KeyComp('Else') then Result := tkKey else
    if KeyComp('Lock') and IsQuali then Result := tkQualifier else
      if KeyComp('Ascii') then Result := tkFunction else Result := tkIdentifier;
end;

function TSynDmlSyn.Func42: TtkTokenKind;
begin
  if KeyComp('Send') then Result := tkKey else
    if KeyComp('Sin') then Result := tkFunction else
      if KeyComp('New') and IsQuali then Result := tkQualifier else
        if KeyComp('Fetch') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func43: TtkTokenKind;
begin
  if KeyComp('Asin') then Result := tkFunction else
    if KeyComp('Int') then Result := tkFunction else
      if KeyComp('Left') then Result := tkFunction else
        if KeyComp('Tanh') then Result := tkFunction else
          Result := tkIdentifier;
end;

function TSynDmlSyn.Func45: TtkTokenKind;
begin
  if KeyComp('Cosh') then Result := tkFunction else Result := tkIdentifier;
end;

function TSynDmlSyn.Func47: TtkTokenKind;
begin
  if KeyComp('Item') and IsQuali then Result := tkQualifier else
    Result := tkIdentifier;
end;

function TSynDmlSyn.Func48: TtkTokenKind;
begin
  if KeyComp('Heading') and IsQuali then Result := tkQualifier else
    if KeyComp('Erase') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func49: TtkTokenKind;
begin
  if KeyComp('Days') then Result := tkFunction else
    if KeyComp('Lov') and IsQuali then Result := tkQualifier else
      Result := tkIdentifier;
end;

function TSynDmlSyn.Func50: TtkTokenKind;
begin
  if KeyComp('Pos') and IsQuali then Result := tkQualifier else
    if KeyComp('Sinh') then Result := tkFunction else
      if KeyComp('Open') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func51: TtkTokenKind;
begin
  if KeyComp('Files') then Result := tkKey else
    if KeyComp('Opt') and IsQuali then Result := tkQualifier else
      if KeyComp('Delete') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func52: TtkTokenKind;
begin
  if KeyComp('Form') then begin
    if IsSpecial then Result := tkSpecial else Result := tkForm;
  end else
    Result := tkIdentifier;
end;

function TSynDmlSyn.Func53: TtkTokenKind;
begin
  if KeyComp('Wait') and IsQuali then Result := tkQualifier else
    if KeyComp('Menu') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func54: TtkTokenKind;
begin
  if KeyComp('Close') then Result := tkKey else
    if KeyComp('Search') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func56: TtkTokenKind;
begin
  if KeyComp('Domain') and IsQuali then Result := tkQualifier else
    if KeyComp('Row') and IsQuali then Result := tkQualifier else
      if KeyComp('Row') and IsSpecial then Result := tkSpecial else
        Result := tkIdentifier;
end;

function TSynDmlSyn.Func57: TtkTokenKind;
begin
  if KeyComp('While') then Result := tkKey else
    if KeyComp('Height') and IsQuali then Result := tkQualifier else
      if KeyComp('Goto') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func58: TtkTokenKind;
begin
  if KeyComp('Exit') and IsQuali then Result := tkQualifier else
    if KeyComp('Exit') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func60: TtkTokenKind;
begin
  if KeyComp('List') then Result := tkKey else
    if KeyComp('With') and IsQuali then Result := tkQualifier else
      if KeyComp('Trim') then Result := tkFunction else
        if KeyComp('Nobell') and IsQuali then Result := tkFunction else
          if KeyComp('Lheading') and IsQuali then Result := tkQualifier else
            if KeyComp('Remain') and IsQuali then Result := tkQualifier else
              Result := tkIdentifier;
end;

function TSynDmlSyn.Func62: TtkTokenKind;
begin
  if KeyComp('Right') then Result := tkFunction else
    if KeyComp('Pause') and IsQuali then Result := tkQualifier else
      Result := tkIdentifier;
end;

function TSynDmlSyn.Func64: TtkTokenKind;
begin
  if KeyComp('Width') and IsQuali then Result := tkQualifier else
    if KeyComp('Expand') then Result := tkFunction else Result := tkIdentifier;
end;

function TSynDmlSyn.Func65: TtkTokenKind;
begin
  if KeyComp('Finish') then Result := tkKey else
    if KeyComp('Release') then Result := tkKey else
      if KeyComp('Random') then Result := tkKey else
        if KeyComp('Repeat') then begin
          if IsQuali then Result := tkQualifier else Result := tkKey;
        end else
          Result := tkIdentifier;
end;

function TSynDmlSyn.Func66: TtkTokenKind;
begin
  if KeyComp('Rheading') and IsQuali then Result := tkQualifier else
    if KeyComp('Floor') then Result := tkKey else
      if KeyComp('Title') then begin
        if IsQuali then Result := tkQualifier else Result := tkKey;
      end else
        Result := tkIdentifier;
end;

function TSynDmlSyn.Func67: TtkTokenKind;
begin
  if KeyComp('Unload') then Result := tkKey else
    if KeyComp('Receive') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func68: TtkTokenKind;
begin
  if KeyComp('Total') and IsQuali then Result := tkQualifier else
    Result := tkIdentifier;
end;

function TSynDmlSyn.Func69: TtkTokenKind;
begin
  if KeyComp('Message') then Result := tkKey else
    if KeyComp('End_if') then Result := tkKey else
      if KeyComp('Text') then begin
        if IsSpecial then Result := tkSpecial else Result := tkKey;
      end else if KeyComp('End_if') then Result := tkKey else
        Result := tkIdentifier;
end;

function TSynDmlSyn.Func70: TtkTokenKind;
begin
  if KeyComp('Using') and IsQuali then Result := tkQualifier else
    Result := tkIdentifier;
end;

function TSynDmlSyn.Func71: TtkTokenKind;
begin
  if KeyComp('Target') and IsQuali then Result := tkQualifier else
    Result := tkIdentifier;
end;

function TSynDmlSyn.Func72: TtkTokenKind;
begin
  if KeyComp('First') and IsQuali then Result := tkQualifier else
    if KeyComp('Failure') then begin
      if IsQuali then Result := tkQualifier else
        if IsSpecial then Result := tkSpecial else Result := tkIdentifier;
    end else
      if KeyComp('Ltrim') then Result := tkFunction else
        if KeyComp('Round') then Result := tkFunction else
          Result := tkIdentifier;
end;

function TSynDmlSyn.Func73: TtkTokenKind;
begin
  if KeyComp('Commit') then Result := tkKey else
    if KeyComp('Compile') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func74: TtkTokenKind;
begin
  if KeyComp('Sqrt') then Result := tkFunction else
    if KeyComp('Error') then begin
      if IsQuali then Result := tkQualifier else Result := tkKey;
    end else
      if KeyComp('Rollback') then Result := tkKey else
        if KeyComp('Connect') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func75: TtkTokenKind;
begin
  if KeyComp('Generate') then Result := tkKey else
    if KeyComp('Write') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func76: TtkTokenKind;
begin
  if KeyComp('Invoke') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func77: TtkTokenKind;
begin
  if KeyComp('Noerase') and IsQuali then Result := tkQualifier else
   if KeyComp('Noheading') and IsQuali then Result := tkQualifier else
    if KeyComp('Account') and IsSpecial then Result := tkSpecial else
      if KeyComp('Print') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func78: TtkTokenKind;
begin
  if KeyComp('Confirm') then Result := tkKey else Result := tkIdentifier;
end;

function TSynDmlSyn.Func79: TtkTokenKind;
begin

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -