亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? searchfile.pas

?? Delphi編寫的一個支持語法高亮顯示和很多語言的文本編輯器
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
                  Inc(FBufferSearchPos);
                BLine[LPos] := #0;
                Inc(LPos);
                Break;
              end
              else
                if not (FCurlyCommentActive or FStarCommentActive) then
                  UseChar := True;
          end
          else
            UseChar := True;
        '{':
          if FNoComments and not FStarCommentActive then
            FCurlyCommentActive := True
          else
            if not (FCurlyCommentActive or FStarCommentActive) then
              UseChar := True;
        '}':
          if FNoComments and not FStarCommentActive then
            FCurlyCommentActive := False
          else
            if not (FCurlyCommentActive or FStarCommentActive) then
              UseChar := true;
      else
        if not (FCurlyCommentActive or FStarCommentActive) then
          UseChar := True;
      end;
      if UseChar then
      begin
        if not (soCaseSensitive in SearchOptions) then
          BLine[LPos] := LoCase(FSearchBuffer[i])
        else
          BLine[LPos] := FSearchBuffer[i];
        Inc(LPos);
        if LPos >= 1023 then //! StH: 1023 somehow related to the 1024 StrAlloc of BLine? What for?
          Exit; { Binary not text file }
      end;
    end;
    if FSearchBuffer[i] <> #0 then Inc(FLineNo);
    BLine[LPos] := #0;
    if BLine[0] <> #0 then PatternMatch;
    LPos := 0;
    if FBufferSearchPos < i then FBufferSearchPos := i;
  end;
end;

procedure TSearcher.SetBufSize(New: Integer);
begin
  if (FSearchBuffer = nil) and (New <> FBufSize) then
    FBufSize := New;
end;

(*
function TSearcher.GetLineCount: Integer;
begin
  if FMode = mmModule then
    Result := EditIntF.LinesInBuffer
  else
    Result := -1;
end;
*)

procedure TSearcher.SetPattern(const Source: string);
var
  PatternCharIndex: Integer;
  SourceCharIndex: Integer;

  procedure Store(Ch: Char);
  begin
    Assert(PatternCharIndex < GrepPatternSize, 'Buffer overrun!');
    if not (soCaseSensitive in SearchOptions) then
      FPattern[PatternCharIndex] := LoCase(Ch)
    else
      FPattern[PatternCharIndex] := Ch;
    Inc(PatternCharIndex);
  end;

  procedure cclass;
  resourcestring
    SClassNotTerminated = 'Class at %d did not terminate properly';
  var
    cstart: Integer;
  begin
    cstart := SourceCharIndex;
    Inc(SourceCharIndex);
    if Source[SourceCharIndex] = '^' then
      Store(Char(opNCLASS))
    else
      Store(Char(opCLASS));

    { changed: 10/22 1998 by dg, more info: see bottom }
    while (SourceCharIndex <= Length(Source)) and (Source[SourceCharIndex] <> ']') do
    begin
      if (Source[SourceCharIndex] = '-') and
        (SourceCharIndex - cstart > 1) and
        (Source[SourceCharIndex + 1] <> ']') and
        (SourceCharIndex < Length(Source)) then
      begin
        Dec(PatternCharIndex, 2);
        Store(Char(opRANGE));
        Store(Source[SourceCharIndex - 1]);
        Store(Source[SourceCharIndex + 1]);
        Inc(SourceCharIndex, 2);
      end
      else
      begin
        Store(Source[SourceCharIndex]);
        Inc(SourceCharIndex);
      end;
    end;

    if (Source[SourceCharIndex] <> ']') or (SourceCharIndex > Length(Source)) then
      raise Exception.CreateFmt(SClassNotTerminated, [cstart]);

    Inc(SourceCharIndex); { To push past close bracket }
  end;

resourcestring
  SPatternTooLong = 'Grep pattern too long. (> 500 characters)';
  SInvalidGrepSearchCriteria = 'Character immediately following: at %d is not a valid grep search criteria';
  SSenselessEscape = 'Escape character ("\") without a following character does not make sense';
begin
  //! Warning: this does not properly protect against pattern overruns
  // A better solution needs to be found for this, possibly by sacrificing
  // a bit of performance for a test in the pattern storage code where a
  // new Assert has been introduced.
  if Length(Source) > 500 then
    raise Exception.Create(SPatternTooLong);

  try
    SourceCharIndex := 1;
    PatternCharIndex := 0;
    while SourceCharIndex <= Length(Source) do
    begin
      if not (soRegEx in SearchOptions) then
      begin
        Store(Char(opCHAR));
        Store(Source[SourceCharIndex]);
        Inc(SourceCharIndex);
      end
      else
      begin
