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

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

?? complete.c

?? sqlite 3.3.8 支持加密的版本
?? C
字號:
/*
** 2001 September 15
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** An tokenizer for SQL
**
** This file contains C code that implements the sqlite3_complete() API.
** This code used to be part of the tokenizer.c source file.  But by
** separating it out, the code will be automatically omitted from
** static links that do not use it.
**
** $Id: complete.c,v 1.17 2006/10/12 21:34:21 rmsimpson Exp $
*/
#include "sqliteInt.h"
#ifndef SQLITE_OMIT_COMPLETE

/*
** This is defined in tokenize.c.  We just have to import the definition.
*/
extern const char sqlite3IsIdChar[];
#define IdChar(C)  (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsIdChar[c-0x20]))


/*
** Token types used by the sqlite3_complete() routine.  See the header
** comments on that procedure for additional information.
*/
#define tkSEMI    0
#define tkWS      1
#define tkOTHER   2
#define tkEXPLAIN 3
#define tkCREATE  4
#define tkTEMP    5
#define tkTRIGGER 6
#define tkEND     7

/*
** Return TRUE if the given SQL string ends in a semicolon.
**
** Special handling is require for CREATE TRIGGER statements.
** Whenever the CREATE TRIGGER keywords are seen, the statement
** must end with ";END;".
**
** This implementation uses a state machine with 7 states:
**
**   (0) START     At the beginning or end of an SQL statement.  This routine
**                 returns 1 if it ends in the START state and 0 if it ends
**                 in any other state.
**
**   (1) NORMAL    We are in the middle of statement which ends with a single
**                 semicolon.
**
**   (2) EXPLAIN   The keyword EXPLAIN has been seen at the beginning of 
**                 a statement.
**
**   (3) CREATE    The keyword CREATE has been seen at the beginning of a
**                 statement, possibly preceeded by EXPLAIN and/or followed by
**                 TEMP or TEMPORARY
**
**   (4) TRIGGER   We are in the middle of a trigger definition that must be
**                 ended by a semicolon, the keyword END, and another semicolon.
**
**   (5) SEMI      We've seen the first semicolon in the ";END;" that occurs at
**                 the end of a trigger definition.
**
**   (6) END       We've seen the ";END" of the ";END;" that occurs at the end
**                 of a trigger difinition.
**
** Transitions between states above are determined by tokens extracted
** from the input.  The following tokens are significant:
**
**   (0) tkSEMI      A semicolon.
**   (1) tkWS        Whitespace
**   (2) tkOTHER     Any other SQL token.
**   (3) tkEXPLAIN   The "explain" keyword.
**   (4) tkCREATE    The "create" keyword.
**   (5) tkTEMP      The "temp" or "temporary" keyword.
**   (6) tkTRIGGER   The "trigger" keyword.
**   (7) tkEND       The "end" keyword.
**
** Whitespace never causes a state transition and is always ignored.
**
** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
** to recognize the end of a trigger can be omitted.  All we have to do
** is look for a semicolon that is not part of an string or comment.
*/
int sqlite3_complete(const char *zSql){
  u8 state = 0;   /* Current state, using numbers defined in header comment */
  u8 token;       /* Value of the next token */

#ifndef SQLITE_OMIT_TRIGGER
  /* A complex statement machine used to detect the end of a CREATE TRIGGER
  ** statement.  This is the normal case.
  */
  static const u8 trans[7][8] = {
                     /* Token:                                                */
     /* State:       **  SEMI  WS  OTHER EXPLAIN  CREATE  TEMP  TRIGGER  END  */
     /* 0   START: */ {    0,  0,     1,      2,      3,    1,       1,   1,  },
     /* 1  NORMAL: */ {    0,  1,     1,      1,      1,    1,       1,   1,  },
     /* 2 EXPLAIN: */ {    0,  2,     1,      1,      3,    1,       1,   1,  },
     /* 3  CREATE: */ {    0,  3,     1,      1,      1,    3,       4,   1,  },
     /* 4 TRIGGER: */ {    5,  4,     4,      4,      4,    4,       4,   4,  },
     /* 5    SEMI: */ {    5,  5,     4,      4,      4,    4,       4,   6,  },
     /* 6     END: */ {    0,  6,     4,      4,      4,    4,       4,   4,  },
  };
#else
  /* If triggers are not suppored by this compile then the statement machine
  ** used to detect the end of a statement is much simplier
  */
  static const u8 trans[2][3] = {
                     /* Token:           */
     /* State:       **  SEMI  WS  OTHER */
     /* 0   START: */ {    0,  0,     1, },
     /* 1  NORMAL: */ {    0,  1,     1, },
  };
#endif /* SQLITE_OMIT_TRIGGER */

  while( *zSql ){
    switch( *zSql ){
      case ';': {  /* A semicolon */
        token = tkSEMI;
        break;
      }
      case ' ':
      case '\r':
      case '\t':
      case '\n':
      case '\f': {  /* White space is ignored */
        token = tkWS;
        break;
      }
      case '/': {   /* C-style comments */
        if( zSql[1]!='*' ){
          token = tkOTHER;
          break;
        }
        zSql += 2;
        while( zSql[0] && (zSql[0]!='*' || zSql[1]!='/') ){ zSql++; }
        if( zSql[0]==0 ) return 0;
        zSql++;
        token = tkWS;
        break;
      }
      case '-': {   /* SQL-style comments from "--" to end of line */
        if( zSql[1]!='-' ){
          token = tkOTHER;
          break;
        }
        while( *zSql && *zSql!='\n' ){ zSql++; }
        if( *zSql==0 ) return state==0;
        token = tkWS;
        break;
      }
      case '[': {   /* Microsoft-style identifiers in [...] */
        zSql++;
        while( *zSql && *zSql!=']' ){ zSql++; }
        if( *zSql==0 ) return 0;
        token = tkOTHER;
        break;
      }
      case '`':     /* Grave-accent quoted symbols used by MySQL */
      case '"':     /* single- and double-quoted strings */
      case '\'': {
        int c = *zSql;
        zSql++;
        while( *zSql && *zSql!=c ){ zSql++; }
        if( *zSql==0 ) return 0;
        token = tkOTHER;
        break;
      }
      default: {
        int c;
        if( IdChar((u8)*zSql) ){
          /* Keywords and unquoted identifiers */
          int nId;
          for(nId=1; IdChar(zSql[nId]); nId++){}
#ifdef SQLITE_OMIT_TRIGGER
          token = tkOTHER;
#else
          switch( *zSql ){
            case 'c': case 'C': {
              if( nId==6 && sqlite3StrNICmp(zSql, "create", 6)==0 ){
                token = tkCREATE;
              }else{
                token = tkOTHER;
              }
              break;
            }
            case 't': case 'T': {
              if( nId==7 && sqlite3StrNICmp(zSql, "trigger", 7)==0 ){
                token = tkTRIGGER;
              }else if( nId==4 && sqlite3StrNICmp(zSql, "temp", 4)==0 ){
                token = tkTEMP;
              }else if( nId==9 && sqlite3StrNICmp(zSql, "temporary", 9)==0 ){
                token = tkTEMP;
              }else{
                token = tkOTHER;
              }
              break;
            }
            case 'e':  case 'E': {
              if( nId==3 && sqlite3StrNICmp(zSql, "end", 3)==0 ){
                token = tkEND;
              }else
#ifndef SQLITE_OMIT_EXPLAIN
              if( nId==7 && sqlite3StrNICmp(zSql, "explain", 7)==0 ){
                token = tkEXPLAIN;
              }else
#endif
              {
                token = tkOTHER;
              }
              break;
            }
            default: {
              token = tkOTHER;
              break;
            }
          }
#endif /* SQLITE_OMIT_TRIGGER */
          zSql += nId-1;
        }else{
          /* Operators and special symbols */
          token = tkOTHER;
        }
        break;
      }
    }
    state = trans[state][token];
    zSql++;
  }
  return state==0;
}

