File: tokenize.h

package info (click to toggle)
pgtcl 1%3A3.0.0-1%2Bdeb12u1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 2,496 kB
  • sloc: ansic: 7,272; tcl: 657; sh: 470; makefile: 34; sql: 11
file content (21 lines) | stat: -rw-r--r-- 759 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** tokenize.h
**
** An tokenizer for SQL
*/
#include <ctype.h>
#include <tcl.h>

enum sqltoken {
TK_BITAND, TK_BITNOT, TK_BITOR, TK_BLOB, TK_COMMA, TK_CONCAT, TK_DOT, TK_EQ, TK_FLOAT, TK_GE,
TK_GT, TK_ID, TK_ILLEGAL, TK_INTEGER, TK_LE, TK_LP, TK_LSHIFT, TK_LT, TK_MINUS, TK_NE, TK_PLUS,
TK_REM, TK_RP, TK_RSHIFT, TK_SEMI, TK_SLASH, TK_SPACE, TK_STAR, TK_STRING, TK_TCLVAR, TK_SQLVAR,
TK_CAST, TK_HASH
};

int Pg_sqlite3GetToken(const char *z, enum sqltoken *tokenType);
int handle_substitutions(Tcl_Interp *interp, const char *sql, char **newSqlPtr, const char ***replacementArrayPtr, int *replacementArrayLengthPtr, const char **bufferPtr);

#define sqlite3Isdigit(x) isdigit(x)
#define sqlite3Isspace(x) isspace(x)
#define sqlite3Isxdigit(x) isxdigit(x)