@@ -53,169 +53,169 @@ def scan_evaluate( str )
53
53
case state
54
54
when nil
55
55
case
56
- when ( text = ss . scan ( /\" [0-9]+-[0-9]+-[0-9]+\" / ) )
56
+ when ( text = ss . scan ( /\" [0-9]+-[0-9]+-[0-9]+\" /i ) )
57
57
@rex_tokens . push action { [ :date_string , Date . parse ( text ) ] }
58
58
59
- when ( text = ss . scan ( /\' [0-9]+-[0-9]+-[0-9]+\' / ) )
59
+ when ( text = ss . scan ( /\' [0-9]+-[0-9]+-[0-9]+\' /i ) )
60
60
@rex_tokens . push action { [ :date_string , Date . parse ( text ) ] }
61
61
62
- when ( text = ss . scan ( /\" [^"]*\" / ) )
62
+ when ( text = ss . scan ( /\" [^"]*\" /i ) )
63
63
@rex_tokens . push action { [ :character_string_literal , text [ 1 ..-2 ] ] }
64
64
65
- when ( text = ss . scan ( /\' [^']*\' / ) )
65
+ when ( text = ss . scan ( /\' [^']*\' /i ) )
66
66
@rex_tokens . push action { [ :character_string_literal , text [ 1 ..-2 ] ] }
67
67
68
- when ( text = ss . scan ( /[0-9]+/ ) )
68
+ when ( text = ss . scan ( /[0-9]+/i ) )
69
69
@rex_tokens . push action { [ :unsigned_integer , text . to_i ] }
70
70
71
- when ( text = ss . scan ( /\s +/ ) )
71
+ when ( text = ss . scan ( /\s +/i ) )
72
72
;
73
73
74
- when ( text = ss . scan ( /SELECT/ ) )
74
+ when ( text = ss . scan ( /SELECT/i ) )
75
75
@rex_tokens . push action { [ :SELECT , text ] }
76
76
77
- when ( text = ss . scan ( /DATE/ ) )
77
+ when ( text = ss . scan ( /DATE/i ) )
78
78
@rex_tokens . push action { [ :DATE , text ] }
79
79
80
- when ( text = ss . scan ( /AS/ ) )
80
+ when ( text = ss . scan ( /AS/i ) )
81
81
@rex_tokens . push action { [ :AS , text ] }
82
82
83
- when ( text = ss . scan ( /FROM/ ) )
83
+ when ( text = ss . scan ( /FROM/i ) )
84
84
@rex_tokens . push action { [ :FROM , text ] }
85
85
86
- when ( text = ss . scan ( /WHERE/ ) )
86
+ when ( text = ss . scan ( /WHERE/i ) )
87
87
@rex_tokens . push action { [ :WHERE , text ] }
88
88
89
- when ( text = ss . scan ( /BETWEEN/ ) )
89
+ when ( text = ss . scan ( /BETWEEN/i ) )
90
90
@rex_tokens . push action { [ :BETWEEN , text ] }
91
91
92
- when ( text = ss . scan ( /AND/ ) )
92
+ when ( text = ss . scan ( /AND/i ) )
93
93
@rex_tokens . push action { [ :AND , text ] }
94
94
95
- when ( text = ss . scan ( /NOT/ ) )
95
+ when ( text = ss . scan ( /NOT/i ) )
96
96
@rex_tokens . push action { [ :NOT , text ] }
97
97
98
- when ( text = ss . scan ( /INNER/ ) )
98
+ when ( text = ss . scan ( /INNER/i ) )
99
99
@rex_tokens . push action { [ :INNER , text ] }
100
100
101
- when ( text = ss . scan ( /IN/ ) )
101
+ when ( text = ss . scan ( /IN/i ) )
102
102
@rex_tokens . push action { [ :IN , text ] }
103
103
104
- when ( text = ss . scan ( /OR/ ) )
104
+ when ( text = ss . scan ( /OR/i ) )
105
105
@rex_tokens . push action { [ :OR , text ] }
106
106
107
- when ( text = ss . scan ( /LIKE/ ) )
107
+ when ( text = ss . scan ( /LIKE/i ) )
108
108
@rex_tokens . push action { [ :LIKE , text ] }
109
109
110
- when ( text = ss . scan ( /IS/ ) )
110
+ when ( text = ss . scan ( /IS/i ) )
111
111
@rex_tokens . push action { [ :IS , text ] }
112
112
113
- when ( text = ss . scan ( /NULL/ ) )
113
+ when ( text = ss . scan ( /NULL/i ) )
114
114
@rex_tokens . push action { [ :NULL , text ] }
115
115
116
- when ( text = ss . scan ( /COUNT/ ) )
116
+ when ( text = ss . scan ( /COUNT/i ) )
117
117
@rex_tokens . push action { [ :COUNT , text ] }
118
118
119
- when ( text = ss . scan ( /AVG/ ) )
119
+ when ( text = ss . scan ( /AVG/i ) )
120
120
@rex_tokens . push action { [ :AVG , text ] }
121
121
122
- when ( text = ss . scan ( /MAX/ ) )
122
+ when ( text = ss . scan ( /MAX/i ) )
123
123
@rex_tokens . push action { [ :MAX , text ] }
124
124
125
- when ( text = ss . scan ( /MIN/ ) )
125
+ when ( text = ss . scan ( /MIN/i ) )
126
126
@rex_tokens . push action { [ :MIN , text ] }
127
127
128
- when ( text = ss . scan ( /SUM/ ) )
128
+ when ( text = ss . scan ( /SUM/i ) )
129
129
@rex_tokens . push action { [ :SUM , text ] }
130
130
131
- when ( text = ss . scan ( /GROUP/ ) )
131
+ when ( text = ss . scan ( /GROUP/i ) )
132
132
@rex_tokens . push action { [ :GROUP , text ] }
133
133
134
- when ( text = ss . scan ( /BY/ ) )
134
+ when ( text = ss . scan ( /BY/i ) )
135
135
@rex_tokens . push action { [ :BY , text ] }
136
136
137
- when ( text = ss . scan ( /HAVING/ ) )
137
+ when ( text = ss . scan ( /HAVING/i ) )
138
138
@rex_tokens . push action { [ :HAVING , text ] }
139
139
140
- when ( text = ss . scan ( /CROSS/ ) )
140
+ when ( text = ss . scan ( /CROSS/i ) )
141
141
@rex_tokens . push action { [ :CROSS , text ] }
142
142
143
- when ( text = ss . scan ( /JOIN/ ) )
143
+ when ( text = ss . scan ( /JOIN/i ) )
144
144
@rex_tokens . push action { [ :JOIN , text ] }
145
145
146
- when ( text = ss . scan ( /ON/ ) )
146
+ when ( text = ss . scan ( /ON/i ) )
147
147
@rex_tokens . push action { [ :ON , text ] }
148
148
149
- when ( text = ss . scan ( /LEFT/ ) )
149
+ when ( text = ss . scan ( /LEFT/i ) )
150
150
@rex_tokens . push action { [ :LEFT , text ] }
151
151
152
- when ( text = ss . scan ( /OUTER/ ) )
152
+ when ( text = ss . scan ( /OUTER/i ) )
153
153
@rex_tokens . push action { [ :OUTER , text ] }
154
154
155
- when ( text = ss . scan ( /RIGHT/ ) )
155
+ when ( text = ss . scan ( /RIGHT/i ) )
156
156
@rex_tokens . push action { [ :RIGHT , text ] }
157
157
158
- when ( text = ss . scan ( /FULL/ ) )
158
+ when ( text = ss . scan ( /FULL/i ) )
159
159
@rex_tokens . push action { [ :FULL , text ] }
160
160
161
- when ( text = ss . scan ( /USING/ ) )
161
+ when ( text = ss . scan ( /USING/i ) )
162
162
@rex_tokens . push action { [ :USING , text ] }
163
163
164
- when ( text = ss . scan ( /<>/ ) )
164
+ when ( text = ss . scan ( /<>/i ) )
165
165
@rex_tokens . push action { [ :not_equals_operator , text ] }
166
166
167
- when ( text = ss . scan ( /!=/ ) )
167
+ when ( text = ss . scan ( /!=/i ) )
168
168
@rex_tokens . push action { [ :not_equals_operator , text ] }
169
169
170
- when ( text = ss . scan ( /=/ ) )
170
+ when ( text = ss . scan ( /=/i ) )
171
171
@rex_tokens . push action { [ :equals_operator , text ] }
172
172
173
- when ( text = ss . scan ( /<=/ ) )
173
+ when ( text = ss . scan ( /<=/i ) )
174
174
@rex_tokens . push action { [ :less_than_or_equals_operator , text ] }
175
175
176
- when ( text = ss . scan ( /</ ) )
176
+ when ( text = ss . scan ( /</i ) )
177
177
@rex_tokens . push action { [ :less_than_operator , text ] }
178
178
179
- when ( text = ss . scan ( />=/ ) )
179
+ when ( text = ss . scan ( />=/i ) )
180
180
@rex_tokens . push action { [ :greater_than_or_equals_operator , text ] }
181
181
182
- when ( text = ss . scan ( />/ ) )
182
+ when ( text = ss . scan ( />/i ) )
183
183
@rex_tokens . push action { [ :greater_than_operator , text ] }
184
184
185
- when ( text = ss . scan ( /\( / ) )
185
+ when ( text = ss . scan ( /\( /i ) )
186
186
@rex_tokens . push action { [ :left_paren , text ] }
187
187
188
- when ( text = ss . scan ( /\) / ) )
188
+ when ( text = ss . scan ( /\) /i ) )
189
189
@rex_tokens . push action { [ :right_paren , text ] }
190
190
191
- when ( text = ss . scan ( /\* / ) )
191
+ when ( text = ss . scan ( /\* /i ) )
192
192
@rex_tokens . push action { [ :asterisk , text ] }
193
193
194
- when ( text = ss . scan ( /\/ / ) )
194
+ when ( text = ss . scan ( /\/ /i ) )
195
195
@rex_tokens . push action { [ :solidus , text ] }
196
196
197
- when ( text = ss . scan ( /\+ / ) )
197
+ when ( text = ss . scan ( /\+ /i ) )
198
198
@rex_tokens . push action { [ :plus_sign , text ] }
199
199
200
- when ( text = ss . scan ( /\- / ) )
200
+ when ( text = ss . scan ( /\- /i ) )
201
201
@rex_tokens . push action { [ :minus_sign , text ] }
202
202
203
- when ( text = ss . scan ( /\. / ) )
203
+ when ( text = ss . scan ( /\. /i ) )
204
204
@rex_tokens . push action { [ :period , text ] }
205
205
206
- when ( text = ss . scan ( /,/ ) )
206
+ when ( text = ss . scan ( /,/i ) )
207
207
@rex_tokens . push action { [ :comma , text ] }
208
208
209
- when ( text = ss . scan ( /`\w +`/ ) )
209
+ when ( text = ss . scan ( /`\w +`/i ) )
210
210
@rex_tokens . push action { [ :identifier , text [ 1 ..-2 ] ] }
211
211
212
- when ( text = ss . scan ( /\w +/ ) )
212
+ when ( text = ss . scan ( /\w +/i ) )
213
213
@rex_tokens . push action { [ :identifier , text ] }
214
214
215
- when ( text = ss . scan ( /----/ ) )
215
+ when ( text = ss . scan ( /----/i ) )
216
216
;
217
217
218
- when ( text = ss . scan ( /require/ ) )
218
+ when ( text = ss . scan ( /require/i ) )
219
219
;
220
220
221
221
else
0 commit comments