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

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

?? myldblexer.pas

?? 一個本地database引擎,支持中文T_Sql查詢,兼容DELPHI標準數據庫控件
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
          inc(column,1);
          break;
         end; // '
       end; // quote symbol

      Commands[command].Tokens[token].Text :=
         Commands[command].Tokens[token].Text + c;
      if (c = lf) then
       begin
        inc(line);
        column := 1;
       end
      else
       if (c <> cr) then
        inc(column);
      inc(i);
     end; // while
    CloseToken;
    if quoteSymbol in [BackQuote, RightSquareBracket] then
      Commands[command].Tokens[token].ReservedWord := rwNone;
   end
  else
  if (c = LeftParenthesis) then
   begin
    Commands[command].Tokens[token].TokenType := tktLeftParenthesis;
    CloseToken;
    inc(numParenthesis);
    LeftParenthesisLine := line;
    LeftParenthesisColumn := column;
   end
  else
  if (c = RightParenthesis) then
   begin
    dec(numParenthesis);
    RightParenthesisLine := line;
    RightParenthesisColumn := column;
    Commands[command].Tokens[token].TokenType := tktRightParenthesis;
    CloseToken;
   end
  else
  if (c = Dot) then //!!
   begin
    Commands[command].Tokens[token].TokenType := tktDot;
    //CloseToken;
   end
  else
  if (c = Comma) then
   begin
    Commands[command].Tokens[token].TokenType := tktComma;
    CloseToken;
   end
  else
  if ((c >= '0') and (c <= '9')) then
    Commands[command].Tokens[token].TokenType := tktInt
  else
   Commands[command].Tokens[token].TokenType := tktString;
  if (c = '-') or (c = '+') or (c = '*') or (c = '/') or (c = '=') then
   CloseToken;
  if (c = '|') then
   begin
    NextSymbol := GetNextSymbol;
    if (NextSymbol = '|') then
     begin
      Commands[command].Tokens[token].Text :=
        Commands[command].Tokens[token].Text + NextSymbol;
      inc(i);
      inc(column);
     end;
    CloseToken;
   end; // <
  if (c = '<') then
   begin
    NextSymbol := GetNextSymbol;
    if (NextSymbol = '=') or (NextSymbol = '>') then
     begin
      Commands[command].Tokens[token].Text :=
        Commands[command].Tokens[token].Text + NextSymbol;
      inc(i);
      inc(column);
     end;
    CloseToken;
   end; // <
  if (c = '>') then
   begin
    NextSymbol := GetNextSymbol;
    if (NextSymbol = '=') then
     begin
      Commands[command].Tokens[token].Text :=
        Commands[command].Tokens[token].Text + NextSymbol;
      inc(i);
      inc(column);
     end;
    CloseToken;
   end; // >
 end; // CreateToken;

 procedure CloseCommand;
 begin
  CloseToken;
  bCommandStarted := false;

  if (numParenthesis > 0) then
    raise EMYLDBException.Create(30059, ErrorGMissingRightParenthesis,
                                  [LeftParenthesisLine,LeftParenthesisColumn]);
  if (numParenthesis < 0) then
    raise EMYLDBException.Create(30060, ErrorGUnexpectedRightParenthesis,
                                  [LeftParenthesisLine,LeftParenthesisColumn]);
  priorSymbol := ' ';

  if (bQuoteNotClosed) then
    raise EMYLDBException.Create(30061, ErrorGUnterminatedString,
                                                       [quoteLine,quoteColumn]);
 end; // CloseCommand;

 var NextSymbol: char;
