/ Check-in [bc729bc3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove a C++-ism from the code. Ticket #3912. (CVS 6752)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:bc729bc3e6f6e3570103e646080eb119311b0fa7
User & Date: drh 2009-06-12 11:42:12
Context
2009-06-12
12:04
Enable the SQLITE_LIMIT_FUNCTION_ARG limiter. (CVS 6753) check-in: a17e3317 user: drh tags: trunk
11:42
Remove a C++-ism from the code. Ticket #3912. (CVS 6752) check-in: bc729bc3 user: drh tags: trunk
03:47
An additional memory leak in the parser fixed. Ticket #3911. (CVS 6751) check-in: 6197b492 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/tokenize.c.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
326
327
328
329
330
331
332
333
334

335
336
337
338
339
340
341
*************************************************************************
** An tokenizer for SQL
**
** This file contains C code that splits an SQL input string up into
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
** $Id: tokenize.c,v 1.159 2009/06/09 18:01:38 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>

/*
** The charMap() macro maps alphabetic characters into their
** lower-case ASCII equivalent.  On ASCII machines, this is just
................................................................................
      ** a digit. Try to match #AAAA where AAAA is a parameter name. */
    }
#ifndef SQLITE_OMIT_TCL_VARIABLE
    case '$':
#endif
    case '@':  /* For compatibility with MS SQL Server */
    case ':': {
      testcase( z[0]=='$' );  testcase( z[0]=='@' );  testcase( z[0]==':' );
      int n = 0;

      *tokenType = TK_VARIABLE;
      for(i=1; (c=z[i])!=0; i++){
        if( IdChar(c) ){
          n++;
#ifndef SQLITE_OMIT_TCL_VARIABLE
        }else if( c=='(' && n>0 ){
          do{







|







 







<

>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
326
327
328
329
330
331
332

333
334
335
336
337
338
339
340
341
*************************************************************************
** An tokenizer for SQL
**
** This file contains C code that splits an SQL input string up into
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
** $Id: tokenize.c,v 1.160 2009/06/12 11:42:12 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>

/*
** The charMap() macro maps alphabetic characters into their
** lower-case ASCII equivalent.  On ASCII machines, this is just
................................................................................
      ** a digit. Try to match #AAAA where AAAA is a parameter name. */
    }
#ifndef SQLITE_OMIT_TCL_VARIABLE
    case '$':
#endif
    case '@':  /* For compatibility with MS SQL Server */
    case ':': {

      int n = 0;
      testcase( z[0]=='$' );  testcase( z[0]=='@' );  testcase( z[0]==':' );
      *tokenType = TK_VARIABLE;
      for(i=1; (c=z[i])!=0; i++){
        if( IdChar(c) ){
          n++;
#ifndef SQLITE_OMIT_TCL_VARIABLE
        }else if( c=='(' && n>0 ){
          do{