querybuilder 0.5.9 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/History.txt +29 -25
  2. data/Manifest.txt +20 -9
  3. data/README.rdoc +73 -10
  4. data/Rakefile +62 -30
  5. data/lib/extconf.rb +3 -0
  6. data/lib/query_builder.rb +39 -898
  7. data/lib/query_builder/error.rb +7 -0
  8. data/lib/query_builder/info.rb +3 -0
  9. data/lib/query_builder/parser.rb +80 -0
  10. data/lib/query_builder/processor.rb +714 -0
  11. data/lib/query_builder/query.rb +273 -0
  12. data/lib/querybuilder_ext.c +1870 -0
  13. data/lib/querybuilder_ext.rl +418 -0
  14. data/lib/querybuilder_rb.rb +1686 -0
  15. data/lib/querybuilder_rb.rl +214 -0
  16. data/lib/querybuilder_syntax.rl +47 -0
  17. data/old_QueryBuilder.rb +946 -0
  18. data/querybuilder.gemspec +42 -15
  19. data/tasks/build.rake +20 -0
  20. data/test/dummy_test.rb +21 -0
  21. data/test/mock/custom_queries/test.yml +5 -4
  22. data/test/mock/dummy.rb +9 -0
  23. data/test/mock/dummy_processor.rb +160 -0
  24. data/test/mock/queries/bar.yml +1 -1
  25. data/test/mock/queries/foo.yml +2 -2
  26. data/test/mock/user_processor.rb +34 -0
  27. data/test/query_test.rb +38 -0
  28. data/test/querybuilder/basic.yml +91 -0
  29. data/test/{query_builder → querybuilder}/custom.yml +11 -11
  30. data/test/querybuilder/errors.yml +32 -0
  31. data/test/querybuilder/filters.yml +115 -0
  32. data/test/querybuilder/group.yml +7 -0
  33. data/test/querybuilder/joins.yml +37 -0
  34. data/test/querybuilder/mixed.yml +18 -0
  35. data/test/querybuilder/rubyless.yml +15 -0
  36. data/test/querybuilder_test.rb +111 -0
  37. data/test/test_helper.rb +8 -3
  38. metadata +66 -19
  39. data/test/mock/dummy_query.rb +0 -114
  40. data/test/mock/user_query.rb +0 -55
  41. data/test/query_builder/basic.yml +0 -60
  42. data/test/query_builder/errors.yml +0 -50
  43. data/test/query_builder/filters.yml +0 -43
  44. data/test/query_builder/joins.yml +0 -25
  45. data/test/query_builder/mixed.yml +0 -12
  46. data/test/query_builder_test.rb +0 -36
