sql-parser 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sql-parser.rb +13 -0
- data/lib/sql-parser/parser.racc +315 -0
- data/lib/sql-parser/parser.racc.rb +1424 -0
- data/lib/sql-parser/parser.rex +100 -0
- data/lib/sql-parser/parser.rex.rb +273 -0
- data/lib/sql-parser/sql_visitor.rb +351 -0
- data/lib/sql-parser/statement.rb +492 -0
- data/lib/sql-parser/version.rb +5 -0
- metadata +103 -0
data/lib/sql-parser.rb
ADDED
@@ -0,0 +1,315 @@
|
|
1
|
+
class SQLParser::Parser
|
2
|
+
|
3
|
+
rule
|
4
|
+
# dynamic sql
|
5
|
+
direct_sql_statement
|
6
|
+
: direct_sql_data_statement
|
7
|
+
|
8
|
+
direct_sql_data_statement
|
9
|
+
: direct_select_statement_multiple_rows
|
10
|
+
|
11
|
+
direct_select_statement_multiple_rows
|
12
|
+
: query_expression order_by_clause { result = SQL::Statement::DirectSelect.new(val[0], val[1]) }
|
13
|
+
|
14
|
+
# module contents
|
15
|
+
order_by_clause
|
16
|
+
: # no action
|
17
|
+
| ORDER BY sort_specification_list { result = SQL::Statement::OrderBy.new(val[2]) }
|
18
|
+
|
19
|
+
sort_specification_list
|
20
|
+
: sort_specification_list comma sort_specification { result = Array(val[0]) + Array(val[2]) }
|
21
|
+
| sort_specification
|
22
|
+
|
23
|
+
sort_specification
|
24
|
+
: sort_key ordering_specification { result = val[1].new(val[0]) }
|
25
|
+
|
26
|
+
sort_key
|
27
|
+
: column_name
|
28
|
+
| unsigned_integer { result = SQL::Statement::Integer.new(val[0]) }
|
29
|
+
|
30
|
+
ordering_specification
|
31
|
+
: { result = SQL::Statement::Ascending } # default
|
32
|
+
| ASC { result = SQL::Statement::Ascending }
|
33
|
+
| DESC { result = SQL::Statement::Descending }
|
34
|
+
|
35
|
+
# queries
|
36
|
+
subquery
|
37
|
+
# FIXME: shortcut
|
38
|
+
: left_paren query_expression right_paren { result = SQL::Statement::Subquery.new(val[1]) }
|
39
|
+
|
40
|
+
query_expression
|
41
|
+
: query_specification
|
42
|
+
|
43
|
+
query_specification
|
44
|
+
: SELECT select_list table_expression { result = SQL::Statement::Select.new(val[1], val[2]) }
|
45
|
+
| SELECT select_list { result = SQL::Statement::Select.new(val[1]) }
|
46
|
+
|
47
|
+
select_list
|
48
|
+
: asterisk { result = SQL::Statement::All.new }
|
49
|
+
| select_sublist { result = SQL::Statement::SelectList.new(val[0]) }
|
50
|
+
|
51
|
+
select_sublist
|
52
|
+
: derived_column comma select_sublist { result = Array(val[0]) + Array(val[2]) }
|
53
|
+
| derived_column
|
54
|
+
|
55
|
+
derived_column
|
56
|
+
: value_expression AS column_name { result = SQL::Statement::As.new(val[0], val[2]) }
|
57
|
+
| value_expression column_name { result = SQL::Statement::As.new(val[0], val[1]) }
|
58
|
+
| value_expression
|
59
|
+
|
60
|
+
table_expression
|
61
|
+
: from_clause where_clause group_by_clause having_clause { result = SQL::Statement::TableExpression.new(val[0], val[1], val[2], val[3]) }
|
62
|
+
|
63
|
+
from_clause
|
64
|
+
: FROM table_reference { result = SQL::Statement::FromClause.new(val[1]) }
|
65
|
+
|
66
|
+
table_reference
|
67
|
+
: table_name AS column_name { result = SQL::Statement::As.new(val[0], val[2]) }
|
68
|
+
| table_name column_name { result = SQL::Statement::As.new(val[0], val[1]) }
|
69
|
+
| table_name
|
70
|
+
| joined_table
|
71
|
+
|
72
|
+
table_subquery
|
73
|
+
: subquery
|
74
|
+
|
75
|
+
joined_table
|
76
|
+
: cross_join
|
77
|
+
| qualified_join
|
78
|
+
|
79
|
+
cross_join
|
80
|
+
: table_reference comma table_name { result = SQL::Statement::CrossJoin.new(val[0], val[2]) }
|
81
|
+
| table_reference CROSS JOIN table_name { result = SQL::Statement::CrossJoin.new(val[0], val[3]) }
|
82
|
+
|
83
|
+
qualified_join
|
84
|
+
: table_reference join_type JOIN table_reference join_specification { result = val[1].new(val[0], val[3], val[4]) }
|
85
|
+
|
86
|
+
join_type
|
87
|
+
: INNER { result = SQL::Statement::InnerJoin }
|
88
|
+
| LEFT OUTER { result = SQL::Statement::LeftOuterJoin }
|
89
|
+
| LEFT { result = SQL::Statement::LeftJoin }
|
90
|
+
| RIGHT OUTER { result = SQL::Statement::RightOuterJoin }
|
91
|
+
| RIGHT { result = SQL::Statement::RightJoin }
|
92
|
+
| FULL { result = SQL::Statement::FullJoin }
|
93
|
+
| FULL OUTER { result = SQL::Statement::FullOuterJoin }
|
94
|
+
|
95
|
+
join_specification
|
96
|
+
: join_condition
|
97
|
+
| named_columns_join
|
98
|
+
|
99
|
+
join_condition
|
100
|
+
: ON search_condition { result = SQL::Statement::On.new(val[1]) }
|
101
|
+
|
102
|
+
named_columns_join
|
103
|
+
: USING left_paren join_column_list right_paren { result = SQL::Statement::Using.new(val[2]) }
|
104
|
+
|
105
|
+
join_column_list
|
106
|
+
: column_name_list
|
107
|
+
|
108
|
+
where_clause
|
109
|
+
: # no action
|
110
|
+
| WHERE search_condition { result = SQL::Statement::WhereClause.new(val[1]) }
|
111
|
+
|
112
|
+
group_by_clause
|
113
|
+
: # no action
|
114
|
+
| GROUP BY grouping_column_reference_list { result = SQL::Statement::GroupByClause.new(val[2]) }
|
115
|
+
|
116
|
+
grouping_column_reference_list
|
117
|
+
: grouping_column_reference_list comma grouping_column_reference { result = Array(val[0]) + Array(val[2]) }
|
118
|
+
| grouping_column_reference
|
119
|
+
|
120
|
+
grouping_column_reference
|
121
|
+
: column_reference
|
122
|
+
|
123
|
+
having_clause
|
124
|
+
: # no action
|
125
|
+
| HAVING search_condition { result = SQL::Statement::HavingClause.new(val[1]) }
|
126
|
+
|
127
|
+
# query expression components
|
128
|
+
row_subquery
|
129
|
+
: subquery
|
130
|
+
|
131
|
+
between_predicate
|
132
|
+
: row_value_constructor NOT BETWEEN row_value_constructor AND row_value_constructor { result = SQL::Statement::Not.new(SQL::Statement::Between.new(val[0], val[3], val[5])) }
|
133
|
+
| row_value_constructor BETWEEN row_value_constructor AND row_value_constructor { result = SQL::Statement::Between.new(val[0], val[2], val[4]) }
|
134
|
+
|
135
|
+
in_predicate
|
136
|
+
: row_value_constructor NOT IN in_predicate_value { result = SQL::Statement::Not.new(SQL::Statement::In.new(val[0], val[3])) }
|
137
|
+
| row_value_constructor IN in_predicate_value { result = SQL::Statement::In.new(val[0], val[2]) }
|
138
|
+
|
139
|
+
in_predicate_value
|
140
|
+
: table_subquery
|
141
|
+
| left_paren in_value_list right_paren { result = SQL::Statement::InValueList.new(val[1]) }
|
142
|
+
|
143
|
+
in_value_list
|
144
|
+
: value_expression comma in_value_list { result = Array(val[0]) + Array(val[2]) }
|
145
|
+
| value_expression
|
146
|
+
|
147
|
+
like_predicate
|
148
|
+
# FIXME: the SQL-92 grammar indicates these should be
|
149
|
+
# character_value_expression nodes, but changing them causes reduce/reduce
|
150
|
+
# conflicts.
|
151
|
+
: row_value_constructor NOT LIKE row_value_constructor { result = SQL::Statement::Not.new(SQL::Statement::Like.new(val[0], val[3])) }
|
152
|
+
| row_value_constructor LIKE row_value_constructor { result = SQL::Statement::Like.new(val[0], val[2]) }
|
153
|
+
|
154
|
+
null_predicate
|
155
|
+
: row_value_constructor IS NOT NULL { result = SQL::Statement::Not.new(SQL::Statement::Is.new(val[0], SQL::Statement::Null.new)) }
|
156
|
+
| row_value_constructor IS NULL { result = SQL::Statement::Is.new(val[0], SQL::Statement::Null.new) }
|
157
|
+
|
158
|
+
exists_predicate
|
159
|
+
: EXISTS table_subquery { result = SQL::Statement::Exists.new(val[1]) }
|
160
|
+
|
161
|
+
# constraints
|
162
|
+
table_name
|
163
|
+
: identifier { result = SQL::Statement::Table.new(val[0]) }
|
164
|
+
|
165
|
+
column_name_list
|
166
|
+
: column_name_list comma column_name { result = Array(val[0]) + Array(val[2]) }
|
167
|
+
| column_name
|
168
|
+
|
169
|
+
# search condition
|
170
|
+
search_condition
|
171
|
+
: boolean_term
|
172
|
+
| search_condition OR boolean_term { result = SQL::Statement::Or.new(val[0], val[2]) }
|
173
|
+
|
174
|
+
boolean_term
|
175
|
+
: boolean_factor
|
176
|
+
| boolean_term AND boolean_factor { result = SQL::Statement::And.new(val[0], val[2]) }
|
177
|
+
|
178
|
+
boolean_factor:
|
179
|
+
: NOT boolean_test { result = SQL::Statement::Not.new(val[1]) }
|
180
|
+
| boolean_test
|
181
|
+
|
182
|
+
boolean_test
|
183
|
+
: boolean_primary
|
184
|
+
|
185
|
+
boolean_primary
|
186
|
+
: predicate
|
187
|
+
| left_paren search_condition right_paren { result = val[1] }
|
188
|
+
|
189
|
+
predicate
|
190
|
+
: comparison_predicate
|
191
|
+
| between_predicate
|
192
|
+
| in_predicate
|
193
|
+
| like_predicate
|
194
|
+
| null_predicate
|
195
|
+
| exists_predicate
|
196
|
+
|
197
|
+
comparison_predicate
|
198
|
+
: row_value_constructor equals_operator row_value_constructor { result = SQL::Statement::Equals.new(val[0], val[2]) }
|
199
|
+
| row_value_constructor not_equals_operator row_value_constructor { result = SQL::Statement::Not.new(SQL::Statement::Equals.new(val[0], val[2])) }
|
200
|
+
| row_value_constructor less_than_operator row_value_constructor { result = SQL::Statement::Less.new(val[0], val[2]) }
|
201
|
+
| row_value_constructor greater_than_operator row_value_constructor { result = SQL::Statement::Greater.new(val[0], val[2]) }
|
202
|
+
| row_value_constructor less_than_or_equals_operator row_value_constructor { result = SQL::Statement::LessOrEquals.new(val[0], val[2]) }
|
203
|
+
| row_value_constructor greater_than_or_equals_operator row_value_constructor { result = SQL::Statement::GreaterOrEquals.new(val[0], val[2]) }
|
204
|
+
|
205
|
+
row_value_constructor
|
206
|
+
: row_value_constructor_element
|
207
|
+
| row_subquery
|
208
|
+
|
209
|
+
row_value_constructor_element
|
210
|
+
: value_expression
|
211
|
+
|
212
|
+
value_expression
|
213
|
+
: numeric_value_expression
|
214
|
+
|
215
|
+
numeric_value_expression
|
216
|
+
: term plus_sign numeric_value_expression { result = SQL::Statement::Add.new(val[0], val[2]) }
|
217
|
+
| term minus_sign numeric_value_expression { result = SQL::Statement::Subtract.new(val[0], val[2]) }
|
218
|
+
| term
|
219
|
+
|
220
|
+
term
|
221
|
+
: factor asterisk term { result = SQL::Statement::Multiply.new(val[0], val[2]) }
|
222
|
+
| factor solidus term { result = SQL::Statement::Divide.new(val[0], val[2]) }
|
223
|
+
| factor
|
224
|
+
|
225
|
+
factor
|
226
|
+
: sign value_expression_primary { result = val[0].new(val[1]) }
|
227
|
+
| value_expression_primary
|
228
|
+
|
229
|
+
value_expression_primary
|
230
|
+
: unsigned_value_specification
|
231
|
+
| column_reference
|
232
|
+
| set_function_specification
|
233
|
+
| left_paren value_expression right_paren { result = val[1] }
|
234
|
+
|
235
|
+
unsigned_value_specification
|
236
|
+
: unsigned_literal
|
237
|
+
| general_value_specification
|
238
|
+
|
239
|
+
unsigned_literal
|
240
|
+
: unsigned_numeric_literal
|
241
|
+
| general_literal
|
242
|
+
|
243
|
+
general_value_specification
|
244
|
+
: CURRENT_USER { result = SQL::Statement::CurrentUser.new }
|
245
|
+
|
246
|
+
column_reference
|
247
|
+
: qualifier period column_name { result = SQL::Statement::QualifiedColumn.new(val[0], val[2]) }
|
248
|
+
| column_name
|
249
|
+
|
250
|
+
qualifier
|
251
|
+
: table_name
|
252
|
+
|
253
|
+
set_function_specification
|
254
|
+
: COUNT left_paren asterisk right_paren { result = SQL::Statement::Count.new(SQL::Statement::All.new) }
|
255
|
+
| general_set_function
|
256
|
+
|
257
|
+
general_set_function
|
258
|
+
: COUNT left_paren value_expression right_paren { result = SQL::Statement::Count.new(val[2]) }
|
259
|
+
| AVG left_paren value_expression right_paren { result = SQL::Statement::Average.new(val[2]) }
|
260
|
+
| MAX left_paren value_expression right_paren { result = SQL::Statement::Maximum.new(val[2]) }
|
261
|
+
| MIN left_paren value_expression right_paren { result = SQL::Statement::Minimum.new(val[2]) }
|
262
|
+
| SUM left_paren value_expression right_paren { result = SQL::Statement::Sum.new(val[2]) }
|
263
|
+
|
264
|
+
# literal numbers, strings, dates and times
|
265
|
+
unsigned_numeric_literal
|
266
|
+
: exact_numeric_literal
|
267
|
+
| approximate_numeric_literal
|
268
|
+
|
269
|
+
exact_numeric_literal
|
270
|
+
: unsigned_integer period unsigned_integer { result = SQL::Statement::Float.new("#{val[0]}.#{val[2]}".to_f) }
|
271
|
+
| unsigned_integer period { result = SQL::Statement::Float.new(val[0]) }
|
272
|
+
| period unsigned_integer { result = SQL::Statement::Float.new("0.#{val[1]}".to_f) }
|
273
|
+
| unsigned_integer { result = SQL::Statement::Integer.new(val[0]) }
|
274
|
+
|
275
|
+
approximate_numeric_literal
|
276
|
+
: mantissa E exponent { result = SQL::Statement::ApproximateFloat.new(val[0], val[2]) }
|
277
|
+
|
278
|
+
mantissa
|
279
|
+
: exact_numeric_literal
|
280
|
+
|
281
|
+
exponent
|
282
|
+
: signed_integer
|
283
|
+
|
284
|
+
signed_integer
|
285
|
+
: sign unsigned_integer { result = val[0].new(SQL::Statement::Integer.new(val[1])) }
|
286
|
+
| unsigned_integer { result = SQL::Statement::Integer.new(val[0]) }
|
287
|
+
|
288
|
+
sign
|
289
|
+
: plus_sign { result = SQL::Statement::UnaryPlus }
|
290
|
+
| minus_sign { result = SQL::Statement::UnaryMinus }
|
291
|
+
|
292
|
+
# sql module
|
293
|
+
column_name
|
294
|
+
: identifier { result = SQL::Statement::Column.new(val[0]) }
|
295
|
+
|
296
|
+
# literals
|
297
|
+
general_literal
|
298
|
+
: quote character_string_literal quote { result = SQL::Statement::String.new(val[1]) }
|
299
|
+
| quote quote { result = SQL::Statement::String.new('') }
|
300
|
+
| datetime_literal
|
301
|
+
|
302
|
+
datetime_literal
|
303
|
+
: date_literal
|
304
|
+
|
305
|
+
date_literal
|
306
|
+
: DATE date_string { result = SQL::Statement::Date.new(val[1]) }
|
307
|
+
|
308
|
+
---- header ----
|
309
|
+
require File.dirname(__FILE__) + '/parser.rex.rb'
|
310
|
+
|
311
|
+
---- inner ----
|
312
|
+
|
313
|
+
def self.parse(sql)
|
314
|
+
new.scan_str(sql)
|
315
|
+
end
|
@@ -0,0 +1,1424 @@
|
|
1
|
+
require_relative 'parser.rex.rb'
|
2
|
+
|
3
|
+
module SQLParser
|
4
|
+
|
5
|
+
class Parser < Racc::Parser
|
6
|
+
|
7
|
+
module_eval <<'..end lib/sql/parser.racc modeval..id637f2c9ecb', 'lib/sql/parser.racc', 312
|
8
|
+
|
9
|
+
def self.parse(sql)
|
10
|
+
new.scan_str(sql)
|
11
|
+
end
|
12
|
+
..end lib/sql/parser.racc modeval..id637f2c9ecb
|
13
|
+
|
14
|
+
##### racc 1.4.5 generates ###
|
15
|
+
|
16
|
+
racc_reduce_table = [
|
17
|
+
0, 0, :racc_error,
|
18
|
+
1, 58, :_reduce_none,
|
19
|
+
1, 59, :_reduce_none,
|
20
|
+
2, 60, :_reduce_3,
|
21
|
+
0, 62, :_reduce_none,
|
22
|
+
3, 62, :_reduce_5,
|
23
|
+
3, 63, :_reduce_6,
|
24
|
+
1, 63, :_reduce_none,
|
25
|
+
2, 64, :_reduce_8,
|
26
|
+
1, 65, :_reduce_none,
|
27
|
+
1, 65, :_reduce_10,
|
28
|
+
0, 66, :_reduce_11,
|
29
|
+
1, 66, :_reduce_12,
|
30
|
+
1, 66, :_reduce_13,
|
31
|
+
3, 68, :_reduce_14,
|
32
|
+
1, 61, :_reduce_none,
|
33
|
+
3, 69, :_reduce_16,
|
34
|
+
2, 69, :_reduce_17,
|
35
|
+
1, 70, :_reduce_18,
|
36
|
+
1, 70, :_reduce_19,
|
37
|
+
3, 72, :_reduce_20,
|
38
|
+
1, 72, :_reduce_none,
|
39
|
+
3, 73, :_reduce_22,
|
40
|
+
2, 73, :_reduce_23,
|
41
|
+
1, 73, :_reduce_none,
|
42
|
+
4, 71, :_reduce_25,
|
43
|
+
2, 75, :_reduce_26,
|
44
|
+
3, 79, :_reduce_27,
|
45
|
+
2, 79, :_reduce_28,
|
46
|
+
1, 79, :_reduce_none,
|
47
|
+
1, 79, :_reduce_none,
|
48
|
+
1, 82, :_reduce_none,
|
49
|
+
1, 81, :_reduce_none,
|
50
|
+
1, 81, :_reduce_none,
|
51
|
+
3, 83, :_reduce_34,
|
52
|
+
4, 83, :_reduce_35,
|
53
|
+
5, 84, :_reduce_36,
|
54
|
+
1, 85, :_reduce_37,
|
55
|
+
2, 85, :_reduce_38,
|
56
|
+
1, 85, :_reduce_39,
|
57
|
+
2, 85, :_reduce_40,
|
58
|
+
1, 85, :_reduce_41,
|
59
|
+
1, 85, :_reduce_42,
|
60
|
+
2, 85, :_reduce_43,
|
61
|
+
1, 86, :_reduce_none,
|
62
|
+
1, 86, :_reduce_none,
|
63
|
+
2, 87, :_reduce_46,
|
64
|
+
4, 88, :_reduce_47,
|
65
|
+
1, 90, :_reduce_none,
|
66
|
+
0, 76, :_reduce_none,
|
67
|
+
2, 76, :_reduce_50,
|
68
|
+
0, 77, :_reduce_none,
|
69
|
+
3, 77, :_reduce_52,
|
70
|
+
3, 92, :_reduce_53,
|
71
|
+
1, 92, :_reduce_none,
|
72
|
+
1, 93, :_reduce_none,
|
73
|
+
0, 78, :_reduce_none,
|
74
|
+
2, 78, :_reduce_57,
|
75
|
+
1, 95, :_reduce_none,
|
76
|
+
6, 96, :_reduce_59,
|
77
|
+
5, 96, :_reduce_60,
|
78
|
+
4, 98, :_reduce_61,
|
79
|
+
3, 98, :_reduce_62,
|
80
|
+
1, 99, :_reduce_none,
|
81
|
+
3, 99, :_reduce_64,
|
82
|
+
3, 100, :_reduce_65,
|
83
|
+
1, 100, :_reduce_none,
|
84
|
+
4, 101, :_reduce_67,
|
85
|
+
3, 101, :_reduce_68,
|
86
|
+
4, 102, :_reduce_69,
|
87
|
+
3, 102, :_reduce_70,
|
88
|
+
2, 103, :_reduce_71,
|
89
|
+
1, 80, :_reduce_72,
|
90
|
+
3, 91, :_reduce_73,
|
91
|
+
1, 91, :_reduce_none,
|
92
|
+
1, 89, :_reduce_none,
|
93
|
+
3, 89, :_reduce_76,
|
94
|
+
1, 104, :_reduce_none,
|
95
|
+
3, 104, :_reduce_78,
|
96
|
+
2, 105, :_reduce_79,
|
97
|
+
1, 105, :_reduce_none,
|
98
|
+
1, 106, :_reduce_none,
|
99
|
+
1, 107, :_reduce_none,
|
100
|
+
3, 107, :_reduce_83,
|
101
|
+
1, 108, :_reduce_none,
|
102
|
+
1, 108, :_reduce_none,
|
103
|
+
1, 108, :_reduce_none,
|
104
|
+
1, 108, :_reduce_none,
|
105
|
+
1, 108, :_reduce_none,
|
106
|
+
1, 108, :_reduce_none,
|
107
|
+
3, 109, :_reduce_90,
|
108
|
+
3, 109, :_reduce_91,
|
109
|
+
3, 109, :_reduce_92,
|
110
|
+
3, 109, :_reduce_93,
|
111
|
+
3, 109, :_reduce_94,
|
112
|
+
3, 109, :_reduce_95,
|
113
|
+
1, 97, :_reduce_none,
|
114
|
+
1, 97, :_reduce_none,
|
115
|
+
1, 110, :_reduce_none,
|
116
|
+
1, 74, :_reduce_none,
|
117
|
+
3, 111, :_reduce_100,
|
118
|
+
3, 111, :_reduce_101,
|
119
|
+
1, 111, :_reduce_none,
|
120
|
+
3, 112, :_reduce_103,
|
121
|
+
3, 112, :_reduce_104,
|
122
|
+
1, 112, :_reduce_none,
|
123
|
+
2, 113, :_reduce_106,
|
124
|
+
1, 113, :_reduce_none,
|
125
|
+
1, 115, :_reduce_none,
|
126
|
+
1, 115, :_reduce_none,
|
127
|
+
1, 115, :_reduce_none,
|
128
|
+
3, 115, :_reduce_111,
|
129
|
+
1, 116, :_reduce_none,
|
130
|
+
1, 116, :_reduce_none,
|
131
|
+
1, 118, :_reduce_none,
|
132
|
+
1, 118, :_reduce_none,
|
133
|
+
1, 119, :_reduce_116,
|
134
|
+
3, 94, :_reduce_117,
|
135
|
+
1, 94, :_reduce_none,
|
136
|
+
1, 122, :_reduce_none,
|
137
|
+
4, 117, :_reduce_120,
|
138
|
+
1, 117, :_reduce_none,
|
139
|
+
4, 123, :_reduce_122,
|
140
|
+
4, 123, :_reduce_123,
|
141
|
+
4, 123, :_reduce_124,
|
142
|
+
4, 123, :_reduce_125,
|
143
|
+
4, 123, :_reduce_126,
|
144
|
+
1, 120, :_reduce_none,
|
145
|
+
1, 120, :_reduce_none,
|
146
|
+
3, 124, :_reduce_129,
|
147
|
+
2, 124, :_reduce_130,
|
148
|
+
2, 124, :_reduce_131,
|
149
|
+
1, 124, :_reduce_132,
|
150
|
+
3, 125, :_reduce_133,
|
151
|
+
1, 126, :_reduce_none,
|
152
|
+
1, 127, :_reduce_none,
|
153
|
+
2, 128, :_reduce_136,
|
154
|
+
1, 128, :_reduce_137,
|
155
|
+
1, 114, :_reduce_138,
|
156
|
+
1, 114, :_reduce_139,
|
157
|
+
1, 67, :_reduce_140,
|
158
|
+
3, 121, :_reduce_141,
|
159
|
+
2, 121, :_reduce_142,
|
160
|
+
1, 121, :_reduce_none,
|
161
|
+
1, 129, :_reduce_none,
|
162
|
+
2, 130, :_reduce_145 ]
|
163
|
+
|
164
|
+
racc_reduce_n = 146
|
165
|
+
|
166
|
+
racc_shift_n = 238
|
167
|
+
|
168
|
+
racc_action_table = [
|
169
|
+
30, 59, 78, 42, 78, 74, 85, 118, 125, 187,
|
170
|
+
204, 55, 56, 6, 99, 115, 205, 117, 30, 119,
|
171
|
+
120, 42, 121, 123, 213, 210, 114, 72, 147, 17,
|
172
|
+
72, 72, 148, 72, 58, 163, 30, 46, 48, 189,
|
173
|
+
15, 18, 22, 26, 31, 33, 37, 17, 45, 149,
|
174
|
+
10, 46, 48, 112, 113, 46, 48, 150, 15, 18,
|
175
|
+
22, 26, 31, 33, 37, 17, 45, 151, 10, 30,
|
176
|
+
75, 76, 42, 46, 48, 12, 15, 18, 22, 26,
|
177
|
+
31, 33, 37, 110, 45, 153, 10, 30, 90, 118,
|
178
|
+
189, 192, 155, 193, 194, 156, 157, 158, 17, 117,
|
179
|
+
72, 119, 120, 162, 121, 123, 46, 48, 163, 15,
|
180
|
+
18, 22, 26, 31, 33, 37, 17, 45, 30, 10,
|
181
|
+
109, 141, 165, 72, 46, 48, 107, 15, 18, 22,
|
182
|
+
26, 31, 33, 37, 181, 45, 182, 10, 30, 133,
|
183
|
+
90, 42, 90, 6, 6, 102, 127, 17, 96, 90,
|
184
|
+
188, 107, 116, 72, 70, 46, 48, 69, 15, 18,
|
185
|
+
22, 26, 31, 33, 37, 68, 45, 17, 10, 30,
|
186
|
+
67, 66, 189, 201, 65, 46, 48, 62, 15, 18,
|
187
|
+
22, 26, 31, 33, 37, 60, 45, 30, 10, 57,
|
188
|
+
189, 17, -134, 165, 54, -72, 201, 53, 17, 218,
|
189
|
+
52, 221, 163, 222, 223, 51, 46, 48, 225, 15,
|
190
|
+
18, 22, 26, 31, 33, 37, 17, 45, 30, 10,
|
191
|
+
50, 42, 227, 6, 46, 48, 228, 15, 18, 22,
|
192
|
+
26, 31, 33, 37, 17, 45, 72, 10, 163, 8,
|
193
|
+
7, 30, 235, 236, 141, 72, nil, 17, nil, nil,
|
194
|
+
nil, nil, nil, nil, nil, 46, 48, nil, 15, 18,
|
195
|
+
22, 26, 31, 33, 37, nil, 45, nil, 10, 127,
|
196
|
+
17, 30, nil, nil, 42, nil, nil, nil, 46, 48,
|
197
|
+
nil, 15, 18, 22, 26, 31, 33, 37, nil, 45,
|
198
|
+
nil, 10, nil, nil, nil, nil, nil, nil, nil, 30,
|
199
|
+
17, nil, 141, nil, nil, nil, nil, nil, 46, 48,
|
200
|
+
nil, 15, 18, 22, 26, 31, 33, 37, nil, 45,
|
201
|
+
133, 10, 30, nil, nil, 42, nil, 127, 17, nil,
|
202
|
+
nil, nil, nil, nil, nil, nil, 46, 48, nil, 15,
|
203
|
+
18, 22, 26, 31, 33, 37, nil, 45, nil, 10,
|
204
|
+
30, 17, nil, 141, nil, nil, nil, nil, nil, 46,
|
205
|
+
48, nil, 15, 18, 22, 26, 31, 33, 37, nil,
|
206
|
+
45, 133, 10, 30, nil, nil, 42, nil, 127, 17,
|
207
|
+
nil, nil, nil, nil, nil, nil, nil, 46, 48, nil,
|
208
|
+
15, 18, 22, 26, 31, 33, 37, nil, 45, nil,
|
209
|
+
10, 30, 17, nil, 189, nil, nil, nil, nil, nil,
|
210
|
+
nil, nil, nil, 15, 18, 22, 26, 31, 33, 37,
|
211
|
+
nil, 45, nil, 10, 30, nil, nil, 189, nil, nil,
|
212
|
+
17, nil, nil, nil, nil, nil, nil, nil, 46, 48,
|
213
|
+
nil, 15, 18, 22, 26, 31, 33, 37, nil, 45,
|
214
|
+
nil, 10, 30, 17, nil, 189, nil, nil, nil, nil,
|
215
|
+
nil, 46, 48, nil, 15, 18, 22, 26, 31, 33,
|
216
|
+
37, nil, 45, nil, 10, 30, nil, nil, 189, nil,
|
217
|
+
nil, 17, nil, nil, nil, nil, nil, nil, nil, 46,
|
218
|
+
48, nil, 15, 18, 22, 26, 31, 33, 37, nil,
|
219
|
+
45, nil, 10, 30, 17, nil, 189, nil, nil, nil,
|
220
|
+
nil, nil, 46, 48, nil, 15, 18, 22, 26, 31,
|
221
|
+
33, 37, nil, 45, nil, 10, nil, nil, nil, nil,
|
222
|
+
nil, 30, 17, nil, 141, nil, nil, nil, nil, nil,
|
223
|
+
46, 48, nil, 15, 18, 22, 26, 31, 33, 37,
|
224
|
+
nil, 45, 133, 10, 30, nil, nil, 42, nil, 127,
|
225
|
+
17, nil, nil, nil, nil, nil, nil, nil, 46, 48,
|
226
|
+
nil, 15, 18, 22, 26, 31, 33, 37, nil, 45,
|
227
|
+
nil, 10, 30, 17, nil, 42, nil, nil, nil, nil,
|
228
|
+
nil, 46, 48, nil, 15, 18, 22, 26, 31, 33,
|
229
|
+
37, nil, 45, nil, 10, 30, nil, nil, 42, nil,
|
230
|
+
nil, 17, nil, nil, nil, nil, nil, nil, nil, 46,
|
231
|
+
48, nil, 15, 18, 22, 26, 31, 33, 37, nil,
|
232
|
+
45, nil, 10, 30, 17, nil, 141, nil, 6, nil,
|
233
|
+
nil, nil, 46, 48, nil, 15, 18, 22, 26, 31,
|
234
|
+
33, 37, nil, 45, 133, 10, nil, nil, nil, nil,
|
235
|
+
nil, 127, 17, 30, nil, nil, 141, nil, nil, nil,
|
236
|
+
46, 48, nil, 15, 18, 22, 26, 31, 33, 37,
|
237
|
+
nil, 45, nil, 10, 133, 30, nil, nil, 189, nil,
|
238
|
+
nil, 127, 17, nil, nil, nil, nil, nil, nil, nil,
|
239
|
+
46, 48, nil, 15, 18, 22, 26, 31, 33, 37,
|
240
|
+
nil, 45, 30, 10, 17, 42, nil, nil, nil, nil,
|
241
|
+
nil, nil, 46, 48, nil, 15, 18, 22, 26, 31,
|
242
|
+
33, 37, nil, 45, 30, 10, nil, 42, nil, nil,
|
243
|
+
nil, 17, nil, nil, nil, nil, nil, nil, nil, 46,
|
244
|
+
48, nil, 15, 18, 22, 26, 31, 33, 37, nil,
|
245
|
+
45, 30, 10, 17, 189, nil, nil, nil, nil, nil,
|
246
|
+
nil, 46, 48, nil, 15, 18, 22, 26, 31, 33,
|
247
|
+
37, nil, 45, 30, 10, nil, 42, nil, nil, nil,
|
248
|
+
17, nil, nil, nil, nil, nil, nil, nil, 46, 48,
|
249
|
+
nil, 15, 18, 22, 26, 31, 33, 37, nil, 45,
|
250
|
+
30, 10, 17, 42, nil, nil, nil, nil, nil, nil,
|
251
|
+
46, 48, nil, 15, 18, 22, 26, 31, 33, 37,
|
252
|
+
nil, 45, 30, 10, nil, 42, nil, nil, nil, 17,
|
253
|
+
nil, nil, nil, nil, nil, nil, nil, 46, 48, nil,
|
254
|
+
15, 18, 22, 26, 31, 33, 37, nil, 45, 30,
|
255
|
+
10, 17, 189, nil, nil, nil, nil, nil, nil, 46,
|
256
|
+
48, nil, 15, 18, 22, 26, 31, 33, 37, nil,
|
257
|
+
45, nil, 10, nil, nil, nil, nil, nil, 17, nil,
|
258
|
+
nil, nil, nil, nil, nil, nil, 46, 48, nil, 15,
|
259
|
+
18, 22, 26, 31, 33, 37, nil, 45, nil, 10,
|
260
|
+
171, 173, nil, 176, 178, 179, nil, nil, nil, nil,
|
261
|
+
169, 170, 172, 174, 175, 177 ]
|
262
|
+
|
263
|
+
racc_action_check = [
|
264
|
+
57, 24, 51, 57, 110, 43, 57, 184, 92, 166,
|
265
|
+
179, 20, 20, 0, 65, 86, 179, 184, 228, 184,
|
266
|
+
184, 228, 184, 184, 184, 184, 85, 43, 97, 57,
|
267
|
+
92, 51, 98, 110, 24, 166, 225, 57, 57, 225,
|
268
|
+
57, 57, 57, 57, 57, 57, 57, 228, 57, 103,
|
269
|
+
57, 65, 65, 81, 81, 228, 228, 104, 228, 228,
|
270
|
+
228, 228, 228, 228, 228, 225, 228, 105, 228, 6,
|
271
|
+
45, 45, 6, 225, 225, 6, 225, 225, 225, 225,
|
272
|
+
225, 225, 225, 79, 225, 117, 225, 218, 118, 91,
|
273
|
+
218, 171, 120, 171, 171, 121, 122, 123, 6, 91,
|
274
|
+
125, 91, 91, 127, 91, 91, 6, 6, 128, 6,
|
275
|
+
6, 6, 6, 6, 6, 6, 218, 6, 213, 6,
|
276
|
+
76, 213, 134, 74, 218, 218, 71, 218, 218, 218,
|
277
|
+
218, 218, 218, 218, 146, 218, 147, 218, 201, 213,
|
278
|
+
153, 201, 157, 201, 162, 66, 213, 213, 64, 62,
|
279
|
+
167, 168, 89, 53, 39, 213, 213, 37, 213, 213,
|
280
|
+
213, 213, 213, 213, 213, 33, 213, 201, 213, 194,
|
281
|
+
31, 30, 194, 176, 29, 201, 201, 28, 201, 201,
|
282
|
+
201, 201, 201, 201, 201, 26, 201, 192, 201, 22,
|
283
|
+
192, 182, 21, 185, 18, 17, 193, 14, 194, 196,
|
284
|
+
10, 204, 206, 207, 210, 8, 194, 194, 215, 194,
|
285
|
+
194, 194, 194, 194, 194, 194, 192, 194, 189, 194,
|
286
|
+
7, 189, 219, 189, 192, 192, 220, 192, 192, 192,
|
287
|
+
192, 192, 192, 192, 222, 192, 223, 192, 224, 5,
|
288
|
+
2, 133, 231, 232, 133, 236, nil, 189, nil, nil,
|
289
|
+
nil, nil, nil, nil, nil, 189, 189, nil, 189, 189,
|
290
|
+
189, 189, 189, 189, 189, nil, 189, nil, 189, 133,
|
291
|
+
133, 70, nil, nil, 70, nil, nil, nil, 133, 133,
|
292
|
+
nil, 133, 133, 133, 133, 133, 133, 133, nil, 133,
|
293
|
+
nil, 133, nil, nil, nil, nil, nil, nil, nil, 181,
|
294
|
+
70, nil, 181, nil, nil, nil, nil, nil, 70, 70,
|
295
|
+
nil, 70, 70, 70, 70, 70, 70, 70, nil, 70,
|
296
|
+
181, 70, 69, nil, nil, 69, nil, 181, 181, nil,
|
297
|
+
nil, nil, nil, nil, nil, nil, 181, 181, nil, 181,
|
298
|
+
181, 181, 181, 181, 181, 181, nil, 181, nil, 181,
|
299
|
+
96, 69, nil, 96, nil, nil, nil, nil, nil, 69,
|
300
|
+
69, nil, 69, 69, 69, 69, 69, 69, 69, nil,
|
301
|
+
69, 96, 69, 27, nil, nil, 27, nil, 96, 96,
|
302
|
+
nil, nil, nil, nil, nil, nil, nil, 96, 96, nil,
|
303
|
+
96, 96, 96, 96, 96, 96, 96, nil, 96, nil,
|
304
|
+
96, 178, 27, nil, 178, nil, nil, nil, nil, nil,
|
305
|
+
nil, nil, nil, 27, 27, 27, 27, 27, 27, 27,
|
306
|
+
nil, 27, nil, 27, 177, nil, nil, 177, nil, nil,
|
307
|
+
178, nil, nil, nil, nil, nil, nil, nil, 178, 178,
|
308
|
+
nil, 178, 178, 178, 178, 178, 178, 178, nil, 178,
|
309
|
+
nil, 178, 175, 177, nil, 175, nil, nil, nil, nil,
|
310
|
+
nil, 177, 177, nil, 177, 177, 177, 177, 177, 177,
|
311
|
+
177, nil, 177, nil, 177, 174, nil, nil, 174, nil,
|
312
|
+
nil, 175, nil, nil, nil, nil, nil, nil, nil, 175,
|
313
|
+
175, nil, 175, 175, 175, 175, 175, 175, 175, nil,
|
314
|
+
175, nil, 175, 173, 174, nil, 173, nil, nil, nil,
|
315
|
+
nil, nil, 174, 174, nil, 174, 174, 174, 174, 174,
|
316
|
+
174, 174, nil, 174, nil, 174, nil, nil, nil, nil,
|
317
|
+
nil, 165, 173, nil, 165, nil, nil, nil, nil, nil,
|
318
|
+
173, 173, nil, 173, 173, 173, 173, 173, 173, 173,
|
319
|
+
nil, 173, 165, 173, 68, nil, nil, 68, nil, 165,
|
320
|
+
165, nil, nil, nil, nil, nil, nil, nil, 165, 165,
|
321
|
+
nil, 165, 165, 165, 165, 165, 165, 165, nil, 165,
|
322
|
+
nil, 165, 42, 68, nil, 42, nil, nil, nil, nil,
|
323
|
+
nil, 68, 68, nil, 68, 68, 68, 68, 68, 68,
|
324
|
+
68, nil, 68, nil, 68, 67, nil, nil, 67, nil,
|
325
|
+
nil, 42, nil, nil, nil, nil, nil, nil, nil, 42,
|
326
|
+
42, nil, 42, 42, 42, 42, 42, 42, 42, nil,
|
327
|
+
42, nil, 42, 141, 67, nil, 141, nil, 141, nil,
|
328
|
+
nil, nil, 67, 67, nil, 67, 67, 67, 67, 67,
|
329
|
+
67, 67, nil, 67, 141, 67, nil, nil, nil, nil,
|
330
|
+
nil, 141, 141, 163, nil, nil, 163, nil, nil, nil,
|
331
|
+
141, 141, nil, 141, 141, 141, 141, 141, 141, 141,
|
332
|
+
nil, 141, nil, 141, 163, 170, nil, nil, 170, nil,
|
333
|
+
nil, 163, 163, nil, nil, nil, nil, nil, nil, nil,
|
334
|
+
163, 163, nil, 163, 163, 163, 163, 163, 163, 163,
|
335
|
+
nil, 163, 55, 163, 170, 55, nil, nil, nil, nil,
|
336
|
+
nil, nil, 170, 170, nil, 170, 170, 170, 170, 170,
|
337
|
+
170, 170, nil, 170, 56, 170, nil, 56, nil, nil,
|
338
|
+
nil, 55, nil, nil, nil, nil, nil, nil, nil, 55,
|
339
|
+
55, nil, 55, 55, 55, 55, 55, 55, 55, nil,
|
340
|
+
55, 169, 55, 56, 169, nil, nil, nil, nil, nil,
|
341
|
+
nil, 56, 56, nil, 56, 56, 56, 56, 56, 56,
|
342
|
+
56, nil, 56, 58, 56, nil, 58, nil, nil, nil,
|
343
|
+
169, nil, nil, nil, nil, nil, nil, nil, 169, 169,
|
344
|
+
nil, 169, 169, 169, 169, 169, 169, 169, nil, 169,
|
345
|
+
59, 169, 58, 59, nil, nil, nil, nil, nil, nil,
|
346
|
+
58, 58, nil, 58, 58, 58, 58, 58, 58, 58,
|
347
|
+
nil, 58, 60, 58, nil, 60, nil, nil, nil, 59,
|
348
|
+
nil, nil, nil, nil, nil, nil, nil, 59, 59, nil,
|
349
|
+
59, 59, 59, 59, 59, 59, 59, nil, 59, 172,
|
350
|
+
59, 60, 172, nil, nil, nil, nil, nil, nil, 60,
|
351
|
+
60, nil, 60, 60, 60, 60, 60, 60, 60, nil,
|
352
|
+
60, nil, 60, nil, nil, nil, nil, nil, 172, nil,
|
353
|
+
nil, nil, nil, nil, nil, nil, 172, 172, nil, 172,
|
354
|
+
172, 172, 172, 172, 172, 172, nil, 172, nil, 172,
|
355
|
+
143, 143, nil, 143, 143, 143, nil, nil, nil, nil,
|
356
|
+
143, 143, 143, 143, 143, 143 ]
|
357
|
+
|
358
|
+
racc_action_pointer = [
|
359
|
+
3, nil, 240, nil, nil, 237, 64, 220, 202, nil,
|
360
|
+
144, nil, nil, nil, 151, nil, nil, 149, 189, nil,
|
361
|
+
-31, 140, 181, nil, -10, nil, 177, 368, 164, 122,
|
362
|
+
125, 162, nil, 157, nil, nil, nil, 149, nil, 150,
|
363
|
+
nil, nil, 577, -7, nil, 17, nil, nil, nil, nil,
|
364
|
+
nil, -3, nil, 119, nil, 707, 729, -5, 778, 805,
|
365
|
+
827, nil, 115, nil, 125, 9, 140, 600, 549, 317,
|
366
|
+
266, 117, nil, nil, 89, nil, 67, nil, nil, 79,
|
367
|
+
nil, 47, nil, nil, nil, 17, 6, nil, nil, 143,
|
368
|
+
nil, 85, -4, nil, nil, nil, 345, 4, 27, nil,
|
369
|
+
nil, nil, nil, 40, 48, 58, nil, nil, nil, nil,
|
370
|
+
-1, nil, nil, nil, nil, nil, nil, 70, 54, nil,
|
371
|
+
74, 77, 81, 79, nil, 66, nil, 95, 73, nil,
|
372
|
+
nil, nil, nil, 236, 94, nil, nil, nil, nil, nil,
|
373
|
+
nil, 628, nil, 884, nil, nil, 109, 133, nil, nil,
|
374
|
+
nil, nil, nil, 106, nil, nil, nil, 108, nil, nil,
|
375
|
+
nil, nil, 134, 658, nil, 526, 0, 141, 142, 756,
|
376
|
+
680, 64, 854, 498, 470, 447, 165, 419, 396, -16,
|
377
|
+
nil, 294, 157, nil, 3, 165, nil, nil, nil, 213,
|
378
|
+
nil, nil, 182, 188, 164, nil, 171, nil, nil, nil,
|
379
|
+
nil, 133, nil, nil, 169, nil, 167, 199, nil, nil,
|
380
|
+
196, nil, nil, 113, nil, 180, nil, nil, 82, 213,
|
381
|
+
222, nil, 200, 202, 203, 31, nil, nil, 13, nil,
|
382
|
+
nil, 233, 239, nil, nil, nil, 211, nil ]
|
383
|
+
|
384
|
+
racc_action_default = [
|
385
|
+
-146, -15, -146, -1, -2, -4, -146, -146, -146, -3,
|
386
|
+
-146, -115, -18, -118, -146, -116, -99, -140, -146, -121,
|
387
|
+
-102, -127, -146, -119, -105, -128, -146, -146, -17, -146,
|
388
|
+
-132, -146, -107, -146, -109, -108, -19, -146, -110, -21,
|
389
|
+
-143, -112, -146, -24, -144, -146, -138, -113, -139, -114,
|
390
|
+
238, -146, -145, -146, -131, -146, -146, -146, -146, -146,
|
391
|
+
-146, -106, -146, -16, -49, -146, -130, -146, -146, -146,
|
392
|
+
-146, -146, -140, -23, -146, -142, -146, -9, -10, -5,
|
393
|
+
-7, -11, -117, -100, -101, -146, -146, -104, -103, -146,
|
394
|
+
-72, -26, -29, -30, -32, -33, -146, -51, -146, -137,
|
395
|
+
-133, -135, -129, -146, -146, -146, -20, -111, -22, -141,
|
396
|
+
-146, -8, -12, -13, -120, -122, -123, -146, -146, -37,
|
397
|
+
-39, -41, -146, -42, -28, -146, -96, -146, -50, -87,
|
398
|
+
-58, -88, -89, -146, -75, -77, -97, -80, -98, -85,
|
399
|
+
-81, -146, -82, -146, -86, -84, -56, -146, -136, -124,
|
400
|
+
-125, -126, -6, -146, -34, -38, -40, -146, -43, -27,
|
401
|
+
-31, -71, -146, -146, -79, -146, -146, -146, -98, -146,
|
402
|
+
-146, -146, -146, -146, -146, -146, -146, -146, -146, -146,
|
403
|
+
-25, -146, -146, -35, -146, -76, -78, -83, -14, -146,
|
404
|
+
-90, -91, -146, -146, -146, -92, -146, -93, -94, -62,
|
405
|
+
-63, -146, -95, -68, -146, -70, -57, -52, -54, -55,
|
406
|
+
-146, -45, -36, -146, -44, -146, -61, -67, -146, -146,
|
407
|
+
-66, -69, -146, -146, -46, -146, -60, -64, -146, -53,
|
408
|
+
-74, -146, -48, -59, -65, -47, -146, -73 ]
|
409
|
+
|
410
|
+
racc_goto_table = [
|
411
|
+
43, 73, 128, 92, 91, 36, 160, 80, 209, 77,
|
412
|
+
219, 82, 208, 199, 83, 84, 87, 88, 190, 191,
|
413
|
+
212, 195, 196, 197, 198, 146, 202, 203, 180, 64,
|
414
|
+
216, 63, 108, 161, 97, 214, 71, 234, 211, 28,
|
415
|
+
231, 215, 232, 217, 207, 111, 2, 166, 209, 79,
|
416
|
+
124, 86, 229, 9, 89, 160, 5, 185, 186, 154,
|
417
|
+
164, 103, 104, 105, 43, 4, 152, 226, 77, 106,
|
418
|
+
3, 98, 160, 61, 233, 100, 101, nil, nil, nil,
|
419
|
+
nil, nil, nil, 159, nil, nil, nil, 206, nil, nil,
|
420
|
+
nil, nil, nil, nil, 183, nil, nil, nil, 92, 184,
|
421
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
422
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 224,
|
423
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
424
|
+
nil, nil, nil, nil, nil, 168, nil, nil, nil, nil,
|
425
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
426
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
427
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
428
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
429
|
+
nil, 230, nil, 71, nil, nil, nil, nil, nil, nil,
|
430
|
+
nil, nil, nil, nil, 237, 220, nil, nil, nil, nil,
|
431
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
432
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
433
|
+
nil, nil, 220 ]
|
434
|
+
|
435
|
+
racc_goto_check = [
|
436
|
+
17, 10, 32, 23, 22, 15, 11, 7, 37, 10,
|
437
|
+
43, 10, 36, 42, 54, 54, 55, 55, 40, 40,
|
438
|
+
29, 40, 40, 40, 40, 20, 40, 40, 21, 18,
|
439
|
+
42, 14, 10, 25, 19, 30, 17, 43, 31, 13,
|
440
|
+
33, 40, 34, 40, 35, 9, 1, 32, 37, 6,
|
441
|
+
10, 17, 36, 5, 17, 11, 4, 47, 48, 23,
|
442
|
+
49, 17, 17, 17, 17, 3, 7, 40, 10, 15,
|
443
|
+
2, 57, 11, 58, 40, 70, 71, nil, nil, nil,
|
444
|
+
nil, nil, nil, 10, nil, nil, nil, 32, nil, nil,
|
445
|
+
nil, nil, nil, nil, 23, nil, nil, nil, 23, 22,
|
446
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
447
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 32,
|
448
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
449
|
+
nil, nil, nil, nil, nil, 17, nil, nil, nil, nil,
|
450
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
451
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
452
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
453
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
454
|
+
nil, 10, nil, 17, nil, nil, nil, nil, nil, nil,
|
455
|
+
nil, nil, nil, nil, 10, 17, nil, nil, nil, nil,
|
456
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
457
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
458
|
+
nil, nil, 17 ]
|
459
|
+
|
460
|
+
racc_goto_pointer = [
|
461
|
+
nil, 46, 70, 65, 56, 48, -2, -44, nil, -36,
|
462
|
+
-42, -121, nil, 33, 3, -1, nil, -6, 1, -30,
|
463
|
+
-72, -118, -58, -59, nil, -94, nil, nil, nil, -164,
|
464
|
+
-149, -146, -94, -183, -181, -138, -170, -174, nil, nil,
|
465
|
+
-151, nil, -163, -191, nil, nil, nil, -106, -107, -73,
|
466
|
+
nil, nil, nil, nil, -41, -42, nil, 6, 46, nil,
|
467
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
468
|
+
10, 11, nil, nil ]
|
469
|
+
|
470
|
+
racc_goto_default = [
|
471
|
+
nil, nil, nil, nil, 167, nil, nil, nil, 81, nil,
|
472
|
+
13, 130, 1, nil, nil, nil, 39, 138, nil, nil,
|
473
|
+
nil, nil, nil, 23, 93, 200, 94, 95, 122, nil,
|
474
|
+
nil, nil, nil, nil, nil, nil, nil, 34, 136, 139,
|
475
|
+
143, 144, nil, nil, 129, 131, 132, 134, 135, 137,
|
476
|
+
140, 142, 145, 126, 16, 20, 24, 27, 32, 35,
|
477
|
+
38, 41, 47, 49, 11, 14, 19, 21, 25, 29,
|
478
|
+
nil, nil, 40, 44 ]
|
479
|
+
|
480
|
+
racc_token_table = {
|
481
|
+
false => 0,
|
482
|
+
Object.new => 1,
|
483
|
+
:ORDER => 2,
|
484
|
+
:BY => 3,
|
485
|
+
:comma => 4,
|
486
|
+
:unsigned_integer => 5,
|
487
|
+
:ASC => 6,
|
488
|
+
:DESC => 7,
|
489
|
+
:left_paren => 8,
|
490
|
+
:right_paren => 9,
|
491
|
+
:SELECT => 10,
|
492
|
+
:asterisk => 11,
|
493
|
+
:AS => 12,
|
494
|
+
:FROM => 13,
|
495
|
+
:CROSS => 14,
|
496
|
+
:JOIN => 15,
|
497
|
+
:INNER => 16,
|
498
|
+
:LEFT => 17,
|
499
|
+
:OUTER => 18,
|
500
|
+
:RIGHT => 19,
|
501
|
+
:FULL => 20,
|
502
|
+
:ON => 21,
|
503
|
+
:USING => 22,
|
504
|
+
:WHERE => 23,
|
505
|
+
:GROUP => 24,
|
506
|
+
:HAVING => 25,
|
507
|
+
:NOT => 26,
|
508
|
+
:BETWEEN => 27,
|
509
|
+
:AND => 28,
|
510
|
+
:IN => 29,
|
511
|
+
:LIKE => 30,
|
512
|
+
:IS => 31,
|
513
|
+
:NULL => 32,
|
514
|
+
:EXISTS => 33,
|
515
|
+
:identifier => 34,
|
516
|
+
:OR => 35,
|
517
|
+
:equals_operator => 36,
|
518
|
+
:not_equals_operator => 37,
|
519
|
+
:less_than_operator => 38,
|
520
|
+
:greater_than_operator => 39,
|
521
|
+
:less_than_or_equals_operator => 40,
|
522
|
+
:greater_than_or_equals_operator => 41,
|
523
|
+
:plus_sign => 42,
|
524
|
+
:minus_sign => 43,
|
525
|
+
:solidus => 44,
|
526
|
+
:CURRENT_USER => 45,
|
527
|
+
:period => 46,
|
528
|
+
:COUNT => 47,
|
529
|
+
:AVG => 48,
|
530
|
+
:MAX => 49,
|
531
|
+
:MIN => 50,
|
532
|
+
:SUM => 51,
|
533
|
+
:E => 52,
|
534
|
+
:quote => 53,
|
535
|
+
:character_string_literal => 54,
|
536
|
+
:DATE => 55,
|
537
|
+
:date_string => 56 }
|
538
|
+
|
539
|
+
racc_use_result_var = true
|
540
|
+
|
541
|
+
racc_nt_base = 57
|
542
|
+
|
543
|
+
Racc_arg = [
|
544
|
+
racc_action_table,
|
545
|
+
racc_action_check,
|
546
|
+
racc_action_default,
|
547
|
+
racc_action_pointer,
|
548
|
+
racc_goto_table,
|
549
|
+
racc_goto_check,
|
550
|
+
racc_goto_default,
|
551
|
+
racc_goto_pointer,
|
552
|
+
racc_nt_base,
|
553
|
+
racc_reduce_table,
|
554
|
+
racc_token_table,
|
555
|
+
racc_shift_n,
|
556
|
+
racc_reduce_n,
|
557
|
+
racc_use_result_var ]
|
558
|
+
|
559
|
+
Racc_token_to_s_table = [
|
560
|
+
'$end',
|
561
|
+
'error',
|
562
|
+
'ORDER',
|
563
|
+
'BY',
|
564
|
+
'comma',
|
565
|
+
'unsigned_integer',
|
566
|
+
'ASC',
|
567
|
+
'DESC',
|
568
|
+
'left_paren',
|
569
|
+
'right_paren',
|
570
|
+
'SELECT',
|
571
|
+
'asterisk',
|
572
|
+
'AS',
|
573
|
+
'FROM',
|
574
|
+
'CROSS',
|
575
|
+
'JOIN',
|
576
|
+
'INNER',
|
577
|
+
'LEFT',
|
578
|
+
'OUTER',
|
579
|
+
'RIGHT',
|
580
|
+
'FULL',
|
581
|
+
'ON',
|
582
|
+
'USING',
|
583
|
+
'WHERE',
|
584
|
+
'GROUP',
|
585
|
+
'HAVING',
|
586
|
+
'NOT',
|
587
|
+
'BETWEEN',
|
588
|
+
'AND',
|
589
|
+
'IN',
|
590
|
+
'LIKE',
|
591
|
+
'IS',
|
592
|
+
'NULL',
|
593
|
+
'EXISTS',
|
594
|
+
'identifier',
|
595
|
+
'OR',
|
596
|
+
'equals_operator',
|
597
|
+
'not_equals_operator',
|
598
|
+
'less_than_operator',
|
599
|
+
'greater_than_operator',
|
600
|
+
'less_than_or_equals_operator',
|
601
|
+
'greater_than_or_equals_operator',
|
602
|
+
'plus_sign',
|
603
|
+
'minus_sign',
|
604
|
+
'solidus',
|
605
|
+
'CURRENT_USER',
|
606
|
+
'period',
|
607
|
+
'COUNT',
|
608
|
+
'AVG',
|
609
|
+
'MAX',
|
610
|
+
'MIN',
|
611
|
+
'SUM',
|
612
|
+
'E',
|
613
|
+
'quote',
|
614
|
+
'character_string_literal',
|
615
|
+
'DATE',
|
616
|
+
'date_string',
|
617
|
+
'$start',
|
618
|
+
'direct_sql_statement',
|
619
|
+
'direct_sql_data_statement',
|
620
|
+
'direct_select_statement_multiple_rows',
|
621
|
+
'query_expression',
|
622
|
+
'order_by_clause',
|
623
|
+
'sort_specification_list',
|
624
|
+
'sort_specification',
|
625
|
+
'sort_key',
|
626
|
+
'ordering_specification',
|
627
|
+
'column_name',
|
628
|
+
'subquery',
|
629
|
+
'query_specification',
|
630
|
+
'select_list',
|
631
|
+
'table_expression',
|
632
|
+
'select_sublist',
|
633
|
+
'derived_column',
|
634
|
+
'value_expression',
|
635
|
+
'from_clause',
|
636
|
+
'where_clause',
|
637
|
+
'group_by_clause',
|
638
|
+
'having_clause',
|
639
|
+
'table_reference',
|
640
|
+
'table_name',
|
641
|
+
'joined_table',
|
642
|
+
'table_subquery',
|
643
|
+
'cross_join',
|
644
|
+
'qualified_join',
|
645
|
+
'join_type',
|
646
|
+
'join_specification',
|
647
|
+
'join_condition',
|
648
|
+
'named_columns_join',
|
649
|
+
'search_condition',
|
650
|
+
'join_column_list',
|
651
|
+
'column_name_list',
|
652
|
+
'grouping_column_reference_list',
|
653
|
+
'grouping_column_reference',
|
654
|
+
'column_reference',
|
655
|
+
'row_subquery',
|
656
|
+
'between_predicate',
|
657
|
+
'row_value_constructor',
|
658
|
+
'in_predicate',
|
659
|
+
'in_predicate_value',
|
660
|
+
'in_value_list',
|
661
|
+
'like_predicate',
|
662
|
+
'null_predicate',
|
663
|
+
'exists_predicate',
|
664
|
+
'boolean_term',
|
665
|
+
'boolean_factor',
|
666
|
+
'boolean_test',
|
667
|
+
'boolean_primary',
|
668
|
+
'predicate',
|
669
|
+
'comparison_predicate',
|
670
|
+
'row_value_constructor_element',
|
671
|
+
'numeric_value_expression',
|
672
|
+
'term',
|
673
|
+
'factor',
|
674
|
+
'sign',
|
675
|
+
'value_expression_primary',
|
676
|
+
'unsigned_value_specification',
|
677
|
+
'set_function_specification',
|
678
|
+
'unsigned_literal',
|
679
|
+
'general_value_specification',
|
680
|
+
'unsigned_numeric_literal',
|
681
|
+
'general_literal',
|
682
|
+
'qualifier',
|
683
|
+
'general_set_function',
|
684
|
+
'exact_numeric_literal',
|
685
|
+
'approximate_numeric_literal',
|
686
|
+
'mantissa',
|
687
|
+
'exponent',
|
688
|
+
'signed_integer',
|
689
|
+
'datetime_literal',
|
690
|
+
'date_literal']
|
691
|
+
|
692
|
+
Racc_debug_parser = false
|
693
|
+
|
694
|
+
##### racc system variables end #####
|
695
|
+
|
696
|
+
# reduce 0 omitted
|
697
|
+
|
698
|
+
# reduce 1 omitted
|
699
|
+
|
700
|
+
# reduce 2 omitted
|
701
|
+
|
702
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 11
|
703
|
+
def _reduce_3( val, _values, result )
|
704
|
+
result = SQL::Statement::DirectSelect.new(val[0], val[1])
|
705
|
+
result
|
706
|
+
end
|
707
|
+
.,.,
|
708
|
+
|
709
|
+
# reduce 4 omitted
|
710
|
+
|
711
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 16
|
712
|
+
def _reduce_5( val, _values, result )
|
713
|
+
result = SQL::Statement::OrderBy.new(val[2])
|
714
|
+
result
|
715
|
+
end
|
716
|
+
.,.,
|
717
|
+
|
718
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 19
|
719
|
+
def _reduce_6( val, _values, result )
|
720
|
+
result = Array(val[0]) + Array(val[2])
|
721
|
+
result
|
722
|
+
end
|
723
|
+
.,.,
|
724
|
+
|
725
|
+
# reduce 7 omitted
|
726
|
+
|
727
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 23
|
728
|
+
def _reduce_8( val, _values, result )
|
729
|
+
result = val[1].new(val[0])
|
730
|
+
result
|
731
|
+
end
|
732
|
+
.,.,
|
733
|
+
|
734
|
+
# reduce 9 omitted
|
735
|
+
|
736
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 27
|
737
|
+
def _reduce_10( val, _values, result )
|
738
|
+
result = SQL::Statement::Integer.new(val[0])
|
739
|
+
result
|
740
|
+
end
|
741
|
+
.,.,
|
742
|
+
|
743
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 30
|
744
|
+
def _reduce_11( val, _values, result )
|
745
|
+
result = SQL::Statement::Ascending
|
746
|
+
result
|
747
|
+
end
|
748
|
+
.,.,
|
749
|
+
|
750
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 31
|
751
|
+
def _reduce_12( val, _values, result )
|
752
|
+
result = SQL::Statement::Ascending
|
753
|
+
result
|
754
|
+
end
|
755
|
+
.,.,
|
756
|
+
|
757
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 32
|
758
|
+
def _reduce_13( val, _values, result )
|
759
|
+
result = SQL::Statement::Descending
|
760
|
+
result
|
761
|
+
end
|
762
|
+
.,.,
|
763
|
+
|
764
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 37
|
765
|
+
def _reduce_14( val, _values, result )
|
766
|
+
result = SQL::Statement::Subquery.new(val[1])
|
767
|
+
result
|
768
|
+
end
|
769
|
+
.,.,
|
770
|
+
|
771
|
+
# reduce 15 omitted
|
772
|
+
|
773
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 43
|
774
|
+
def _reduce_16( val, _values, result )
|
775
|
+
result = SQL::Statement::Select.new(val[1], val[2])
|
776
|
+
result
|
777
|
+
end
|
778
|
+
.,.,
|
779
|
+
|
780
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 44
|
781
|
+
def _reduce_17( val, _values, result )
|
782
|
+
result = SQL::Statement::Select.new(val[1])
|
783
|
+
result
|
784
|
+
end
|
785
|
+
.,.,
|
786
|
+
|
787
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 47
|
788
|
+
def _reduce_18( val, _values, result )
|
789
|
+
result = SQL::Statement::All.new
|
790
|
+
result
|
791
|
+
end
|
792
|
+
.,.,
|
793
|
+
|
794
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 48
|
795
|
+
def _reduce_19( val, _values, result )
|
796
|
+
result = SQL::Statement::SelectList.new(val[0])
|
797
|
+
result
|
798
|
+
end
|
799
|
+
.,.,
|
800
|
+
|
801
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 51
|
802
|
+
def _reduce_20( val, _values, result )
|
803
|
+
result = Array(val[0]) + Array(val[2])
|
804
|
+
result
|
805
|
+
end
|
806
|
+
.,.,
|
807
|
+
|
808
|
+
# reduce 21 omitted
|
809
|
+
|
810
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 55
|
811
|
+
def _reduce_22( val, _values, result )
|
812
|
+
result = SQL::Statement::As.new(val[0], val[2])
|
813
|
+
result
|
814
|
+
end
|
815
|
+
.,.,
|
816
|
+
|
817
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 56
|
818
|
+
def _reduce_23( val, _values, result )
|
819
|
+
result = SQL::Statement::As.new(val[0], val[1])
|
820
|
+
result
|
821
|
+
end
|
822
|
+
.,.,
|
823
|
+
|
824
|
+
# reduce 24 omitted
|
825
|
+
|
826
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 60
|
827
|
+
def _reduce_25( val, _values, result )
|
828
|
+
result = SQL::Statement::TableExpression.new(val[0], val[1], val[2], val[3])
|
829
|
+
result
|
830
|
+
end
|
831
|
+
.,.,
|
832
|
+
|
833
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 63
|
834
|
+
def _reduce_26( val, _values, result )
|
835
|
+
result = SQL::Statement::FromClause.new(val[1])
|
836
|
+
result
|
837
|
+
end
|
838
|
+
.,.,
|
839
|
+
|
840
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 66
|
841
|
+
def _reduce_27( val, _values, result )
|
842
|
+
result = SQL::Statement::As.new(val[0], val[2])
|
843
|
+
result
|
844
|
+
end
|
845
|
+
.,.,
|
846
|
+
|
847
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 67
|
848
|
+
def _reduce_28( val, _values, result )
|
849
|
+
result = SQL::Statement::As.new(val[0], val[1])
|
850
|
+
result
|
851
|
+
end
|
852
|
+
.,.,
|
853
|
+
|
854
|
+
# reduce 29 omitted
|
855
|
+
|
856
|
+
# reduce 30 omitted
|
857
|
+
|
858
|
+
# reduce 31 omitted
|
859
|
+
|
860
|
+
# reduce 32 omitted
|
861
|
+
|
862
|
+
# reduce 33 omitted
|
863
|
+
|
864
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 79
|
865
|
+
def _reduce_34( val, _values, result )
|
866
|
+
result = SQL::Statement::CrossJoin.new(val[0], val[2])
|
867
|
+
result
|
868
|
+
end
|
869
|
+
.,.,
|
870
|
+
|
871
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 80
|
872
|
+
def _reduce_35( val, _values, result )
|
873
|
+
result = SQL::Statement::CrossJoin.new(val[0], val[3])
|
874
|
+
result
|
875
|
+
end
|
876
|
+
.,.,
|
877
|
+
|
878
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 83
|
879
|
+
def _reduce_36( val, _values, result )
|
880
|
+
result = val[1].new(val[0], val[3], val[4])
|
881
|
+
result
|
882
|
+
end
|
883
|
+
.,.,
|
884
|
+
|
885
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 86
|
886
|
+
def _reduce_37( val, _values, result )
|
887
|
+
result = SQL::Statement::InnerJoin
|
888
|
+
result
|
889
|
+
end
|
890
|
+
.,.,
|
891
|
+
|
892
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 87
|
893
|
+
def _reduce_38( val, _values, result )
|
894
|
+
result = SQL::Statement::LeftOuterJoin
|
895
|
+
result
|
896
|
+
end
|
897
|
+
.,.,
|
898
|
+
|
899
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 88
|
900
|
+
def _reduce_39( val, _values, result )
|
901
|
+
result = SQL::Statement::LeftJoin
|
902
|
+
result
|
903
|
+
end
|
904
|
+
.,.,
|
905
|
+
|
906
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 89
|
907
|
+
def _reduce_40( val, _values, result )
|
908
|
+
result = SQL::Statement::RightOuterJoin
|
909
|
+
result
|
910
|
+
end
|
911
|
+
.,.,
|
912
|
+
|
913
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 90
|
914
|
+
def _reduce_41( val, _values, result )
|
915
|
+
result = SQL::Statement::RightJoin
|
916
|
+
result
|
917
|
+
end
|
918
|
+
.,.,
|
919
|
+
|
920
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 91
|
921
|
+
def _reduce_42( val, _values, result )
|
922
|
+
result = SQL::Statement::FullJoin
|
923
|
+
result
|
924
|
+
end
|
925
|
+
.,.,
|
926
|
+
|
927
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 92
|
928
|
+
def _reduce_43( val, _values, result )
|
929
|
+
result = SQL::Statement::FullOuterJoin
|
930
|
+
result
|
931
|
+
end
|
932
|
+
.,.,
|
933
|
+
|
934
|
+
# reduce 44 omitted
|
935
|
+
|
936
|
+
# reduce 45 omitted
|
937
|
+
|
938
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 99
|
939
|
+
def _reduce_46( val, _values, result )
|
940
|
+
result = SQL::Statement::On.new(val[1])
|
941
|
+
result
|
942
|
+
end
|
943
|
+
.,.,
|
944
|
+
|
945
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 102
|
946
|
+
def _reduce_47( val, _values, result )
|
947
|
+
result = SQL::Statement::Using.new(val[2])
|
948
|
+
result
|
949
|
+
end
|
950
|
+
.,.,
|
951
|
+
|
952
|
+
# reduce 48 omitted
|
953
|
+
|
954
|
+
# reduce 49 omitted
|
955
|
+
|
956
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 109
|
957
|
+
def _reduce_50( val, _values, result )
|
958
|
+
result = SQL::Statement::WhereClause.new(val[1])
|
959
|
+
result
|
960
|
+
end
|
961
|
+
.,.,
|
962
|
+
|
963
|
+
# reduce 51 omitted
|
964
|
+
|
965
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 113
|
966
|
+
def _reduce_52( val, _values, result )
|
967
|
+
result = SQL::Statement::GroupByClause.new(val[2])
|
968
|
+
result
|
969
|
+
end
|
970
|
+
.,.,
|
971
|
+
|
972
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 116
|
973
|
+
def _reduce_53( val, _values, result )
|
974
|
+
result = Array(val[0]) + Array(val[2])
|
975
|
+
result
|
976
|
+
end
|
977
|
+
.,.,
|
978
|
+
|
979
|
+
# reduce 54 omitted
|
980
|
+
|
981
|
+
# reduce 55 omitted
|
982
|
+
|
983
|
+
# reduce 56 omitted
|
984
|
+
|
985
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 124
|
986
|
+
def _reduce_57( val, _values, result )
|
987
|
+
result = SQL::Statement::HavingClause.new(val[1])
|
988
|
+
result
|
989
|
+
end
|
990
|
+
.,.,
|
991
|
+
|
992
|
+
# reduce 58 omitted
|
993
|
+
|
994
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 131
|
995
|
+
def _reduce_59( val, _values, result )
|
996
|
+
result = SQL::Statement::Not.new(SQL::Statement::Between.new(val[0], val[3], val[5]))
|
997
|
+
result
|
998
|
+
end
|
999
|
+
.,.,
|
1000
|
+
|
1001
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 132
|
1002
|
+
def _reduce_60( val, _values, result )
|
1003
|
+
result = SQL::Statement::Between.new(val[0], val[2], val[4])
|
1004
|
+
result
|
1005
|
+
end
|
1006
|
+
.,.,
|
1007
|
+
|
1008
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 135
|
1009
|
+
def _reduce_61( val, _values, result )
|
1010
|
+
result = SQL::Statement::Not.new(SQL::Statement::In.new(val[0], val[3]))
|
1011
|
+
result
|
1012
|
+
end
|
1013
|
+
.,.,
|
1014
|
+
|
1015
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 136
|
1016
|
+
def _reduce_62( val, _values, result )
|
1017
|
+
result = SQL::Statement::In.new(val[0], val[2])
|
1018
|
+
result
|
1019
|
+
end
|
1020
|
+
.,.,
|
1021
|
+
|
1022
|
+
# reduce 63 omitted
|
1023
|
+
|
1024
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 140
|
1025
|
+
def _reduce_64( val, _values, result )
|
1026
|
+
result = SQL::Statement::InValueList.new(val[1])
|
1027
|
+
result
|
1028
|
+
end
|
1029
|
+
.,.,
|
1030
|
+
|
1031
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 143
|
1032
|
+
def _reduce_65( val, _values, result )
|
1033
|
+
result = Array(val[0]) + Array(val[2])
|
1034
|
+
result
|
1035
|
+
end
|
1036
|
+
.,.,
|
1037
|
+
|
1038
|
+
# reduce 66 omitted
|
1039
|
+
|
1040
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 150
|
1041
|
+
def _reduce_67( val, _values, result )
|
1042
|
+
result = SQL::Statement::Not.new(SQL::Statement::Like.new(val[0], val[3]))
|
1043
|
+
result
|
1044
|
+
end
|
1045
|
+
.,.,
|
1046
|
+
|
1047
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 151
|
1048
|
+
def _reduce_68( val, _values, result )
|
1049
|
+
result = SQL::Statement::Like.new(val[0], val[2])
|
1050
|
+
result
|
1051
|
+
end
|
1052
|
+
.,.,
|
1053
|
+
|
1054
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 154
|
1055
|
+
def _reduce_69( val, _values, result )
|
1056
|
+
result = SQL::Statement::Not.new(SQL::Statement::Is.new(val[0], SQL::Statement::Null.new))
|
1057
|
+
result
|
1058
|
+
end
|
1059
|
+
.,.,
|
1060
|
+
|
1061
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 155
|
1062
|
+
def _reduce_70( val, _values, result )
|
1063
|
+
result = SQL::Statement::Is.new(val[0], SQL::Statement::Null.new)
|
1064
|
+
result
|
1065
|
+
end
|
1066
|
+
.,.,
|
1067
|
+
|
1068
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 158
|
1069
|
+
def _reduce_71( val, _values, result )
|
1070
|
+
result = SQL::Statement::Exists.new(val[1])
|
1071
|
+
result
|
1072
|
+
end
|
1073
|
+
.,.,
|
1074
|
+
|
1075
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 162
|
1076
|
+
def _reduce_72( val, _values, result )
|
1077
|
+
result = SQL::Statement::Table.new(val[0])
|
1078
|
+
result
|
1079
|
+
end
|
1080
|
+
.,.,
|
1081
|
+
|
1082
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 165
|
1083
|
+
def _reduce_73( val, _values, result )
|
1084
|
+
result = Array(val[0]) + Array(val[2])
|
1085
|
+
result
|
1086
|
+
end
|
1087
|
+
.,.,
|
1088
|
+
|
1089
|
+
# reduce 74 omitted
|
1090
|
+
|
1091
|
+
# reduce 75 omitted
|
1092
|
+
|
1093
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 171
|
1094
|
+
def _reduce_76( val, _values, result )
|
1095
|
+
result = SQL::Statement::Or.new(val[0], val[2])
|
1096
|
+
result
|
1097
|
+
end
|
1098
|
+
.,.,
|
1099
|
+
|
1100
|
+
# reduce 77 omitted
|
1101
|
+
|
1102
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 175
|
1103
|
+
def _reduce_78( val, _values, result )
|
1104
|
+
result = SQL::Statement::And.new(val[0], val[2])
|
1105
|
+
result
|
1106
|
+
end
|
1107
|
+
.,.,
|
1108
|
+
|
1109
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 178
|
1110
|
+
def _reduce_79( val, _values, result )
|
1111
|
+
result = SQL::Statement::Not.new(val[1])
|
1112
|
+
result
|
1113
|
+
end
|
1114
|
+
.,.,
|
1115
|
+
|
1116
|
+
# reduce 80 omitted
|
1117
|
+
|
1118
|
+
# reduce 81 omitted
|
1119
|
+
|
1120
|
+
# reduce 82 omitted
|
1121
|
+
|
1122
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 186
|
1123
|
+
def _reduce_83( val, _values, result )
|
1124
|
+
result = val[1]
|
1125
|
+
result
|
1126
|
+
end
|
1127
|
+
.,.,
|
1128
|
+
|
1129
|
+
# reduce 84 omitted
|
1130
|
+
|
1131
|
+
# reduce 85 omitted
|
1132
|
+
|
1133
|
+
# reduce 86 omitted
|
1134
|
+
|
1135
|
+
# reduce 87 omitted
|
1136
|
+
|
1137
|
+
# reduce 88 omitted
|
1138
|
+
|
1139
|
+
# reduce 89 omitted
|
1140
|
+
|
1141
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 197
|
1142
|
+
def _reduce_90( val, _values, result )
|
1143
|
+
result = SQL::Statement::Equals.new(val[0], val[2])
|
1144
|
+
result
|
1145
|
+
end
|
1146
|
+
.,.,
|
1147
|
+
|
1148
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 198
|
1149
|
+
def _reduce_91( val, _values, result )
|
1150
|
+
result = SQL::Statement::Not.new(SQL::Statement::Equals.new(val[0], val[2]))
|
1151
|
+
result
|
1152
|
+
end
|
1153
|
+
.,.,
|
1154
|
+
|
1155
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 199
|
1156
|
+
def _reduce_92( val, _values, result )
|
1157
|
+
result = SQL::Statement::Less.new(val[0], val[2])
|
1158
|
+
result
|
1159
|
+
end
|
1160
|
+
.,.,
|
1161
|
+
|
1162
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 200
|
1163
|
+
def _reduce_93( val, _values, result )
|
1164
|
+
result = SQL::Statement::Greater.new(val[0], val[2])
|
1165
|
+
result
|
1166
|
+
end
|
1167
|
+
.,.,
|
1168
|
+
|
1169
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 201
|
1170
|
+
def _reduce_94( val, _values, result )
|
1171
|
+
result = SQL::Statement::LessOrEquals.new(val[0], val[2])
|
1172
|
+
result
|
1173
|
+
end
|
1174
|
+
.,.,
|
1175
|
+
|
1176
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 202
|
1177
|
+
def _reduce_95( val, _values, result )
|
1178
|
+
result = SQL::Statement::GreaterOrEquals.new(val[0], val[2])
|
1179
|
+
result
|
1180
|
+
end
|
1181
|
+
.,.,
|
1182
|
+
|
1183
|
+
# reduce 96 omitted
|
1184
|
+
|
1185
|
+
# reduce 97 omitted
|
1186
|
+
|
1187
|
+
# reduce 98 omitted
|
1188
|
+
|
1189
|
+
# reduce 99 omitted
|
1190
|
+
|
1191
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 215
|
1192
|
+
def _reduce_100( val, _values, result )
|
1193
|
+
result = SQL::Statement::Add.new(val[0], val[2])
|
1194
|
+
result
|
1195
|
+
end
|
1196
|
+
.,.,
|
1197
|
+
|
1198
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 216
|
1199
|
+
def _reduce_101( val, _values, result )
|
1200
|
+
result = SQL::Statement::Subtract.new(val[0], val[2])
|
1201
|
+
result
|
1202
|
+
end
|
1203
|
+
.,.,
|
1204
|
+
|
1205
|
+
# reduce 102 omitted
|
1206
|
+
|
1207
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 220
|
1208
|
+
def _reduce_103( val, _values, result )
|
1209
|
+
result = SQL::Statement::Multiply.new(val[0], val[2])
|
1210
|
+
result
|
1211
|
+
end
|
1212
|
+
.,.,
|
1213
|
+
|
1214
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 221
|
1215
|
+
def _reduce_104( val, _values, result )
|
1216
|
+
result = SQL::Statement::Divide.new(val[0], val[2])
|
1217
|
+
result
|
1218
|
+
end
|
1219
|
+
.,.,
|
1220
|
+
|
1221
|
+
# reduce 105 omitted
|
1222
|
+
|
1223
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 225
|
1224
|
+
def _reduce_106( val, _values, result )
|
1225
|
+
result = val[0].new(val[1])
|
1226
|
+
result
|
1227
|
+
end
|
1228
|
+
.,.,
|
1229
|
+
|
1230
|
+
# reduce 107 omitted
|
1231
|
+
|
1232
|
+
# reduce 108 omitted
|
1233
|
+
|
1234
|
+
# reduce 109 omitted
|
1235
|
+
|
1236
|
+
# reduce 110 omitted
|
1237
|
+
|
1238
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 232
|
1239
|
+
def _reduce_111( val, _values, result )
|
1240
|
+
result = val[1]
|
1241
|
+
result
|
1242
|
+
end
|
1243
|
+
.,.,
|
1244
|
+
|
1245
|
+
# reduce 112 omitted
|
1246
|
+
|
1247
|
+
# reduce 113 omitted
|
1248
|
+
|
1249
|
+
# reduce 114 omitted
|
1250
|
+
|
1251
|
+
# reduce 115 omitted
|
1252
|
+
|
1253
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 243
|
1254
|
+
def _reduce_116( val, _values, result )
|
1255
|
+
result = SQL::Statement::CurrentUser.new
|
1256
|
+
result
|
1257
|
+
end
|
1258
|
+
.,.,
|
1259
|
+
|
1260
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 246
|
1261
|
+
def _reduce_117( val, _values, result )
|
1262
|
+
result = SQL::Statement::QualifiedColumn.new(val[0], val[2])
|
1263
|
+
result
|
1264
|
+
end
|
1265
|
+
.,.,
|
1266
|
+
|
1267
|
+
# reduce 118 omitted
|
1268
|
+
|
1269
|
+
# reduce 119 omitted
|
1270
|
+
|
1271
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 253
|
1272
|
+
def _reduce_120( val, _values, result )
|
1273
|
+
result = SQL::Statement::Count.new(SQL::Statement::All.new)
|
1274
|
+
result
|
1275
|
+
end
|
1276
|
+
.,.,
|
1277
|
+
|
1278
|
+
# reduce 121 omitted
|
1279
|
+
|
1280
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 257
|
1281
|
+
def _reduce_122( val, _values, result )
|
1282
|
+
result = SQL::Statement::Count.new(val[2])
|
1283
|
+
result
|
1284
|
+
end
|
1285
|
+
.,.,
|
1286
|
+
|
1287
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 258
|
1288
|
+
def _reduce_123( val, _values, result )
|
1289
|
+
result = SQL::Statement::Average.new(val[2])
|
1290
|
+
result
|
1291
|
+
end
|
1292
|
+
.,.,
|
1293
|
+
|
1294
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 259
|
1295
|
+
def _reduce_124( val, _values, result )
|
1296
|
+
result = SQL::Statement::Maximum.new(val[2])
|
1297
|
+
result
|
1298
|
+
end
|
1299
|
+
.,.,
|
1300
|
+
|
1301
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 260
|
1302
|
+
def _reduce_125( val, _values, result )
|
1303
|
+
result = SQL::Statement::Minimum.new(val[2])
|
1304
|
+
result
|
1305
|
+
end
|
1306
|
+
.,.,
|
1307
|
+
|
1308
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 261
|
1309
|
+
def _reduce_126( val, _values, result )
|
1310
|
+
result = SQL::Statement::Sum.new(val[2])
|
1311
|
+
result
|
1312
|
+
end
|
1313
|
+
.,.,
|
1314
|
+
|
1315
|
+
# reduce 127 omitted
|
1316
|
+
|
1317
|
+
# reduce 128 omitted
|
1318
|
+
|
1319
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 269
|
1320
|
+
def _reduce_129( val, _values, result )
|
1321
|
+
result = SQL::Statement::Float.new("#{val[0]}.#{val[2]}".to_f)
|
1322
|
+
result
|
1323
|
+
end
|
1324
|
+
.,.,
|
1325
|
+
|
1326
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 270
|
1327
|
+
def _reduce_130( val, _values, result )
|
1328
|
+
result = SQL::Statement::Float.new(val[0])
|
1329
|
+
result
|
1330
|
+
end
|
1331
|
+
.,.,
|
1332
|
+
|
1333
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 271
|
1334
|
+
def _reduce_131( val, _values, result )
|
1335
|
+
result = SQL::Statement::Float.new("0.#{val[1]}".to_f)
|
1336
|
+
result
|
1337
|
+
end
|
1338
|
+
.,.,
|
1339
|
+
|
1340
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 272
|
1341
|
+
def _reduce_132( val, _values, result )
|
1342
|
+
result = SQL::Statement::Integer.new(val[0])
|
1343
|
+
result
|
1344
|
+
end
|
1345
|
+
.,.,
|
1346
|
+
|
1347
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 275
|
1348
|
+
def _reduce_133( val, _values, result )
|
1349
|
+
result = SQL::Statement::ApproximateFloat.new(val[0], val[2])
|
1350
|
+
result
|
1351
|
+
end
|
1352
|
+
.,.,
|
1353
|
+
|
1354
|
+
# reduce 134 omitted
|
1355
|
+
|
1356
|
+
# reduce 135 omitted
|
1357
|
+
|
1358
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 284
|
1359
|
+
def _reduce_136( val, _values, result )
|
1360
|
+
result = val[0].new(SQL::Statement::Integer.new(val[1]))
|
1361
|
+
result
|
1362
|
+
end
|
1363
|
+
.,.,
|
1364
|
+
|
1365
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 285
|
1366
|
+
def _reduce_137( val, _values, result )
|
1367
|
+
result = SQL::Statement::Integer.new(val[0])
|
1368
|
+
result
|
1369
|
+
end
|
1370
|
+
.,.,
|
1371
|
+
|
1372
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 288
|
1373
|
+
def _reduce_138( val, _values, result )
|
1374
|
+
result = SQL::Statement::UnaryPlus
|
1375
|
+
result
|
1376
|
+
end
|
1377
|
+
.,.,
|
1378
|
+
|
1379
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 289
|
1380
|
+
def _reduce_139( val, _values, result )
|
1381
|
+
result = SQL::Statement::UnaryMinus
|
1382
|
+
result
|
1383
|
+
end
|
1384
|
+
.,.,
|
1385
|
+
|
1386
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 293
|
1387
|
+
def _reduce_140( val, _values, result )
|
1388
|
+
result = SQL::Statement::Column.new(val[0])
|
1389
|
+
result
|
1390
|
+
end
|
1391
|
+
.,.,
|
1392
|
+
|
1393
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 297
|
1394
|
+
def _reduce_141( val, _values, result )
|
1395
|
+
result = SQL::Statement::String.new(val[1])
|
1396
|
+
result
|
1397
|
+
end
|
1398
|
+
.,.,
|
1399
|
+
|
1400
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 298
|
1401
|
+
def _reduce_142( val, _values, result )
|
1402
|
+
result = SQL::Statement::String.new('')
|
1403
|
+
result
|
1404
|
+
end
|
1405
|
+
.,.,
|
1406
|
+
|
1407
|
+
# reduce 143 omitted
|
1408
|
+
|
1409
|
+
# reduce 144 omitted
|
1410
|
+
|
1411
|
+
module_eval <<'.,.,', 'lib/sql/parser.racc', 305
|
1412
|
+
def _reduce_145( val, _values, result )
|
1413
|
+
result = SQL::Statement::Date.new(val[1])
|
1414
|
+
result
|
1415
|
+
end
|
1416
|
+
.,.,
|
1417
|
+
|
1418
|
+
def _reduce_none( val, _values, result )
|
1419
|
+
result
|
1420
|
+
end
|
1421
|
+
|
1422
|
+
end
|
1423
|
+
|
1424
|
+
end
|