begin
 l := Length(FSQL);
 line := 1;
 column := 1;
 NumCommands := 0;
 Commands := nil;
 bTokenStarted := false;
 bQuoteNotClosed := false;
 bCommandStarted := false;
 command := 0;
 token := 0;
 priorSymbol := ' ';
 numParenthesis := 0;
 LeftParenthesisLine := 0;
 LeftParenthesisColumn := 0;
 RightParenthesisLine := 0;
 RightParenthesisColumn := 0;
 LastParamNo := 0;
 i := 0;
 while (i < l) do
  begin
   // get current character
   c := pChar(pChar(FSQL)+i)^;

   // end of the current comand
   if (c = ';') then
    begin
     CloseCommand;
     inc(i);
     continue;
    end;

   // check for comment
   if (c = '-') then
    begin
     NextSymbol := GetNextSymbol;
     if (NextSymbol = '-') then
      begin
       // seek for end of line
       inc(i);
       column := 1;
       inc(line);
       while (i < l) do
        begin
         c := pChar(pChar(FSQL)+i)^;
         if (c = lf) then
           break;
         inc(i);
        end;
       inc(i);
       continue;
      end;
    end; // comment --

   // check for comment
   if (c = '/') then
    begin
     NextSymbol := GetNextSymbol;
     if (NextSymbol = '*') then
      begin
       // commentary started
       inc(i,2);
       inc(column,2);
       while (i < l) do
        begin
          c := pChar(pChar(FSQL)+i)^;
          if (c = '*') then
           begin
             NextSymbol := GetNextSymbol;
             if (NextSymbol = '/') then
              begin
               inc(i,2);
               inc(column,2);
               break;
              end;
           end;
          if (c = lf) then
           begin
            inc(line);
            column := 1;
           end
          else
           if (c <> cr) then
            inc(column);
          inc(i);
        end; // while
       continue;
      end; // comment /* */ started
    end;


   // is this symbol a delimiter?
   bIsDelimiter := false;
   if (c = Tab) or (c = CR) or (c = LF) or (c = Space) then
    bIsDelimiter := true;

   bTokenFinished := IsTokenFinished;
   bNewTokenStarted := IsNewTokenStarted;
   if (bTokenFinished) or (bTokenStarted and bNewTokenStarted) then
    CloseToken;
   if (bNewTokenStarted) then
    CreateToken;

   // add current symbol to token
   if (not bNewTokenStarted) and (bTokenStarted) and (not bIsDelimiter) then
    begin
     // check for number
     if Commands[command].Tokens[token].TokenType in [tktInt,tktFloat] then
      if not ((c >= '0') and (c <= '9') or (c = Dot) or
              (UpperCase(c)='E') or (c = '+') or (c = '-') ) then
        raise EMYLDBException.Create(30062, ErrorGInvalidNumericSymbol,
                                                              [c,line,column]);
      // check float type .22
      if (Commands[command].Tokens[token].TokenType = tktDot) and
         (c >= '0') and (c <= '9') then
       begin
        Commands[command].Tokens[token].TokenType := tktInt;
       end;
     // add current symbol to token
    Commands[command].Tokens[token].Text :=
      Commands[command].Tokens[token].Text + c;
    end;

   if (c = lf) then
    begin
     inc(line);
     column := 1;
    end
   else
    if (c <> cr) then
     inc(column);
   // skip delimiters
   if (bIsDelimiter) then
    begin
     if (bTokenStarted) then
      CloseToken;
    end;
   // next symbol
   priorSymbol := c;
   inc(i);
  end; // for all symbols in FSQL

 CloseCommand;
end; // Parse


//------------------------------------------------------------------------------
// create
//------------------------------------------------------------------------------
constructor TMYLDBLexer.Create(SQLScript: string; SQLParams: TMYLDBSQLParams);
var
  i: integer;
begin
  FSQL := SQLScript;
  FSQLParams := SQLParams;
  NumCommands := 0;
  Parse;
  CurrentCommandNo := -1;
  for i := 0 to NumCommands-1 do
    Commands[i].CurrentTokenNo := 0;
end; // Create


//------------------------------------------------------------------------------
// destroy
//------------------------------------------------------------------------------
destructor TMYLDBLexer.Destroy;
var i,j: integer;
begin
 for i:=0 to NumCommands - 1 do
  for j:=0 to  Length(Commands[i].Tokens)-1 do
   if (Commands[i].Tokens[j].ParamValue <> nil) then
     Commands[i].Tokens[j].ParamValue.Free;
end; // Destroy


//------------------------------------------------------------------------------
// test
//------------------------------------------------------------------------------
function TMYLDBLexer.Test(bGenerate: Boolean = true; bShowDetails: Boolean = true): string;
var i,j: integer;
    s: string;
