Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/rake_tasks/crazy_fun/build_grammar.rb
2867 views
1
# line 1 "rake-tasks/crazy_fun/build_grammar.rl"
2
3
class BuildFile
4
# line 73 "rake-tasks/crazy_fun/build_grammar.rl"
5
def parse(data)
6
# line 12 "rake-tasks/crazy_fun/build_grammar.rb"
7
class << self
8
attr_accessor :_build_grammar_trans_keys
9
private :_build_grammar_trans_keys, :_build_grammar_trans_keys=
10
end
11
12
self._build_grammar_trans_keys = [
13
0, 0, 9, 122, 10, 13,
14
40, 122, 9, 122, 9,
15
122, 9, 122, 9, 61,
16
9, 91, 34, 34, 9, 44,
17
10, 13, 9, 123, 34,
18
34, 9, 93, 9, 123,
19
9, 44, 9, 34, 34, 34,
20
9, 58, 9, 34, 34,
21
34, 9, 125, 9, 125,
22
9, 93, 9, 122, 9, 122,
23
0
24
]
25
26
class << self
27
attr_accessor :_build_grammar_key_spans
28
private :_build_grammar_key_spans, :_build_grammar_key_spans=
29
end
30
31
self._build_grammar_key_spans = [
32
0, 114, 4, 83, 114, 114, 114, 53,
33
83, 1, 36, 4, 115, 1, 85, 115,
34
36, 26, 1, 50, 26, 1, 117, 117,
35
85, 114, 114
36
]
37
38
class << self
39
attr_accessor :_build_grammar_index_offsets
40
private :_build_grammar_index_offsets, :_build_grammar_index_offsets=
41
end
42
43
self._build_grammar_index_offsets = [
44
0, 0, 115, 120, 204, 319, 434, 549,
45
603, 687, 689, 726, 731, 847, 849, 935,
46
1051, 1088, 1115, 1117, 1168, 1195, 1197, 1315,
47
1433, 1519, 1634
48
]
49
50
class << self
51
attr_accessor :_build_grammar_indicies
52
private :_build_grammar_indicies, :_build_grammar_indicies=
53
end
54
55
self._build_grammar_indicies = [
56
0, 0, 0, 0, 0, 1, 1, 1,
57
1, 1, 1, 1, 1, 1, 1, 1,
58
1, 1, 1, 1, 1, 1, 1,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, 1, 1, 1, 1, 8, 1,
99
1, 1, 1, 1, 1, 1, 1, 1,
100
1, 1, 1, 1, 1, 1, 1, 1,
101
1, 1, 1, 1, 1, 1, 1, 1,
102
1, 1, 1, 1, 1, 1, 1, 1,
103
1, 1, 1, 1, 1, 1, 1, 1,
104
1, 1, 1, 1, 1, 1, 1, 1,
105
1, 1, 1, 1, 1, 1, 1, 1,
106
1, 1, 1, 1, 1, 1, 1, 9,
107
9, 9, 9, 9, 9, 9, 9, 9,
108
9, 9, 9, 9, 9, 9, 9, 9,
109
9, 9, 9, 9, 9, 9, 9, 9,
110
9, 1, 10, 10, 10, 10, 10, 1,
111
1, 1, 1, 1, 1, 1, 1, 1,
112
1, 1, 1, 1, 1, 1, 1, 1,
113
1, 10, 1, 1, 1, 1, 1, 1,
114
1, 1, 1, 1, 1, 1, 1, 1,
115
1, 11, 11, 11, 11, 11, 11, 11,
116
11, 11, 11, 1, 1, 1, 12, 1,
117
1, 1, 1, 1, 1, 1, 1, 1,
118
1, 1, 1, 1, 1, 1, 1, 1,
119
1, 1, 1, 1, 1, 1, 1, 1,
120
1, 1, 1, 1, 1, 1, 1, 1,
121
11, 1, 11, 11, 11, 11, 11, 11,
122
11, 11, 11, 11, 11, 11, 11, 11,
123
11, 11, 11, 11, 11, 11, 11, 11,
124
11, 11, 11, 11, 1, 13, 13, 13,
125
13, 13, 1, 1, 1, 1, 1, 1,
126
1, 1, 1, 1, 1, 1, 1, 1,
127
1, 1, 1, 1, 13, 1, 1, 1,
128
1, 1, 1, 1, 1, 1, 1, 1,
129
1, 1, 1, 1, 1, 1, 1, 1,
130
1, 1, 1, 1, 1, 1, 1, 1,
131
1, 14, 1, 14, 14, 14, 14, 14,
132
1, 1, 1, 1, 1, 1, 1, 1,
133
1, 1, 1, 1, 1, 1, 1, 1,
134
1, 1, 14, 1, 15, 1, 1, 1,
135
1, 1, 1, 1, 1, 1, 1, 1,
136
1, 1, 1, 1, 1, 1, 1, 1,
137
1, 1, 1, 1, 1, 1, 1, 1,
138
1, 1, 1, 1, 1, 1, 1, 1,
139
1, 1, 1, 1, 1, 1, 1, 1,
140
1, 1, 1, 1, 1, 1, 1, 1,
141
1, 1, 1, 1, 1, 16, 1, 18,
142
17, 19, 19, 19, 19, 19, 1, 1,
143
1, 1, 1, 1, 1, 1, 1, 1,
144
1, 1, 1, 1, 1, 1, 1, 1,
145
19, 1, 1, 1, 1, 1, 1, 1,
146
1, 20, 1, 1, 4, 1, 22, 21,
147
21, 22, 21, 23, 23, 23, 23, 23,
148
1, 1, 1, 1, 1, 1, 1, 1,
149
1, 1, 1, 1, 1, 1, 1, 1,
150
1, 1, 23, 1, 24, 1, 1, 1,
151
1, 1, 1, 1, 1, 1, 1, 1,
152
1, 1, 1, 1, 1, 1, 1, 1,
153
1, 1, 1, 1, 1, 1, 1, 1,
154
1, 1, 1, 1, 1, 1, 1, 1,
155
1, 1, 1, 1, 1, 1, 1, 1,
156
1, 1, 1, 1, 1, 1, 1, 1,
157
1, 1, 1, 1, 1, 1, 1, 1,
158
1, 1, 1, 1, 1, 1, 1, 1,
159
1, 1, 1, 1, 1, 1, 1, 1,
160
1, 1, 1, 1, 1, 1, 1, 1,
161
1, 1, 1, 1, 1, 25, 1, 27,
162
26, 28, 28, 28, 28, 28, 1, 1,
163
1, 1, 1, 1, 1, 1, 1, 1,
164
1, 1, 1, 1, 1, 1, 1, 1,
165
28, 1, 1, 1, 1, 1, 1, 1,
166
1, 1, 1, 1, 29, 1, 1, 1,
167
1, 1, 1, 1, 1, 1, 1, 1,
168
1, 1, 1, 1, 1, 1, 1, 1,
169
1, 1, 1, 1, 1, 1, 1, 1,
170
1, 1, 1, 1, 1, 1, 1, 1,
171
1, 1, 1, 1, 1, 1, 1, 1,
172
1, 1, 1, 1, 1, 30, 1, 29,
173
29, 29, 29, 29, 1, 1, 1, 1,
174
1, 1, 1, 1, 1, 1, 1, 1,
175
1, 1, 1, 1, 1, 1, 29, 1,
176
24, 1, 1, 1, 1, 1, 1, 1,
177
1, 1, 1, 1, 1, 1, 1, 1,
178
1, 1, 1, 1, 1, 1, 1, 1,
179
1, 1, 1, 1, 1, 1, 1, 1,
180
1, 1, 1, 1, 1, 1, 1, 1,
181
1, 1, 1, 1, 1, 1, 1, 1,
182
1, 1, 1, 1, 1, 1, 1, 1,
183
1, 1, 1, 30, 1, 1, 1, 1,
184
1, 1, 1, 1, 1, 1, 1, 1,
185
1, 1, 1, 1, 1, 1, 1, 1,
186
1, 1, 1, 1, 1, 1, 1, 1,
187
1, 25, 1, 18, 18, 18, 18, 18,
188
1, 1, 1, 1, 1, 1, 1, 1,
189
1, 1, 1, 1, 1, 1, 1, 1,
190
1, 1, 18, 1, 1, 1, 1, 1,
191
1, 1, 1, 20, 1, 1, 4, 1,
192
31, 31, 31, 31, 31, 1, 1, 1,
193
1, 1, 1, 1, 1, 1, 1, 1,
194
1, 1, 1, 1, 1, 1, 1, 31,
195
1, 32, 1, 34, 33, 35, 35, 35,
196
35, 35, 1, 1, 1, 1, 1, 1,
197
1, 1, 1, 1, 1, 1, 1, 1,
198
1, 1, 1, 1, 35, 1, 1, 1,
199
1, 1, 1, 1, 1, 1, 1, 1,
200
1, 1, 1, 1, 1, 1, 1, 1,
201
1, 1, 1, 1, 1, 1, 36, 1,
202
36, 36, 36, 36, 36, 1, 1, 1,
203
1, 1, 1, 1, 1, 1, 1, 1,
204
1, 1, 1, 1, 1, 1, 1, 36,
205
1, 37, 1, 39, 38, 40, 40, 40,
206
40, 40, 1, 1, 1, 1, 1, 1,
207
1, 1, 1, 1, 1, 1, 1, 1,
208
1, 1, 1, 1, 40, 1, 1, 1,
209
1, 1, 1, 1, 1, 1, 1, 1,
210
41, 1, 1, 1, 1, 1, 1, 1,
211
1, 1, 1, 1, 1, 1, 1, 1,
212
1, 1, 1, 1, 1, 1, 1, 1,
213
1, 1, 1, 1, 1, 1, 1, 1,
214
1, 1, 1, 1, 1, 1, 1, 1,
215
1, 1, 1, 1, 1, 1, 1, 1,
216
1, 1, 1,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1, 1,
256
1, 1, 1, 1, 1, 1, 1, 49,
257
49, 49, 49, 49, 49, 49, 49, 49,
258
49, 49, 49, 49, 49, 49, 49, 49,
259
49, 49, 49, 49, 49, 49, 49, 49,
260
49, 1, 22, 22, 22, 22, 22, 1,
261
1, 1, 1, 1, 1, 1, 1, 1,
262
1, 1, 1, 1, 1, 1, 1, 1,
263
1, 22, 1, 1, 21, 1, 1, 1,
264
1, 1, 1, 1, 1, 1, 1, 1,
265
1, 1, 1, 1, 1, 1, 1, 1,
266
1, 1, 1, 1, 1, 1, 1, 1,
267
1, 1, 1, 1, 1, 1, 1, 1,
268
1, 1, 1, 1, 1, 1, 1, 1,
269
1, 1, 1, 1, 1, 1, 1, 1,
270
1, 1, 1, 1, 1, 1, 1, 1,
271
1, 1, 3, 3, 3, 3, 3, 3,
272
3, 3, 3, 3, 3, 3, 3, 3,
273
3, 3, 3, 3, 3, 3, 3, 3,
274
3, 3, 3, 3, 1, 0
275
]
276
277
class << self
278
attr_accessor :_build_grammar_trans_targs
279
private :_build_grammar_trans_targs, :_build_grammar_trans_targs=
280
end
281
282
self._build_grammar_trans_targs = [
283
1, 0, 2, 3, 4, 3, 5, 6,
284
5, 6, 7, 6, 8, 7, 8, 9,
285
12, 9, 10, 10, 25, 11, 26, 12,
286
13, 17, 13, 14, 14, 15, 16, 17,
287
18, 18, 19, 19, 20, 21, 21, 22,
288
23, 17, 24, 23, 24, 15, 16, 26,
289
11, 3
290
]
291
292
class << self
293
attr_accessor :_build_grammar_trans_actions
294
private :_build_grammar_trans_actions, :_build_grammar_trans_actions=
295
end
296
297
self._build_grammar_trans_actions = [
298
0, 0, 0, 1, 2, 3, 4, 5,
299
0, 6, 2, 3, 2, 0, 0, 7,
300
8, 3, 2, 0, 9, 0, 10, 0,
301
7, 11, 3, 2, 0, 0, 0, 0,
302
12, 3, 2, 0, 0, 7, 3, 2,
303
2, 2, 2, 0, 0, 2, 2, 9,
304
2, 13
305
]
306
307
class << self
308
attr_accessor :_build_grammar_eof_actions
309
private :_build_grammar_eof_actions, :_build_grammar_eof_actions=
310
end
311
312
self._build_grammar_eof_actions = [
313
0, 0, 0, 0, 0, 0, 0, 0,
314
0, 0, 0, 0, 0, 0, 0, 0,
315
0, 0, 0, 0, 0, 0, 0, 0,
316
0, 2, 0
317
]
318
319
class << self
320
attr_accessor :build_grammar_start
321
end
322
323
self.build_grammar_start = 1
324
325
class << self
326
attr_accessor :build_grammar_first_final
327
end
328
329
self.build_grammar_first_final = 25
330
331
class << self
332
attr_accessor :build_grammar_error
333
end
334
335
self.build_grammar_error = 0
336
337
class << self
338
attr_accessor :build_grammar_en_main
339
end
340
341
self.build_grammar_en_main = 1
342
343
# line 77 "rake-tasks/crazy_fun/build_grammar.rl"
344
@data = data
345
@data = @data.unpack("c*") if @data.is_a?(String)
346
# line 343 "rake-tasks/crazy_fun/build_grammar.rb"
347
begin
348
@p ||= 0
349
pe ||= @data.length
350
cs = build_grammar_start
351
end
352
353
# line 82 "rake-tasks/crazy_fun/build_grammar.rl"
354
355
begin
356
# line 354 "rake-tasks/crazy_fun/build_grammar.rb"
357
begin
358
testEof = false
359
_slen, _trans, _keys, _inds, _acts, _nacts = nil
360
_goto_level = 0
361
_resume = 10
362
_eof_trans = 15
363
_again = 20
364
_test_eof = 30
365
_out = 40
366
while true
367
if _goto_level <= 0
368
if @p == pe
369
_goto_level = _test_eof
370
next
371
end
372
373
if cs == 0
374
_goto_level = _out
375
next
376
end
377
end
378
379
if _goto_level <= _resume
380
_keys = cs << 1
381
_inds = _build_grammar_index_offsets[cs]
382
_slen = _build_grammar_key_spans[cs]
383
_trans =
384
if (_slen > 0 && _build_grammar_trans_keys[_keys] <= @data[ @p] && @data[ @p] <= _build_grammar_trans_keys[_keys + 1])
385
_build_grammar_indicies[ _inds + @data[ @p] - _build_grammar_trans_keys[_keys] ]
386
else
387
_build_grammar_indicies[ _inds + _slen ]
388
end
389
cs = _build_grammar_trans_targs[_trans]
390
if _build_grammar_trans_actions[_trans] != 0
391
case _build_grammar_trans_actions[_trans]
392
when 4
393
# line 10 "rake-tasks/crazy_fun/build_grammar.rl"
394
begin
395
# clear the stack
396
while !@lhs[-1].is_a? OutputType
397
leave
398
end
399
400
puts "Starting arg" if @debug
401
@lhs.push ArgType.new
402
end
403
# line 10 "rake-tasks/crazy_fun/build_grammar.rl"
404
when 8
405
# line 23 "rake-tasks/crazy_fun/build_grammar.rl"
406
begin
407
puts "Starting array" if @debug
408
@lhs.push ArrayType.new
409
end
410
# line 23 "rake-tasks/crazy_fun/build_grammar.rl"
411
when 11
412
# line 27 "rake-tasks/crazy_fun/build_grammar.rl"
413
begin
414
415
puts "Starting map" if @debug
416
@lhs.push MapType.new
417
end
418
# line 27 "rake-tasks/crazy_fun/build_grammar.rl"
419
when 7
420
# line 35 "rake-tasks/crazy_fun/build_grammar.rl"
421
begin
422
if @data[@p + 1].chr == ':'
423
puts "Starting symbol" if @debug
424
@lhs.push SymbolType.new
425
@p = @p + 1
426
else
427
puts "Starting string" if @debug
428
@lhs.push StringType.new
429
end
430
end
431
# line 35 "rake-tasks/crazy_fun/build_grammar.rl"
432
when 10
433
# line 56 "rake-tasks/crazy_fun/build_grammar.rl"
434
begin
435
while (!@lhs.empty?)
436
leave
437
end
438
end
439
# line 56 "rake-tasks/crazy_fun/build_grammar.rl"
440
when 3
441
# line 67 "rake-tasks/crazy_fun/build_grammar.rl"
442
begin
443
@lhs[-1] << @data[@p].chr
444
end
445
# line 67 "rake-tasks/crazy_fun/build_grammar.rl"
446
when 2
447
# line 68 "rake-tasks/crazy_fun/build_grammar.rl"
448
begin
449
leave
450
end
451
# line 68 "rake-tasks/crazy_fun/build_grammar.rl"
452
when 6
453
# line 19 "rake-tasks/crazy_fun/build_grammar.rl"
454
begin
455
puts "Starting arg name" if @debug
456
@lhs.push SymbolType.new
457
end
458
# line 19 "rake-tasks/crazy_fun/build_grammar.rl"
459
# line 67 "rake-tasks/crazy_fun/build_grammar.rl"
460
begin
461
@lhs[-1] << @data[@p].chr
462
end
463
# line 67 "rake-tasks/crazy_fun/build_grammar.rl"
464
when 12
465
# line 31 "rake-tasks/crazy_fun/build_grammar.rl"
466
begin
467
puts "Starting map entry" if @debug
468
@lhs.push MapEntry.new
469
end
470
# line 31 "rake-tasks/crazy_fun/build_grammar.rl"
471
# line 35 "rake-tasks/crazy_fun/build_grammar.rl"
472
begin
473
if @data[@p + 1].chr == ':'
474
puts "Starting symbol" if @debug
475
@lhs.push SymbolType.new
476
@p = @p + 1
477
else
478
puts "Starting string" if @debug
479
@lhs.push StringType.new
480
end
481
end
482
# line 35 "rake-tasks/crazy_fun/build_grammar.rl"
483
when 9
484
# line 68 "rake-tasks/crazy_fun/build_grammar.rl"
485
begin
486
leave
487
end
488
# line 68 "rake-tasks/crazy_fun/build_grammar.rl"
489
# line 56 "rake-tasks/crazy_fun/build_grammar.rl"
490
begin
491
while (!@lhs.empty?)
492
leave
493
end
494
end
495
# line 56 "rake-tasks/crazy_fun/build_grammar.rl"
496
when 5
497
# line 10 "rake-tasks/crazy_fun/build_grammar.rl"
498
begin
499
# clear the stack
500
while !@lhs[-1].is_a? OutputType
501
leave
502
end
503
504
puts "Starting arg" if @debug
505
@lhs.push ArgType.new
506
end
507
# line 10 "rake-tasks/crazy_fun/build_grammar.rl"
508
# line 19 "rake-tasks/crazy_fun/build_grammar.rl"
509
begin
510
puts "Starting arg name" if @debug
511
@lhs.push SymbolType.new
512
end
513
# line 19 "rake-tasks/crazy_fun/build_grammar.rl"
514
# line 67 "rake-tasks/crazy_fun/build_grammar.rl"
515
begin
516
@lhs[-1] << @data[@p].chr
517
end
518
# line 67 "rake-tasks/crazy_fun/build_grammar.rl"
519
when 1
520
# line 45 "rake-tasks/crazy_fun/build_grammar.rl"
521
begin
522
puts "Starting type" if @debug
523
# Unwind the stack until the top is another OutputType (or it's empty)
524
while (!@lhs.empty?)
525
puts "Unwinding [#{@lhs}]" + @lhs.length.to_s
526
leave
527
end
528
529
@lhs.push OutputType.new
530
end
531
# line 45 "rake-tasks/crazy_fun/build_grammar.rl"
532
# line 62 "rake-tasks/crazy_fun/build_grammar.rl"
533
begin
534
puts "Starting type name" if @debug
535
@lhs.push NameType.new
536
end
537
# line 62 "rake-tasks/crazy_fun/build_grammar.rl"
538
# line 67 "rake-tasks/crazy_fun/build_grammar.rl"
539
begin
540
@lhs[-1] << @data[@p].chr
541
end
542
# line 67 "rake-tasks/crazy_fun/build_grammar.rl"
543
when 13
544
# line 68 "rake-tasks/crazy_fun/build_grammar.rl"
545
begin
546
leave
547
end
548
# line 68 "rake-tasks/crazy_fun/build_grammar.rl"
549
# line 45 "rake-tasks/crazy_fun/build_grammar.rl"
550
begin
551
puts "Starting type" if @debug
552
# Unwind the stack until the top is another OutputType (or it's empty)
553
while (!@lhs.empty?)
554
puts "Unwinding [#{@lhs}]" + @lhs.length.to_s
555
leave
556
end
557
558
@lhs.push OutputType.new
559
end
560
# line 45 "rake-tasks/crazy_fun/build_grammar.rl"
561
# line 62 "rake-tasks/crazy_fun/build_grammar.rl"
562
begin
563
puts "Starting type name" if @debug
564
@lhs.push NameType.new
565
end
566
# line 62 "rake-tasks/crazy_fun/build_grammar.rl"
567
# line 67 "rake-tasks/crazy_fun/build_grammar.rl"
568
begin
569
@lhs[-1] << @data[@p].chr
570
end
571
# line 67 "rake-tasks/crazy_fun/build_grammar.rl"
572
# line 582 "rake-tasks/crazy_fun/build_grammar.rb"
573
end
574
575
# THIS IS THE END OF THE HUMONGOUS CASE STATEMENT - Luke - Sep 2019
576
end
577
end
578
579
if _goto_level <= _again
580
if cs == 0
581
_goto_level = _out
582
next
583
end
584
585
@p += 1
586
587
if @p != pe
588
_goto_level = _resume
589
next
590
end
591
end
592
593
if _goto_level <= _test_eof
594
if @p == @eof
595
case _build_grammar_eof_actions[cs]
596
when 2
597
# line 68 "rake-tasks/crazy_fun/build_grammar.rl"
598
begin
599
leave
600
end
601
# line 68 "rake-tasks/crazy_fun/build_grammar.rl"
602
# line 607 "rake-tasks/crazy_fun/build_grammar.rb"
603
end
604
end
605
end
606
607
if _goto_level <= _out
608
break
609
end
610
end
611
end
612
# line 85 "rake-tasks/crazy_fun/build_grammar.rl"
613
rescue
614
puts show_bad_line
615
throw $!
616
end
617
618
if cs == build_grammar_error
619
throw show_bad_line
620
end
621
622
@types
623
end
624
end
625
626