CUBRID Engine
latest
Main Page
Namespaces
Classes
Files
File List
File Members
cnvlex.h
Go to the documentation of this file.
1
/*
2
* Copyright 2008 Search Solution Corporation
3
* Copyright 2016 CUBRID Corporation
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*/
18
19
20
/*
21
* cnvlex.h - Lexical scanning interface for string conversion API.
22
*/
23
24
#ifndef _CNVLEX_H_
25
#define _CNVLEX_H_
26
27
#ident "$Id$"
28
29
#include "
intl_support.h
"
30
31
/*
32
* Lexical scan modes. These correspond directly to start conditions defined
33
* in the scanner definition file. Be sure to update db_fmt_lex_start() to
34
* maintain the correspondence.
35
*/
36
37
typedef
enum
38
{
39
FL_LOCAL_NUMBER
= 0,
40
FL_US_ENG_NUMBER
= 1,
41
FL_KO_KR_NUMBER
= 2,
42
FL_LOCAL_TIME
= 3,
43
FL_US_ENG_TIME
= 4,
44
FL_KO_KR_TIME
= 5,
45
FL_INTEGER_FORMAT
= 6,
46
FL_TIME_FORMAT
= 7,
47
FL_BIT_STRING_FORMAT
= 8,
48
FL_BIT_STRING
= 9,
49
FL_VALIDATE_DATE_FORMAT
= 10,
50
FL_VALIDATE_FLOAT_FORMAT
= 11,
51
FL_VALIDATE_INTEGER_FORMAT
= 12,
52
FL_VALIDATE_MONETARY_FORMAT
= 13,
53
FL_VALIDATE_TIME_FORMAT
= 14,
54
FL_VALIDATE_TIMESTAMP_FORMAT
= 15,
55
FL_VALIDATE_BIT_STRING_FORMAT
= 16
56
}
FMT_LEX_MODE
;
57
58
59
typedef
enum
60
{
61
FT_NONE
= 0,
62
FT_AM_PM
= 1,
63
FT_BLANKS
= 2,
64
FT_BINARY_DIGITS
= 3,
65
FT_BIT_STRING_FORMAT
= 4,
66
FT_CURRENCY
= 5,
67
FT_DATE
= 6,
68
FT_DATE_FORMAT
= 7,
69
FT_DATE_SEPARATOR
= 8,
70
FT_LOCAL_DATE_SEPARATOR
= 9,
71
FT_DECIMAL
= 10,
72
FT_FLOAT_FORMAT
= 11,
73
FT_HOUR
= 12,
74
FT_HEX_DIGITS
= 13,
75
FT_INTEGER_FORMAT
= 14,
76
FT_MINUS
= 15,
77
FT_MINUTE
= 16,
78
FT_MONETARY_FORMAT
= 17,
79
FT_MONTH
= 18,
80
FT_MONTHDAY
= 19,
81
FT_MONTH_LONG
= 20,
82
FT_NUMBER
= 21,
83
FT_PATTERN
= 22,
84
FT_PLUS
= 23,
85
FT_SECOND
= 24,
86
FT_SPACES
= 25,
87
FT_STARS
= 26,
88
FT_THOUSANDS
= 27,
89
FT_TIME
= 28,
90
FT_TIME_DIGITS
= 29,
91
FT_TIME_DIGITS_ANY
= 30,
92
FT_TIME_DIGITS_0
= 31,
93
FT_TIME_DIGITS_BLANK
= 32,
94
FT_TIME_FORMAT
= 33,
95
FT_TIME_SEPARATOR
= 34,
96
FT_LOCAL_TIME_SEPARATOR
= 35,
97
FT_UNKNOWN
= 36,
98
FT_TIMESTAMP
= 37,
99
FT_TIMESTAMP_FORMAT
= 38,
100
FT_WEEKDAY
= 39,
101
FT_WEEKDAY_LONG
= 40,
102
FT_YEAR
= 41,
103
FT_ZEROES
= 42,
104
FT_ZONE
= 43,
105
FT_MILLISECOND
= 44
106
}
FMT_TOKEN_TYPE
;
107
108
typedef
struct
fmt_token
FMT_TOKEN
;
109
struct
fmt_token
110
{
111
FMT_TOKEN_TYPE
type
;
112
const
char
*
text
;
113
int
length
;
114
const
char
*
raw_text
;
115
int
value
;
116
};
117
118
extern
void
cnv_fmt_analyze
(
const
char
*instring,
FMT_LEX_MODE
mode
);
119
extern
FMT_TOKEN_TYPE
cnv_fmt_lex
(
FMT_TOKEN
* token);
120
extern
void
cnv_fmt_unlex
(
void
);
121
extern
const
char
*
cnv_fmt_next_token
(
void
);
122
extern
FMT_LEX_MODE
cnv_fmt_number_mode
(
INTL_ZONE
zone);
123
extern
FMT_LEX_MODE
cnv_fmt_time_mode
(
INTL_ZONE
zone);
124
extern
void
cnv_fmt_exit
(
void
);
125
#endif
/* _CNVLEX_H_ */
FT_SPACES
Definition:
cnvlex.h:86
FT_MILLISECOND
Definition:
cnvlex.h:105
FT_DATE
Definition:
cnvlex.h:67
fmt_token::type
FMT_TOKEN_TYPE type
Definition:
cnvlex.h:111
FT_WEEKDAY
Definition:
cnvlex.h:100
FL_US_ENG_TIME
Definition:
cnvlex.h:43
FT_HEX_DIGITS
Definition:
cnvlex.h:74
FL_KO_KR_NUMBER
Definition:
cnvlex.h:41
FT_FLOAT_FORMAT
Definition:
cnvlex.h:72
FT_DECIMAL
Definition:
cnvlex.h:71
FT_YEAR
Definition:
cnvlex.h:102
FL_LOCAL_NUMBER
Definition:
cnvlex.h:39
FT_STARS
Definition:
cnvlex.h:87
FT_BIT_STRING_FORMAT
Definition:
cnvlex.h:65
FT_SECOND
Definition:
cnvlex.h:85
cnv_fmt_lex
FMT_TOKEN_TYPE cnv_fmt_lex(FMT_TOKEN *token)
FMT_LEX_MODE
FMT_LEX_MODE
Definition:
cnvlex.h:37
fmt_token::value
int value
Definition:
cnvlex.h:115
FT_MONTH
Definition:
cnvlex.h:79
FT_TIME
Definition:
cnvlex.h:89
FL_VALIDATE_TIMESTAMP_FORMAT
Definition:
cnvlex.h:54
FT_WEEKDAY_LONG
Definition:
cnvlex.h:101
FL_BIT_STRING_FORMAT
Definition:
cnvlex.h:47
cnv_fmt_analyze
void cnv_fmt_analyze(const char *instring, FMT_LEX_MODE mode)
Definition:
cnvlex.c:1869
FL_VALIDATE_INTEGER_FORMAT
Definition:
cnvlex.h:51
FT_LOCAL_TIME_SEPARATOR
Definition:
cnvlex.h:96
FT_PATTERN
Definition:
cnvlex.h:83
FL_VALIDATE_FLOAT_FORMAT
Definition:
cnvlex.h:50
FL_US_ENG_NUMBER
Definition:
cnvlex.h:40
FT_TIME_SEPARATOR
Definition:
cnvlex.h:95
cnv_fmt_next_token
const char * cnv_fmt_next_token(void)
Definition:
cnvlex.c:1893
FT_MINUTE
Definition:
cnvlex.h:77
fmt_token::text
const char * text
Definition:
cnvlex.h:112
FT_NUMBER
Definition:
cnvlex.h:82
FT_TIME_FORMAT
Definition:
cnvlex.h:94
FL_VALIDATE_TIME_FORMAT
Definition:
cnvlex.h:53
FT_UNKNOWN
Definition:
cnvlex.h:97
FT_INTEGER_FORMAT
Definition:
cnvlex.h:75
FT_TIME_DIGITS_ANY
Definition:
cnvlex.h:91
mode
static enum scanner_mode mode
Definition:
esql_scanner_support.h:100
FT_ZEROES
Definition:
cnvlex.h:103
FT_AM_PM
Definition:
cnvlex.h:62
FT_NONE
Definition:
cnvlex.h:61
FT_THOUSANDS
Definition:
cnvlex.h:88
FT_TIMESTAMP
Definition:
cnvlex.h:98
FT_TIME_DIGITS
Definition:
cnvlex.h:90
FL_VALIDATE_MONETARY_FORMAT
Definition:
cnvlex.h:52
cnv_fmt_time_mode
FMT_LEX_MODE cnv_fmt_time_mode(INTL_ZONE zone)
Definition:
cnvlex.c:1962
cnv_fmt_exit
void cnv_fmt_exit(void)
Definition:
cnvlex.c:1995
FL_BIT_STRING
Definition:
cnvlex.h:48
INTL_ZONE
enum intl_zone INTL_ZONE
Definition:
intl_support.h:150
FT_BLANKS
Definition:
cnvlex.h:63
FT_MONETARY_FORMAT
Definition:
cnvlex.h:78
fmt_token::raw_text
const char * raw_text
Definition:
cnvlex.h:114
FL_VALIDATE_DATE_FORMAT
Definition:
cnvlex.h:49
FT_DATE_SEPARATOR
Definition:
cnvlex.h:69
fmt_token
Definition:
cnvlex.h:109
FT_ZONE
Definition:
cnvlex.h:104
intl_support.h
fmt_token::length
int length
Definition:
cnvlex.h:113
FT_MONTH_LONG
Definition:
cnvlex.h:81
FT_TIME_DIGITS_0
Definition:
cnvlex.h:92
cnv_fmt_unlex
void cnv_fmt_unlex(void)
Definition:
cnvlex.c:1883
FT_TIME_DIGITS_BLANK
Definition:
cnvlex.h:93
FMT_TOKEN_TYPE
FMT_TOKEN_TYPE
Definition:
cnvlex.h:59
FT_HOUR
Definition:
cnvlex.h:73
FL_TIME_FORMAT
Definition:
cnvlex.h:46
FT_DATE_FORMAT
Definition:
cnvlex.h:68
FT_PLUS
Definition:
cnvlex.h:84
FT_MINUS
Definition:
cnvlex.h:76
FL_LOCAL_TIME
Definition:
cnvlex.h:42
FT_TIMESTAMP_FORMAT
Definition:
cnvlex.h:99
FT_LOCAL_DATE_SEPARATOR
Definition:
cnvlex.h:70
FT_MONTHDAY
Definition:
cnvlex.h:80
FL_VALIDATE_BIT_STRING_FORMAT
Definition:
cnvlex.h:55
FL_KO_KR_TIME
Definition:
cnvlex.h:44
FT_BINARY_DIGITS
Definition:
cnvlex.h:64
FL_INTEGER_FORMAT
Definition:
cnvlex.h:45
cnv_fmt_number_mode
FMT_LEX_MODE cnv_fmt_number_mode(INTL_ZONE zone)
Definition:
cnvlex.c:1928
FT_CURRENCY
Definition:
cnvlex.h:66
src
compat
cnvlex.h
Generated by
1.8.11