begin
 result := 'Number of commands: '+IntToStr(NumCommands);
 if (bGenerate) then
  begin
   // generate
  end;

 for i := 0 to NumCommands - 1 do
  begin
   result := result + Crlf+'Command #'+IntToStr(i+1)+':' + Crlf;
   for j := 0 to Commands[i].NumTokens - 1 do
    begin
     result := result + Commands[i].Tokens[j].Text + Crlf;
     if (bShowDetails) then
      begin
       if (Commands[i].Tokens[j].ReservedWord = rwNone) then
        s := 'ReservedWord = None'+Crlf
       else
        s :=  'ReservedWord = ' +
              MYLDBSQLReservedWords[Integer(Commands[i].Tokens[j].ReservedWord)] +
              Crlf;
        result := result +
                  'Type = ' +
                  EMYLDBTokenType[Integer(Commands[i].Tokens[j].TokenType)] +
                  Crlf + s +
                  'Line = ' + IntToStr(Commands[i].Tokens[j].LineNum) + Crlf +
                  'Column = ' + IntToStr(Commands[i].Tokens[j].ColumnNum) +
                  Crlf + Crlf;
      end;
    end;

  end;
end; // Test


//------------------------------------------------------------------------------
// Add Empty Command
//------------------------------------------------------------------------------
procedure TMYLDBLexer.AddCommand;
begin
  SetLength(Commands, Length(Commands)+1);
  NumCommands := Length(Commands);
  CurrentCommandNo := NumCommands - 1;
end;// AddCommand


//------------------------------------------------------------------------------
// AddToken
//------------------------------------------------------------------------------
procedure TMYLDBLexer.AddToken(Token: TToken);
begin
 with Commands[CurrentCommandNo] do
   begin
     SetLength(Tokens, Length(Tokens)+1);
     NumTokens := Length(Tokens);
     CurrentTokenNo := NumTokens - 1;
     Tokens[CurrentTokenNo] := Token;
   end;
end;// AddToken


//------------------------------------------------------------------------------
// makes next command current
//------------------------------------------------------------------------------
function TMYLDBLexer.GetNextCommand: Boolean;
begin
 Inc(CurrentCommandNo);
 Result := (CurrentCommandNo < NumCommands);
end;// GetNextCommand

//------------------------------------------------------------------------------
// gets next token in current command
//------------------------------------------------------------------------------
function TMYLDBLexer.GetNextToken(var Token: TToken): Boolean;
begin
 with Commands[CurrentCommandNo] do
  begin
   Result := LookNextToken(Token);
//   if (Result) then
    Inc(CurrentTokenNo);
  end;
end;// GetNextToken


//------------------------------------------------------------------------------
// gets current token in current command
//------------------------------------------------------------------------------
function TMYLDBLexer.GetCurrentToken(var Token: TToken): Boolean;
begin
 with Commands[CurrentCommandNo] do
  begin
   Result := (CurrentTokenNo < NumTokens);
   if (Result) then
    Token := Tokens[CurrentTokenNo]
   else
    Token.TokenType := tktNone;
  end;
end;// GetCurrentToken


//------------------------------------------------------------------------------
// looks at next token in current command
//------------------------------------------------------------------------------
function TMYLDBLexer.LookNextToken(var Token: TToken): Boolean;
begin
 with Commands[CurrentCommandNo] do
  begin
   Result := (CurrentTokenNo+1 < NumTokens);
   if (Result) then
    Token := Tokens[CurrentTokenNo+1]
   else
     begin
       Token.TokenType := tktNone;
       Token.Text := '';
     end;
  end;
end;// LookNextToken


//------------------------------------------------------------------------------
// gets current token No
//------------------------------------------------------------------------------
function TMYLDBLexer.GetCurrentTokenNo: integer;
begin
  Result := Commands[CurrentCommandNo].CurrentTokenNo;
end;// GetCurrentTokenNo


//------------------------------------------------------------------------------
// sets current token No
//------------------------------------------------------------------------------
function TMYLDBLexer.SetCurrentTokenNo(TokenNo: integer; var Token: TToken): Boolean;
begin
 Commands[CurrentCommandNo].CurrentTokenNo := TokenNo;
 Result := GetCurrentToken(Token);