(*
      if (Source[SourceCharIndex]='*') or (Source[SourceCharIndex]='+') or (Source[SourceCharIndex]='-') then
      if (SourceCharIndex=1) or
         ((PatternCharIndex>1) and (  (PBuf[lp-1]=char(opBOL)) or
                        (PBuf[PatternCharIndex-1]=char(opEOL)) or
                        (PBuf[PatternCharIndex-1]=char(opSTAR)) or
                        (PBuf[PatternCharIndex-1]=char(opPLUS)) or
                        (PBuf[PatternCharIndex-1]=char(opMINUS)))) then
         begin
         Store(Char(opENDPAT));
         Raise Exception.Create('Bad pattern at character '+intToStr(SourceCharIndex));
         end;
*)
        case Source[SourceCharIndex] of
          '^':
            begin
              Store(Char(opBOL));
              Inc(SourceCharIndex);
            end;

          '$':
            begin
              Store(Char(opEOL));
              Inc(SourceCharIndex);
            end;

          '.':
            begin
              Store(Char(opANY));
              Inc(SourceCharIndex);
            end;

          '[':
            cclass;

          ':':
            begin
              if SourceCharIndex < Length(Source) then
              begin
                case UpCase(Source[SourceCharIndex + 1]) of
                  'A': Store(Char(opALPHA));
                  'D': Store(Char(opDIGIT));
                  'N': Store(Char(opNALPHA));
                  ' ': Store(Char(opPUNCT));
                else
                  Store(Char(opENDPAT));
                  //! ????? Store followed by Exception?
                  raise Exception.CreateFmt(SInvalidGrepSearchCriteria, [SourceCharIndex]);
                end;
                Inc(SourceCharIndex, 2);
              end
              else
              begin
                Store(Char(opCHAR));
                Store(Source[SourceCharIndex]);
                Inc(SourceCharIndex);
              end;
            end;

          '\':
            begin { changed: 10/22 1998 by dg, more info: see bottom }
              if SourceCharIndex >= Length(Source) then
                raise Exception.Create(SSenselessEscape);

              Store(Char(opCHAR));
              Store(Source[SourceCharIndex + 1]);
              Inc(SourceCharIndex, 2);
            end;
        else
          Store(Char(opCHAR));
          Store(Source[SourceCharIndex]);
          Inc(SourceCharIndex);
        end; // case
      end;
    end;
  finally
    Store(Char(opENDPAT));
    Store(#0);
  end;
end;

procedure TSearcher.PatternMatch;
var
  l, p: Integer; // line and pattern pointers
//e: Integer;     // End for STAR and PLUS match
  op: Char; // Pattern operation
//n: Integer;     // Class Counter
//are: String;    // Start of STAR match
  linepos: Integer;

  procedure IsFound;
  var
    S: Integer;
    E: Integer;
  begin
    { TODO -oStefan -cIssue : Note that this algorithm will identify  "GX_GExperts" as a word for "GExperts" }
    if soWholeWord in SearchOptions then
    begin
      S := linepos - 2;
      E := l;
      if (S > 0) and IsCharAlpha(BLine[S]) then
        Exit;
      if (BLine[E] <> #0) and IsCharAlpha(BLine[E]) then
        Exit;
    end;
    if Assigned(FOnFound) then
      FOnFound(Self, FLineNo, BLine, linepos, l);
  end;

begin
  if FPattern[0] = Char(opENDPAT) then
    Exit;
  linepos := 0;

  { Don't bother pattern matching if first search is opCHAR, just go to first match directly }
  { Results in about a 5% to 10% speed increase }
  if (FPattern[0] = Char(opCHAR)) and not (soCaseSensitive in SearchOptions) then
    while (FPattern[1] <> BLine[linepos]) and (BLine[linepos] <> #0) do
      Inc(Linepos);

  while BLine[linepos] <> #0 do
  begin
    l := linepos;
    p := 0;
    op := FPattern[p];
    while op <> Char(opENDPAT) do
    begin
      case Ord(op) of
        opCHAR:
          begin
            if not (Bline[l] = FPattern[p + 1]) then
              Break;
            Inc(p, 2);
          end;

        opBOL:
          begin
            Inc(p);
          end;

        opEOL:
          begin
            if BLine[l] in [#0, #10, #13] then
              Inc(p)
            else
              Break;
          end;

        opANY:
          begin
            if BLine[l] in [#0, #10, #13] then
              Break;
            Inc(p);
          end;

        opCLASS:
          begin
            Inc(p);
            { Compare letters to find a match }
            while (FPattern[p] > LastPatternChar) and (FPattern[p] <> Bline[l]) do
              Inc(p);
            { Was a match found? }
            if FPattern[p] <= LastPatternChar then
              Break;
            { move pattern pointer to next opcode }
            while FPattern[p] > LastPatternChar do
              Inc(p);
          end;

        opNCLASS:
          begin
            Inc(p);
            { Compare letters to find a match }
            while (FPattern[p] > LastPatternChar) and (FPattern[p] <> Bline[l]) do
              Inc(p);
            if FPattern[p] > LastPatternChar then
              Break;
          end;

        opALPHA:
          begin
            if not IsCharAlpha(BLine[l]) then
              Break;
            Inc(p);
          end;

        opDIGIT:
          begin
            if not (BLine[l] in ['0'..'9']) then
              Break;
            Inc(p);
          end;

        opNALPHA:
          begin
            //! StH: Is the second part of the clause correct?
            // This appears to be a test for alphanumerics - if it is, then
            // the clause is incorrect and should be
            //        if IsCharAlphaNumeric(BLine[l]) then
            if IsCharAlpha(BLine[l]) or ((BLine[l] < '0') or (BLine[l] > '9')) then
              Inc(p)
            else
              Break;
          end;

        opPUNCT:
          begin
            if (BLine[l] = ' ') or (BLine[l] > #64) then
              Break;
            Inc(p);
          end;

        opRANGE:
          begin
            if (BLine[l] < FPattern[p + 1]) or (BLine[l] > FPattern[p + 2]) then
              Break;
            Inc(p, 3);
          end;
      else
        Inc(p);
      end; { case }

      if (op = Char(opBOL)) and not (BLine[l] in [#9, #32]) then
        Exit; { Means that we did not match at start }

      op := FPattern[p];
      Inc(l);
    end; { while op <> opENDPAT }
    Inc(LinePos);
    if op = Char(opENDPAT) then
      IsFound;
  end; { while BLine[LinePos] <> #0 }
end;

{
change notes:

changed made by dg (dgerhard@bigfoot.com) @ 22/10 1998:

1) '\'-behaviour: changed to standard grep style
new meaning: any character following '\' is treated as a normal character (= is being quoted).
Only exception: inside classes (see next remark).
examples:
 search for a '[': -> searchstring = '\[',
 search for a '\' -> searchstring = '\\',
 search for '\\' -> searchstring = '\\\\'.

2) removed '\'-treatment in classes ([...]) because it didn't work anyway and excape-functionality inside
of classes is very seldomly useful.
btw.: other grep implementations dont's treat '\' as escape-character in classes, too :-)
}

end.


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91女神在线视频| 国产91在线观看丝袜| 欧美日韩黄色一区二区| 亚洲尤物视频在线| 欧美精品 日韩| 六月丁香婷婷色狠狠久久| 日韩精品中文字幕在线一区| 国产一区二区中文字幕| 欧美国产日韩精品免费观看| 91在线观看免费视频| 亚洲高清不卡在线观看| 欧美一区二区三区在| 国产成人av一区| 一区二区三区四区不卡在线| 欧美精品v日韩精品v韩国精品v| 蜜臀精品一区二区三区在线观看 | 久久网站最新地址| 成人黄色综合网站| 亚洲国产欧美另类丝袜| 欧美电影免费观看高清完整版 | 日韩高清国产一区在线| 久久久精品人体av艺术| 一本久道中文字幕精品亚洲嫩| 亚洲成在人线在线播放| 精品理论电影在线| 日本道精品一区二区三区 | 一区二区在线观看av| 91麻豆精品国产91久久久久久| 成人做爰69片免费看网站| 爽好久久久欧美精品| 中文字幕国产精品一区二区| 欧美日韩精品一二三区| 丁香激情综合五月| 日韩av在线发布| 亚洲男女一区二区三区| 久久天堂av综合合色蜜桃网| 91久久精品午夜一区二区| 国产精品一卡二卡在线观看| 亚洲国产三级在线| 亚洲欧美综合另类在线卡通| 欧美成va人片在线观看| 欧美日韩一区二区三区四区| 成人黄色在线看| 久久成人久久爱| 亚洲一二三四区不卡| 欧美激情一区二区三区全黄| 精品日本一线二线三线不卡| 欧美日韩国产欧美日美国产精品| av一区二区三区在线| 国产乱人伦偷精品视频不卡| 男男成人高潮片免费网站| 亚洲免费在线电影| 国产精品沙发午睡系列990531| 欧美一级黄色片| 欧美精品亚洲一区二区在线播放| 99久久er热在这里只有精品15| 国产精品2024| 国产精品资源在线看| 乱一区二区av| 麻豆国产一区二区| 亚洲成a人片在线观看中文| 一区二区三区免费看视频| 国产精品国产三级国产a| 国产欧美一区二区三区在线看蜜臀| 欧美一区二区二区| 日韩一卡二卡三卡国产欧美| 欧美日韩久久久一区| 欧美在线免费播放| 欧美亚洲国产怡红院影院| 在线观看国产日韩| 在线中文字幕一区二区| 色综合久久中文字幕综合网| 99国产精品视频免费观看| 99久久精品国产毛片| av电影在线观看不卡| 99久久精品99国产精品| 一本久久综合亚洲鲁鲁五月天| 波多野结衣亚洲一区| 99精品桃花视频在线观看| 91丨九色丨尤物| 91国内精品野花午夜精品| 欧美日韩精品三区| 91精品久久久久久久99蜜桃| 91精品国产综合久久久蜜臀图片| 欧美日韩精品综合在线| 欧美一级欧美一级在线播放| 日韩精品中文字幕在线不卡尤物| 亚洲精品在线电影| 国产欧美日本一区二区三区| 国产精品久久久久久亚洲伦| 亚洲精选视频免费看| 亚瑟在线精品视频| 美女国产一区二区三区| 风流少妇一区二区| 色综合久久久久| 欧美一区二区三区免费观看视频| 欧美成人猛片aaaaaaa| 亚洲国产经典视频| 亚洲午夜久久久久久久久久久| 日韩精品免费视频人成| 国产中文字幕精品| 9i在线看片成人免费| 91久久精品一区二区二区| 91精品国产91久久综合桃花| 久久久噜噜噜久久中文字幕色伊伊 | 青青草原综合久久大伊人精品优势 | 欧美日韩不卡视频| 久久人人超碰精品| 亚洲免费观看高清完整版在线观看熊| 亚洲国产wwwccc36天堂| 韩国欧美国产1区| 99久久久免费精品国产一区二区| 欧美日韩午夜在线| 久久久久久综合| 一区二区三区四区五区视频在线观看| 免费观看日韩av| 高清av一区二区| 欧美巨大另类极品videosbest | 亚洲一区二区在线播放相泽| 美女视频网站黄色亚洲| 91蝌蚪porny| 欧美va日韩va| 亚洲曰韩产成在线| 成人污视频在线观看| 精品视频999| 国产精品午夜电影| 三级成人在线视频| 91在线国产福利| 久久久久亚洲蜜桃| 日本午夜一区二区| 欧美在线视频全部完| 国产精品视频免费看| 激情伊人五月天久久综合| 91九色02白丝porn| 欧美国产在线观看| 黄色小说综合网站| 7799精品视频| 亚洲综合视频网| 成人久久视频在线观看| 精品国产一区二区三区不卡 | 国产综合色在线| 3d动漫精品啪啪一区二区竹菊| 欧美高清在线视频| 精品无码三级在线观看视频| 欧美一区二区三区四区久久| 亚洲精品欧美综合四区| 成人自拍视频在线观看| 久久久久久久久久久黄色| 久久精品免费观看| 51精品国自产在线| 亚洲国产sm捆绑调教视频| 在线观看国产精品网站| 中文字幕日韩一区| 成人免费av网站| 国产欧美在线观看一区| 国产在线播放一区三区四| 日韩三级精品电影久久久| 午夜视频在线观看一区| 欧美日韩一区二区欧美激情| 亚洲欧美日韩中文播放| 色婷婷久久综合| 一区二区三区不卡在线观看| 91精彩视频在线| 一区二区三区在线免费观看| 91丝袜美腿高跟国产极品老师 | 久久成人18免费观看| 欧美成va人片在线观看| 国产在线播放一区三区四| 久久在线观看免费| 国产成人精品1024| 日韩一区在线免费观看| 99久久精品免费观看| 一区二区三区在线影院| 欧美性淫爽ww久久久久无| 亚洲成a天堂v人片| 日韩欧美一区二区在线视频| 精品制服美女久久| 久久精品在线免费观看| 粉嫩一区二区三区性色av| 中文字幕中文字幕在线一区| 不卡电影免费在线播放一区| 最新国产精品久久精品| 在线观看网站黄不卡| 偷拍日韩校园综合在线| 日韩免费一区二区| 国产伦精品一区二区三区免费迷 | 久久麻豆一区二区| 成人h动漫精品| 亚洲欧美日韩中文播放| 欧美美女黄视频| 国内精品嫩模私拍在线| 亚洲国产精华液网站w| 91传媒视频在线播放| 免费欧美日韩国产三级电影| 久久综合成人精品亚洲另类欧美 | 欧美色图在线观看| 蜜桃视频免费观看一区| 中文一区二区完整视频在线观看| 欧美在线一二三| 国产成人免费在线视频|