macks-ruby_protobuf 0.3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. data/History.txt +14 -0
  2. data/Manifest.txt +74 -0
  3. data/README.txt +58 -0
  4. data/Rakefile +18 -0
  5. data/bin/mk_parser +2 -0
  6. data/bin/rprotoc +36 -0
  7. data/examples/addressbook.pb.rb +56 -0
  8. data/examples/addressbook.proto +24 -0
  9. data/examples/reading_a_message.rb +32 -0
  10. data/examples/writing_a_message.rb +46 -0
  11. data/lib/protobuf/common/wire_type.rb +10 -0
  12. data/lib/protobuf/compiler/compiler.rb +54 -0
  13. data/lib/protobuf/compiler/nodes.rb +319 -0
  14. data/lib/protobuf/compiler/proto.y +203 -0
  15. data/lib/protobuf/compiler/proto2.ebnf +79 -0
  16. data/lib/protobuf/compiler/proto_parser.rb +1394 -0
  17. data/lib/protobuf/compiler/template/rpc_bin.erb +4 -0
  18. data/lib/protobuf/compiler/template/rpc_client.erb +18 -0
  19. data/lib/protobuf/compiler/template/rpc_service.erb +25 -0
  20. data/lib/protobuf/compiler/visitors.rb +288 -0
  21. data/lib/protobuf/descriptor/descriptor.proto +286 -0
  22. data/lib/protobuf/descriptor/descriptor.rb +54 -0
  23. data/lib/protobuf/descriptor/descriptor_builder.rb +144 -0
  24. data/lib/protobuf/descriptor/descriptor_proto.rb +119 -0
  25. data/lib/protobuf/descriptor/enum_descriptor.rb +33 -0
  26. data/lib/protobuf/descriptor/field_descriptor.rb +50 -0
  27. data/lib/protobuf/descriptor/file_descriptor.rb +38 -0
  28. data/lib/protobuf/message/decoder.rb +93 -0
  29. data/lib/protobuf/message/encoder.rb +37 -0
  30. data/lib/protobuf/message/enum.rb +28 -0
  31. data/lib/protobuf/message/extend.rb +8 -0
  32. data/lib/protobuf/message/field.rb +654 -0
  33. data/lib/protobuf/message/message.rb +308 -0
  34. data/lib/protobuf/message/protoable.rb +37 -0
  35. data/lib/protobuf/message/service.rb +9 -0
  36. data/lib/protobuf/rpc/client.rb +19 -0
  37. data/lib/protobuf/rpc/handler.rb +17 -0
  38. data/lib/protobuf/rpc/server.rb +39 -0
  39. data/lib/ruby_protobuf.rb +3 -0
  40. data/test/addressbook.rb +98 -0
  41. data/test/addressbook_base.rb +62 -0
  42. data/test/addressbook_ext.rb +12 -0
  43. data/test/check_unbuild.rb +30 -0
  44. data/test/collision.rb +18 -0
  45. data/test/data/data.bin +3 -0
  46. data/test/data/data_source.py +14 -0
  47. data/test/data/types.bin +0 -0
  48. data/test/data/types_source.py +22 -0
  49. data/test/data/unk.png +0 -0
  50. data/test/ext_collision.rb +25 -0
  51. data/test/ext_range.rb +23 -0
  52. data/test/merge.rb +40 -0
  53. data/test/nested.rb +25 -0
  54. data/test/proto/addressbook.proto +31 -0
  55. data/test/proto/addressbook_base.proto +26 -0
  56. data/test/proto/addressbook_ext.proto +6 -0
  57. data/test/proto/collision.proto +5 -0
  58. data/test/proto/ext_collision.proto +8 -0
  59. data/test/proto/ext_range.proto +7 -0
  60. data/test/proto/merge.proto +15 -0
  61. data/test/proto/nested.proto +7 -0
  62. data/test/proto/rpc.proto +6 -0
  63. data/test/proto/types.proto +17 -0
  64. data/test/test_addressbook.rb +43 -0
  65. data/test/test_compiler.rb +313 -0
  66. data/test/test_descriptor.rb +122 -0
  67. data/test/test_extension.rb +40 -0
  68. data/test/test_message.rb +106 -0
  69. data/test/test_optional_field.rb +68 -0
  70. data/test/test_parse.rb +15 -0
  71. data/test/test_ruby_protobuf.rb +1 -0
  72. data/test/test_serialize.rb +42 -0
  73. data/test/test_standard_message.rb +96 -0
  74. data/test/test_types.rb +181 -0
  75. data/test/types.rb +22 -0
  76. metadata +150 -0