end;// SetCurrentTokenNo

function TMYLDBLexer.SetCurrentTokenNo(TokenNo: integer): Boolean;
begin
 with Commands[CurrentCommandNo] do
  begin
   CurrentTokenNo := TokenNo;
   Result := (CurrentTokenNo < NumTokens);
  end;
end;


// checks whether token is reserved word
function IsReservedWord(Token: TToken; ReservedWord: TReservedWord=rwNone): Boolean;
begin
 Result := False;
 if (Token.TokenType = tktReservedWord) then
  if ((Token.ReservedWord = ReservedWord) or
      (ReservedWord = rwNone)) then
   Result := True;
end;

//------------------------------------------------------------------------------
// gets first next token specified type
//------------------------------------------------------------------------------
function TMYLDBLexer.GetNextSpecifiedToken(var Token: TToken;
  TokenTypes: TTokenTypes): Boolean;
begin
 with Commands[CurrentCommandNo] do
  begin
   repeat
     Result := LookNextToken(Token);
     if (Result) then
      Inc(CurrentTokenNo);
   until (not Result) or (Token.TokenType in TokenTypes);
  end;
end;// GetNextSpecifiedToken

function FindReservedWord(s: string): Integer;
var i: integer;
begin
  result := -1;
  s := UpperCase(s);
  for i := 0 to MYLDBMaxSQLReservedWords do
    if (s = MYLDBSQLReservedWords[i]) then
     begin
      result := i;
      break;
     end;
end; // FindReservedWord


