-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtokens.h
More file actions
38 lines (35 loc) · 931 Bytes
/
tokens.h
File metadata and controls
38 lines (35 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <string.h>
typedef enum{
TOKEN_QUERIE,
TOKEN_DATA_MANIPULATION,
TOKEN_DATA_DEFINITION,
TOKEN_FLOW_CONTROL,
TOKEN_TRANSACTION_CONTROL,
TOKEN_DATA_CONTROL,
TOKEN_LOGICAL_OPERATOR,
TOKEN_OPERATOR,
TOKEN_DATA_TYPE,
TOKEN_FUNCTION,
TOKEN_JOIN,
TOKEN_TRANSACTION,
TOKEN_MISC,
TOKEN_SPECIAL_SYMBOL,
TOKEN_COMMENT_SINGLE_LINE,
TOKEN_COMMENT_MULTIPLE_LINES,
TOKEN_LITERAL,
TOKEN_IDENTIFIER,
TOKEN_NUMBER_INTEGER,
TOKEN_NUMBER_FLOAT,
TOKEN_ERROR,
TOKEN_UNKNOWN
} SQLTokenType;
typedef struct{
SQLTokenType type; // tipo o clase de token
char *info; // informacion opcional acerca del token
char *value; // almacena el valor del token
int line; // linea del codigo donde fue encontrado
int column; // columna del codigo donde fue encontrado
} Token;