@@ -0,0 +1,1394 @@
1
+ #
2
+ # DO NOT MODIFY!!!!
3
+ # This file is automatically generated by Racc 1.4.5
4
+ # from Racc grammer file "".
5
+ #
6
+
7
+ ###### racc/parser.rb begin
8
+ unless $".index 'racc/parser.rb'
9
+ $".push 'racc/parser.rb'
10
+ self.class.module_eval(<<'...end racc/parser.rb/module_eval...', 'racc/parser.rb', 1)
11
+ #
12
+ # $Id: parser.rb 2169 2006-11-06 21:39:00Z aamine $
13
+ #
14
+ # Copyright (c) 1999-2006 Minero Aoki
15
+ #
16
+ # This program is free software.
17
+ # You can distribute/modify this program under the same terms of ruby.
18
+ #
19
+ # As a special exception, when this code is copied by Racc
20
+ # into a Racc output file, you may use that output file
21
+ # without restriction.
22
+ #
23
+
24
+ unless defined?(NotImplementedError)
25
+ NotImplementedError = NotImplementError
26
+ end
27
+
28
+ module Racc
29
+ class ParseError < StandardError; end
30
+ end
31
+ unless defined?(::ParseError)
32
+ ParseError = Racc::ParseError
33
+ end
34
+
35
+ module Racc
36
+
37
+ unless defined?(Racc_No_Extentions)
38
+ Racc_No_Extentions = false
39
+ end
40
+
41
+ class Parser
42
+
43
+ Racc_Runtime_Version = '1.4.5'
44
+ Racc_Runtime_Revision = '$Revision: 2169 $'.split[1]
45
+
46
+ Racc_Runtime_Core_Version_R = '1.4.5'
47
+ Racc_Runtime_Core_Revision_R = '$Revision: 2169 $'.split[1]
48
+ begin
49
+ require 'racc/cparse'
50
+ # Racc_Runtime_Core_Version_C = (defined in extention)
51
+ Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2]
52
+ unless new.respond_to?(:_racc_do_parse_c, true)
53
+ raise LoadError, 'old cparse.so'
54
+ end
55
+ if Racc_No_Extentions
56
+ raise LoadError, 'selecting ruby version of racc runtime core'
57
+ end
58
+
59
+ Racc_Main_Parsing_Routine = :_racc_do_parse_c
60
+ Racc_YY_Parse_Method = :_racc_yyparse_c
61
+ Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C
62
+ Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C
63
+ Racc_Runtime_Type = 'c'
64
+ rescue LoadError
65
+ Racc_Main_Parsing_Routine = :_racc_do_parse_rb
66
+ Racc_YY_Parse_Method = :_racc_yyparse_rb
67
+ Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R
68
+ Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R
69
+ Racc_Runtime_Type = 'ruby'
70
+ end
71
+
72
+ def Parser.racc_runtime_type
73
+ Racc_Runtime_Type
74
+ end
75
+
76
+ private
77
+
78
+ def _racc_setup
79
+ @yydebug = false unless self.class::Racc_debug_parser
80
+ @yydebug = false unless defined?(@yydebug)
81
+ if @yydebug
82
+ @racc_debug_out = $stderr unless defined?(@racc_debug_out)
83
+ @racc_debug_out ||= $stderr
84
+ end
85
+ arg = self.class::Racc_arg
86
+ arg[13] = true if arg.size < 14
87
+ arg
88
+ end
89
+
90
+ def _racc_init_sysvars
91
+ @racc_state = [0]
92
+ @racc_tstack = []
93
+ @racc_vstack = []
94
+
95
+ @racc_t = nil
96
+ @racc_val = nil
97
+
98
+ @racc_read_next = true
99
+
100
+ @racc_user_yyerror = false
101
+ @racc_error_status = 0
102
+ end
103
+
104
+ ###
105
+ ### do_parse
106
+ ###
107
+
108
+ def do_parse
109
+ __send__(Racc_Main_Parsing_Routine, _racc_setup(), false)
110
+ end
111
+
112
+ def next_token
113
+ raise NotImplementedError, "#{self.class}\#next_token is not defined"
114
+ end
115
+
116
+ def _racc_do_parse_rb(arg, in_debug)
117
+ action_table, action_check, action_default, action_pointer,
118
+ goto_table, goto_check, goto_default, goto_pointer,
119
+ nt_base, reduce_table, token_table, shift_n,
120
+ reduce_n, use_result, * = arg
121
+
122
+ _racc_init_sysvars
123
+ tok = act = i = nil
124
+ nerr = 0
125
+
126
+ catch(:racc_end_parse) {
127
+ while true
128
+ if i = action_pointer[@racc_state[-1]]
129
+ if @racc_read_next
130
+ if @racc_t != 0 # not EOF
131
+ tok, @racc_val = next_token()
132
+ unless tok # EOF
133
+ @racc_t = 0
134
+ else
135
+ @racc_t = (token_table[tok] or 1) # error token
136
+ end
137
+ racc_read_token(@racc_t, tok, @racc_val) if @yydebug
138
+ @racc_read_next = false
139
+ end
140
+ end
141
+ i += @racc_t
142
+ unless i >= 0 and
143
+ act = action_table[i] and
144
+ action_check[i] == @racc_state[-1]
145
+ act = action_default[@racc_state[-1]]
146
+ end
147
+ else
148
+ act = action_default[@racc_state[-1]]
149
+ end
150
+ while act = _racc_evalact(act, arg)
151
+ ;
152
+ end
153
+ end
154
+ }
155
+ end
156
+
157
+ ###
158
+ ### yyparse
159
+ ###
160
+
161
+ def yyparse(recv, mid)
162
+ __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true)
163
+ end
164
+
165
+ def _racc_yyparse_rb(recv, mid, arg, c_debug)
166
+ action_table, action_check, action_default, action_pointer,
167
+ goto_table, goto_check, goto_default, goto_pointer,
168
+ nt_base, reduce_table, token_table, shift_n,
169
+ reduce_n, use_result, * = arg
170
+
171
+ _racc_init_sysvars
172
+ nerr = 0
173
+
174
+ catch(:racc_end_parse) {
175
+ until i = action_pointer[@racc_state[-1]]
176
+ while act = _racc_evalact(action_default[@racc_state[-1]], arg)
177
+ ;
178
+ end
179
+ end
180
+ recv.__send__(mid) do |tok, val|
181
+ unless tok
182
+ @racc_t = 0
183
+ else
184
+ @racc_t = (token_table[tok] or 1) # error token
185
+ end
186
+ @racc_val = val
187
+ @racc_read_next = false
188
+
189
+ i += @racc_t
190
+ unless i >= 0 and
191
+ act = action_table[i] and
192
+ action_check[i] == @racc_state[-1]
193
+ act = action_default[@racc_state[-1]]
194
+ end
195
+ while act = _racc_evalact(act, arg)
196
+ ;
197
+ end
198
+
199
+ while not (i = action_pointer[@racc_state[-1]]) or
200
+ not @racc_read_next or
201
+ @racc_t == 0 # $
202
+ unless i and i += @racc_t and
203
+ i >= 0 and
204
+ act = action_table[i] and
205
+ action_check[i] == @racc_state[-1]
206
+ act = action_default[@racc_state[-1]]
207
+ end
208
+ while act = _racc_evalact(act, arg)
209
+ ;
210
+ end
211
+ end
212
+ end
213
+ }
214
+ end
215
+
216
+ ###
217
+ ### common
218
+ ###
219
+
220
+ def _racc_evalact(act, arg)
221
+ action_table, action_check, action_default, action_pointer,
222
+ goto_table, goto_check, goto_default, goto_pointer,
223
+ nt_base, reduce_table, token_table, shift_n,
224
+ reduce_n, use_result, * = arg
225
+ nerr = 0 # tmp
226
+
227
+ if act > 0 and act < shift_n
228
+ #
229
+ # shift
230
+ #
231
+ if @racc_error_status > 0
232
+ @racc_error_status -= 1 unless @racc_t == 1 # error token
233
+ end
234
+ @racc_vstack.push @racc_val
235
+ @racc_state.push act
236
+ @racc_read_next = true
237
+ if @yydebug
238
+ @racc_tstack.push @racc_t
239
+ racc_shift @racc_t, @racc_tstack, @racc_vstack
240
+ end
241
+
242
+ elsif act < 0 and act > -reduce_n
243
+ #
244
+ # reduce
245
+ #
246
+ code = catch(:racc_jump) {
247
+ @racc_state.push _racc_do_reduce(arg, act)
248
+ false
249
+ }
250
+ if code
251
+ case code
252
+ when 1 # yyerror
253
+ @racc_user_yyerror = true # user_yyerror
254
+ return -reduce_n
255
+ when 2 # yyaccept
256
+ return shift_n
257
+ else
258
+ raise '[Racc Bug] unknown jump code'
259
+ end
260
+ end
261
+
262
+ elsif act == shift_n
263
+ #
264
+ # accept
265
+ #
266
+ racc_accept if @yydebug
267
+ throw :racc_end_parse, @racc_vstack[0]
268
+
269
+ elsif act == -reduce_n
270
+ #
271
+ # error
272
+ #
273
+ case @racc_error_status
274
+ when 0
275
+ unless arg[21] # user_yyerror
276
+ nerr += 1
277
+ on_error @racc_t, @racc_val, @racc_vstack
278
+ end
279
+ when 3
280
+ if @racc_t == 0 # is $
281
+ throw :racc_end_parse, nil
282
+ end
283
+ @racc_read_next = true
284
+ end
285
+ @racc_user_yyerror = false
286
+ @racc_error_status = 3
287
+ while true
288
+ if i = action_pointer[@racc_state[-1]]
289
+ i += 1 # error token
290
+ if i >= 0 and
291
+ (act = action_table[i]) and
292
+ action_check[i] == @racc_state[-1]
293
+ break
294
+ end
295
+ end
296
+ throw :racc_end_parse, nil if @racc_state.size <= 1
297
+ @racc_state.pop
298
+ @racc_vstack.pop
299
+ if @yydebug
300
+ @racc_tstack.pop
301
+ racc_e_pop @racc_state, @racc_tstack, @racc_vstack
302
+ end
303
+ end
304
+ return act
305
+
306
+ else
307
+ raise "[Racc Bug] unknown action #{act.inspect}"
308
+ end
309
+
310
+ racc_next_state(@racc_state[-1], @racc_state) if @yydebug
311
+
312
+ nil
313
+ end
314
+
315
+ def _racc_do_reduce(arg, act)
316
+ action_table, action_check, action_default, action_pointer,
317
+ goto_table, goto_check, goto_default, goto_pointer,
318
+ nt_base, reduce_table, token_table, shift_n,
319
+ reduce_n, use_result, * = arg
320
+ state = @racc_state
321
+ vstack = @racc_vstack
322
+ tstack = @racc_tstack
323
+
324
+ i = act * -3
325
+ len = reduce_table[i]
326
+ reduce_to = reduce_table[i+1]
327
+ method_id = reduce_table[i+2]
328
+ void_array = []
329
+
330
+ tmp_t = tstack[-len, len] if @yydebug
331
+ tmp_v = vstack[-len, len]
332
+ tstack[-len, len] = void_array if @yydebug
333
+ vstack[-len, len] = void_array
334
+ state[-len, len] = void_array
335
+
336
+ # tstack must be updated AFTER method call
337
+ if use_result
338
+ vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0])
339
+ else
340
+ vstack.push __send__(method_id, tmp_v, vstack)
341
+ end
342
+ tstack.push reduce_to
343
+
344
+ racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug
345
+
346
+ k1 = reduce_to - nt_base
347
+ if i = goto_pointer[k1]
348
+ i += state[-1]
349
+ if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1
350
+ return curstate
351
+ end
352
+ end
353
+ goto_default[k1]
354
+ end
355
+
356
+ def on_error(t, val, vstack)
357
+ raise ParseError, sprintf("\nparse error on value %s (%s)",
358
+ val.inspect, token_to_str(t) || '?')
359
+ end
360
+
361
+ def yyerror
362
+ throw :racc_jump, 1
363
+ end
364
+
365
+ def yyaccept
366
+ throw :racc_jump, 2
367
+ end
368
+
369
+ def yyerrok
370
+ @racc_error_status = 0
371
+ end
372
+
373
+ #
374
+ # for debugging output
375
+ #
376
+
377
+ def racc_read_token(t, tok, val)
378
+ @racc_debug_out.print 'read '
379
+ @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') '
380
+ @racc_debug_out.puts val.inspect
381
+ @racc_debug_out.puts
382
+ end
383
+
384
+ def racc_shift(tok, tstack, vstack)
385
+ @racc_debug_out.puts "shift #{racc_token2str tok}"
386
+ racc_print_stacks tstack, vstack
387
+ @racc_debug_out.puts
388
+ end
389
+
390
+ def racc_reduce(toks, sim, tstack, vstack)
391
+ out = @racc_debug_out
392
+ out.print 'reduce '
393
+ if toks.empty?
394
+ out.print ' <none>'
395
+ else
396
+ toks.each {|t| out.print ' ', racc_token2str(t) }
397
+ end
398
+ out.puts " --> #{racc_token2str(sim)}"
399
+
400
+ racc_print_stacks tstack, vstack
401
+ @racc_debug_out.puts
402
+ end
403
+
404
+ def racc_accept
405
+ @racc_debug_out.puts 'accept'
406
+ @racc_debug_out.puts
407
+ end
408
+
409
+ def racc_e_pop(state, tstack, vstack)
410
+ @racc_debug_out.puts 'error recovering mode: pop token'
411
+ racc_print_states state
412
+ racc_print_stacks tstack, vstack
413
+ @racc_debug_out.puts
414
+ end
415
+
416
+ def racc_next_state(curstate, state)
417
+ @racc_debug_out.puts "goto #{curstate}"
418
+ racc_print_states state
419
+ @racc_debug_out.puts
420
+ end
421
+
422
+ def racc_print_stacks(t, v)
423
+ out = @racc_debug_out
424
+ out.print ' ['
425
+ t.each_index do |i|
426
+ out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')'
427
+ end
428
+ out.puts ' ]'
429
+ end
430
+
431
+ def racc_print_states(s)
432
+ out = @racc_debug_out
433
+ out.print ' ['
434
+ s.each {|st| out.print ' ', st }
435
+ out.puts ' ]'
436
+ end
437
+
438
+ def racc_token2str(tok)
439
+ self.class::Racc_token_to_s_table[tok] or
440
+ raise "[Racc Bug] can't convert token #{tok} to string"
441
+ end
442
+
443
+ def token_to_str(t)
444
+ self.class::Racc_token_to_s_table[t]
445
+ end
446
+
447
+ end
448
+
449
+ end
450
+ ...end racc/parser.rb/module_eval...
451
+ end
452
+ ###### racc/parser.rb end
453
+ module Protobuf
454
+ class ProtoParser < Racc::Parser
455
+
456
+ module_eval(<<'...end proto.y/module_eval...', 'proto.y', 164)
457
+
458
+ def parse(f)
459
+ @q = []
460
+ f.each do |line|
461
+ until line.empty? do
462
+ case line
463
+ when /\A\s+/, /\A\/\/.*/
464
+ ;
465
+ when /\A(required|optional|repeated|import|package|option|message|extend|enum|service|rpc|returns|group|default|extensions|to|max|double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\b/
466
+ @q.push [$&, $&.to_sym]
467
+ when /\A[1-9]\d*(?!\.)/, /\A0(?![.xX0-9])/
468
+ @q.push [:DEC_INTEGER, $&.to_i]
469
+ when /\A0[xX]([A-Fa-f0-9])+/
470
+ @q.push [:HEX_INTEGER, $&.to_i(0)]
471
+ when /\A0[0-7]+/
472
+ @q.push [:OCT_INTEGER, $&.to_i(0)]
473
+ when /\A\d+(\.\d+)?([Ee][\+-]?\d+)?/
474
+ @q.push [:FLOAT_LITERAL, $&.to_f]
475
+ when /\A(true|false)/
476
+ @q.push [:BOOLEAN_LITERAL, $& == 'true']
477
+ when /\A"(?:[^"\\]+|\\.)*"/, /\A'(?:[^'\\]+|\\.)*'/
478
+ @q.push [:STRING_LITERAL, eval($&)]
479
+ when /\A[a-zA-Z_][\w_]*/
480
+ @q.push [:IDENT, $&.to_sym]
481
+ when /\A[A-Z][\w_]*/
482
+ @q.push [:CAMEL_IDENT, $&.to_sym]
483
+ when /\A./
484
+ @q.push [$&, $&]
485
+ else
486
+ raise ArgumentError.new(line)
487
+ end
488
+ line = $'
489
+ end
490
+ end
491
+ do_parse
492
+ end
493
+
494
+ def next_token
495
+ @q.shift
496
+ end
497
+ ...end proto.y/module_eval...
498
+ ##### State transition tables begin ###
499
+
500
+ racc_action_table = [
501
+ 74, 51, 77, 19, 20, 74, 25, 77, 67, 60,
502
+ 32, 47, 53, 63, 14, 14, 43, 107, 39, 68,
503
+ 61, 38, 69, 50, 54, 56, 110, 170, 106, 109,
504
+ 94, 96, 97, 98, 99, 100, 101, 103, 104, 105,
505
+ 108, 93, 95, 72, 73, 75, 76, 78, 72, 73,
506
+ 75, 76, 78, 123, 111, 131, 134, 43, 141, 48,
507
+ 147, 116, 19, 20, 122, 126, 130, 19, 20, 140,
508
+ 144, 75, 76, 78, 120, 124, 127, 129, 133, 136,
509
+ 139, 143, 146, 115, 118, 119, 121, 125, 128, 132,
510
+ 135, 138, 142, 145, 114, 117, 83, 167, 176, 75,
511
+ 76, 78, 14, 25, 16, 1, 159, 85, 6, 75,
512
+ 76, 78, 75, 76, 78, 19, 20, 166, 50, 54,
513
+ 56, 177, 91, 35, 170, 75, 76, 78, 27, 34,
514
+ 4, 7, 148, 11, 33, 150, 14, 151, 16, 1,
515
+ 153, 154, 6, 9, 4, 7, 155, 11, 156, 43,
516
+ 14, 40, 16, 1, 161, 30, 6, 9, 75, 76,
517
+ 78, 29, 25, 165, 24, 40, 169, 23, 174, 175,
518
+ 22, 43, 21, 180, 59, 182, 183 ]
519
+
520
+ racc_action_check = [
521
+ 48, 42, 48, 58, 58, 175, 177, 175, 46, 45,
522
+ 20, 36, 42, 45, 46, 45, 36, 58, 27, 46,
523
+ 45, 26, 46, 42, 42, 42, 63, 177, 58, 58,
524
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
525
+ 58, 58, 58, 48, 48, 48, 48, 48, 175, 175,
526
+ 175, 175, 175, 102, 69, 102, 102, 37, 102, 37,
527
+ 102, 102, 150, 150, 102, 102, 102, 1, 1, 102,
528
+ 102, 91, 91, 91, 102, 102, 102, 102, 102, 102,
529
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
530
+ 102, 102, 102, 102, 102, 102, 49, 163, 172, 110,
531
+ 110, 110, 49, 166, 49, 49, 151, 49, 49, 154,
532
+ 154, 154, 153, 153, 153, 174, 174, 163, 49, 49,
533
+ 49, 172, 49, 23, 166, 151, 151, 151, 15, 22,
534
+ 15, 15, 107, 15, 21, 111, 15, 112, 15, 15,
535
+ 113, 137, 15, 15, 0, 0, 148, 0, 149, 44,
536
+ 0, 29, 0, 0, 152, 18, 0, 0, 155, 155,
537
+ 155, 16, 14, 158, 11, 164, 165, 9, 169, 170,
538
+ 7, 31, 6, 176, 43, 178, 182 ]
539
+
540
+ racc_action_pointer = [
541
+ 142, 61, nil, nil, nil, nil, 166, 166, nil, 161,
542
+ nil, 158, nil, nil, 156, 128, 155, nil, 143, nil,
543
+ 4, 122, 127, 111, nil, nil, 19, 18, nil, 139,
544
+ nil, 164, nil, nil, nil, nil, 9, 50, nil, nil,
545
+ nil, nil, -1, 168, 142, 7, 6, nil, -4, 94,
546
+ nil, nil, nil, nil, nil, nil, nil, nil, -3, nil,
547
+ nil, nil, nil, 17, nil, nil, nil, nil, nil, 48,
548
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
549
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
550
+ nil, 22, nil, nil, nil, nil, nil, nil, nil, nil,
551
+ nil, nil, 50, nil, nil, nil, nil, 111, nil, nil,
552
+ 50, 118, 108, 94, nil, nil, nil, nil, nil, nil,
553
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
554
+ nil, nil, nil, nil, nil, nil, nil, 132, nil, nil,
555
+ nil, nil, nil, nil, nil, nil, nil, nil, 137, 146,
556
+ 56, 76, 152, 63, 60, 109, nil, nil, 145, nil,
557
+ nil, nil, nil, 95, 153, 147, 97, nil, nil, 151,
558
+ 160, nil, 75, nil, 109, 1, 171, 0, 157, nil,
559
+ nil, nil, 174, nil ]
560
+
561
+ racc_action_default = [
562
+ -126, -126, -3, -4, -10, -5, -126, -126, -6, -126,
563
+ -7, -126, -8, -9, -126, -126, -126, -1, -126, -13,
564
+ -126, -126, -126, -126, -13, -13, -126, -126, -2, -126,
565
+ -19, -116, -13, -25, -11, -32, -126, -126, -15, 184,
566
+ -41, -17, -126, -126, -117, -126, -126, -12, -126, -126,
567
+ -97, -23, -20, -18, -98, -21, -99, -22, -126, -14,
568
+ -29, -24, -27, -126, -26, -28, -35, -36, -31, -126,
569
+ -34, -33, -120, -122, -121, -123, -124, -118, -125, -119,
570
+ -16, -45, -46, -50, -44, -40, -43, -42, -48, -47,
571
+ -49, -126, -115, -113, -102, -114, -103, -104, -105, -106,
572
+ -107, -108, -126, -109, -110, -111, -100, -126, -112, -101,
573
+ -126, -126, -94, -92, -85, -74, -62, -86, -75, -76,
574
+ -55, -77, -63, -58, -56, -78, -64, -57, -79, -68,
575
+ -65, -59, -80, -69, -54, -81, -70, -126, -82, -71,
576
+ -66, -60, -83, -72, -67, -84, -73, -61, -126, -126,
577
+ -38, -126, -126, -126, -126, -126, -30, -39, -126, -96,
578
+ -95, -91, -93, -126, -126, -126, -126, -52, -51, -126,
579
+ -126, -89, -126, -87, -38, -126, -126, -126, -126, -90,
580
+ -53, -88, -126, -37 ]
581
+
582
+ racc_goto_table = [
583
+ 41, 80, 112, 18, 158, 113, 31, 17, 57, 173,
584
+ 55, 36, 37, 64, 42, 88, 26, 86, 45, 44,
585
+ 181, 149, 28, 62, 70, 52, 65, 90, 178, 84,
586
+ 46, 71, 66, 82, 49, 87, 89, 102, 137, 172,
587
+ 81, 15, 152, nil, nil, nil, nil, nil, nil, nil,
588
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
589
+ 92, nil, 160, nil, 112, 163, 164, 162, nil, nil,
590
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
591
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
592
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
593
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
594
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
595
+ nil, nil, nil, nil, nil, nil, nil, nil, 179, nil,
596
+ nil, nil, nil, nil, nil, 168 ]
597
+
598
+ racc_goto_check = [
599
+ 13, 12, 22, 14, 26, 35, 10, 2, 18, 34,
600
+ 17, 10, 10, 20, 15, 18, 11, 17, 19, 10,
601
+ 34, 22, 2, 8, 8, 16, 21, 8, 26, 5,
602
+ 23, 24, 25, 4, 27, 28, 29, 31, 32, 33,
603
+ 3, 1, 36, nil, nil, nil, nil, nil, nil, nil,
604
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
605
+ 14, nil, 22, nil, 22, 22, 22, 35, nil, nil,
606
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
607
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
608
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
609
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
610
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
611
+ nil, nil, nil, nil, nil, nil, nil, nil, 12, nil,
612
+ nil, nil, nil, nil, nil, 13 ]
613
+
614
+ racc_goto_pointer = [
615
+ nil, 41, 7, -9, -16, -20, nil, nil, -22, nil,
616
+ -13, 2, -47, -29, 2, -16, -17, -32, -34, -15,
617
+ -32, -19, -89, -5, -15, -14, -146, -6, -14, -13,
618
+ nil, -21, -64, -127, -157, -86, -71 ]
619
+
620
+ racc_goto_default = [
621
+ nil, nil, nil, 2, 3, 5, 8, 10, 12, 13,
622
+ nil, 171, nil, nil, 157, nil, nil, nil, nil, nil,
623
+ nil, nil, 79, nil, nil, nil, nil, nil, nil, nil,
624
+ 58, nil, nil, nil, nil, nil, nil ]
625
+
626
+ racc_reduce_table = [
627
+ 0, 0, :racc_error,
628
+ 1, 53, :_reduce_1,
629
+ 2, 53, :_reduce_2,
630
+ 1, 54, :_reduce_none,
631
+ 1, 54, :_reduce_none,
632
+ 1, 54, :_reduce_none,
633
+ 1, 54, :_reduce_none,
634
+ 1, 54, :_reduce_none,
635
+ 1, 54, :_reduce_none,
636
+ 1, 54, :_reduce_none,
637
+ 1, 54, :_reduce_10,
638
+ 3, 58, :_reduce_11,
639
+ 4, 59, :_reduce_12,
640
+ 0, 62, :_reduce_13,
641
+ 3, 62, :_reduce_14,
642
+ 3, 60, :_reduce_15,
643
+ 4, 63, :_reduce_16,
644
+ 3, 55, :_reduce_17,
645
+ 5, 56, :_reduce_18,
646
+ 0, 67, :_reduce_19,
647
+ 2, 67, :_reduce_20,
648
+ 1, 68, :_reduce_none,
649
+ 1, 68, :_reduce_none,
650
+ 1, 68, :_reduce_23,
651
+ 5, 57, :_reduce_24,
652
+ 0, 71, :_reduce_25,
653
+ 2, 71, :_reduce_26,
654
+ 1, 72, :_reduce_none,
655
+ 1, 72, :_reduce_none,
656
+ 1, 72, :_reduce_29,
657
+ 4, 73, :_reduce_30,
658
+ 5, 61, :_reduce_31,
659
+ 0, 75, :_reduce_32,
660
+ 2, 75, :_reduce_33,
661
+ 1, 76, :_reduce_none,
662
+ 1, 76, :_reduce_none,
663
+ 1, 76, :_reduce_36,
664
+ 10, 77, :_reduce_37,
665
+ 0, 78, :_reduce_none,
666
+ 1, 78, :_reduce_none,
667
+ 3, 65, :_reduce_40,
668
+ 0, 79, :_reduce_41,
669
+ 2, 79, :_reduce_42,
670
+ 1, 80, :_reduce_none,
671
+ 1, 80, :_reduce_none,
672
+ 1, 80, :_reduce_none,
673
+ 1, 80, :_reduce_none,
674
+ 1, 80, :_reduce_none,
675
+ 1, 80, :_reduce_none,
676
+ 1, 80, :_reduce_none,
677
+ 1, 80, :_reduce_50,
678
+ 6, 70, :_reduce_51,
679
+ 6, 69, :_reduce_52,
680
+ 9, 69, :_reduce_53,
681
+ 1, 84, :_reduce_none,
682
+ 1, 84, :_reduce_none,
683
+ 1, 84, :_reduce_none,
684
+ 1, 84, :_reduce_none,
685
+ 1, 84, :_reduce_none,
686
+ 1, 84, :_reduce_none,
687
+ 1, 84, :_reduce_none,
688
+ 1, 84, :_reduce_none,
689
+ 1, 84, :_reduce_none,
690
+ 1, 84, :_reduce_none,
691
+ 1, 84, :_reduce_none,
692
+ 1, 84, :_reduce_none,
693
+ 1, 84, :_reduce_none,
694
+ 1, 84, :_reduce_none,
695
+ 1, 84, :_reduce_none,
696
+ 1, 84, :_reduce_none,
697
+ 1, 84, :_reduce_none,
698
+ 1, 84, :_reduce_none,
699
+ 1, 84, :_reduce_none,
700
+ 1, 84, :_reduce_none,
701
+ 1, 84, :_reduce_none,
702
+ 1, 84, :_reduce_none,
703
+ 1, 84, :_reduce_none,
704
+ 1, 84, :_reduce_none,
705
+ 1, 84, :_reduce_none,
706
+ 1, 84, :_reduce_none,
707
+ 1, 84, :_reduce_none,
708
+ 1, 84, :_reduce_none,
709
+ 1, 84, :_reduce_none,
710
+ 1, 84, :_reduce_none,
711
+ 1, 84, :_reduce_none,
712
+ 1, 84, :_reduce_none,
713
+ 1, 84, :_reduce_none,
714
+ 1, 85, :_reduce_87,
715
+ 3, 85, :_reduce_88,
716
+ 1, 86, :_reduce_none,
717
+ 3, 86, :_reduce_90,
718
+ 4, 81, :_reduce_91,
719
+ 0, 88, :_reduce_92,
720
+ 2, 88, :_reduce_93,
721
+ 1, 87, :_reduce_94,
722
+ 3, 87, :_reduce_95,
723
+ 3, 87, :_reduce_96,
724
+ 1, 82, :_reduce_none,
725
+ 1, 82, :_reduce_none,
726
+ 1, 82, :_reduce_none,
727
+ 1, 83, :_reduce_none,
728
+ 1, 83, :_reduce_none,
729
+ 1, 83, :_reduce_none,
730
+ 1, 83, :_reduce_none,
731
+ 1, 83, :_reduce_none,
732
+ 1, 83, :_reduce_none,
733
+ 1, 83, :_reduce_none,
734
+ 1, 83, :_reduce_none,
735
+ 1, 83, :_reduce_none,
736
+ 1, 83, :_reduce_none,
737
+ 1, 83, :_reduce_none,
738
+ 1, 83, :_reduce_none,
739
+ 1, 83, :_reduce_none,
740
+ 1, 83, :_reduce_none,
741
+ 1, 83, :_reduce_none,
742
+ 1, 83, :_reduce_none,
743
+ 2, 66, :_reduce_116,
744
+ 3, 66, :_reduce_117,
745
+ 1, 64, :_reduce_none,
746
+ 1, 64, :_reduce_none,
747
+ 1, 64, :_reduce_none,
748
+ 1, 64, :_reduce_none,
749
+ 1, 64, :_reduce_none,
750
+ 1, 74, :_reduce_none,
751
+ 1, 74, :_reduce_none,
752
+ 1, 74, :_reduce_none ]
753
+
754
+ racc_reduce_n = 126
755
+
756
+ racc_shift_n = 184
757
+
758
+ racc_token_table = {
759
+ false => 0,
760
+ :error => 1,
761
+ ";" => 2,
762
+ "import" => 3,
763
+ :STRING_LITERAL => 4,
764
+ "package" => 5,
765
+ :IDENT => 6,
766
+ "." => 7,
767
+ "option" => 8,
768
+ "=" => 9,
769
+ "message" => 10,
770
+ "extend" => 11,
771
+ "{" => 12,
772
+ "}" => 13,
773
+ "enum" => 14,
774
+ "service" => 15,
775
+ "rpc" => 16,
776
+ "(" => 17,
777
+ ")" => 18,
778
+ "returns" => 19,
779
+ "group" => 20,
780
+ :CAMEL_IDENT => 21,
781
+ "[" => 22,
782
+ "]" => 23,
783
+ "required" => 24,
784
+ "optional" => 25,
785
+ "repeated" => 26,
786
+ "default" => 27,
787
+ "extensions" => 28,
788
+ "to" => 29,
789
+ "max" => 30,
790
+ "double" => 31,
791
+ "float" => 32,
792
+ "int32" => 33,
793
+ "int64" => 34,
794
+ "uint32" => 35,
795
+ "uint64" => 36,
796
+ "sint32" => 37,
797
+ "sint64" => 38,
798
+ "fixed32" => 39,
799
+ "fixed64" => 40,
800
+ "sfixed32" => 41,
801
+ "sfixed64" => 42,
802
+ "bool" => 43,
803
+ "string" => 44,
804
+ "bytes" => 45,
805
+ "," => 46,
806
+ :FLOAT_LITERAL => 47,
807
+ :BOOLEAN_LITERAL => 48,
808
+ :DEC_INTEGER => 49,
809
+ :HEX_INTEGER => 50,
810
+ :OCT_INTEGER => 51 }
811
+
812
+ racc_nt_base = 52
813
+
814
+ racc_use_result_var = true
815
+
816
+ Racc_arg = [
817
+ racc_action_table,
818
+ racc_action_check,
819
+ racc_action_default,
820
+ racc_action_pointer,
821
+ racc_goto_table,
822
+ racc_goto_check,
823
+ racc_goto_default,
824
+ racc_goto_pointer,
825
+ racc_nt_base,
826
+ racc_reduce_table,
827
+ racc_token_table,
828
+ racc_shift_n,
829
+ racc_reduce_n,
830
+ racc_use_result_var ]
831
+
832
+ Racc_token_to_s_table = [
833
+ "$end",
834
+ "error",
835
+ "\";\"",
836
+ "\"import\"",
837
+ "STRING_LITERAL",
838
+ "\"package\"",
839
+ "IDENT",
840
+ "\".\"",
841
+ "\"option\"",
842
+ "\"=\"",
843
+ "\"message\"",
844
+ "\"extend\"",
845
+ "\"{\"",
846
+ "\"}\"",
847
+ "\"enum\"",
848
+ "\"service\"",
849
+ "\"rpc\"",
850
+ "\"(\"",
851
+ "\")\"",
852
+ "\"returns\"",
853
+ "\"group\"",
854
+ "CAMEL_IDENT",
855
+ "\"[\"",
856
+ "\"]\"",
857
+ "\"required\"",
858
+ "\"optional\"",
859
+ "\"repeated\"",
860
+ "\"default\"",
861
+ "\"extensions\"",
862
+ "\"to\"",
863
+ "\"max\"",
864
+ "\"double\"",
865
+ "\"float\"",
866
+ "\"int32\"",
867
+ "\"int64\"",
868
+ "\"uint32\"",
869
+ "\"uint64\"",
870
+ "\"sint32\"",
871
+ "\"sint64\"",
872
+ "\"fixed32\"",
873
+ "\"fixed64\"",
874
+ "\"sfixed32\"",
875
+ "\"sfixed64\"",
876
+ "\"bool\"",
877
+ "\"string\"",
878
+ "\"bytes\"",
879
+ "\",\"",
880
+ "FLOAT_LITERAL",
881
+ "BOOLEAN_LITERAL",
882
+ "DEC_INTEGER",
883
+ "HEX_INTEGER",
884
+ "OCT_INTEGER",
885
+ "$start",
886
+ "proto",
887
+ "proto_item",
888
+ "message",
889
+ "extend",
890
+ "enum",
891
+ "import",
892
+ "package",
893
+ "option",
894
+ "service",
895
+ "dot_ident_list",
896
+ "option_body",
897
+ "constant",
898
+ "message_body",
899
+ "user_type",
900
+ "extend_body_list",
901
+ "extend_body",
902
+ "field",
903
+ "group",
904
+ "enum_body_list",
905
+ "enum_body",
906
+ "enum_field",
907
+ "integer_literal",
908
+ "service_body_list",
909
+ "service_body",
910
+ "rpc",
911
+ "rpc_arg",
912
+ "message_body_body_list",
913
+ "message_body_body",
914
+ "extensions",
915
+ "label",
916
+ "type",
917
+ "field_name",
918
+ "field_option_list",
919
+ "field_option",
920
+ "extension",
921
+ "comma_extension_list" ]
922
+
923
+ Racc_debug_parser = false
924
+
925
+ ##### State transition tables end #####
926
+
927
+ # reduce 0 omitted
928
+
929
+ module_eval(<<'.,.,', 'proto.y', 4)
930
+ def _reduce_1(val, _values, result)
931
+ result = Protobuf::Node::ProtoNode.new val
932
+ result
933
+ end
934
+ .,.,
935
+
936
+ module_eval(<<'.,.,', 'proto.y', 6)
937
+ def _reduce_2(val, _values, result)
938
+ result.children << val[1]
939
+ result
940
+ end
941
+ .,.,
942
+
943
+ # reduce 3 omitted
944
+
945
+ # reduce 4 omitted
946
+
947
+ # reduce 5 omitted
948
+
949
+ # reduce 6 omitted
950
+
951
+ # reduce 7 omitted
952
+
953
+ # reduce 8 omitted
954
+
955
+ # reduce 9 omitted
956
+
957
+ module_eval(<<'.,.,', 'proto.y', 16)
958
+ def _reduce_10(val, _values, result)
959
+
960
+ result
961
+ end
962
+ .,.,
963
+
964
+ module_eval(<<'.,.,', 'proto.y', 19)
965
+ def _reduce_11(val, _values, result)
966
+ result = Protobuf::Node::ImportNode.new val[1]
967
+ result
968
+ end
969
+ .,.,
970
+
971
+ module_eval(<<'.,.,', 'proto.y', 22)
972
+ def _reduce_12(val, _values, result)
973
+ result = Protobuf::Node::PackageNode.new val[2].unshift(val[1])
974
+ result
975
+ end
976
+ .,.,
977
+
978
+ module_eval(<<'.,.,', 'proto.y', 25)
979
+ def _reduce_13(val, _values, result)
980
+ result = []
981
+ result
982
+ end
983
+ .,.,
984
+
985
+ module_eval(<<'.,.,', 'proto.y', 27)
986
+ def _reduce_14(val, _values, result)
987
+ result << val[2]
988
+ result
989
+ end
990
+ .,.,
991
+
992
+ module_eval(<<'.,.,', 'proto.y', 30)
993
+ def _reduce_15(val, _values, result)
994
+ result = Protobuf::Node::OptionNode.new(*val[1])
995
+ result
996
+ end
997
+ .,.,
998
+
999
+ module_eval(<<'.,.,', 'proto.y', 33)
1000
+ def _reduce_16(val, _values, result)
1001
+ result = [val[1].unshift(val[0]), val[3]]
1002
+ result
1003
+ end
1004
+ .,.,
1005
+
1006
+ module_eval(<<'.,.,', 'proto.y', 36)
1007
+ def _reduce_17(val, _values, result)
1008
+ result = Protobuf::Node::MessageNode.new val[1], val[2]
1009
+ result
1010
+ end
1011
+ .,.,
1012
+
1013
+ module_eval(<<'.,.,', 'proto.y', 39)
1014
+ def _reduce_18(val, _values, result)
1015
+ result = Protobuf::Node::ExtendNode.new val[1], val[3]
1016
+ result
1017
+ end
1018
+ .,.,
1019
+
1020
+ module_eval(<<'.,.,', 'proto.y', 42)
1021
+ def _reduce_19(val, _values, result)
1022
+ result = []
1023
+ result
1024
+ end
1025
+ .,.,
1026
+
1027
+ module_eval(<<'.,.,', 'proto.y', 44)
1028
+ def _reduce_20(val, _values, result)
1029
+ result << val[1]
1030
+ result
1031
+ end
1032
+ .,.,
1033
+
1034
+ # reduce 21 omitted
1035
+
1036
+ # reduce 22 omitted
1037
+
1038
+ module_eval(<<'.,.,', 'proto.y', 49)
1039
+ def _reduce_23(val, _values, result)
1040
+
1041
+ result
1042
+ end
1043
+ .,.,
1044
+
1045
+ module_eval(<<'.,.,', 'proto.y', 52)
1046
+ def _reduce_24(val, _values, result)
1047
+ result = Protobuf::Node::EnumNode.new val[1], val[3]
1048
+ result
1049
+ end
1050
+ .,.,
1051
+
1052
+ module_eval(<<'.,.,', 'proto.y', 55)
1053
+ def _reduce_25(val, _values, result)
1054
+ result = []
1055
+ result
1056
+ end
1057
+ .,.,
1058
+
1059
+ module_eval(<<'.,.,', 'proto.y', 57)
1060
+ def _reduce_26(val, _values, result)
1061
+ result << val[1]
1062
+ result
1063
+ end
1064
+ .,.,
1065
+
1066
+ # reduce 27 omitted
1067
+
1068
+ # reduce 28 omitted
1069
+
1070
+ module_eval(<<'.,.,', 'proto.y', 62)
1071
+ def _reduce_29(val, _values, result)
1072
+
1073
+ result
1074
+ end
1075
+ .,.,
1076
+
1077
+ module_eval(<<'.,.,', 'proto.y', 65)
1078
+ def _reduce_30(val, _values, result)
1079
+ result = Protobuf::Node::EnumFieldNode.new val[0], val[2]
1080
+ result
1081
+ end
1082
+ .,.,
1083
+
1084
+ module_eval(<<'.,.,', 'proto.y', 68)
1085
+ def _reduce_31(val, _values, result)
1086
+ result = Protobuf::Node::ServiceNode.new val[1], val[3]
1087
+ result
1088
+ end
1089
+ .,.,
1090
+
1091
+ module_eval(<<'.,.,', 'proto.y', 71)
1092
+ def _reduce_32(val, _values, result)
1093
+ result = []
1094
+ result
1095
+ end
1096
+ .,.,
1097
+
1098
+ module_eval(<<'.,.,', 'proto.y', 73)
1099
+ def _reduce_33(val, _values, result)
1100
+ result << val[1]
1101
+ result
1102
+ end
1103
+ .,.,
1104
+
1105
+ # reduce 34 omitted
1106
+
1107
+ # reduce 35 omitted
1108
+
1109
+ module_eval(<<'.,.,', 'proto.y', 78)
1110
+ def _reduce_36(val, _values, result)
1111
+
1112
+ result
1113
+ end
1114
+ .,.,
1115
+
1116
+ module_eval(<<'.,.,', 'proto.y', 81)
1117
+ def _reduce_37(val, _values, result)
1118
+ result = Protobuf::Node::RpcNode.new val[1], val[3], val[7]
1119
+ result
1120
+ end
1121
+ .,.,
1122
+
1123
+ # reduce 38 omitted
1124
+
1125
+ # reduce 39 omitted
1126
+
1127
+ module_eval(<<'.,.,', 'proto.y', 87)
1128
+ def _reduce_40(val, _values, result)
1129
+ result = val[1]
1130
+ result
1131
+ end
1132
+ .,.,
1133
+
1134
+ module_eval(<<'.,.,', 'proto.y', 90)
1135
+ def _reduce_41(val, _values, result)
1136
+ result = []
1137
+ result
1138
+ end
1139
+ .,.,
1140
+
1141
+ module_eval(<<'.,.,', 'proto.y', 92)
1142
+ def _reduce_42(val, _values, result)
1143
+ result << val[1]
1144
+ result
1145
+ end
1146
+ .,.,
1147
+
1148
+ # reduce 43 omitted
1149
+
1150
+ # reduce 44 omitted
1151
+
1152
+ # reduce 45 omitted
1153
+
1154
+ # reduce 46 omitted
1155
+
1156
+ # reduce 47 omitted
1157
+
1158
+ # reduce 48 omitted
1159
+
1160
+ # reduce 49 omitted
1161
+
1162
+ module_eval(<<'.,.,', 'proto.y', 102)
1163
+ def _reduce_50(val, _values, result)
1164
+
1165
+ result
1166
+ end
1167
+ .,.,
1168
+
1169
+ module_eval(<<'.,.,', 'proto.y', 105)
1170
+ def _reduce_51(val, _values, result)
1171
+ result = Protobuf::Node::GroupNode.new val[0], val[2], val[4], val[5]
1172
+ result
1173
+ end
1174
+ .,.,
1175
+
1176
+ module_eval(<<'.,.,', 'proto.y', 108)
1177
+ def _reduce_52(val, _values, result)
1178
+ result = Protobuf::Node::FieldNode.new val[0], val[1], val[2], val[4]
1179
+ result
1180
+ end
1181
+ .,.,
1182
+
1183
+ module_eval(<<'.,.,', 'proto.y', 110)
1184
+ def _reduce_53(val, _values, result)
1185
+ result = Protobuf::Node::FieldNode.new val[0], val[1], val[2], val[4], val[6]
1186
+ result
1187
+ end
1188
+ .,.,
1189
+
1190
+ # reduce 54 omitted
1191
+
1192
+ # reduce 55 omitted
1193
+
1194
+ # reduce 56 omitted
1195
+
1196
+ # reduce 57 omitted
1197
+
1198
+ # reduce 58 omitted
1199
+
1200
+ # reduce 59 omitted
1201
+
1202
+ # reduce 60 omitted
1203
+
1204
+ # reduce 61 omitted
1205
+
1206
+ # reduce 62 omitted
1207
+
1208
+ # reduce 63 omitted
1209
+
1210
+ # reduce 64 omitted
1211
+
1212
+ # reduce 65 omitted
1213
+
1214
+ # reduce 66 omitted
1215
+
1216
+ # reduce 67 omitted
1217
+
1218
+ # reduce 68 omitted
1219
+
1220
+ # reduce 69 omitted
1221
+
1222
+ # reduce 70 omitted
1223
+
1224
+ # reduce 71 omitted
1225
+
1226
+ # reduce 72 omitted
1227
+
1228
+ # reduce 73 omitted
1229
+
1230
+ # reduce 74 omitted
1231
+
1232
+ # reduce 75 omitted
1233
+
1234
+ # reduce 76 omitted
1235
+
1236
+ # reduce 77 omitted
1237
+
1238
+ # reduce 78 omitted
1239
+
1240
+ # reduce 79 omitted
1241
+
1242
+ # reduce 80 omitted
1243
+
1244
+ # reduce 81 omitted
1245
+
1246
+ # reduce 82 omitted
1247
+
1248
+ # reduce 83 omitted
1249
+
1250
+ # reduce 84 omitted
1251
+
1252
+ # reduce 85 omitted
1253
+
1254
+ # reduce 86 omitted
1255
+
1256
+ module_eval(<<'.,.,', 'proto.y', 115)
1257
+ def _reduce_87(val, _values, result)
1258
+ result = val
1259
+ result
1260
+ end
1261
+ .,.,
1262
+
1263
+ module_eval(<<'.,.,', 'proto.y', 117)
1264
+ def _reduce_88(val, _values, result)
1265
+ result << val[2]
1266
+ result
1267
+ end
1268
+ .,.,
1269
+
1270
+ # reduce 89 omitted
1271
+
1272
+ module_eval(<<'.,.,', 'proto.y', 121)
1273
+ def _reduce_90(val, _values, result)
1274
+ result = [:default, val[2]]
1275
+ result
1276
+ end
1277
+ .,.,
1278
+
1279
+ module_eval(<<'.,.,', 'proto.y', 124)
1280
+ def _reduce_91(val, _values, result)
1281
+ result = Protobuf::Node::ExtensionsNode.new val[2].unshift(val[1])
1282
+ result
1283
+ end
1284
+ .,.,
1285
+
1286
+ module_eval(<<'.,.,', 'proto.y', 127)
1287
+ def _reduce_92(val, _values, result)
1288
+ result = []
1289
+ result
1290
+ end
1291
+ .,.,
1292
+
1293
+ module_eval(<<'.,.,', 'proto.y', 129)
1294
+ def _reduce_93(val, _values, result)
1295
+ result << val[1]
1296
+ result
1297
+ end
1298
+ .,.,
1299
+
1300
+ module_eval(<<'.,.,', 'proto.y', 132)
1301
+ def _reduce_94(val, _values, result)
1302
+ result = Protobuf::Node::ExtensionRangeNode.new val[0]
1303
+ result
1304
+ end
1305
+ .,.,
1306
+
1307
+ module_eval(<<'.,.,', 'proto.y', 134)
1308
+ def _reduce_95(val, _values, result)
1309
+ result = Protobuf::Node::ExtensionRangeNode.new val[0], val[2]
1310
+ result
1311
+ end
1312
+ .,.,
1313
+
1314
+ module_eval(<<'.,.,', 'proto.y', 136)
1315
+ def _reduce_96(val, _values, result)
1316
+ result = Protobuf::Node::ExtensionRangeNode.new val[0], :max
1317
+ result
1318
+ end
1319
+ .,.,
1320
+
1321
+ # reduce 97 omitted
1322
+
1323
+ # reduce 98 omitted
1324
+
1325
+ # reduce 99 omitted
1326
+
1327
+ # reduce 100 omitted
1328
+
1329
+ # reduce 101 omitted
1330
+
1331
+ # reduce 102 omitted
1332
+
1333
+ # reduce 103 omitted
1334
+
1335
+ # reduce 104 omitted
1336
+
1337
+ # reduce 105 omitted
1338
+
1339
+ # reduce 106 omitted
1340
+
1341
+ # reduce 107 omitted
1342
+
1343
+ # reduce 108 omitted
1344
+
1345
+ # reduce 109 omitted
1346
+
1347
+ # reduce 110 omitted
1348
+
1349
+ # reduce 111 omitted
1350
+
1351
+ # reduce 112 omitted
1352
+
1353
+ # reduce 113 omitted
1354
+
1355
+ # reduce 114 omitted
1356
+
1357
+ # reduce 115 omitted
1358
+
1359
+ module_eval(<<'.,.,', 'proto.y', 147)
1360
+ def _reduce_116(val, _values, result)
1361
+ result = val[1].unshift(val[0])
1362
+ result
1363
+ end
1364
+ .,.,
1365
+
1366
+ module_eval(<<'.,.,', 'proto.y', 149)
1367
+ def _reduce_117(val, _values, result)
1368
+ result = val[1].unshift(val[0])
1369
+ result
1370
+ end
1371
+ .,.,
1372
+
1373
+ # reduce 118 omitted
1374
+
1375
+ # reduce 119 omitted
1376
+
1377
+ # reduce 120 omitted
1378
+
1379
+ # reduce 121 omitted
1380
+
1381
+ # reduce 122 omitted
1382
+
1383
+ # reduce 123 omitted
1384
+
1385
+ # reduce 124 omitted
1386
+
1387
+ # reduce 125 omitted
1388
+
1389
+ def _reduce_none(val, _values, result)
1390
+ val[0]
1391
+ end
1392
+
1393
+ end # class ProtoParser
1394
+ end # module Protobuf