@@ -0,0 +1,418 @@
1
+ #include <ruby.h>
2
+
3
+ static VALUE rb_QueryBuilder = Qnil;
4
+ static VALUE rb_Parser = Qnil;
5
+ static VALUE rb_SyntaxError = Qnil;
6
+
7
+ /* symbols */
8
+ static VALUE _query;
9
+ static VALUE _string;
10
+ static VALUE _dstring;
11
+ static VALUE _rubyless;
12
+ static VALUE _integer;
13
+ static VALUE _real;
14
+ static VALUE _field;
15
+ static VALUE _method;
16
+ static VALUE _raw;
17
+ static VALUE _function;
18
+ static VALUE _relation;
19
+ static VALUE _is;
20
+ static VALUE _interval;
21
+ static VALUE _scope;
22
+ static VALUE _filter;
23
+ static VALUE _offset;
24
+ static VALUE _param;
25
+ static VALUE _paginate;
26
+ static VALUE _limit;
27
+ static VALUE _group;
28
+ static VALUE _order;
29
+ static VALUE _from;
30
+ static VALUE _clause;
31
+ static VALUE _clause_and;
32
+ static VALUE _clause_or;
33
+ static VALUE _clause_par;
34
+ static VALUE _clause_par_close;
35
+ static VALUE _par;
36
+ static VALUE _par_close;
37
+
38
+
39
+ /* methods */
40
+ static ID _insert;
41
+ static ID _apply_op;
42
+ static ID _downcase;
43
+ static ID _pop_stack;
44
+
45
+ /* methods */
46
+ static VALUE rb_parse(VALUE self, VALUE string);
47
+
48
+ #define STORE_SYM(k) _##k = ID2SYM(rb_intern(#k));
49
+
50
+ /* init */
51
+ void Init_querybuilder_ext() {
52
+ rb_QueryBuilder = rb_define_module("QueryBuilder");
53
+ rb_Parser = rb_define_class_under(rb_QueryBuilder, "Parser", rb_cObject);
54
+ rb_define_singleton_method(rb_Parser, "parse", rb_parse, 1);
55
+
56
+ /* store symbols */
57
+ STORE_SYM(query);
58
+ STORE_SYM(string);
59
+ STORE_SYM(dstring);
60
+ STORE_SYM(rubyless);
61
+ STORE_SYM(integer);
62
+ STORE_SYM(real);
63
+ STORE_SYM(field);
64
+ STORE_SYM(method);
65
+ STORE_SYM(raw);
66
+ STORE_SYM(function);
67
+ STORE_SYM(relation);
68
+ STORE_SYM(is);
69
+ STORE_SYM(interval);
70
+ STORE_SYM(scope);
71
+ STORE_SYM(filter);
72
+ STORE_SYM(offset);
73
+ STORE_SYM(param);
74
+ STORE_SYM(paginate);
75
+ STORE_SYM(limit);
76
+ STORE_SYM(group);
77
+ STORE_SYM(order);
78
+ STORE_SYM(from);
79
+ STORE_SYM(clause);
80
+ STORE_SYM(clause_and);
81
+ STORE_SYM(clause_or);
82
+ STORE_SYM(clause_par);
83
+ STORE_SYM(clause_par_close);
84
+ STORE_SYM(par);
85
+ STORE_SYM(par_close);
86
+
87
+ /* methods */
88
+ _insert = rb_intern("insert");
89
+ _apply_op = rb_intern("apply_op");
90
+ _downcase = rb_intern("downcase");
91
+ _pop_stack = rb_intern("pop_stack");
92
+
93
+ /* classes */
94
+ rb_SyntaxError = rb_const_get(rb_QueryBuilder, rb_intern("SyntaxError"));
95
+ }
96
+
97
+ /* macro */
98
+ #define SET_TMP_ARY(sym) tmp = rb_ary_new(); \
99
+ rb_ary_push(tmp, sym); \
100
+ rb_ary_push(tmp, rb_str_new(str_a, p - str_a)); \
101
+ str_a = NULL;
102
+
103
+ #define SET_TMP_STR tmp = rb_str_new(str_a, p - str_a); \
104
+ str_a = NULL;
105
+
106
+ #define APPLY_OP(elem) last = rb_funcall(self, _apply_op, 2, stack, elem);
107
+
108
+ %%{
109
+ machine querybuilder;
110
+
111
+ action str_a {
112
+ if (str_a == NULL) str_a = p;
113
+ }
114
+
115
+ action string {
116
+ if (str_a == NULL) str_a = p;
117
+ SET_TMP_ARY(_string);
118
+ rb_ary_push(last, tmp);
119
+ }
120
+
121
+ action dstring {
122
+ if (str_a == NULL) str_a = p;
123
+ SET_TMP_ARY(_dstring);
124
+ rb_ary_push(last, tmp);
125
+ }
126
+
127
+ action rubyless {
128
+ SET_TMP_ARY(_rubyless);
129
+ rb_ary_push(last, tmp);
130
+ }
131
+
132
+ action integer {
133
+ SET_TMP_ARY(_integer);
134
+ rb_ary_push(last, tmp);
135
+ }
136
+
137
+ action real {
138
+ SET_TMP_ARY(_real);
139
+ rb_ary_push(last, tmp);
140
+ }
141
+
142
+ action field {
143
+ SET_TMP_ARY(_field);
144
+ rb_ary_push(last, tmp);
145
+ }
146
+
147
+ action method {
148
+ SET_TMP_ARY(_method);
149
+ rb_ary_push(last, tmp);
150
+ }
151
+
152
+ action raw {
153
+ SET_TMP_ARY(_raw);
154
+ rb_ary_push(last, tmp);
155
+ }
156
+
157
+
158
+ action function {
159
+ // last = apply_op(stack, :function)
160
+ APPLY_OP(_function);
161
+ // str_buf = ""
162
+ str_a = NULL;
163
+ }
164
+
165
+ action direction {
166
+ SET_TMP_STR;
167
+ tmp = ID2SYM(rb_to_id(rb_funcall(tmp, _downcase, 0)));
168
+ // last = apply_op(stack, str_buf.downcase.to_sym, false)
169
+ last = rb_funcall(self, _apply_op, 3, stack, tmp, Qfalse);
170
+ }
171
+
172
+ action relation {
173
+ // if clause_state == :relation || clause_state == :parenthesis
174
+ // last = insert(stack, [:relation, str_buf])
175
+ // str_buf = ""
176
+ // end
177
+ if (clause_state & (CLAUSE_RELATION | CLAUSE_PARENTHESIS)) {
178
+ SET_TMP_ARY(_relation);
179
+ last = rb_funcall(self, _insert, 2, stack, tmp);
180
+ }
181
+ }
182
+
183
+ action operator {
184
+ SET_TMP_STR;
185
+ tmp = ID2SYM(rb_to_id(rb_funcall(tmp, _downcase, 0)));
186
+ APPLY_OP(tmp);
187
+ // last = apply_op(stack, str_buf.downcase.to_sym)
188
+ }
189
+
190
+ action is {
191
+ // We need the 'is' operator to avoid confusion with 'in site'.
192
+ APPLY_OP(_is);
193
+ // last = apply_op(stack, :is)
194
+ }
195
+
196
+ action interval {
197
+ // last = apply_op(stack, :interval)
198
+ APPLY_OP(_interval);
199
+ SET_TMP_STR;
200
+ // last << str_buf
201
+ rb_ary_push(last, tmp);
202
+ }
203
+
204
+ action filter {
205
+ // last = apply_op(stack, :filter)
206
+ APPLY_OP(_filter);
207
+ clause_state = CLAUSE_FILTER;
208
+ }
209
+
210
+ action goto_expr_p {
211
+ // # remember current machine state 'cs'
212
+ // last << [:par, cs]
213
+ tmp = rb_ary_new();
214
+ rb_ary_push(tmp, _par);
215
+ rb_ary_push(tmp, INT2NUM(cs));
216
+ rb_ary_push(last, tmp);
217
+ // stack.push last.last
218
+ rb_ary_push(stack, tmp);
219
+ // last = last.last
220
+ last = tmp;
221
+ fgoto expr_p;
222
+ }
223
+
224
+ action expr_close {
225
+ // pop_stack(stack, :par_close)
226
+ rb_funcall(self, _pop_stack, 2, stack, _par_close);
227
+ // # reset machine state 'cs'
228
+ // cs = stack.last.delete_at(1)
229
+ tmp = rb_ary_entry(stack, -1);
230
+ tmp = rb_ary_delete_at(tmp, 1);
231
+ cs = NUM2INT(tmp);
232
+ // # one more time to remove [:par...] line
233
+ // stack.pop
234
+ rb_ary_pop(stack);
235
+ // last = stack.last
236
+ last = rb_ary_entry(stack, -1);
237
+ // # closing ')' must be parsed twice
238
+ fhold;
239
+ }
240
+
241
+ action goto_clause_p {
242
+ clause_state = CLAUSE_PARENTHESIS;
243
+ // # remember current machine state 'cs'
244
+ // last << [:clause_par, cs]
245
+ tmp = rb_ary_new();
246
+ rb_ary_push(tmp, _clause_par);
247
+ rb_ary_push(tmp, INT2NUM(cs));
248
+ rb_ary_push(last, tmp);
249
+ // stack.push last.last
250
+ rb_ary_push(stack, tmp);
251
+ // last = last.last
252
+ last = tmp;
253
+ fgoto clause_p;
254
+ }
255
+
256
+ action clause_close {
257
+ clause_state = CLAUSE_RELATION;
258
+ // pop_stack(stack, :clause_par_close)
259
+ rb_funcall(self, _pop_stack, 2, stack, _clause_par_close);
260
+ // # reset machine state 'cs'
261
+ // cs = stack.last.delete_at(1)
262
+ tmp = rb_ary_entry(stack, -1);
263
+ tmp = rb_ary_delete_at(tmp, 1);
264
+ cs = NUM2INT(tmp);
265
+ // # one more time to remove [:par...] line
266
+ // stack.pop
267
+ rb_ary_pop(stack);
268
+ // last = stack.last
269
+ last = rb_ary_entry(stack, -1);
270
+ // # closing ')' must be parsed twice
271
+ fhold;
272
+ }
273
+
274
+ action scope {
275
+ // last = apply_op(stack, :scope)
276
+ APPLY_OP(_scope);
277
+ // last << str_buf
278
+ SET_TMP_STR;
279
+ rb_ary_push(last, tmp);
280
+ }
281
+
282
+ action offset {
283
+ // last = apply_op(stack, :offset)
284
+ APPLY_OP(_offset);
285
+ // str_buf = ""
286
+ str_a = NULL;
287
+ }
288
+
289
+ action param {
290
+ // last << [:param, str_buf]
291
+ SET_TMP_ARY(_param);
292
+ rb_ary_push(last, tmp);
293
+ }
294
+
295
+ action paginate {
296
+ // last = apply_op(stack, :paginate)
297
+ APPLY_OP(_paginate);
298
+ // str_buf = ""
299
+ str_a = NULL;
300
+ }
301
+
302
+ action limit {
303
+ // last = apply_op(stack, :limit)
304
+ APPLY_OP(_limit);
305
+ // str_buf = ""
306
+ str_a = NULL;
307
+ }
308
+
309
+ action order {
310
+ // last = apply_op(stack, :order)
311
+ APPLY_OP(_order);
312
+ // str_buf = ""
313
+ str_a = NULL;
314
+ }
315
+
316
+ action group {
317
+ // last = apply_op(stack, :group)
318
+ APPLY_OP(_group);
319
+ // str_buf = ""
320
+ str_a = NULL;
321
+ }
322
+
323
+ action from_ {
324
+ // last = apply_op(stack, :from)
325
+ APPLY_OP(_from);
326
+ // str_buf = ""
327
+ str_a = NULL;
328
+ clause_state = CLAUSE_RELATION;
329
+ }
330
+
331
+ action join_clause {
332
+ // if clause_state == :relation
333
+ // last = apply_op(stack, "clause_#{str_buf}".to_sym)
334
+ // str_buf = ""
335
+ // end
336
+ if (clause_state & CLAUSE_RELATION) {
337
+ if (*str_a == 'a') {
338
+ APPLY_OP(_clause_and);
339
+ } else {
340
+ APPLY_OP(_clause_or);
341
+ }
342
+ str_a = NULL;
343
+ }
344
+ }
345
+
346
+ action clause {
347
+ // last = insert(stack, [:clause])
348
+ tmp = rb_ary_new();
349
+ rb_ary_push(tmp, _clause);
350
+ last = rb_funcall(self, _insert, 2, stack, tmp);
351
+ str_a = NULL;
352
+ }
353
+
354
+ action error {
355
+ p = p - 3;
356
+ if (p < data) p = data;
357
+ // raise QueryBuilder::SyntaxError.new("Syntax error near #{data[p..-1].chomp.inspect}.")
358
+ rb_raise(rb_SyntaxError, "Syntax error near %s.", RSTRING_PTR(rb_str_inspect(rb_str_new(p , pe - p - 1))));
359
+ }
360
+
361
+ action debug {
362
+ // printf("_%c", data[p]);
363
+ }
364
+
365
+ include querybuilder "querybuilder_syntax.rl";
366
+ }%%
367
+
368
+ %% write data;
369
+
370
+ #define CLAUSE_RELATION 1
371
+ #define CLAUSE_PARENTHESIS 2
372
+ #define CLAUSE_FILTER 4
373
+
374
+ VALUE rb_parse(VALUE self, VALUE arg) {
375
+ VALUE stack, last, tmp;
376
+ // if string.kind_of?(Array) // rb_type(string) == T_ARRAY
377
+ if (rb_type(arg) == T_ARRAY) {
378
+ // data = "(#{arg.join(') or (')})\n"
379
+ tmp = rb_str_new2("(");
380
+ rb_str_append(tmp, rb_ary_join(arg, rb_str_new2(") or (")));
381
+ rb_str_append(tmp, rb_str_new2(")\n"));
382
+ } else if (rb_type(arg) == T_STRING) {
383
+ // data = "#{arg}\n"
384
+ tmp = rb_str_plus(arg, rb_str_new2("\n"));
385
+ } else {
386
+ rb_raise(rb_SyntaxError, "Bad element type: Parser only accepts strings.");
387
+ }
388
+ const char * data = RSTRING_PTR(tmp);
389
+
390
+ int cs;
391
+ const char * p = data;
392
+ const char * pe = data + RSTRING_LEN(tmp);
393
+ const char * eof = pe;
394
+ const char * str_a = NULL;
395
+
396
+ // last = [:query]
397
+ last = rb_ary_new();
398
+ rb_ary_push(last, _query);
399
+ // stack = [last]
400
+ stack = rb_ary_new();
401
+ rb_ary_push(stack, last);
402
+
403
+ /* clause_state = :relation */
404
+ int clause_state = CLAUSE_RELATION;
405
+
406
+
407
+ %% write init;
408
+ %% write exec;
409
+
410
+ // raise QueryBuilder::SyntaxError.new("Syntax error near #{data[p..-1].chomp.inspect}.") if p != pe
411
+ if (p < pe) {
412
+ p = p - 3;
413
+ if (p < data) p = data;
414
+ rb_raise(rb_SyntaxError, "Syntax error near %s.", RSTRING_PTR(rb_str_inspect(rb_str_new(p , pe - p - 1))));
415
+ }
416
+
417
+ return rb_ary_entry(stack, 0);
418
+ }
@@ -0,0 +1,1686 @@
1
+
2
+ # line 1 "querybuilder_rb.rl"
3
+ module QueryBuilder
4
+ class Parser
5
+
6
+ # line 188 "querybuilder_rb.rl"
7
+
8
+
9
+
10
+ # line 11 "querybuilder_rb.rb"
11
+ class << self
12
+ attr_accessor :_querybuilder_actions
13
+ private :_querybuilder_actions, :_querybuilder_actions=
14
+ end
15
+ self._querybuilder_actions = [
16
+ 0, 1, 0, 1, 1, 1, 2, 1,
17
+ 3, 1, 4, 1, 5, 1, 6, 1,
18
+ 7, 1, 8, 1, 9, 1, 10, 1,
19
+ 11, 1, 12, 1, 13, 1, 14, 1,
20
+ 15, 1, 16, 1, 17, 1, 18, 1,
21
+ 19, 1, 20, 1, 21, 1, 22, 1,
22
+ 23, 1, 24, 1, 25, 1, 26, 1,
23
+ 27, 1, 28, 1, 29, 2, 4, 0,
24
+ 2, 4, 17, 2, 4, 19, 2, 5,
25
+ 0, 2, 5, 17, 2, 5, 19, 2,
26
+ 6, 0, 2, 6, 11, 2, 6, 17,
27
+ 2, 6, 19, 2, 7, 0, 2, 7,
28
+ 17, 2, 7, 19, 2, 8, 0, 2,
29
+ 8, 17, 2, 8, 19, 2, 9, 0,
30
+ 2, 11, 6, 2, 11, 19, 2, 12,
31
+ 0, 2, 12, 16, 2, 12, 28, 2,
32
+ 14, 0, 2, 14, 17, 2, 14, 19,
33
+ 2, 16, 18, 2, 18, 16, 2, 20,
34
+ 19, 2, 21, 0, 2, 23, 0, 2,
35
+ 24, 0, 2, 25, 0, 2, 26, 0,
36
+ 2, 27, 0, 2, 27, 18, 2, 28,
37
+ 12
38
+ ]
39
+
40
+ class << self
41
+ attr_accessor :_querybuilder_key_offsets
42
+ private :_querybuilder_key_offsets, :_querybuilder_key_offsets=
43
+ end
44
+ self._querybuilder_key_offsets = [
45
+ 0, 0, 9, 13, 16, 17, 18, 21,
46
+ 30, 34, 37, 38, 39, 40, 49, 58,
47
+ 66, 67, 68, 69, 70, 73, 77, 78,
48
+ 86, 94, 104, 105, 106, 107, 108, 114,
49
+ 120, 122, 128, 134, 136, 141, 142, 143,
50
+ 144, 145, 146, 152, 158, 160, 165, 166,
51
+ 167, 168, 169, 170, 171, 172, 180, 188,
52
+ 196, 198, 199, 200, 201, 204, 208, 209,
53
+ 217, 225, 235, 236, 237, 241, 242, 243,
54
+ 244, 245, 253, 261, 271, 279, 287, 297,
55
+ 298, 301, 309, 317, 319, 323, 324, 325,
56
+ 326, 327, 330, 345, 347, 355, 370, 371,
57
+ 374, 377, 379, 379, 379, 388, 396, 404,
58
+ 418, 434, 436, 436, 440, 448, 449, 450,
59
+ 453, 468, 470, 481, 483, 493, 507, 508,
60
+ 509, 518, 519, 522, 525, 526, 527, 528,
61
+ 530, 533, 538, 539, 540, 541, 549, 551,
62
+ 552, 555, 560, 561, 562, 565, 567, 568,
63
+ 571, 572, 573, 574, 575, 576, 577, 578,
64
+ 579, 580, 581, 583, 584, 587, 591, 592,
65
+ 593, 595, 599, 600, 601, 602, 603, 604,
66
+ 606, 607, 608, 609, 610, 611, 614, 629,
67
+ 631, 639, 654, 655, 658, 661, 663, 663,
68
+ 663, 672, 680, 688, 702, 718, 720, 720,
69
+ 724, 732, 733, 734, 737, 752, 754, 765,
70
+ 767, 777, 791, 792, 793, 802, 803, 806,
71
+ 809, 810, 811, 812, 814, 817, 822, 823,
72
+ 824, 825, 833, 835, 836, 839, 844, 845,
73
+ 846, 849, 851, 852, 855, 856, 857, 858,
74
+ 859, 860, 861, 862, 863, 864, 865, 867,
75
+ 868, 871, 875, 876, 877, 879, 883, 884,
76
+ 885, 886, 887, 888, 890, 891, 892, 893,
77
+ 894, 895, 909, 910, 910, 911, 912, 913,
78
+ 927, 928, 928, 936, 937, 938, 939, 940,
79
+ 949, 957, 958, 961, 969, 977, 978, 979,
80
+ 980, 981, 984, 999, 1001, 1009, 1024, 1025,
81
+ 1028, 1031, 1033, 1033, 1033, 1042, 1050, 1058,
82
+ 1072, 1088, 1090, 1090, 1094, 1102, 1103, 1104,
83
+ 1107, 1122, 1124, 1135, 1137, 1147, 1161, 1162,
84
+ 1163, 1172, 1173, 1176, 1179, 1180, 1181, 1182,
85
+ 1184, 1187, 1192, 1193, 1194, 1195, 1203, 1205,
86
+ 1206, 1209, 1214, 1215, 1216, 1219, 1221, 1222,
87
+ 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232,
88
+ 1233, 1234, 1235, 1237, 1238, 1241, 1245, 1246,
89
+ 1247, 1249, 1253, 1254, 1255, 1256, 1257, 1258,
90
+ 1260, 1261, 1262, 1263, 1264, 1265, 1279, 1280,
91
+ 1280, 1295, 1297, 1306, 1328, 1343, 1344, 1347,
92
+ 1350, 1352, 1352, 1352, 1362, 1370, 1378, 1393,
93
+ 1409, 1411, 1411, 1415, 1424, 1441, 1442, 1443,
94
+ 1446, 1447, 1449, 1450, 1453, 1458, 1459, 1460,
95
+ 1461, 1470, 1472, 1473, 1476, 1481, 1482, 1483,
96
+ 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1494,
97
+ 1495, 1498, 1502, 1503, 1504, 1506, 1518, 1520,
98
+ 1531, 1546, 1547, 1548, 1558, 1559, 1560, 1561,
99
+ 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571,
100
+ 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579,
101
+ 1580, 1581, 1581, 1590, 1594, 1598, 1603, 1604,
102
+ 1605, 1606, 1615, 1624, 1631, 1632, 1635, 1643,
103
+ 1652, 1653, 1654, 1655, 1656, 1659, 1674, 1676,
104
+ 1685, 1708, 1723, 1724, 1727, 1730, 1732, 1732,
105
+ 1732, 1742, 1750, 1758, 1773, 1789, 1791, 1791,
106
+ 1795, 1804, 1822, 1823, 1824, 1827, 1828, 1830,
107
+ 1832, 1835, 1840, 1841, 1842, 1843, 1852, 1854,
108
+ 1855, 1858, 1863, 1864, 1865, 1868, 1869, 1870,
109
+ 1871, 1872, 1873, 1874, 1876, 1877, 1880, 1884,
110
+ 1885, 1886, 1888, 1900, 1902, 1913, 1928, 1929,
111
+ 1930, 1940, 1941, 1942, 1943, 1946, 1947, 1948,
112
+ 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956,
113
+ 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1963,
114
+ 1972, 1981, 1992, 1999, 2005, 2010, 2014, 2017,
115
+ 2028, 2035, 2058, 2076, 2099, 2122, 2140, 2163,
116
+ 2174, 2185, 2208, 2226, 2249, 2249
117
+ ]
118
+
119
+ class << self
120
+ attr_accessor :_querybuilder_trans_keys
121
+ private :_querybuilder_trans_keys, :_querybuilder_trans_keys=
122
+ end
123
+ self._querybuilder_trans_keys = [
124
+ 32, 40, 95, 9, 10, 65, 90, 97,
125
+ 122, 32, 41, 9, 10, 32, 9, 10,
126
+ 110, 100, 32, 9, 10, 32, 40, 95,
127
+ 9, 10, 65, 90, 97, 122, 32, 41,
128
+ 9, 10, 32, 9, 10, 114, 111, 109,
129
+ 32, 40, 95, 9, 10, 65, 90, 97,
130
+ 122, 32, 40, 95, 9, 10, 65, 90,
131
+ 97, 122, 32, 95, 9, 10, 65, 90,
132
+ 97, 122, 114, 111, 117, 112, 32, 9,
133
+ 10, 32, 98, 9, 10, 121, 32, 95,
134
+ 9, 10, 65, 90, 97, 122, 32, 95,
135
+ 9, 10, 65, 90, 97, 122, 32, 44,
136
+ 46, 95, 9, 10, 65, 90, 97, 122,
137
+ 105, 109, 105, 116, 32, 45, 9, 10,
138
+ 48, 57, 32, 45, 9, 10, 48, 57,
139
+ 48, 57, 32, 44, 9, 10, 48, 57,
140
+ 32, 45, 9, 10, 48, 57, 48, 57,
141
+ 32, 9, 10, 48, 57, 102, 102, 115,
142
+ 101, 116, 32, 45, 9, 10, 48, 57,
143
+ 32, 45, 9, 10, 48, 57, 48, 57,
144
+ 32, 9, 10, 48, 57, 97, 103, 105,
145
+ 110, 97, 116, 101, 32, 95, 9, 10,
146
+ 65, 90, 97, 122, 32, 95, 9, 10,
147
+ 65, 90, 97, 122, 32, 95, 9, 10,
148
+ 65, 90, 97, 122, 102, 114, 100, 101,
149
+ 114, 32, 9, 10, 32, 98, 9, 10,
150
+ 121, 32, 95, 9, 10, 65, 90, 97,
151
+ 122, 32, 95, 9, 10, 65, 90, 97,
152
+ 122, 32, 44, 46, 95, 9, 10, 65,
153
+ 90, 97, 122, 83, 67, 32, 44, 9,
154
+ 10, 69, 115, 99, 101, 32, 95, 9,
155
+ 10, 65, 90, 97, 122, 32, 95, 9,
156
+ 10, 65, 90, 97, 122, 32, 44, 46,
157
+ 95, 9, 10, 65, 90, 97, 122, 32,
158
+ 95, 9, 10, 65, 90, 97, 122, 32,
159
+ 95, 9, 10, 65, 90, 97, 122, 32,
160
+ 44, 46, 95, 9, 10, 65, 90, 97,
161
+ 122, 110, 32, 9, 10, 32, 95, 9,
162
+ 10, 65, 90, 97, 122, 32, 95, 9,
163
+ 10, 65, 90, 97, 122, 102, 114, 32,
164
+ 100, 9, 10, 104, 101, 114, 101, 32,
165
+ 9, 10, 32, 34, 35, 39, 40, 45,
166
+ 95, 9, 10, 48, 57, 65, 90, 97,
167
+ 122, 34, 92, 32, 43, 45, 61, 9,
168
+ 10, 60, 62, 32, 34, 35, 39, 40,
169
+ 45, 95, 9, 10, 48, 57, 65, 90,
170
+ 97, 122, 123, 34, 92, 125, 34, 92,
171
+ 125, 34, 92, 32, 43, 45, 46, 61,
172
+ 9, 10, 60, 62, 32, 95, 9, 10,
173
+ 65, 90, 97, 122, 32, 95, 9, 10,
174
+ 65, 90, 97, 122, 32, 43, 45, 46,
175
+ 61, 95, 9, 10, 60, 62, 65, 90,
176
+ 97, 122, 32, 34, 35, 39, 40, 45,
177
+ 61, 95, 9, 10, 48, 57, 65, 90,
178
+ 97, 122, 39, 92, 32, 41, 9, 10,
179
+ 32, 43, 45, 61, 9, 10, 60, 62,
180
+ 110, 100, 32, 9, 10, 32, 34, 35,
181
+ 39, 40, 45, 95, 9, 10, 48, 57,
182
+ 65, 90, 97, 122, 48, 57, 32, 43,
183
+ 45, 46, 61, 9, 10, 48, 57, 60,
184
+ 62, 48, 57, 32, 43, 45, 61, 9,
185
+ 10, 48, 57, 60, 62, 32, 43, 45,
186
+ 46, 61, 95, 9, 10, 60, 62, 65,
187
+ 90, 97, 122, 97, 121, 32, 43, 45,
188
+ 61, 115, 9, 10, 60, 62, 113, 32,
189
+ 9, 10, 101, 114, 116, 111, 117, 114,
190
+ 110, 115, 32, 9, 10, 32, 78, 110,
191
+ 9, 10, 85, 76, 76, 32, 43, 45,
192
+ 61, 9, 10, 60, 62, 111, 117, 116,
193
+ 32, 9, 10, 32, 78, 110, 9, 10,
194
+ 108, 108, 101, 105, 116, 107, 109, 101,
195
+ 97, 105, 111, 116, 99, 104, 110, 117,
196
+ 116, 101, 110, 116, 104, 101, 111, 116,
197
+ 32, 9, 10, 32, 108, 9, 10, 105,
198
+ 107, 102, 114, 32, 100, 9, 10, 101,
199
+ 99, 111, 110, 100, 101, 104, 101, 107,
200
+ 101, 114, 101, 32, 9, 10, 32, 34,
201
+ 35, 39, 40, 45, 95, 9, 10, 48,
202
+ 57, 65, 90, 97, 122, 34, 92, 32,
203
+ 43, 45, 61, 9, 10, 60, 62, 32,
204
+ 34, 35, 39, 40, 45, 95, 9, 10,
205
+ 48, 57, 65, 90, 97, 122, 123, 34,
206
+ 92, 125, 34, 92, 125, 34, 92, 32,
207
+ 43, 45, 46, 61, 9, 10, 60, 62,
208
+ 32, 95, 9, 10, 65, 90, 97, 122,
209
+ 32, 95, 9, 10, 65, 90, 97, 122,
210
+ 32, 43, 45, 46, 61, 95, 9, 10,
211
+ 60, 62, 65, 90, 97, 122, 32, 34,
212
+ 35, 39, 40, 45, 61, 95, 9, 10,
213
+ 48, 57, 65, 90, 97, 122, 39, 92,
214
+ 32, 41, 9, 10, 32, 43, 45, 61,
215
+ 9, 10, 60, 62, 110, 100, 32, 9,
216
+ 10, 32, 34, 35, 39, 40, 45, 95,
217
+ 9, 10, 48, 57, 65, 90, 97, 122,
218
+ 48, 57, 32, 43, 45, 46, 61, 9,
219
+ 10, 48, 57, 60, 62, 48, 57, 32,
220
+ 43, 45, 61, 9, 10, 48, 57, 60,
221
+ 62, 32, 43, 45, 46, 61, 95, 9,
222
+ 10, 60, 62, 65, 90, 97, 122, 97,
223
+ 121, 32, 43, 45, 61, 115, 9, 10,
224
+ 60, 62, 113, 32, 9, 10, 101, 114,
225
+ 116, 111, 117, 114, 110, 115, 32, 9,
226
+ 10, 32, 78, 110, 9, 10, 85, 76,
227
+ 76, 32, 43, 45, 61, 9, 10, 60,
228
+ 62, 111, 117, 116, 32, 9, 10, 32,
229
+ 78, 110, 9, 10, 108, 108, 101, 105,
230
+ 116, 107, 109, 101, 97, 105, 111, 116,
231
+ 99, 104, 110, 117, 116, 101, 110, 116,
232
+ 104, 101, 111, 116, 32, 9, 10, 32,
233
+ 108, 9, 10, 105, 107, 102, 114, 32,
234
+ 100, 9, 10, 101, 99, 111, 110, 100,
235
+ 101, 104, 101, 107, 101, 97, 97, 32,
236
+ 43, 45, 46, 61, 95, 9, 10, 60,
237
+ 62, 65, 90, 97, 122, 101, 101, 97,
238
+ 97, 32, 43, 45, 46, 61, 95, 9,
239
+ 10, 60, 62, 65, 90, 97, 122, 101,
240
+ 32, 95, 9, 10, 65, 90, 97, 122,
241
+ 104, 114, 111, 109, 32, 40, 95, 9,
242
+ 10, 65, 90, 97, 122, 32, 95, 9,
243
+ 10, 65, 90, 97, 122, 110, 32, 9,
244
+ 10, 32, 95, 9, 10, 65, 90, 97,
245
+ 122, 32, 95, 9, 10, 65, 90, 97,
246
+ 122, 104, 101, 114, 101, 32, 9, 10,
247
+ 32, 34, 35, 39, 40, 45, 95, 9,
248
+ 10, 48, 57, 65, 90, 97, 122, 34,
249
+ 92, 32, 43, 45, 61, 9, 10, 60,
250
+ 62, 32, 34, 35, 39, 40, 45, 95,
251
+ 9, 10, 48, 57, 65, 90, 97, 122,
252
+ 123, 34, 92, 125, 34, 92, 125, 34,
253
+ 92, 32, 43, 45, 46, 61, 9, 10,
254
+ 60, 62, 32, 95, 9, 10, 65, 90,
255
+ 97, 122, 32, 95, 9, 10, 65, 90,
256
+ 97, 122, 32, 43, 45, 46, 61, 95,
257
+ 9, 10, 60, 62, 65, 90, 97, 122,
258
+ 32, 34, 35, 39, 40, 45, 61, 95,
259
+ 9, 10, 48, 57, 65, 90, 97, 122,
260
+ 39, 92, 32, 41, 9, 10, 32, 43,
261
+ 45, 61, 9, 10, 60, 62, 110, 100,
262
+ 32, 9, 10, 32, 34, 35, 39, 40,
263
+ 45, 95, 9, 10, 48, 57, 65, 90,
264
+ 97, 122, 48, 57, 32, 43, 45, 46,
265
+ 61, 9, 10, 48, 57, 60, 62, 48,
266
+ 57, 32, 43, 45, 61, 9, 10, 48,
267
+ 57, 60, 62, 32, 43, 45, 46, 61,
268
+ 95, 9, 10, 60, 62, 65, 90, 97,
269
+ 122, 97, 121, 32, 43, 45, 61, 115,
270
+ 9, 10, 60, 62, 113, 32, 9, 10,
271
+ 101, 114, 116, 111, 117, 114, 110, 115,
272
+ 32, 9, 10, 32, 78, 110, 9, 10,
273
+ 85, 76, 76, 32, 43, 45, 61, 9,
274
+ 10, 60, 62, 111, 117, 116, 32, 9,
275
+ 10, 32, 78, 110, 9, 10, 108, 108,
276
+ 101, 105, 116, 107, 109, 101, 97, 105,
277
+ 111, 116, 99, 104, 110, 117, 116, 101,
278
+ 110, 116, 104, 101, 111, 116, 32, 9,
279
+ 10, 32, 108, 9, 10, 105, 107, 102,
280
+ 114, 32, 100, 9, 10, 101, 99, 111,
281
+ 110, 100, 101, 104, 101, 107, 101, 97,
282
+ 97, 32, 43, 45, 46, 61, 95, 9,
283
+ 10, 60, 62, 65, 90, 97, 122, 101,
284
+ 32, 34, 35, 39, 40, 45, 95, 9,
285
+ 10, 48, 57, 65, 90, 97, 122, 34,
286
+ 92, 32, 41, 43, 45, 61, 9, 10,
287
+ 60, 62, 32, 41, 43, 45, 61, 97,
288
+ 100, 101, 103, 104, 105, 108, 109, 110,
289
+ 111, 115, 119, 121, 9, 10, 60, 62,
290
+ 32, 34, 35, 39, 40, 45, 95, 9,
291
+ 10, 48, 57, 65, 90, 97, 122, 123,
292
+ 34, 92, 125, 34, 92, 125, 34, 92,
293
+ 32, 41, 43, 45, 46, 61, 9, 10,
294
+ 60, 62, 32, 95, 9, 10, 65, 90,
295
+ 97, 122, 32, 95, 9, 10, 65, 90,
296
+ 97, 122, 32, 41, 43, 45, 46, 61,
297
+ 95, 9, 10, 60, 62, 65, 90, 97,
298
+ 122, 32, 34, 35, 39, 40, 45, 61,
299
+ 95, 9, 10, 48, 57, 65, 90, 97,
300
+ 122, 39, 92, 32, 41, 9, 10, 32,
301
+ 41, 43, 45, 61, 9, 10, 60, 62,
302
+ 32, 41, 43, 45, 61, 97, 101, 103,
303
+ 105, 108, 109, 110, 111, 9, 10, 60,
304
+ 62, 110, 100, 32, 9, 10, 113, 101,
305
+ 116, 115, 32, 9, 10, 32, 78, 110,
306
+ 9, 10, 85, 76, 76, 32, 41, 43,
307
+ 45, 61, 9, 10, 60, 62, 111, 117,
308
+ 116, 32, 9, 10, 32, 78, 110, 9,
309
+ 10, 108, 108, 101, 105, 116, 107, 101,
310
+ 97, 116, 99, 104, 101, 111, 116, 32,
311
+ 9, 10, 32, 108, 9, 10, 105, 114,
312
+ 48, 57, 32, 41, 43, 45, 46, 61,
313
+ 9, 10, 48, 57, 60, 62, 48, 57,
314
+ 32, 41, 43, 45, 61, 9, 10, 48,
315
+ 57, 60, 62, 32, 41, 43, 45, 46,
316
+ 61, 95, 9, 10, 60, 62, 65, 90,
317
+ 97, 122, 97, 121, 32, 41, 43, 45,
318
+ 61, 115, 9, 10, 60, 62, 111, 117,
319
+ 114, 97, 105, 111, 110, 117, 116, 101,
320
+ 110, 116, 104, 101, 99, 111, 110, 100,
321
+ 101, 101, 107, 101, 97, 32, 40, 95,
322
+ 9, 10, 65, 90, 97, 122, 32, 41,
323
+ 9, 10, 32, 41, 9, 10, 32, 41,
324
+ 102, 9, 10, 114, 111, 109, 32, 40,
325
+ 95, 9, 10, 65, 90, 97, 122, 32,
326
+ 41, 95, 9, 10, 65, 90, 97, 122,
327
+ 32, 41, 102, 105, 119, 9, 10, 110,
328
+ 32, 9, 10, 32, 95, 9, 10, 65,
329
+ 90, 97, 122, 32, 41, 95, 9, 10,
330
+ 65, 90, 97, 122, 104, 101, 114, 101,
331
+ 32, 9, 10, 32, 34, 35, 39, 40,
332
+ 45, 95, 9, 10, 48, 57, 65, 90,
333
+ 97, 122, 34, 92, 32, 41, 43, 45,
334
+ 61, 9, 10, 60, 62, 32, 41, 43,
335
+ 45, 61, 97, 100, 101, 102, 103, 104,
336
+ 105, 108, 109, 110, 111, 115, 119, 121,
337
+ 9, 10, 60, 62, 32, 34, 35, 39,
338
+ 40, 45, 95, 9, 10, 48, 57, 65,
339
+ 90, 97, 122, 123, 34, 92, 125, 34,
340
+ 92, 125, 34, 92, 32, 41, 43, 45,
341
+ 46, 61, 9, 10, 60, 62, 32, 95,
342
+ 9, 10, 65, 90, 97, 122, 32, 95,
343
+ 9, 10, 65, 90, 97, 122, 32, 41,
344
+ 43, 45, 46, 61, 95, 9, 10, 60,
345
+ 62, 65, 90, 97, 122, 32, 34, 35,
346
+ 39, 40, 45, 61, 95, 9, 10, 48,
347
+ 57, 65, 90, 97, 122, 39, 92, 32,
348
+ 41, 9, 10, 32, 41, 43, 45, 61,
349
+ 9, 10, 60, 62, 32, 41, 43, 45,
350
+ 61, 97, 101, 102, 103, 105, 108, 109,
351
+ 110, 111, 9, 10, 60, 62, 110, 100,
352
+ 32, 9, 10, 113, 101, 116, 110, 115,
353
+ 32, 9, 10, 32, 78, 110, 9, 10,
354
+ 85, 76, 76, 32, 41, 43, 45, 61,
355
+ 9, 10, 60, 62, 111, 117, 116, 32,
356
+ 9, 10, 32, 78, 110, 9, 10, 108,
357
+ 108, 101, 105, 116, 107, 101, 97, 116,
358
+ 99, 104, 101, 111, 116, 32, 9, 10,
359
+ 32, 108, 9, 10, 105, 114, 48, 57,
360
+ 32, 41, 43, 45, 46, 61, 9, 10,
361
+ 48, 57, 60, 62, 48, 57, 32, 41,
362
+ 43, 45, 61, 9, 10, 48, 57, 60,
363
+ 62, 32, 41, 43, 45, 46, 61, 95,
364
+ 9, 10, 60, 62, 65, 90, 97, 122,
365
+ 97, 121, 32, 41, 43, 45, 61, 115,
366
+ 9, 10, 60, 62, 111, 117, 114, 97,
367
+ 105, 111, 110, 117, 116, 101, 110, 116,
368
+ 104, 101, 99, 111, 110, 100, 101, 101,
369
+ 107, 101, 97, 32, 97, 102, 103, 108,
370
+ 111, 112, 9, 10, 32, 97, 102, 103,
371
+ 108, 111, 112, 9, 10, 32, 97, 102,
372
+ 103, 105, 108, 111, 112, 119, 9, 10,
373
+ 32, 44, 108, 111, 112, 9, 10, 32,
374
+ 44, 111, 112, 9, 10, 32, 111, 112,
375
+ 9, 10, 32, 112, 9, 10, 32, 9,
376
+ 10, 32, 44, 65, 68, 97, 100, 108,
377
+ 111, 112, 9, 10, 32, 44, 108, 111,
378
+ 112, 9, 10, 32, 43, 45, 61, 97,
379
+ 100, 101, 102, 103, 104, 105, 108, 109,
380
+ 110, 111, 112, 115, 119, 121, 9, 10,
381
+ 60, 62, 32, 43, 45, 61, 97, 101,
382
+ 102, 103, 105, 108, 109, 110, 111, 112,
383
+ 9, 10, 60, 62, 32, 43, 45, 61,
384
+ 97, 100, 101, 102, 103, 104, 105, 108,
385
+ 109, 110, 111, 112, 115, 119, 121, 9,
386
+ 10, 60, 62, 32, 43, 45, 61, 97,
387
+ 100, 101, 102, 103, 104, 105, 108, 109,
388
+ 110, 111, 112, 115, 119, 121, 9, 10,
389
+ 60, 62, 32, 43, 45, 61, 97, 101,
390
+ 102, 103, 105, 108, 109, 110, 111, 112,
391
+ 9, 10, 60, 62, 32, 43, 45, 61,
392
+ 97, 100, 101, 102, 103, 104, 105, 108,
393
+ 109, 110, 111, 112, 115, 119, 121, 9,
394
+ 10, 60, 62, 32, 97, 102, 103, 105,
395
+ 108, 111, 112, 119, 9, 10, 32, 97,
396
+ 102, 103, 105, 108, 111, 112, 119, 9,
397
+ 10, 32, 43, 45, 61, 97, 100, 101,
398
+ 102, 103, 104, 105, 108, 109, 110, 111,
399
+ 112, 115, 119, 121, 9, 10, 60, 62,
400
+ 32, 43, 45, 61, 97, 101, 102, 103,
401
+ 105, 108, 109, 110, 111, 112, 9, 10,
402
+ 60, 62, 32, 43, 45, 61, 97, 100,
403
+ 101, 102, 103, 104, 105, 108, 109, 110,
404
+ 111, 112, 115, 119, 121, 9, 10, 60,
405
+ 62, 0
406
+ ]
407
+
408
+ class << self
409
+ attr_accessor :_querybuilder_single_lengths
410
+ private :_querybuilder_single_lengths, :_querybuilder_single_lengths=
411
+ end
412
+ self._querybuilder_single_lengths = [
413
+ 0, 3, 2, 1, 1, 1, 1, 3,
414
+ 2, 1, 1, 1, 1, 3, 3, 2,
415
+ 1, 1, 1, 1, 1, 2, 1, 2,
416
+ 2, 4, 1, 1, 1, 1, 2, 2,
417
+ 0, 2, 2, 0, 1, 1, 1, 1,
418
+ 1, 1, 2, 2, 0, 1, 1, 1,
419
+ 1, 1, 1, 1, 1, 2, 2, 2,
420
+ 2, 1, 1, 1, 1, 2, 1, 2,
421
+ 2, 4, 1, 1, 2, 1, 1, 1,
422
+ 1, 2, 2, 4, 2, 2, 4, 1,
423
+ 1, 2, 2, 2, 2, 1, 1, 1,
424
+ 1, 1, 7, 2, 4, 7, 1, 3,
425
+ 3, 2, 0, 0, 5, 2, 2, 6,
426
+ 8, 2, 0, 2, 4, 1, 1, 1,
427
+ 7, 0, 5, 0, 4, 6, 1, 1,
428
+ 5, 1, 1, 3, 1, 1, 1, 2,
429
+ 1, 3, 1, 1, 1, 4, 2, 1,
430
+ 1, 3, 1, 1, 3, 2, 1, 3,
431
+ 1, 1, 1, 1, 1, 1, 1, 1,
432
+ 1, 1, 2, 1, 1, 2, 1, 1,
433
+ 2, 2, 1, 1, 1, 1, 1, 2,
434
+ 1, 1, 1, 1, 1, 1, 7, 2,
435
+ 4, 7, 1, 3, 3, 2, 0, 0,
436
+ 5, 2, 2, 6, 8, 2, 0, 2,
437
+ 4, 1, 1, 1, 7, 0, 5, 0,
438
+ 4, 6, 1, 1, 5, 1, 1, 3,
439
+ 1, 1, 1, 2, 1, 3, 1, 1,
440
+ 1, 4, 2, 1, 1, 3, 1, 1,
441
+ 3, 2, 1, 3, 1, 1, 1, 1,
442
+ 1, 1, 1, 1, 1, 1, 2, 1,
443
+ 1, 2, 1, 1, 2, 2, 1, 1,
444
+ 1, 1, 1, 2, 1, 1, 1, 1,
445
+ 1, 6, 1, 0, 1, 1, 1, 6,
446
+ 1, 0, 2, 1, 1, 1, 1, 3,
447
+ 2, 1, 1, 2, 2, 1, 1, 1,
448
+ 1, 1, 7, 2, 4, 7, 1, 3,
449
+ 3, 2, 0, 0, 5, 2, 2, 6,
450
+ 8, 2, 0, 2, 4, 1, 1, 1,
451
+ 7, 0, 5, 0, 4, 6, 1, 1,
452
+ 5, 1, 1, 3, 1, 1, 1, 2,
453
+ 1, 3, 1, 1, 1, 4, 2, 1,
454
+ 1, 3, 1, 1, 3, 2, 1, 3,
455
+ 1, 1, 1, 1, 1, 1, 1, 1,
456
+ 1, 1, 2, 1, 1, 2, 1, 1,
457
+ 2, 2, 1, 1, 1, 1, 1, 2,
458
+ 1, 1, 1, 1, 1, 6, 1, 0,
459
+ 7, 2, 5, 18, 7, 1, 3, 3,
460
+ 2, 0, 0, 6, 2, 2, 7, 8,
461
+ 2, 0, 2, 5, 13, 1, 1, 1,
462
+ 1, 2, 1, 1, 3, 1, 1, 1,
463
+ 5, 2, 1, 1, 3, 1, 1, 3,
464
+ 1, 1, 1, 1, 1, 1, 2, 1,
465
+ 1, 2, 1, 1, 0, 6, 0, 5,
466
+ 7, 1, 1, 6, 1, 1, 1, 3,
467
+ 1, 1, 1, 1, 1, 1, 1, 1,
468
+ 1, 1, 1, 1, 1, 1, 1, 1,
469
+ 1, 0, 3, 2, 2, 3, 1, 1,
470
+ 1, 3, 3, 5, 1, 1, 2, 3,
471
+ 1, 1, 1, 1, 1, 7, 2, 5,
472
+ 19, 7, 1, 3, 3, 2, 0, 0,
473
+ 6, 2, 2, 7, 8, 2, 0, 2,
474
+ 5, 14, 1, 1, 1, 1, 2, 2,
475
+ 1, 3, 1, 1, 1, 5, 2, 1,
476
+ 1, 3, 1, 1, 3, 1, 1, 1,
477
+ 1, 1, 1, 2, 1, 1, 2, 1,
478
+ 1, 0, 6, 0, 5, 7, 1, 1,
479
+ 6, 1, 1, 1, 3, 1, 1, 1,
480
+ 1, 1, 1, 1, 1, 1, 1, 1,
481
+ 1, 1, 1, 1, 1, 1, 0, 7,
482
+ 7, 9, 5, 4, 3, 2, 1, 9,
483
+ 5, 19, 14, 19, 19, 14, 19, 9,
484
+ 9, 19, 14, 19, 0, 0
485
+ ]
486
+
487
+ class << self
488
+ attr_accessor :_querybuilder_range_lengths
489
+ private :_querybuilder_range_lengths, :_querybuilder_range_lengths=
490
+ end
491
+ self._querybuilder_range_lengths = [
492
+ 0, 3, 1, 1, 0, 0, 1, 3,
493
+ 1, 1, 0, 0, 0, 3, 3, 3,
494
+ 0, 0, 0, 0, 1, 1, 0, 3,
495
+ 3, 3, 0, 0, 0, 0, 2, 2,
496
+ 1, 2, 2, 1, 2, 0, 0, 0,
497
+ 0, 0, 2, 2, 1, 2, 0, 0,
498
+ 0, 0, 0, 0, 0, 3, 3, 3,
499
+ 0, 0, 0, 0, 1, 1, 0, 3,
500
+ 3, 3, 0, 0, 1, 0, 0, 0,
501
+ 0, 3, 3, 3, 3, 3, 3, 0,
502
+ 1, 3, 3, 0, 1, 0, 0, 0,
503
+ 0, 1, 4, 0, 2, 4, 0, 0,
504
+ 0, 0, 0, 0, 2, 3, 3, 4,
505
+ 4, 0, 0, 1, 2, 0, 0, 1,
506
+ 4, 1, 3, 1, 3, 4, 0, 0,
507
+ 2, 0, 1, 0, 0, 0, 0, 0,
508
+ 1, 1, 0, 0, 0, 2, 0, 0,
509
+ 1, 1, 0, 0, 0, 0, 0, 0,
510
+ 0, 0, 0, 0, 0, 0, 0, 0,
511
+ 0, 0, 0, 0, 1, 1, 0, 0,
512
+ 0, 1, 0, 0, 0, 0, 0, 0,
513
+ 0, 0, 0, 0, 0, 1, 4, 0,
514
+ 2, 4, 0, 0, 0, 0, 0, 0,
515
+ 2, 3, 3, 4, 4, 0, 0, 1,
516
+ 2, 0, 0, 1, 4, 1, 3, 1,
517
+ 3, 4, 0, 0, 2, 0, 1, 0,
518
+ 0, 0, 0, 0, 1, 1, 0, 0,
519
+ 0, 2, 0, 0, 1, 1, 0, 0,
520
+ 0, 0, 0, 0, 0, 0, 0, 0,
521
+ 0, 0, 0, 0, 0, 0, 0, 0,
522
+ 1, 1, 0, 0, 0, 1, 0, 0,
523
+ 0, 0, 0, 0, 0, 0, 0, 0,
524
+ 0, 4, 0, 0, 0, 0, 0, 4,
525
+ 0, 0, 3, 0, 0, 0, 0, 3,
526
+ 3, 0, 1, 3, 3, 0, 0, 0,
527
+ 0, 1, 4, 0, 2, 4, 0, 0,
528
+ 0, 0, 0, 0, 2, 3, 3, 4,
529
+ 4, 0, 0, 1, 2, 0, 0, 1,
530
+ 4, 1, 3, 1, 3, 4, 0, 0,
531
+ 2, 0, 1, 0, 0, 0, 0, 0,
532
+ 1, 1, 0, 0, 0, 2, 0, 0,
533
+ 1, 1, 0, 0, 0, 0, 0, 0,
534
+ 0, 0, 0, 0, 0, 0, 0, 0,
535
+ 0, 0, 0, 0, 1, 1, 0, 0,
536
+ 0, 1, 0, 0, 0, 0, 0, 0,
537
+ 0, 0, 0, 0, 0, 4, 0, 0,
538
+ 4, 0, 2, 2, 4, 0, 0, 0,
539
+ 0, 0, 0, 2, 3, 3, 4, 4,
540
+ 0, 0, 1, 2, 2, 0, 0, 1,
541
+ 0, 0, 0, 1, 1, 0, 0, 0,
542
+ 2, 0, 0, 1, 1, 0, 0, 0,
543
+ 0, 0, 0, 0, 0, 0, 0, 0,
544
+ 1, 1, 0, 0, 1, 3, 1, 3,
545
+ 4, 0, 0, 2, 0, 0, 0, 0,
546
+ 0, 0, 0, 0, 0, 0, 0, 0,
547
+ 0, 0, 0, 0, 0, 0, 0, 0,
548
+ 0, 0, 3, 1, 1, 1, 0, 0,
549
+ 0, 3, 3, 1, 0, 1, 3, 3,
550
+ 0, 0, 0, 0, 1, 4, 0, 2,
551
+ 2, 4, 0, 0, 0, 0, 0, 0,
552
+ 2, 3, 3, 4, 4, 0, 0, 1,
553
+ 2, 2, 0, 0, 1, 0, 0, 0,
554
+ 1, 1, 0, 0, 0, 2, 0, 0,
555
+ 1, 1, 0, 0, 0, 0, 0, 0,
556
+ 0, 0, 0, 0, 0, 1, 1, 0,
557
+ 0, 1, 3, 1, 3, 4, 0, 0,
558
+ 2, 0, 0, 0, 0, 0, 0, 0,
559
+ 0, 0, 0, 0, 0, 0, 0, 0,
560
+ 0, 0, 0, 0, 0, 0, 0, 1,
561
+ 1, 1, 1, 1, 1, 1, 1, 1,
562
+ 1, 2, 2, 2, 2, 2, 2, 1,
563
+ 1, 2, 2, 2, 0, 0
564
+ ]
565
+
566
+ class << self
567
+ attr_accessor :_querybuilder_index_offsets
568
+ private :_querybuilder_index_offsets, :_querybuilder_index_offsets=
569
+ end
570
+ self._querybuilder_index_offsets = [
571
+ 0, 0, 7, 11, 14, 16, 18, 21,
572
+ 28, 32, 35, 37, 39, 41, 48, 55,
573
+ 61, 63, 65, 67, 69, 72, 76, 78,
574
+ 84, 90, 98, 100, 102, 104, 106, 111,
575
+ 116, 118, 123, 128, 130, 134, 136, 138,
576
+ 140, 142, 144, 149, 154, 156, 160, 162,
577
+ 164, 166, 168, 170, 172, 174, 180, 186,
578
+ 192, 195, 197, 199, 201, 204, 208, 210,
579
+ 216, 222, 230, 232, 234, 238, 240, 242,
580
+ 244, 246, 252, 258, 266, 272, 278, 286,
581
+ 288, 291, 297, 303, 306, 310, 312, 314,
582
+ 316, 318, 321, 333, 336, 343, 355, 357,
583
+ 361, 365, 368, 369, 370, 378, 384, 390,
584
+ 401, 414, 417, 418, 422, 429, 431, 433,
585
+ 436, 448, 450, 459, 461, 469, 480, 482,
586
+ 484, 492, 494, 497, 501, 503, 505, 507,
587
+ 510, 513, 518, 520, 522, 524, 531, 534,
588
+ 536, 539, 544, 546, 548, 552, 555, 557,
589
+ 561, 563, 565, 567, 569, 571, 573, 575,
590
+ 577, 579, 581, 584, 586, 589, 593, 595,
591
+ 597, 600, 604, 606, 608, 610, 612, 614,
592
+ 617, 619, 621, 623, 625, 627, 630, 642,
593
+ 645, 652, 664, 666, 670, 674, 677, 678,
594
+ 679, 687, 693, 699, 710, 723, 726, 727,
595
+ 731, 738, 740, 742, 745, 757, 759, 768,
596
+ 770, 778, 789, 791, 793, 801, 803, 806,
597
+ 810, 812, 814, 816, 819, 822, 827, 829,
598
+ 831, 833, 840, 843, 845, 848, 853, 855,
599
+ 857, 861, 864, 866, 870, 872, 874, 876,
600
+ 878, 880, 882, 884, 886, 888, 890, 893,
601
+ 895, 898, 902, 904, 906, 909, 913, 915,
602
+ 917, 919, 921, 923, 926, 928, 930, 932,
603
+ 934, 936, 947, 949, 950, 952, 954, 956,
604
+ 967, 969, 970, 976, 978, 980, 982, 984,
605
+ 991, 997, 999, 1002, 1008, 1014, 1016, 1018,
606
+ 1020, 1022, 1025, 1037, 1040, 1047, 1059, 1061,
607
+ 1065, 1069, 1072, 1073, 1074, 1082, 1088, 1094,
608
+ 1105, 1118, 1121, 1122, 1126, 1133, 1135, 1137,
609
+ 1140, 1152, 1154, 1163, 1165, 1173, 1184, 1186,
610
+ 1188, 1196, 1198, 1201, 1205, 1207, 1209, 1211,
611
+ 1214, 1217, 1222, 1224, 1226, 1228, 1235, 1238,
612
+ 1240, 1243, 1248, 1250, 1252, 1256, 1259, 1261,
613
+ 1265, 1267, 1269, 1271, 1273, 1275, 1277, 1279,
614
+ 1281, 1283, 1285, 1288, 1290, 1293, 1297, 1299,
615
+ 1301, 1304, 1308, 1310, 1312, 1314, 1316, 1318,
616
+ 1321, 1323, 1325, 1327, 1329, 1331, 1342, 1344,
617
+ 1345, 1357, 1360, 1368, 1389, 1401, 1403, 1407,
618
+ 1411, 1414, 1415, 1416, 1425, 1431, 1437, 1449,
619
+ 1462, 1465, 1466, 1470, 1478, 1494, 1496, 1498,
620
+ 1501, 1503, 1506, 1508, 1511, 1516, 1518, 1520,
621
+ 1522, 1530, 1533, 1535, 1538, 1543, 1545, 1547,
622
+ 1551, 1553, 1555, 1557, 1559, 1561, 1563, 1566,
623
+ 1568, 1571, 1575, 1577, 1579, 1581, 1591, 1593,
624
+ 1602, 1614, 1616, 1618, 1627, 1629, 1631, 1633,
625
+ 1637, 1639, 1641, 1643, 1645, 1647, 1649, 1651,
626
+ 1653, 1655, 1657, 1659, 1661, 1663, 1665, 1667,
627
+ 1669, 1671, 1672, 1679, 1683, 1687, 1692, 1694,
628
+ 1696, 1698, 1705, 1712, 1719, 1721, 1724, 1730,
629
+ 1737, 1739, 1741, 1743, 1745, 1748, 1760, 1763,
630
+ 1771, 1793, 1805, 1807, 1811, 1815, 1818, 1819,
631
+ 1820, 1829, 1835, 1841, 1853, 1866, 1869, 1870,
632
+ 1874, 1882, 1899, 1901, 1903, 1906, 1908, 1911,
633
+ 1914, 1917, 1922, 1924, 1926, 1928, 1936, 1939,
634
+ 1941, 1944, 1949, 1951, 1953, 1957, 1959, 1961,
635
+ 1963, 1965, 1967, 1969, 1972, 1974, 1977, 1981,
636
+ 1983, 1985, 1987, 1997, 1999, 2008, 2020, 2022,
637
+ 2024, 2033, 2035, 2037, 2039, 2043, 2045, 2047,
638
+ 2049, 2051, 2053, 2055, 2057, 2059, 2061, 2063,
639
+ 2065, 2067, 2069, 2071, 2073, 2075, 2077, 2078,
640
+ 2087, 2096, 2107, 2114, 2120, 2125, 2129, 2132,
641
+ 2143, 2150, 2172, 2189, 2211, 2233, 2250, 2272,
642
+ 2283, 2294, 2316, 2333, 2355, 2356
643
+ ]
644
+
645
+ class << self
646
+ attr_accessor :_querybuilder_indicies
647
+ private :_querybuilder_indicies, :_querybuilder_indicies=
648
+ end
649
+ self._querybuilder_indicies = [
650
+ 0, 2, 3, 0, 3, 3, 1, 4,
651
+ 5, 4, 1, 7, 7, 6, 8, 1,
652
+ 9, 1, 10, 10, 1, 11, 12, 13,
653
+ 11, 13, 13, 1, 14, 15, 14, 1,
654
+ 16, 16, 6, 17, 1, 18, 1, 19,
655
+ 1, 20, 21, 22, 20, 22, 22, 1,
656
+ 23, 12, 24, 23, 24, 24, 1, 25,
657
+ 24, 25, 24, 24, 6, 26, 1, 27,
658
+ 1, 28, 1, 29, 1, 30, 30, 1,
659
+ 30, 31, 30, 1, 32, 1, 33, 34,
660
+ 33, 34, 34, 1, 35, 36, 35, 36,
661
+ 36, 1, 37, 38, 39, 36, 37, 36,
662
+ 36, 6, 40, 1, 41, 1, 42, 1,
663
+ 43, 1, 44, 45, 44, 46, 1, 47,
664
+ 48, 47, 49, 1, 49, 1, 50, 51,
665
+ 50, 49, 6, 52, 53, 52, 54, 1,
666
+ 54, 1, 55, 55, 54, 6, 56, 1,
667
+ 57, 1, 58, 1, 59, 1, 60, 1,
668
+ 61, 62, 61, 63, 1, 64, 65, 64,
669
+ 66, 1, 66, 1, 67, 67, 66, 6,
670
+ 68, 1, 69, 1, 70, 1, 71, 1,
671
+ 72, 1, 73, 1, 74, 1, 75, 76,
672
+ 75, 76, 76, 1, 77, 78, 77, 78,
673
+ 78, 1, 79, 78, 79, 78, 78, 6,
674
+ 56, 80, 1, 81, 1, 82, 1, 83,
675
+ 1, 84, 84, 1, 84, 85, 84, 1,
676
+ 86, 1, 87, 88, 87, 88, 88, 1,
677
+ 89, 90, 89, 90, 90, 1, 91, 92,
678
+ 93, 90, 91, 90, 90, 6, 94, 1,
679
+ 95, 1, 96, 97, 96, 6, 98, 1,
680
+ 99, 1, 95, 1, 100, 1, 101, 102,
681
+ 101, 102, 102, 1, 103, 104, 103, 104,
682
+ 104, 1, 105, 106, 107, 104, 105, 104,
683
+ 104, 6, 108, 109, 108, 109, 109, 1,
684
+ 110, 111, 110, 111, 111, 1, 112, 113,
685
+ 114, 111, 112, 111, 111, 6, 115, 1,
686
+ 116, 116, 1, 116, 117, 116, 117, 117,
687
+ 1, 118, 117, 118, 117, 117, 6, 56,
688
+ 119, 1, 10, 81, 10, 1, 120, 1,
689
+ 121, 1, 122, 1, 123, 1, 124, 124,
690
+ 1, 125, 126, 127, 128, 129, 130, 132,
691
+ 125, 131, 132, 132, 1, 134, 135, 133,
692
+ 136, 137, 137, 137, 136, 138, 6, 139,
693
+ 140, 141, 142, 143, 144, 146, 139, 145,
694
+ 146, 146, 1, 147, 1, 149, 150, 1,
695
+ 148, 149, 150, 151, 148, 148, 152, 149,
696
+ 149, 148, 136, 137, 137, 153, 137, 136,
697
+ 138, 6, 154, 155, 154, 155, 155, 1,
698
+ 156, 157, 156, 157, 157, 1, 158, 159,
699
+ 159, 160, 159, 157, 158, 161, 157, 157,
700
+ 6, 139, 140, 141, 142, 143, 144, 137,
701
+ 146, 139, 145, 146, 146, 1, 163, 164,
702
+ 162, 162, 165, 166, 165, 1, 167, 137,
703
+ 137, 137, 167, 138, 6, 168, 1, 169,
704
+ 1, 170, 170, 1, 171, 126, 127, 128,
705
+ 172, 130, 173, 171, 131, 173, 173, 1,
706
+ 131, 1, 174, 175, 175, 176, 175, 174,
707
+ 131, 177, 6, 178, 1, 179, 180, 180,
708
+ 180, 179, 178, 181, 6, 182, 183, 183,
709
+ 184, 183, 173, 182, 185, 173, 173, 6,
710
+ 186, 1, 187, 1, 188, 189, 189, 189,
711
+ 191, 188, 190, 6, 192, 1, 139, 139,
712
+ 1, 192, 26, 192, 1, 193, 1, 194,
713
+ 1, 187, 1, 115, 195, 1, 196, 196,
714
+ 1, 197, 198, 199, 197, 1, 200, 1,
715
+ 201, 1, 202, 1, 203, 204, 204, 204,
716
+ 203, 205, 6, 206, 207, 1, 208, 1,
717
+ 209, 209, 1, 209, 198, 199, 209, 1,
718
+ 210, 1, 202, 1, 192, 211, 192, 1,
719
+ 212, 41, 1, 192, 1, 213, 214, 215,
720
+ 1, 216, 1, 217, 1, 192, 1, 218,
721
+ 1, 219, 1, 220, 1, 187, 1, 221,
722
+ 1, 222, 1, 187, 1, 192, 223, 1,
723
+ 224, 1, 225, 225, 1, 226, 227, 226,
724
+ 1, 228, 1, 212, 1, 56, 229, 1,
725
+ 170, 81, 170, 1, 230, 1, 231, 1,
726
+ 232, 1, 233, 1, 187, 1, 234, 235,
727
+ 1, 236, 1, 187, 1, 237, 1, 238,
728
+ 1, 239, 1, 240, 240, 1, 241, 242,
729
+ 243, 244, 245, 246, 248, 241, 247, 248,
730
+ 248, 1, 250, 251, 249, 252, 253, 253,
731
+ 253, 252, 254, 6, 255, 256, 257, 258,
732
+ 259, 260, 262, 255, 261, 262, 262, 1,
733
+ 263, 1, 265, 266, 1, 264, 265, 266,
734
+ 267, 264, 264, 268, 265, 265, 264, 252,
735
+ 253, 253, 269, 253, 252, 254, 6, 270,
736
+ 271, 270, 271, 271, 1, 272, 273, 272,
737
+ 273, 273, 1, 274, 275, 275, 276, 275,
738
+ 273, 274, 277, 273, 273, 6, 255, 256,
739
+ 257, 258, 259, 260, 253, 262, 255, 261,
740
+ 262, 262, 1, 279, 280, 278, 278, 281,
741
+ 282, 281, 1, 283, 253, 253, 253, 283,
742
+ 254, 6, 284, 1, 285, 1, 286, 286,
743
+ 1, 287, 242, 243, 244, 288, 246, 289,
744
+ 287, 247, 289, 289, 1, 247, 1, 290,
745
+ 291, 291, 292, 291, 290, 247, 293, 6,
746
+ 294, 1, 295, 296, 296, 296, 295, 294,
747
+ 297, 6, 298, 299, 299, 300, 299, 289,
748
+ 298, 301, 289, 289, 6, 302, 1, 303,
749
+ 1, 304, 305, 305, 305, 307, 304, 306,
750
+ 6, 308, 1, 255, 255, 1, 308, 26,
751
+ 308, 1, 309, 1, 310, 1, 303, 1,
752
+ 115, 311, 1, 312, 312, 1, 313, 314,
753
+ 315, 313, 1, 316, 1, 317, 1, 318,
754
+ 1, 319, 320, 320, 320, 319, 321, 6,
755
+ 322, 323, 1, 324, 1, 325, 325, 1,
756
+ 325, 314, 315, 325, 1, 326, 1, 318,
757
+ 1, 308, 327, 308, 1, 328, 41, 1,
758
+ 308, 1, 329, 330, 331, 1, 332, 1,
759
+ 333, 1, 308, 1, 334, 1, 335, 1,
760
+ 336, 1, 303, 1, 337, 1, 338, 1,
761
+ 303, 1, 308, 339, 1, 340, 1, 341,
762
+ 341, 1, 342, 343, 342, 1, 344, 1,
763
+ 328, 1, 56, 345, 1, 286, 81, 286,
764
+ 1, 346, 1, 347, 1, 348, 1, 349,
765
+ 1, 303, 1, 350, 235, 1, 351, 1,
766
+ 303, 1, 352, 1, 310, 1, 329, 1,
767
+ 353, 299, 299, 300, 299, 248, 353, 301,
768
+ 248, 248, 6, 350, 1, 249, 354, 1,
769
+ 194, 1, 213, 1, 355, 183, 183, 184,
770
+ 183, 132, 355, 185, 132, 132, 6, 234,
771
+ 1, 133, 356, 13, 356, 13, 13, 6,
772
+ 235, 1, 357, 1, 358, 1, 359, 1,
773
+ 360, 361, 362, 360, 362, 362, 1, 363,
774
+ 3, 363, 3, 3, 6, 364, 1, 365,
775
+ 365, 1, 365, 366, 365, 366, 366, 1,
776
+ 367, 366, 367, 366, 366, 6, 368, 1,
777
+ 369, 1, 370, 1, 371, 1, 372, 372,
778
+ 1, 373, 374, 375, 376, 377, 378, 380,
779
+ 373, 379, 380, 380, 1, 382, 383, 381,
780
+ 384, 385, 385, 385, 384, 386, 6, 387,
781
+ 388, 389, 390, 391, 392, 394, 387, 393,
782
+ 394, 394, 1, 395, 1, 397, 398, 1,
783
+ 396, 397, 398, 399, 396, 396, 400, 397,
784
+ 397, 396, 384, 385, 385, 401, 385, 384,
785
+ 386, 6, 402, 403, 402, 403, 403, 1,
786
+ 404, 405, 404, 405, 405, 1, 406, 407,
787
+ 407, 408, 407, 405, 406, 409, 405, 405,
788
+ 6, 387, 388, 389, 390, 391, 392, 385,
789
+ 394, 387, 393, 394, 394, 1, 411, 412,
790
+ 410, 410, 413, 414, 413, 1, 415, 385,
791
+ 385, 385, 415, 386, 6, 416, 1, 417,
792
+ 1, 418, 418, 1, 419, 374, 375, 376,
793
+ 420, 378, 421, 419, 379, 421, 421, 1,
794
+ 379, 1, 422, 423, 423, 424, 423, 422,
795
+ 379, 425, 6, 426, 1, 427, 428, 428,
796
+ 428, 427, 426, 429, 6, 430, 431, 431,
797
+ 432, 431, 421, 430, 433, 421, 421, 6,
798
+ 434, 1, 435, 1, 436, 437, 437, 437,
799
+ 439, 436, 438, 6, 440, 1, 387, 387,
800
+ 1, 440, 26, 440, 1, 441, 1, 442,
801
+ 1, 435, 1, 364, 443, 1, 444, 444,
802
+ 1, 445, 446, 447, 445, 1, 448, 1,
803
+ 449, 1, 450, 1, 451, 452, 452, 452,
804
+ 451, 453, 6, 454, 455, 1, 456, 1,
805
+ 457, 457, 1, 457, 446, 447, 457, 1,
806
+ 458, 1, 450, 1, 440, 459, 440, 1,
807
+ 460, 41, 1, 440, 1, 461, 462, 463,
808
+ 1, 464, 1, 465, 1, 440, 1, 466,
809
+ 1, 467, 1, 468, 1, 435, 1, 469,
810
+ 1, 470, 1, 435, 1, 440, 471, 1,
811
+ 472, 1, 473, 473, 1, 474, 475, 474,
812
+ 1, 476, 1, 460, 1, 56, 477, 1,
813
+ 418, 81, 418, 1, 478, 1, 479, 1,
814
+ 480, 1, 481, 1, 435, 1, 482, 235,
815
+ 1, 483, 1, 435, 1, 484, 1, 442,
816
+ 1, 461, 1, 485, 431, 431, 432, 431,
817
+ 380, 485, 433, 380, 380, 6, 482, 1,
818
+ 381, 486, 487, 488, 489, 490, 491, 493,
819
+ 486, 492, 493, 493, 1, 495, 496, 494,
820
+ 497, 498, 499, 499, 499, 497, 500, 1,
821
+ 497, 498, 499, 499, 499, 501, 502, 503,
822
+ 504, 505, 506, 507, 508, 509, 510, 511,
823
+ 512, 513, 497, 500, 1, 514, 515, 516,
824
+ 517, 518, 519, 521, 514, 520, 521, 521,
825
+ 1, 522, 1, 524, 525, 1, 523, 524,
826
+ 525, 526, 523, 523, 527, 524, 524, 523,
827
+ 497, 498, 499, 499, 528, 499, 497, 500,
828
+ 1, 529, 530, 529, 530, 530, 1, 531,
829
+ 532, 531, 532, 532, 1, 533, 534, 535,
830
+ 535, 536, 535, 532, 533, 537, 532, 532,
831
+ 1, 514, 515, 516, 517, 518, 519, 499,
832
+ 521, 514, 520, 521, 521, 1, 539, 540,
833
+ 538, 538, 541, 542, 541, 1, 543, 498,
834
+ 499, 499, 499, 543, 500, 1, 543, 498,
835
+ 499, 499, 499, 501, 503, 504, 506, 507,
836
+ 544, 509, 510, 543, 500, 1, 545, 1,
837
+ 546, 1, 514, 514, 1, 546, 1, 546,
838
+ 546, 1, 547, 1, 548, 548, 1, 549,
839
+ 550, 551, 549, 1, 552, 1, 553, 1,
840
+ 554, 1, 555, 556, 557, 557, 557, 555,
841
+ 558, 1, 559, 560, 1, 561, 1, 562,
842
+ 562, 1, 562, 550, 551, 562, 1, 563,
843
+ 1, 554, 1, 546, 564, 546, 1, 565,
844
+ 1, 546, 1, 566, 1, 567, 1, 568,
845
+ 1, 546, 1, 546, 569, 1, 570, 1,
846
+ 571, 571, 1, 572, 573, 572, 1, 564,
847
+ 1, 546, 1, 492, 1, 574, 575, 576,
848
+ 576, 577, 576, 574, 492, 578, 1, 579,
849
+ 1, 580, 581, 582, 582, 582, 580, 579,
850
+ 583, 1, 584, 585, 586, 586, 587, 586,
851
+ 493, 584, 588, 493, 493, 1, 589, 1,
852
+ 590, 1, 591, 592, 593, 593, 593, 595,
853
+ 591, 594, 1, 596, 1, 597, 1, 590,
854
+ 1, 566, 598, 599, 1, 600, 1, 601,
855
+ 1, 602, 1, 590, 1, 603, 1, 604,
856
+ 1, 590, 1, 605, 1, 606, 1, 607,
857
+ 1, 608, 1, 590, 1, 609, 1, 610,
858
+ 1, 590, 1, 611, 1, 597, 1, 494,
859
+ 612, 613, 614, 612, 614, 614, 1, 615,
860
+ 616, 615, 1, 617, 618, 617, 1, 617,
861
+ 618, 619, 617, 1, 620, 1, 621, 1,
862
+ 622, 1, 623, 624, 625, 623, 625, 625,
863
+ 1, 626, 627, 614, 626, 614, 614, 1,
864
+ 628, 618, 619, 629, 630, 628, 1, 631,
865
+ 1, 632, 632, 1, 632, 633, 632, 633,
866
+ 633, 1, 634, 635, 633, 634, 633, 633,
867
+ 1, 636, 1, 637, 1, 638, 1, 639,
868
+ 1, 640, 640, 1, 641, 642, 643, 644,
869
+ 645, 646, 648, 641, 647, 648, 648, 1,
870
+ 650, 651, 649, 652, 618, 653, 653, 653,
871
+ 652, 654, 1, 652, 618, 653, 653, 653,
872
+ 655, 656, 657, 619, 658, 659, 660, 661,
873
+ 662, 663, 664, 665, 666, 667, 652, 654,
874
+ 1, 668, 669, 670, 671, 672, 673, 675,
875
+ 668, 674, 675, 675, 1, 676, 1, 678,
876
+ 679, 1, 677, 678, 679, 680, 677, 677,
877
+ 681, 678, 678, 677, 652, 618, 653, 653,
878
+ 682, 653, 652, 654, 1, 683, 684, 683,
879
+ 684, 684, 1, 685, 686, 685, 686, 686,
880
+ 1, 687, 688, 689, 689, 690, 689, 686,
881
+ 687, 691, 686, 686, 1, 668, 669, 670,
882
+ 671, 672, 673, 653, 675, 668, 674, 675,
883
+ 675, 1, 693, 694, 692, 692, 695, 696,
884
+ 695, 1, 697, 618, 653, 653, 653, 697,
885
+ 654, 1, 697, 618, 653, 653, 653, 655,
886
+ 657, 619, 658, 660, 661, 698, 663, 664,
887
+ 697, 654, 1, 699, 1, 700, 1, 668,
888
+ 668, 1, 700, 1, 700, 700, 1, 631,
889
+ 701, 1, 702, 702, 1, 703, 704, 705,
890
+ 703, 1, 706, 1, 707, 1, 708, 1,
891
+ 709, 710, 711, 711, 711, 709, 712, 1,
892
+ 713, 714, 1, 715, 1, 716, 716, 1,
893
+ 716, 704, 705, 716, 1, 717, 1, 708,
894
+ 1, 700, 718, 700, 1, 719, 1, 700,
895
+ 1, 720, 1, 721, 1, 722, 1, 700,
896
+ 1, 700, 723, 1, 724, 1, 725, 725,
897
+ 1, 726, 727, 726, 1, 718, 1, 700,
898
+ 1, 647, 1, 728, 729, 730, 730, 731,
899
+ 730, 728, 647, 732, 1, 733, 1, 734,
900
+ 735, 736, 736, 736, 734, 733, 737, 1,
901
+ 738, 739, 740, 740, 741, 740, 648, 738,
902
+ 742, 648, 648, 1, 743, 1, 744, 1,
903
+ 745, 746, 747, 747, 747, 749, 745, 748,
904
+ 1, 750, 1, 751, 1, 744, 1, 720,
905
+ 752, 753, 1, 754, 1, 755, 1, 756,
906
+ 1, 744, 1, 757, 1, 758, 1, 744,
907
+ 1, 759, 1, 760, 1, 761, 1, 762,
908
+ 1, 744, 1, 763, 1, 764, 1, 744,
909
+ 1, 765, 1, 751, 1, 649, 7, 766,
910
+ 767, 768, 769, 770, 771, 7, 6, 16,
911
+ 766, 772, 768, 769, 770, 771, 16, 6,
912
+ 773, 766, 772, 768, 774, 769, 770, 771,
913
+ 775, 773, 6, 776, 35, 769, 777, 771,
914
+ 776, 6, 778, 52, 779, 771, 778, 6,
915
+ 780, 779, 771, 780, 6, 781, 771, 781,
916
+ 6, 782, 782, 6, 783, 89, 98, 784,
917
+ 100, 785, 769, 779, 771, 783, 6, 786,
918
+ 89, 769, 779, 771, 786, 6, 136, 137,
919
+ 137, 137, 787, 788, 789, 772, 790, 791,
920
+ 792, 793, 794, 795, 796, 771, 797, 798,
921
+ 799, 136, 138, 6, 167, 137, 137, 137,
922
+ 787, 789, 772, 790, 792, 793, 800, 795,
923
+ 796, 771, 167, 138, 6, 801, 137, 137,
924
+ 137, 787, 788, 789, 772, 790, 791, 792,
925
+ 793, 794, 795, 796, 771, 797, 802, 799,
926
+ 801, 138, 6, 252, 253, 253, 253, 803,
927
+ 804, 805, 772, 806, 807, 808, 809, 810,
928
+ 811, 812, 771, 813, 814, 815, 252, 254,
929
+ 6, 283, 253, 253, 253, 803, 805, 772,
930
+ 806, 808, 809, 816, 811, 812, 771, 283,
931
+ 254, 6, 817, 253, 253, 253, 803, 804,
932
+ 805, 772, 806, 807, 808, 809, 810, 811,
933
+ 812, 771, 813, 818, 815, 817, 254, 6,
934
+ 819, 766, 772, 768, 774, 769, 770, 771,
935
+ 820, 819, 6, 821, 766, 767, 768, 822,
936
+ 769, 770, 771, 823, 821, 6, 384, 385,
937
+ 385, 385, 824, 825, 826, 767, 827, 828,
938
+ 829, 830, 831, 832, 833, 771, 834, 835,
939
+ 836, 384, 386, 6, 415, 385, 385, 385,
940
+ 824, 826, 767, 827, 829, 830, 837, 832,
941
+ 833, 771, 415, 386, 6, 838, 385, 385,
942
+ 385, 824, 825, 826, 767, 827, 828, 829,
943
+ 830, 831, 832, 833, 771, 834, 839, 836,
944
+ 838, 386, 6, 1, 1, 0
945
+ ]
946
+
947
+ class << self
948
+ attr_accessor :_querybuilder_trans_targs
949
+ private :_querybuilder_trans_targs, :_querybuilder_trans_targs=
950
+ end
951
+ self._querybuilder_trans_targs = [
952
+ 1, 0, 2, 272, 2, 3, 0, 551,
953
+ 5, 6, 7, 7, 8, 266, 8, 9,
954
+ 552, 11, 12, 13, 14, 8, 15, 14,
955
+ 15, 553, 17, 18, 19, 20, 21, 22,
956
+ 23, 24, 25, 24, 25, 554, 24, 76,
957
+ 27, 28, 29, 30, 31, 32, 33, 31,
958
+ 32, 33, 555, 34, 34, 35, 36, 556,
959
+ 38, 39, 40, 41, 42, 43, 44, 45,
960
+ 43, 44, 45, 557, 47, 48, 49, 50,
961
+ 51, 52, 53, 54, 55, 54, 55, 558,
962
+ 57, 58, 59, 60, 61, 62, 63, 64,
963
+ 65, 64, 65, 559, 64, 73, 67, 68,
964
+ 560, 64, 66, 71, 70, 74, 75, 74,
965
+ 75, 559, 64, 73, 77, 78, 77, 78,
966
+ 554, 24, 76, 80, 81, 82, 552, 84,
967
+ 86, 87, 88, 89, 90, 90, 91, 94,
968
+ 105, 107, 113, 114, 263, 91, 92, 265,
969
+ 561, 93, 104, 90, 91, 94, 105, 107,
970
+ 113, 114, 263, 95, 96, 97, 99, 100,
971
+ 98, 101, 102, 103, 102, 103, 561, 93,
972
+ 101, 104, 105, 92, 106, 107, 108, 562,
973
+ 110, 111, 112, 112, 107, 117, 561, 93,
974
+ 115, 104, 116, 561, 93, 104, 563, 93,
975
+ 101, 104, 119, 120, 562, 93, 104, 108,
976
+ 122, 125, 126, 128, 129, 129, 130, 134,
977
+ 131, 132, 133, 562, 93, 104, 135, 138,
978
+ 136, 137, 139, 141, 142, 144, 147, 151,
979
+ 145, 146, 148, 149, 150, 152, 153, 155,
980
+ 156, 157, 157, 158, 159, 161, 163, 164,
981
+ 165, 166, 168, 170, 169, 171, 172, 173,
982
+ 174, 174, 175, 178, 189, 191, 197, 198,
983
+ 257, 175, 176, 259, 564, 177, 188, 174,
984
+ 175, 178, 189, 191, 197, 198, 257, 179,
985
+ 180, 181, 183, 184, 182, 185, 186, 187,
986
+ 186, 187, 564, 177, 185, 188, 189, 176,
987
+ 190, 191, 192, 565, 194, 195, 196, 196,
988
+ 191, 201, 564, 177, 199, 188, 200, 564,
989
+ 177, 188, 566, 177, 185, 188, 203, 204,
990
+ 565, 177, 188, 192, 206, 209, 210, 212,
991
+ 213, 213, 214, 218, 215, 216, 217, 565,
992
+ 177, 188, 219, 222, 220, 221, 223, 225,
993
+ 226, 228, 231, 235, 229, 230, 232, 233,
994
+ 234, 236, 237, 239, 240, 241, 241, 242,
995
+ 243, 245, 247, 248, 249, 250, 252, 253,
996
+ 255, 564, 261, 561, 567, 269, 270, 271,
997
+ 1, 2, 272, 568, 274, 275, 276, 551,
998
+ 278, 279, 280, 281, 282, 282, 283, 286,
999
+ 297, 299, 305, 306, 365, 283, 284, 367,
1000
+ 569, 285, 296, 282, 283, 286, 297, 299,
1001
+ 305, 306, 365, 287, 288, 289, 291, 292,
1002
+ 290, 293, 294, 295, 294, 295, 569, 285,
1003
+ 293, 296, 297, 284, 298, 299, 300, 570,
1004
+ 302, 303, 304, 304, 299, 309, 569, 285,
1005
+ 307, 296, 308, 569, 285, 296, 571, 285,
1006
+ 293, 296, 311, 312, 570, 285, 296, 300,
1007
+ 314, 317, 318, 320, 321, 321, 322, 326,
1008
+ 323, 324, 325, 570, 285, 296, 327, 330,
1009
+ 328, 329, 331, 333, 334, 336, 339, 343,
1010
+ 337, 338, 340, 341, 342, 344, 345, 347,
1011
+ 348, 349, 349, 350, 351, 353, 355, 356,
1012
+ 357, 358, 360, 361, 363, 569, 368, 369,
1013
+ 373, 384, 386, 420, 421, 424, 369, 370,
1014
+ 449, 371, 572, 372, 383, 389, 425, 392,
1015
+ 393, 428, 394, 407, 431, 414, 419, 439,
1016
+ 444, 447, 368, 369, 373, 384, 386, 420,
1017
+ 421, 424, 374, 375, 376, 378, 379, 377,
1018
+ 380, 381, 382, 381, 382, 371, 572, 372,
1019
+ 380, 383, 384, 370, 385, 386, 387, 388,
1020
+ 410, 390, 391, 395, 396, 396, 397, 401,
1021
+ 398, 399, 400, 388, 572, 372, 383, 402,
1022
+ 405, 403, 404, 406, 408, 409, 411, 412,
1023
+ 413, 415, 416, 417, 417, 418, 371, 572,
1024
+ 372, 422, 383, 423, 371, 572, 372, 383,
1025
+ 371, 572, 372, 380, 383, 426, 427, 388,
1026
+ 572, 372, 383, 387, 429, 430, 432, 436,
1027
+ 433, 434, 435, 437, 438, 440, 441, 442,
1028
+ 443, 445, 446, 448, 450, 451, 458, 451,
1029
+ 452, 453, 573, 454, 455, 456, 457, 450,
1030
+ 451, 458, 459, 573, 459, 460, 464, 461,
1031
+ 462, 463, 453, 573, 465, 466, 467, 468,
1032
+ 469, 469, 470, 474, 485, 487, 521, 522,
1033
+ 525, 470, 471, 550, 472, 473, 484, 490,
1034
+ 526, 493, 494, 529, 495, 508, 532, 515,
1035
+ 520, 540, 545, 548, 469, 470, 474, 485,
1036
+ 487, 521, 522, 525, 475, 476, 477, 479,
1037
+ 480, 478, 481, 482, 483, 482, 483, 472,
1038
+ 573, 473, 481, 484, 485, 471, 486, 487,
1039
+ 488, 489, 511, 491, 492, 496, 497, 497,
1040
+ 498, 502, 499, 500, 501, 489, 573, 473,
1041
+ 484, 503, 506, 504, 505, 507, 509, 510,
1042
+ 512, 513, 514, 516, 517, 518, 518, 519,
1043
+ 472, 573, 473, 523, 484, 524, 472, 573,
1044
+ 473, 484, 472, 573, 473, 481, 484, 527,
1045
+ 528, 489, 573, 473, 484, 488, 530, 531,
1046
+ 533, 537, 534, 535, 536, 538, 539, 541,
1047
+ 542, 543, 544, 546, 547, 549, 4, 268,
1048
+ 16, 26, 83, 46, 10, 553, 79, 85,
1049
+ 554, 56, 555, 37, 556, 557, 558, 559,
1050
+ 69, 72, 560, 109, 118, 121, 123, 124,
1051
+ 127, 140, 143, 154, 160, 162, 264, 260,
1052
+ 262, 563, 167, 193, 202, 205, 207, 208,
1053
+ 211, 224, 227, 238, 244, 246, 258, 254,
1054
+ 256, 566, 251, 567, 267, 568, 273, 277,
1055
+ 301, 310, 313, 315, 316, 319, 332, 335,
1056
+ 346, 352, 354, 366, 362, 364, 571, 359
1057
+ ]
1058
+
1059
+ class << self
1060
+ attr_accessor :_querybuilder_trans_actions
1061
+ private :_querybuilder_trans_actions, :_querybuilder_trans_actions=
1062
+ end
1063
+ self._querybuilder_trans_actions = [
1064
+ 0, 0, 37, 1, 0, 0, 59, 0,
1065
+ 1, 1, 57, 0, 37, 1, 0, 0,
1066
+ 0, 0, 0, 0, 55, 163, 160, 0,
1067
+ 1, 23, 0, 0, 0, 0, 0, 0,
1068
+ 0, 53, 157, 0, 1, 13, 13, 13,
1069
+ 0, 0, 0, 0, 49, 151, 151, 0,
1070
+ 1, 1, 9, 9, 0, 1, 1, 9,
1071
+ 0, 0, 0, 0, 0, 43, 145, 145,
1072
+ 0, 1, 1, 9, 0, 0, 0, 0,
1073
+ 0, 0, 0, 47, 148, 0, 1, 45,
1074
+ 0, 0, 0, 0, 0, 0, 0, 51,
1075
+ 154, 0, 1, 13, 13, 13, 1, 1,
1076
+ 21, 21, 1, 1, 1, 19, 109, 0,
1077
+ 1, 15, 15, 15, 19, 109, 0, 1,
1078
+ 15, 15, 15, 0, 0, 1, 41, 1,
1079
+ 0, 0, 0, 0, 31, 0, 0, 0,
1080
+ 0, 33, 1, 1, 1, 1, 5, 0,
1081
+ 0, 1, 1, 25, 25, 25, 25, 121,
1082
+ 118, 118, 118, 0, 1, 1, 0, 7,
1083
+ 1, 0, 19, 109, 0, 1, 15, 91,
1084
+ 15, 91, 1, 3, 0, 0, 0, 0,
1085
+ 1, 1, 166, 0, 139, 1, 9, 61,
1086
+ 1, 61, 1, 11, 70, 70, 112, 79,
1087
+ 13, 79, 1, 1, 29, 127, 127, 29,
1088
+ 1, 1, 1, 0, 27, 0, 1, 1,
1089
+ 1, 1, 1, 17, 100, 100, 1, 1,
1090
+ 1, 1, 1, 1, 1, 1, 1, 1,
1091
+ 1, 1, 1, 1, 1, 1, 1, 1,
1092
+ 1, 25, 0, 1, 1, 1, 1, 1,
1093
+ 1, 1, 1, 0, 1, 0, 0, 0,
1094
+ 31, 0, 0, 0, 0, 33, 1, 1,
1095
+ 1, 1, 5, 0, 0, 1, 1, 25,
1096
+ 25, 25, 25, 121, 118, 118, 118, 0,
1097
+ 1, 1, 0, 7, 1, 0, 19, 109,
1098
+ 0, 1, 15, 91, 15, 91, 1, 3,
1099
+ 0, 0, 0, 0, 1, 1, 166, 0,
1100
+ 136, 1, 9, 61, 1, 61, 1, 11,
1101
+ 70, 70, 112, 79, 13, 79, 1, 1,
1102
+ 29, 127, 127, 29, 1, 1, 1, 0,
1103
+ 27, 0, 1, 1, 1, 1, 1, 17,
1104
+ 100, 100, 1, 1, 1, 1, 1, 1,
1105
+ 1, 1, 1, 1, 1, 1, 1, 1,
1106
+ 1, 1, 1, 1, 1, 25, 0, 1,
1107
+ 1, 1, 1, 1, 1, 1, 1, 1,
1108
+ 1, 13, 1, 13, 23, 0, 0, 0,
1109
+ 55, 163, 160, 23, 0, 0, 1, 41,
1110
+ 0, 0, 0, 0, 31, 0, 0, 0,
1111
+ 0, 33, 1, 1, 1, 1, 5, 0,
1112
+ 0, 1, 1, 25, 25, 25, 25, 121,
1113
+ 118, 118, 118, 0, 1, 1, 0, 7,
1114
+ 1, 0, 19, 109, 0, 1, 15, 91,
1115
+ 15, 91, 1, 3, 0, 0, 0, 0,
1116
+ 1, 1, 124, 0, 136, 1, 9, 61,
1117
+ 1, 61, 1, 11, 70, 70, 82, 79,
1118
+ 13, 79, 1, 1, 29, 127, 127, 29,
1119
+ 1, 1, 1, 0, 27, 0, 1, 1,
1120
+ 1, 1, 1, 17, 100, 100, 1, 1,
1121
+ 1, 1, 1, 1, 1, 1, 1, 1,
1122
+ 1, 1, 1, 1, 1, 1, 1, 1,
1123
+ 1, 25, 0, 1, 1, 1, 1, 1,
1124
+ 1, 1, 1, 1, 1, 13, 0, 0,
1125
+ 0, 0, 33, 1, 1, 1, 1, 5,
1126
+ 0, 0, 35, 1, 1, 1, 1, 1,
1127
+ 1, 1, 0, 1, 1, 1, 1, 1,
1128
+ 1, 1, 25, 25, 25, 25, 121, 118,
1129
+ 118, 118, 0, 1, 1, 0, 7, 1,
1130
+ 0, 19, 109, 0, 1, 15, 94, 91,
1131
+ 15, 91, 1, 3, 0, 0, 0, 0,
1132
+ 1, 1, 1, 0, 27, 0, 1, 1,
1133
+ 1, 1, 1, 17, 103, 100, 100, 1,
1134
+ 1, 1, 1, 1, 1, 1, 1, 1,
1135
+ 1, 1, 1, 25, 0, 1, 9, 64,
1136
+ 61, 1, 61, 1, 11, 73, 70, 70,
1137
+ 13, 85, 79, 13, 79, 1, 1, 29,
1138
+ 130, 127, 127, 29, 1, 1, 1, 1,
1139
+ 1, 1, 1, 1, 1, 1, 1, 1,
1140
+ 1, 1, 1, 1, 0, 37, 1, 0,
1141
+ 0, 0, 39, 0, 0, 0, 0, 55,
1142
+ 163, 160, 23, 115, 0, 0, 0, 0,
1143
+ 0, 1, 41, 142, 0, 0, 0, 0,
1144
+ 31, 0, 0, 0, 0, 33, 1, 1,
1145
+ 1, 1, 5, 0, 0, 1, 1, 1,
1146
+ 1, 1, 1, 1, 0, 1, 1, 1,
1147
+ 1, 1, 1, 1, 25, 25, 25, 25,
1148
+ 121, 118, 118, 118, 0, 1, 1, 0,
1149
+ 7, 1, 0, 19, 109, 0, 1, 15,
1150
+ 97, 91, 15, 91, 1, 3, 0, 0,
1151
+ 0, 0, 1, 1, 1, 0, 27, 0,
1152
+ 1, 1, 1, 1, 1, 17, 106, 100,
1153
+ 100, 1, 1, 1, 1, 1, 1, 1,
1154
+ 1, 1, 1, 1, 1, 25, 0, 1,
1155
+ 9, 67, 61, 1, 61, 1, 11, 76,
1156
+ 70, 70, 13, 88, 79, 13, 79, 1,
1157
+ 1, 29, 133, 127, 127, 29, 1, 1,
1158
+ 1, 1, 1, 1, 1, 1, 1, 1,
1159
+ 1, 1, 1, 1, 1, 1, 1, 0,
1160
+ 0, 0, 1, 0, 0, 0, 0, 0,
1161
+ 0, 0, 0, 0, 0, 0, 0, 0,
1162
+ 1, 1, 0, 1, 1, 1, 1, 1,
1163
+ 0, 1, 1, 1, 1, 1, 1, 1,
1164
+ 1, 0, 1, 1, 1, 1, 1, 1,
1165
+ 0, 1, 1, 1, 1, 1, 1, 1,
1166
+ 1, 0, 1, 0, 0, 0, 0, 0,
1167
+ 1, 1, 1, 1, 1, 0, 1, 1,
1168
+ 1, 1, 1, 1, 1, 1, 0, 1
1169
+ ]
1170
+
1171
+ class << self
1172
+ attr_accessor :_querybuilder_eof_actions
1173
+ private :_querybuilder_eof_actions, :_querybuilder_eof_actions=
1174
+ end
1175
+ self._querybuilder_eof_actions = [
1176
+ 0, 0, 0, 59, 0, 0, 0, 0,
1177
+ 0, 59, 0, 0, 0, 0, 0, 59,
1178
+ 0, 0, 0, 0, 0, 0, 0, 0,
1179
+ 0, 59, 0, 0, 0, 0, 0, 0,
1180
+ 0, 59, 0, 0, 59, 0, 0, 0,
1181
+ 0, 0, 0, 0, 0, 59, 0, 0,
1182
+ 0, 0, 0, 0, 0, 0, 0, 59,
1183
+ 0, 0, 0, 0, 0, 0, 0, 0,
1184
+ 0, 59, 0, 0, 59, 0, 0, 0,
1185
+ 0, 0, 0, 59, 0, 0, 59, 0,
1186
+ 0, 0, 59, 0, 0, 0, 0, 0,
1187
+ 0, 0, 0, 0, 59, 0, 0, 0,
1188
+ 0, 0, 0, 0, 59, 0, 0, 59,
1189
+ 0, 0, 0, 0, 59, 0, 0, 0,
1190
+ 0, 0, 59, 0, 59, 59, 0, 0,
1191
+ 59, 0, 0, 0, 0, 0, 0, 0,
1192
+ 0, 0, 0, 0, 0, 59, 0, 0,
1193
+ 0, 0, 0, 0, 0, 0, 0, 0,
1194
+ 0, 0, 0, 0, 0, 0, 0, 0,
1195
+ 0, 0, 0, 0, 0, 0, 0, 0,
1196
+ 0, 0, 0, 0, 0, 0, 0, 0,
1197
+ 0, 0, 0, 0, 0, 0, 0, 0,
1198
+ 59, 0, 0, 0, 0, 0, 0, 0,
1199
+ 59, 0, 0, 59, 0, 0, 0, 0,
1200
+ 59, 0, 0, 0, 0, 0, 59, 0,
1201
+ 59, 59, 0, 0, 59, 0, 0, 0,
1202
+ 0, 0, 0, 0, 0, 0, 0, 0,
1203
+ 0, 59, 0, 0, 0, 0, 0, 0,
1204
+ 0, 0, 0, 0, 0, 0, 0, 0,
1205
+ 0, 0, 0, 0, 0, 0, 0, 0,
1206
+ 0, 0, 0, 0, 0, 0, 0, 0,
1207
+ 0, 0, 0, 0, 0, 0, 0, 0,
1208
+ 0, 59, 0, 0, 0, 0, 0, 59,
1209
+ 0, 0, 59, 0, 0, 0, 0, 0,
1210
+ 59, 0, 0, 0, 59, 0, 0, 0,
1211
+ 0, 0, 0, 0, 59, 0, 0, 0,
1212
+ 0, 0, 0, 0, 59, 0, 0, 59,
1213
+ 0, 0, 0, 0, 59, 0, 0, 0,
1214
+ 0, 0, 59, 0, 59, 59, 0, 0,
1215
+ 59, 0, 0, 0, 0, 0, 0, 0,
1216
+ 0, 0, 0, 0, 0, 59, 0, 0,
1217
+ 0, 0, 0, 0, 0, 0, 0, 0,
1218
+ 0, 0, 0, 0, 0, 0, 0, 0,
1219
+ 0, 0, 0, 0, 0, 0, 0, 0,
1220
+ 0, 0, 0, 0, 0, 0, 0, 0,
1221
+ 0, 0, 0, 0, 0, 59, 0, 0,
1222
+ 0, 0, 0, 0, 0, 0, 0, 0,
1223
+ 0, 0, 0, 0, 0, 0, 0, 0,
1224
+ 0, 0, 0, 0, 0, 0, 0, 0,
1225
+ 0, 0, 0, 0, 0, 0, 0, 0,
1226
+ 0, 0, 0, 0, 0, 0, 0, 0,
1227
+ 0, 0, 0, 0, 0, 0, 0, 0,
1228
+ 0, 0, 0, 0, 0, 0, 0, 0,
1229
+ 0, 0, 0, 0, 0, 0, 0, 0,
1230
+ 0, 0, 0, 0, 0, 0, 0, 0,
1231
+ 0, 0, 0, 0, 0, 0, 0, 0,
1232
+ 0, 0, 0, 0, 0, 0, 0, 0,
1233
+ 0, 0, 0, 0, 0, 0, 0, 0,
1234
+ 0, 0, 0, 0, 0, 0, 0, 0,
1235
+ 0, 0, 0, 0, 0, 0, 0, 0,
1236
+ 0, 0, 0, 0, 0, 0, 0, 0,
1237
+ 0, 0, 0, 0, 0, 0, 0, 0,
1238
+ 0, 0, 0, 0, 0, 0, 0, 0,
1239
+ 0, 0, 0, 0, 0, 0, 0, 0,
1240
+ 0, 0, 0, 0, 0, 0, 0, 0,
1241
+ 0, 0, 0, 0, 0, 0, 0, 0,
1242
+ 0, 0, 0, 0, 0, 0, 0, 0,
1243
+ 0, 0, 0, 0, 0, 0, 0, 0,
1244
+ 0, 0, 0, 0, 0, 0, 0, 0,
1245
+ 0, 0, 0, 0, 0, 0, 0, 0,
1246
+ 0, 0, 0, 0, 0, 0, 0, 0,
1247
+ 0, 0, 0, 0, 0, 0
1248
+ ]
1249
+
1250
+ class << self
1251
+ attr_accessor :querybuilder_start
1252
+ end
1253
+ self.querybuilder_start = 1;
1254
+ class << self
1255
+ attr_accessor :querybuilder_first_final
1256
+ end
1257
+ self.querybuilder_first_final = 551;
1258
+ class << self
1259
+ attr_accessor :querybuilder_error
1260
+ end
1261
+ self.querybuilder_error = 0;
1262
+
1263
+ class << self
1264
+ attr_accessor :querybuilder_en_expr_p
1265
+ end
1266
+ self.querybuilder_en_expr_p = 368;
1267
+ class << self
1268
+ attr_accessor :querybuilder_en_clause_p
1269
+ end
1270
+ self.querybuilder_en_clause_p = 450;
1271
+ class << self
1272
+ attr_accessor :querybuilder_en_main
1273
+ end
1274
+ self.querybuilder_en_main = 1;
1275
+
1276
+
1277
+ # line 191 "querybuilder_rb.rl"
1278
+
1279
+ def self.parse(arg)
1280
+ if arg.kind_of?(Array)
1281
+ data = "(#{arg.join(') or (')})\n"
1282
+ else
1283
+ data = "#{arg}\n"
1284
+ end
1285
+ stack = [[:query]]
1286
+ last = stack.last
1287
+ str_buf = ""
1288
+ clause_state = :relation
1289
+ eof = 0;
1290
+
1291
+ # line 1292 "querybuilder_rb.rb"
1292
+ begin
1293
+ p ||= 0
1294
+ pe ||= data.length
1295
+ cs = querybuilder_start
1296
+ end
1297
+
1298
+ # line 204 "querybuilder_rb.rl"
1299
+
1300
+ # line 1301 "querybuilder_rb.rb"
1301
+ begin
1302
+ _klen, _trans, _keys, _acts, _nacts = nil
1303
+ _goto_level = 0
1304
+ _resume = 10
1305
+ _eof_trans = 15
1306
+ _again = 20
1307
+ _test_eof = 30
1308
+ _out = 40
1309
+ while true
1310
+ _trigger_goto = false
1311
+ if _goto_level <= 0
1312
+ if p == pe
1313
+ _goto_level = _test_eof
1314
+ next
1315
+ end
1316
+ if cs == 0
1317
+ _goto_level = _out
1318
+ next
1319
+ end
1320
+ end
1321
+ if _goto_level <= _resume
1322
+ _keys = _querybuilder_key_offsets[cs]
1323
+ _trans = _querybuilder_index_offsets[cs]
1324
+ _klen = _querybuilder_single_lengths[cs]
1325
+ _break_match = false
1326
+
1327
+ begin
1328
+ if _klen > 0
1329
+ _lower = _keys
1330
+ _upper = _keys + _klen - 1
1331
+
1332
+ loop do
1333
+ break if _upper < _lower
1334
+ _mid = _lower + ( (_upper - _lower) >> 1 )
1335
+
1336
+ if data[p] < _querybuilder_trans_keys[_mid]
1337
+ _upper = _mid - 1
1338
+ elsif data[p] > _querybuilder_trans_keys[_mid]
1339
+ _lower = _mid + 1
1340
+ else
1341
+ _trans += (_mid - _keys)
1342
+ _break_match = true
1343
+ break
1344
+ end
1345
+ end # loop
1346
+ break if _break_match
1347
+ _keys += _klen
1348
+ _trans += _klen
1349
+ end
1350
+ _klen = _querybuilder_range_lengths[cs]
1351
+ if _klen > 0
1352
+ _lower = _keys
1353
+ _upper = _keys + (_klen << 1) - 2
1354
+ loop do
1355
+ break if _upper < _lower
1356
+ _mid = _lower + (((_upper-_lower) >> 1) & ~1)
1357
+ if data[p] < _querybuilder_trans_keys[_mid]
1358
+ _upper = _mid - 2
1359
+ elsif data[p] > _querybuilder_trans_keys[_mid+1]
1360
+ _lower = _mid + 2
1361
+ else
1362
+ _trans += ((_mid - _keys) >> 1)
1363
+ _break_match = true
1364
+ break
1365
+ end
1366
+ end # loop
1367
+ break if _break_match
1368
+ _trans += _klen
1369
+ end
1370
+ end while false
1371
+ _trans = _querybuilder_indicies[_trans]
1372
+ cs = _querybuilder_trans_targs[_trans]
1373
+ if _querybuilder_trans_actions[_trans] != 0
1374
+ _acts = _querybuilder_trans_actions[_trans]
1375
+ _nacts = _querybuilder_actions[_acts]
1376
+ _acts += 1
1377
+ while _nacts > 0
1378
+ _nacts -= 1
1379
+ _acts += 1
1380
+ case _querybuilder_actions[_acts - 1]
1381
+ when 0 then
1382
+ # line 6 "querybuilder_rb.rl"
1383
+ begin
1384
+
1385
+ str_buf += data[p].chr
1386
+ end
1387
+ when 1 then
1388
+ # line 10 "querybuilder_rb.rl"
1389
+ begin
1390
+
1391
+ last << [:string, str_buf]
1392
+ str_buf = ""
1393
+ end
1394
+ when 2 then
1395
+ # line 15 "querybuilder_rb.rl"
1396
+ begin
1397
+
1398
+ last << [:dstring, str_buf]
1399
+ str_buf = ""
1400
+ end
1401
+ when 3 then
1402
+ # line 20 "querybuilder_rb.rl"
1403
+ begin
1404
+
1405
+ last << [:rubyless, str_buf]
1406
+ str_buf = ""
1407
+ end
1408
+ when 4 then
1409
+ # line 25 "querybuilder_rb.rl"
1410
+ begin
1411
+
1412
+ last << [:integer, str_buf]
1413
+ str_buf = ""
1414
+ end
1415
+ when 5 then
1416
+ # line 30 "querybuilder_rb.rl"
1417
+ begin
1418
+
1419
+ last << [:real, str_buf]
1420
+ str_buf = ""
1421
+ end
1422
+ when 6 then
1423
+ # line 35 "querybuilder_rb.rl"
1424
+ begin
1425
+
1426
+ last << [:field, str_buf]
1427
+ str_buf = ""
1428
+ end
1429
+ when 7 then
1430
+ # line 40 "querybuilder_rb.rl"
1431
+ begin
1432
+
1433
+ last << [:method, str_buf]
1434
+ str_buf = ""
1435
+ end
1436
+ when 8 then
1437
+ # line 45 "querybuilder_rb.rl"
1438
+ begin
1439
+
1440
+ last << [:raw, str_buf]
1441
+ str_buf = ""
1442
+ end
1443
+ when 9 then
1444
+ # line 50 "querybuilder_rb.rl"
1445
+ begin
1446
+
1447
+ last = apply_op(stack, :function)
1448
+ str_buf = ""
1449
+ end
1450
+ when 10 then
1451
+ # line 55 "querybuilder_rb.rl"
1452
+ begin
1453
+
1454
+ last = apply_op(stack, str_buf.downcase.to_sym, false)
1455
+ str_buf = ""
1456
+ end
1457
+ when 11 then
1458
+ # line 60 "querybuilder_rb.rl"
1459
+ begin
1460
+
1461
+ if clause_state == :relation || clause_state == :parenthesis
1462
+ last = insert(stack, [:relation, str_buf])
1463
+ str_buf = ""
1464
+ end
1465
+ end
1466
+ when 12 then
1467
+ # line 67 "querybuilder_rb.rl"
1468
+ begin
1469
+
1470
+ last = apply_op(stack, str_buf.downcase.to_sym)
1471
+ str_buf = ""
1472
+ end
1473
+ when 13 then
1474
+ # line 72 "querybuilder_rb.rl"
1475
+ begin
1476
+
1477
+ # We need the 'is' operator to avoid confusion with 'in site'.
1478
+ last = apply_op(stack, :is)
1479
+ end
1480
+ when 14 then
1481
+ # line 77 "querybuilder_rb.rl"
1482
+ begin
1483
+
1484
+ last = apply_op(stack, :interval)
1485
+ last << str_buf
1486
+ str_buf = ""
1487
+ end
1488
+ when 15 then
1489
+ # line 83 "querybuilder_rb.rl"
1490
+ begin
1491
+
1492
+ last = apply_op(stack, :filter)
1493
+ clause_state = :filter
1494
+ end
1495
+ when 16 then
1496
+ # line 88 "querybuilder_rb.rl"
1497
+ begin
1498
+
1499
+ # remember current machine state 'cs'
1500
+ last << [:par, cs]
1501
+ stack.push last.last
1502
+ last = last.last
1503
+ begin
1504
+ cs = 368
1505
+ _trigger_goto = true
1506
+ _goto_level = _again
1507
+ break
1508
+ end
1509
+
1510
+ end
1511
+ when 17 then
1512
+ # line 96 "querybuilder_rb.rl"
1513
+ begin
1514
+
1515
+ pop_stack(stack, :par_close)
1516
+ # reset machine state 'cs'
1517
+ cs = stack.last.delete_at(1)
1518
+ # one more time to remove [:par...] line
1519
+ stack.pop
1520
+ last = stack.last
1521
+ # closing ')' must be parsed twice
1522
+ p = p - 1;
1523
+ end
1524
+ when 18 then
1525
+ # line 107 "querybuilder_rb.rl"
1526
+ begin
1527
+
1528
+ # remember current machine state 'cs'
1529
+ clause_state = :parenthesis
1530
+ last << [:clause_par, cs]
1531
+ stack.push last.last
1532
+ last = last.last
1533
+ begin
1534
+ cs = 450
1535
+ _trigger_goto = true
1536
+ _goto_level = _again
1537
+ break
1538
+ end
1539
+
1540
+ end
1541
+ when 19 then
1542
+ # line 116 "querybuilder_rb.rl"
1543
+ begin
1544
+
1545
+ pop_stack(stack, :clause_par_close)
1546
+ clause_state = :relation
1547
+ # reset machine state 'cs'
1548
+ cs = stack.last.delete_at(1)
1549
+ # one more time to remove [:clause_par...] line
1550
+ stack.pop
1551
+ last = stack.last
1552
+ # closing ')' must be parsed twice
1553
+ p = p - 1;
1554
+ end
1555
+ when 20 then
1556
+ # line 128 "querybuilder_rb.rl"
1557
+ begin
1558
+
1559
+ last = apply_op(stack, :scope)
1560
+ last << str_buf
1561
+ str_buf = ""
1562
+ end
1563
+ when 21 then
1564
+ # line 134 "querybuilder_rb.rl"
1565
+ begin
1566
+
1567
+ last = apply_op(stack, :offset)
1568
+ end
1569
+ when 22 then
1570
+ # line 138 "querybuilder_rb.rl"
1571
+ begin
1572
+
1573
+ last << [:param, str_buf]
1574
+ str_buf = ""
1575
+ end
1576
+ when 23 then
1577
+ # line 143 "querybuilder_rb.rl"
1578
+ begin
1579
+
1580
+ last = apply_op(stack, :paginate)
1581
+ end
1582
+ when 24 then
1583
+ # line 147 "querybuilder_rb.rl"
1584
+ begin
1585
+
1586
+ last = apply_op(stack, :limit)
1587
+ str_buf = ""
1588
+ end
1589
+ when 25 then
1590
+ # line 152 "querybuilder_rb.rl"
1591
+ begin
1592
+
1593
+ last = apply_op(stack, :order)
1594
+ str_buf = ""
1595
+ end
1596
+ when 26 then
1597
+ # line 157 "querybuilder_rb.rl"
1598
+ begin
1599
+
1600
+ last = apply_op(stack, :group)
1601
+ end
1602
+ when 27 then
1603
+ # line 161 "querybuilder_rb.rl"
1604
+ begin
1605
+
1606
+ last = apply_op(stack, :from)
1607
+ clause_state = :relation
1608
+ end
1609
+ when 28 then
1610
+ # line 166 "querybuilder_rb.rl"
1611
+ begin
1612
+
1613
+ if clause_state == :relation
1614
+ last = apply_op(stack, "clause_#{str_buf}".to_sym)
1615
+ str_buf = ""
1616
+ end
1617
+ end
1618
+ when 29 then
1619
+ # line 177 "querybuilder_rb.rl"
1620
+ begin
1621
+
1622
+ p = p - 3
1623
+ p = 0 if p < 0
1624
+ raise QueryBuilder::SyntaxError.new("Syntax error near #{data[p..-1].chomp.inspect}.")
1625
+ end
1626
+ # line 1627 "querybuilder_rb.rb"
1627
+ end # action switch
1628
+ end
1629
+ end
1630
+ if _trigger_goto
1631
+ next
1632
+ end
1633
+ end
1634
+ if _goto_level <= _again
1635
+ if cs == 0
1636
+ _goto_level = _out
1637
+ next
1638
+ end
1639
+ p += 1
1640
+ if p != pe
1641
+ _goto_level = _resume
1642
+ next
1643
+ end
1644
+ end
1645
+ if _goto_level <= _test_eof
1646
+ if p == eof
1647
+ __acts = _querybuilder_eof_actions[cs]
1648
+ __nacts = _querybuilder_actions[__acts]
1649
+ __acts += 1
1650
+ while __nacts > 0
1651
+ __nacts -= 1
1652
+ __acts += 1
1653
+ case _querybuilder_actions[__acts - 1]
1654
+ when 29 then
1655
+ # line 177 "querybuilder_rb.rl"
1656
+ begin
1657
+
1658
+ p = p - 3
1659
+ p = 0 if p < 0
1660
+ raise QueryBuilder::SyntaxError.new("Syntax error near #{data[p..-1].chomp.inspect}.")
1661
+ end
1662
+ # line 1663 "querybuilder_rb.rb"
1663
+ end # eof action switch
1664
+ end
1665
+ if _trigger_goto
1666
+ next
1667
+ end
1668
+ end
1669
+ end
1670
+ if _goto_level <= _out
1671
+ break
1672
+ end
1673
+ end
1674
+ end
1675
+
1676
+ # line 205 "querybuilder_rb.rl"
1677
+
1678
+ if p < pe
1679
+ p = p - 3
1680
+ p = 0 if p < 0
1681
+ raise QueryBuilder::SyntaxError.new("Syntax error near #{data[p..-1].chomp.inspect}.")
1682
+ end
1683
+ stack.first
1684
+ end
1685
+ end
1686
+ end