end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www.欧美日韩国产在线| 国产激情一区二区三区| 亚洲伦理在线精品| 国产精品久久久久久久蜜臀| 国产精品久久夜| 中文字幕的久久| 中文字幕视频一区| 亚洲成人免费在线| 日韩av一区二区在线影视| 美腿丝袜亚洲色图| 色综合久久中文字幕综合网 | 日本中文字幕不卡| 久久精品国产免费看久久精品| 成人精品国产福利| 色综合天天性综合| 欧美亚洲免费在线一区| 久久久久久99精品| 一区二区在线观看视频在线观看| 青青草成人在线观看| 欧美精品九九99久久| 精品伦理精品一区| 亚洲三级在线观看| 日韩精品一二三四| 成人污视频在线观看| 欧美日韩在线播放一区| 1024成人网色www| 国产成人免费视频网站高清观看视频| 成人听书哪个软件好| 欧美午夜片在线观看| 中文字幕在线免费不卡| 日本va欧美va瓶| 久久成人精品无人区| 91香蕉视频mp4| 久久久久久久久久久久久夜| 综合中文字幕亚洲| 91免费版pro下载短视频| 国产精品视频你懂的| 五月天精品一区二区三区| 国产91色综合久久免费分享| 99久久精品免费看| 91在线视频官网| 国产精品你懂的在线欣赏| 91在线精品秘密一区二区| 国产欧美一区二区精品婷婷 | 亚洲成人免费在线观看| 欧美日韩免费一区二区三区 | 色婷婷久久久综合中文字幕| 亚洲另类色综合网站| 日韩黄色免费电影| 7777精品伊人久久久大香线蕉经典版下载| 日韩中文字幕1| 久久久久久久网| 成人app下载| 欧美日本在线视频| 国产精品国模大尺度视频| 韩国成人在线视频| 亚洲三级电影网站| 色域天天综合网| 国产原创一区二区| 精品国产91乱码一区二区三区| 五月激情六月综合| 欧美电影一区二区三区| 国产成人8x视频一区二区 | 国产亚洲制服色| 日本精品一级二级| 成人一区二区三区中文字幕| 极品尤物av久久免费看| 亚洲欧美国产三级| 精品国产乱码久久| 国产精品久久久久久久久快鸭 | 福利一区二区在线| 亚洲天堂免费看| 欧美日韩高清一区二区三区| 亚洲成人av福利| 日韩国产在线观看一区| 国产精品一区二区视频| 国产精品白丝在线| 欧美精品一区二区在线播放| 91福利区一区二区三区| 国产一二精品视频| 国产一区二区三区电影在线观看| 麻豆成人av在线| 久久九九国产精品| 欧美精品1区2区| 青青草成人在线观看| 一区二区三区资源| 久久综合九色综合欧美就去吻| 久久精品亚洲麻豆av一区二区| 欧美日韩不卡在线| 亚洲精选在线视频| 一区二区三区四区视频精品免费 | 日av在线不卡| 久久综合九色综合97婷婷女人| 日韩一区二区不卡| 欧美精品aⅴ在线视频| 紧缚奴在线一区二区三区| 麻豆91在线观看| 国产一区二区三区电影在线观看 | 久久综合狠狠综合久久激情| 91美女蜜桃在线| 丁香亚洲综合激情啪啪综合| 99re这里都是精品| 色丁香久综合在线久综合在线观看| 亚洲午夜久久久久久久久电影网| 亚洲午夜免费福利视频| 国产精品国产三级国产aⅴ无密码| 一本大道综合伊人精品热热| 久久 天天综合| 免费观看在线综合色| 国产专区综合网| 亚洲成人第一页| 一区二区在线观看视频| 国产日韩欧美不卡在线| 亚洲欧美色一区| 亚洲国产三级在线| 精品一区二区影视| 中文字幕一区三区| 亚洲天堂av老司机| 一区二区不卡在线视频 午夜欧美不卡在| 蜜桃av一区二区| 欧美美女喷水视频| 久久精品男人天堂av| 亚洲国产精品综合小说图片区| 美腿丝袜亚洲色图| 91免费国产视频网站| 久久综合久久鬼色| 日韩成人午夜电影| av亚洲产国偷v产偷v自拍| 欧美一区二区三区四区视频 | 美日韩黄色大片| 国产成人免费xxxxxxxx| 欧美艳星brazzers| 国产精品不卡一区二区三区| 五月天激情综合| 91小视频免费观看| 亚洲视频一二区| av不卡免费在线观看| 欧美国产激情一区二区三区蜜月| 夜夜操天天操亚洲| 色综合天天视频在线观看| 亚洲欧美一区二区三区久本道91 | 婷婷六月综合网| 欧美日韩国产123区| 一区二区三区在线视频免费| 91福利精品视频| 日韩一区二区三| 粉嫩av一区二区三区| 欧美日韩一区二区三区在线看 | 99精品视频在线观看| 欧美一级一级性生活免费录像| 夜色激情一区二区| 亚洲二区在线观看| 欧美日韩黄视频| 亚洲成人综合在线| 久久蜜桃一区二区| 黄色日韩网站视频| 中文字幕精品一区二区精品绿巨人 | 菠萝蜜视频在线观看一区| 久久午夜羞羞影院免费观看| 韩国成人福利片在线播放| 中文字幕欧美日本乱码一线二线| 久热成人在线视频| 一区二区三区四区乱视频| 国产激情偷乱视频一区二区三区| 久久午夜色播影院免费高清| 成人高清视频免费观看| 综合自拍亚洲综合图不卡区| 欧美三级电影在线看| 国产呦精品一区二区三区网站| 色婷婷激情综合| 国内外精品视频| 亚洲综合激情另类小说区| 国产日韩欧美精品在线| 99久久精品国产毛片| 午夜精品视频一区| 国产精品入口麻豆原神| 精品久久人人做人人爽| 成人国产精品视频| 亚洲1区2区3区4区| 亚洲福利电影网| ...xxx性欧美| 欧美国产成人在线| 精品国产一区二区三区久久影院| 91麻豆精品国产91久久久使用方法 | 日本一区二区免费在线观看视频 | 成人国产精品免费观看动漫| 蜜桃视频第一区免费观看| 喷水一区二区三区| 亚洲国产精品久久久久婷婷884| 久久婷婷久久一区二区三区| 欧美三级电影网| 欧美色老头old∨ideo| 欧美午夜理伦三级在线观看| eeuss国产一区二区三区| 国产一区二区美女| 国产精品亚洲视频| 久久国产精品99久久人人澡| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲欧美日韩国产一区二区三区| 国产精品乱码人人做人人爱 |