#ifndef SQLITE_OMIT_UTF16
/*
** This routine is the same as the sqlite3_complete() routine described
** above, except that the parameter is required to be UTF-16 encoded, not
** UTF-8.
*/
int sqlite3_complete16(const void *zSql){
  sqlite3_value *pVal;
  char const *zSql8;
  int rc = 0;

  pVal = sqlite3ValueNew();
  sqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);
  zSql8 = sqlite3ValueText(pVal, SQLITE_UTF8);
  if( zSql8 ){
    rc = sqlite3_complete(zSql8);
  }
  sqlite3ValueFree(pVal);
  return sqlite3ApiExit(0, rc);
}
#endif /* SQLITE_OMIT_UTF16 */
#endif /* SQLITE_OMIT_COMPLETE */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久影院午夜论| 天堂成人国产精品一区| 亚洲国产中文字幕| 黄色小说综合网站| 色婷婷综合久久久中文一区二区| 欧美丰满嫩嫩电影| ...中文天堂在线一区| 美女一区二区在线观看| 欧美日韩国产综合一区二区三区| 中文字幕第一区第二区| 男女男精品视频网| 99国产精品99久久久久久| 2023国产精品自拍| 麻豆精品在线看| 欧美美女一区二区三区| 亚洲久本草在线中文字幕| 国产·精品毛片| 久久综合国产精品| 久久国产生活片100| 欧美日韩精品欧美日韩精品一| 亚洲女人的天堂| 成人精品免费看| 久久婷婷一区二区三区| 久久99这里只有精品| 欧美一区永久视频免费观看| 亚洲第一搞黄网站| 欧美日韩色一区| 亚洲一区在线观看免费| 欧美吻胸吃奶大尺度电影 | 欧美电影一区二区| 亚洲成av人片在线观看| 欧美三级电影网| 五月婷婷另类国产| 91精品国产欧美日韩| 日本一道高清亚洲日美韩| 欧美精品777| 麻豆精品久久久| 欧美一区二区三区啪啪| 日本最新不卡在线| 欧美一区二区三区四区五区| 免费黄网站欧美| 久久综合一区二区| 国产自产v一区二区三区c| 久久久国产一区二区三区四区小说| 国产伦精品一区二区三区免费 | 日韩欧美卡一卡二| 狠狠色综合播放一区二区| 久久久久久久电影| 99国产精品久久| 亚洲成人精品影院| 欧美一区二区精品久久911| 精品一区二区三区香蕉蜜桃| 国产色产综合色产在线视频| 99在线精品视频| 天天色天天操综合| 精品国内片67194| 99久久久国产精品免费蜜臀| 亚洲国产精品嫩草影院| 久久一区二区视频| av在线免费不卡| 亚洲r级在线视频| xvideos.蜜桃一区二区| 99re视频这里只有精品| 日本中文字幕不卡| 中文字幕一区二区三区不卡| 7777精品伊人久久久大香线蕉最新版| 国产一区二区三区四| 亚洲精品乱码久久久久久久久| 日韩欧美一区二区久久婷婷| 91在线观看高清| 精品一区二区三区蜜桃| 欧美主播一区二区三区美女| 中文字幕一区二| 日韩激情中文字幕| 亚洲国产精品99久久久久久久久 | 日韩国产欧美视频| 亚洲va中文字幕| 日韩精品视频网| 国产精品国产三级国产专播品爱网| 欧美日韩的一区二区| 国产乱码精品1区2区3区| 亚洲va欧美va天堂v国产综合| 欧美韩国日本不卡| 91丝袜国产在线播放| 精品人伦一区二区色婷婷| 麻豆精品一区二区av白丝在线| 99精品1区2区| 亚洲与欧洲av电影| 日本精品视频一区二区| 日本一区二区免费在线观看视频 | 91啪亚洲精品| 91麻豆高清视频| 精品伊人久久久久7777人| 亚洲成人自拍网| 综合电影一区二区三区| 国产午夜亚洲精品午夜鲁丝片| 3751色影院一区二区三区| 欧美视频中文字幕| 成人动漫一区二区在线| 国产麻豆精品95视频| 久久精品国产免费| 日本亚洲一区二区| 日产国产欧美视频一区精品 | 国产一区视频在线看| 欧美aaaaa成人免费观看视频| 亚洲一本大道在线| 亚洲综合成人在线| 亚洲自拍与偷拍| 亚洲国产精品人人做人人爽| 亚洲一二三专区| 午夜精品免费在线| 亚洲第一激情av| 天天综合天天综合色| 丝袜脚交一区二区| 蜜桃一区二区三区在线| 香蕉加勒比综合久久| 亚洲一区二区三区四区在线 | 欧美日韩和欧美的一区二区| 欧美日韩国产高清一区二区| 欧美酷刑日本凌虐凌虐| 欧美精品久久99久久在免费线 | 蜜桃精品视频在线观看| 蜜臀av国产精品久久久久| 精品在线你懂的| 国产精品一二三| eeuss鲁片一区二区三区在线看| 成人永久看片免费视频天堂| 91在线云播放| 欧美日韩国产综合久久| 欧美福利电影网| 久久久夜色精品亚洲| 中文字幕一区二区日韩精品绯色| 亚洲在线成人精品| 蜜臀av一区二区三区| 国产精品一区二区免费不卡| 成人动漫在线一区| 欧美日本乱大交xxxxx| 日韩美一区二区三区| 国产精品丝袜一区| 亚洲高清不卡在线| 国产麻豆成人精品| 在线观看国产91| 亚洲精品在线三区| 亚洲免费观看高清| 美国欧美日韩国产在线播放| 成人app软件下载大全免费| 91国产免费看| 国产亚洲视频系列| 亚洲一区二区三区三| 黑人巨大精品欧美一区| 91久久精品网| 亚洲精品一区二区三区99| 亚洲欧洲综合另类| 激情图片小说一区| 欧美天堂亚洲电影院在线播放| 精品国产免费一区二区三区四区 | 亚洲视频小说图片| 麻豆成人免费电影| 欧美在线观看视频一区二区三区 | 成人性生交大片免费看视频在线 | 99久久免费精品| 亚洲精品一区二区三区香蕉| 亚洲在线视频一区| 国产精品69毛片高清亚洲| 91成人免费电影| 国产网站一区二区三区| 青娱乐精品视频| 欧美亚洲一区三区| 国产亚洲精品资源在线26u| 日韩高清国产一区在线| 精品久久人人做人人爽| 97se亚洲国产综合在线| 欧美精品一区二区三区视频| 亚洲午夜三级在线| av在线不卡免费看| 国产日韩视频一区二区三区| 日韩国产在线一| 91免费版在线看| 欧美国产一区二区| 九九在线精品视频| 678五月天丁香亚洲综合网| 亚洲激情在线播放| 国产麻豆视频精品| 6080日韩午夜伦伦午夜伦| 亚洲一区二区精品3399| 99久久精品国产观看| 国产欧美日韩麻豆91| 国产综合色产在线精品| 91精品国产综合久久久久久久| 亚洲综合在线观看视频| av一区二区三区在线| 国产色产综合色产在线视频| 国产精品一二三四区| 久久精品夜色噜噜亚洲aⅴ| 狠狠狠色丁香婷婷综合激情 | 激情欧美日韩一区二区| 日韩三级视频在线看| 蜜桃av噜噜一区| 精品国产乱码久久久久久牛牛| 看国产成人h片视频|