# # DO NOT MODIFY!!!! # This file is automatically generated by racc 1.4.5 # from racc grammer file "lib/protobuf/compiler/proto.y". # # # lib/protobuf/compiler/proto_parser.rb: generated by racc (runtime embedded) # ###### racc/parser.rb begin unless $".index 'racc/parser.rb' $".push 'racc/parser.rb' self.class.module_eval <<'..end racc/parser.rb modeval..id57af5bfae3', 'racc/parser.rb', 1 # # $Id: parser.rb,v 1.7 2005/11/20 17:31:32 aamine Exp $ # # Copyright (c) 1999-2005 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # # As a special exception, when this code is copied by Racc # into a Racc output file, you may use that output file # without restriction. # unless defined?(NotImplementedError) NotImplementedError = NotImplementError end module Racc class ParseError < StandardError; end end unless defined?(::ParseError) ParseError = Racc::ParseError end module Racc unless defined?(Racc_No_Extentions) Racc_No_Extentions = false end class Parser Racc_Runtime_Version = '1.4.5' Racc_Runtime_Revision = '$Revision: 1.7 $'.split[1] Racc_Runtime_Core_Version_R = '1.4.5' Racc_Runtime_Core_Revision_R = '$Revision: 1.7 $'.split[1] begin require 'racc/cparse' # Racc_Runtime_Core_Version_C = (defined in extention) Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2] unless new.respond_to?(:_racc_do_parse_c, true) raise LoadError, 'old cparse.so' end if Racc_No_Extentions raise LoadError, 'selecting ruby version of racc runtime core' end Racc_Main_Parsing_Routine = :_racc_do_parse_c Racc_YY_Parse_Method = :_racc_yyparse_c Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C Racc_Runtime_Type = 'c' rescue LoadError Racc_Main_Parsing_Routine = :_racc_do_parse_rb Racc_YY_Parse_Method = :_racc_yyparse_rb Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R Racc_Runtime_Type = 'ruby' end def Parser.racc_runtime_type Racc_Runtime_Type end private def _racc_setup @yydebug = false unless self.class::Racc_debug_parser @yydebug = false unless defined?(@yydebug) if @yydebug @racc_debug_out = $stderr unless defined?(@racc_debug_out) @racc_debug_out ||= $stderr end arg = self.class::Racc_arg arg[13] = true if arg.size < 14 arg end def _racc_init_sysvars @racc_state = [0] @racc_tstack = [] @racc_vstack = [] @racc_t = nil @racc_val = nil @racc_read_next = true @racc_user_yyerror = false @racc_error_status = 0 end ### ### do_parse ### def do_parse __send__(Racc_Main_Parsing_Routine, _racc_setup(), false) end def next_token raise NotImplementedError, "#{self.class}\#next_token is not defined" end def _racc_do_parse_rb(arg, in_debug) action_table, action_check, action_default, action_pointer, goto_table, goto_check, goto_default, goto_pointer, nt_base, reduce_table, token_table, shift_n, reduce_n, use_result, * = arg _racc_init_sysvars tok = act = i = nil nerr = 0 catch(:racc_end_parse) { while true if i = action_pointer[@racc_state[-1]] if @racc_read_next if @racc_t != 0 # not EOF tok, @racc_val = next_token() unless tok # EOF @racc_t = 0 else @racc_t = (token_table[tok] or 1) # error token end racc_read_token(@racc_t, tok, @racc_val) if @yydebug @racc_read_next = false end end i += @racc_t unless i >= 0 and act = action_table[i] and action_check[i] == @racc_state[-1] act = action_default[@racc_state[-1]] end else act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) ; end end } end ### ### yyparse ### def yyparse(recv, mid) __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true) end def _racc_yyparse_rb(recv, mid, arg, c_debug) action_table, action_check, action_default, action_pointer, goto_table, goto_check, goto_default, goto_pointer, nt_base, reduce_table, token_table, shift_n, reduce_n, use_result, * = arg _racc_init_sysvars tok = nil act = nil i = nil nerr = 0 catch(:racc_end_parse) { until i = action_pointer[@racc_state[-1]] while act = _racc_evalact(action_default[@racc_state[-1]], arg) ; end end recv.__send__(mid) do |tok, val| unless tok @racc_t = 0 else @racc_t = (token_table[tok] or 1) # error token end @racc_val = val @racc_read_next = false i += @racc_t unless i >= 0 and act = action_table[i] and action_check[i] == @racc_state[-1] act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) ; end while not (i = action_pointer[@racc_state[-1]]) or not @racc_read_next or @racc_t == 0 # $ unless i and i += @racc_t and i >= 0 and act = action_table[i] and action_check[i] == @racc_state[-1] act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) ; end end end } end ### ### common ### def _racc_evalact(act, arg) action_table, action_check, action_default, action_pointer, goto_table, goto_check, goto_default, goto_pointer, nt_base, reduce_table, token_table, shift_n, reduce_n, use_result, * = arg nerr = 0 # tmp if act > 0 and act < shift_n # # shift # if @racc_error_status > 0 @racc_error_status -= 1 unless @racc_t == 1 # error token end @racc_vstack.push @racc_val @racc_state.push act @racc_read_next = true if @yydebug @racc_tstack.push @racc_t racc_shift @racc_t, @racc_tstack, @racc_vstack end elsif act < 0 and act > -reduce_n # # reduce # code = catch(:racc_jump) { @racc_state.push _racc_do_reduce(arg, act) false } if code case code when 1 # yyerror @racc_user_yyerror = true # user_yyerror return -reduce_n when 2 # yyaccept return shift_n else raise '[Racc Bug] unknown jump code' end end elsif act == shift_n # # accept # racc_accept if @yydebug throw :racc_end_parse, @racc_vstack[0] elsif act == -reduce_n # # error # case @racc_error_status when 0 unless arg[21] # user_yyerror nerr += 1 on_error @racc_t, @racc_val, @racc_vstack end when 3 if @racc_t == 0 # is $ throw :racc_end_parse, nil end @racc_read_next = true end @racc_user_yyerror = false @racc_error_status = 3 while true if i = action_pointer[@racc_state[-1]] i += 1 # error token if i >= 0 and (act = action_table[i]) and action_check[i] == @racc_state[-1] break end end throw :racc_end_parse, nil if @racc_state.size <= 1 @racc_state.pop @racc_vstack.pop if @yydebug @racc_tstack.pop racc_e_pop @racc_state, @racc_tstack, @racc_vstack end end return act else raise "[Racc Bug] unknown action #{act.inspect}" end racc_next_state(@racc_state[-1], @racc_state) if @yydebug nil end def _racc_do_reduce(arg, act) action_table, action_check, action_default, action_pointer, goto_table, goto_check, goto_default, goto_pointer, nt_base, reduce_table, token_table, shift_n, reduce_n, use_result, * = arg state = @racc_state vstack = @racc_vstack tstack = @racc_tstack i = act * -3 len = reduce_table[i] reduce_to = reduce_table[i+1] method_id = reduce_table[i+2] void_array = [] tmp_t = tstack[-len, len] if @yydebug tmp_v = vstack[-len, len] tstack[-len, len] = void_array if @yydebug vstack[-len, len] = void_array state[-len, len] = void_array # tstack must be updated AFTER method call if use_result vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0]) else vstack.push __send__(method_id, tmp_v, vstack) end tstack.push reduce_to racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug k1 = reduce_to - nt_base if i = goto_pointer[k1] i += state[-1] if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1 return curstate end end goto_default[k1] end def on_error(t, val, vstack) raise ParseError, sprintf("\nparse error on value %s (%s)", val.inspect, token_to_str(t) || '?') end def yyerror throw :racc_jump, 1 end def yyaccept throw :racc_jump, 2 end def yyerrok @racc_error_status = 0 end # # for debugging output # def racc_read_token(t, tok, val) @racc_debug_out.print 'read ' @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') ' @racc_debug_out.puts val.inspect @racc_debug_out.puts end def racc_shift(tok, tstack, vstack) @racc_debug_out.puts "shift #{racc_token2str tok}" racc_print_stacks tstack, vstack @racc_debug_out.puts end def racc_reduce(toks, sim, tstack, vstack) out = @racc_debug_out out.print 'reduce ' if toks.empty? out.print ' ' else toks.each {|t| out.print ' ', racc_token2str(t) } end out.puts " --> #{racc_token2str(sim)}" racc_print_stacks tstack, vstack @racc_debug_out.puts end def racc_accept @racc_debug_out.puts 'accept' @racc_debug_out.puts end def racc_e_pop(state, tstack, vstack) @racc_debug_out.puts 'error recovering mode: pop token' racc_print_states state racc_print_stacks tstack, vstack @racc_debug_out.puts end def racc_next_state(curstate, state) @racc_debug_out.puts "goto #{curstate}" racc_print_states state @racc_debug_out.puts end def racc_print_stacks(t, v) out = @racc_debug_out out.print ' [' t.each_index do |i| out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')' end out.puts ' ]' end def racc_print_states(s) out = @racc_debug_out out.print ' [' s.each {|st| out.print ' ', st } out.puts ' ]' end def racc_token2str(tok) self.class::Racc_token_to_s_table[tok] or raise "[Racc Bug] can't convert token #{tok} to string" end def token_to_str(t) self.class::Racc_token_to_s_table[t] end end end ..end racc/parser.rb modeval..id57af5bfae3 end ###### racc/parser.rb end module Protobuf class ProtoParser < Racc::Parser module_eval <<'..end lib/protobuf/compiler/proto.y modeval..idf83c19ba1e', 'lib/protobuf/compiler/proto.y', 161 require 'strscan' def parse(f) @scanner = StringScanner.new(f.read) yyparse(self, :scan) end def scan_debug scan do |token, value| p [token, value] yield [token, value] end end def scan until @scanner.eos? case when match(/\s+/, /\/\/.*/) # skip when match(/\/\*/) # C-like comment raise 'EOF inside block comment' until @scanner.scan_until(/\*\//) when match(/(?:required|optional|repeated|import|package|option|message|extend|enum|service|syntax|rpc|returns|group|default|extensions|to|max|double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\b/) yield [@token, @token.to_sym] when match(/[+-]?\d*\.\d+([Ee][\+-]?\d+)?/) yield [:FLOAT_LITERAL, @token.to_f] when match(/[+-]?[1-9]\d*(?!\.)/, /0(?![.xX0-9])/) yield [:DEC_INTEGER, @token.to_i] when match(/0[xX]([A-Fa-f0-9])+/) yield [:HEX_INTEGER, @token.to_i(0)] when match(/0[0-7]+/) yield [:OCT_INTEGER, @token.to_i(0)] when match(/(true|false)\b/) yield [:BOOLEAN_LITERAL, @token == 'true'] when match(/"(?:[^"\\]+|\\.)*"/, /'(?:[^'\\]+|\\.)*'/) yield [:STRING_LITERAL, eval(@token)] when match(/[a-zA-Z_]\w*/) yield [:IDENT, @token.to_sym] when match(/./) yield [@token, @token] else raise "parse error around #{@scanner.string[@scanner.pos, 32].inspect}" end end yield [false, nil] end def match(*regular_expressions) regular_expressions.each do |re| if @scanner.scan(re) @token = @scanner[0] return true end end false end ..end lib/protobuf/compiler/proto.y modeval..idf83c19ba1e ##### racc 1.4.5 generates ### racc_reduce_table = [ 0, 0, :racc_error, 1, 53, :_reduce_1, 2, 53, :_reduce_2, 1, 54, :_reduce_none, 1, 54, :_reduce_none, 1, 54, :_reduce_none, 1, 54, :_reduce_none, 1, 54, :_reduce_none, 1, 54, :_reduce_none, 1, 54, :_reduce_none, 1, 54, :_reduce_none, 1, 54, :_reduce_11, 3, 58, :_reduce_12, 4, 59, :_reduce_13, 0, 63, :_reduce_14, 3, 63, :_reduce_15, 3, 60, :_reduce_16, 4, 64, :_reduce_17, 3, 55, :_reduce_18, 5, 56, :_reduce_19, 0, 68, :_reduce_20, 2, 68, :_reduce_21, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_24, 5, 57, :_reduce_25, 0, 72, :_reduce_26, 2, 72, :_reduce_27, 1, 73, :_reduce_none, 1, 73, :_reduce_none, 1, 73, :_reduce_30, 4, 74, :_reduce_31, 5, 61, :_reduce_32, 0, 76, :_reduce_33, 2, 76, :_reduce_34, 1, 77, :_reduce_none, 1, 77, :_reduce_none, 1, 77, :_reduce_37, 4, 62, :_reduce_38, 10, 78, :_reduce_39, 0, 79, :_reduce_none, 1, 79, :_reduce_none, 3, 66, :_reduce_42, 0, 80, :_reduce_43, 2, 80, :_reduce_44, 1, 81, :_reduce_none, 1, 81, :_reduce_none, 1, 81, :_reduce_none, 1, 81, :_reduce_none, 1, 81, :_reduce_none, 1, 81, :_reduce_none, 1, 81, :_reduce_none, 1, 81, :_reduce_52, 6, 71, :_reduce_53, 6, 70, :_reduce_54, 9, 70, :_reduce_55, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 85, :_reduce_none, 1, 86, :_reduce_90, 3, 86, :_reduce_91, 1, 87, :_reduce_none, 3, 87, :_reduce_93, 4, 82, :_reduce_94, 0, 89, :_reduce_95, 2, 89, :_reduce_96, 1, 88, :_reduce_97, 3, 88, :_reduce_98, 3, 88, :_reduce_99, 1, 83, :_reduce_none, 1, 83, :_reduce_none, 1, 83, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 1, 84, :_reduce_none, 2, 67, :_reduce_119, 3, 67, :_reduce_120, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 75, :_reduce_none, 1, 75, :_reduce_none, 1, 75, :_reduce_none ] racc_reduce_n = 129 racc_shift_n = 190 racc_action_table = [ 79, 56, 82, 21, 22, 79, 28, 82, 47, 65, 53, 73, 57, 68, 52, 16, 115, 16, 114, 47, 66, 64, 74, 55, 58, 60, 76, 176, 111, 113, 98, 101, 102, 103, 104, 105, 106, 107, 109, 110, 112, 97, 100, 77, 78, 80, 81, 83, 77, 78, 80, 81, 83, 128, 51, 136, 140, 47, 145, 45, 153, 121, 21, 22, 127, 131, 135, 139, 21, 22, 149, 152, 21, 22, 125, 129, 132, 134, 138, 142, 144, 148, 151, 120, 123, 124, 126, 130, 133, 137, 141, 143, 147, 150, 119, 122, 88, 173, 182, 80, 81, 83, 16, 28, 18, 1, 167, 90, 6, 80, 81, 83, 80, 81, 83, 43, 47, 172, 55, 58, 60, 183, 96, 116, 176, 80, 81, 83, 30, 42, 4, 7, 39, 12, 154, 38, 16, 156, 18, 1, 158, 159, 6, 9, 11, 4, 7, 160, 12, 161, 162, 16, 37, 18, 1, 165, 36, 6, 9, 11, 80, 81, 83, 80, 81, 83, 35, 33, 32, 171, 28, 45, 175, 27, 180, 181, 26, 25, 24, 186, 23, 188, 189 ] racc_action_check = [ 53, 46, 53, 63, 63, 181, 172, 181, 41, 49, 41, 50, 46, 49, 40, 49, 68, 50, 63, 40, 49, 47, 50, 46, 46, 46, 50, 172, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 53, 53, 53, 53, 53, 181, 181, 181, 181, 181, 108, 39, 108, 108, 34, 108, 32, 108, 108, 156, 156, 108, 108, 108, 108, 1, 1, 108, 108, 180, 180, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 54, 169, 178, 160, 160, 160, 54, 183, 54, 54, 159, 54, 54, 96, 96, 96, 161, 161, 161, 30, 48, 169, 54, 54, 54, 178, 54, 76, 183, 159, 159, 159, 17, 29, 17, 17, 26, 17, 114, 25, 17, 116, 17, 17, 117, 118, 17, 17, 17, 0, 0, 146, 0, 154, 155, 0, 24, 0, 0, 157, 23, 0, 0, 0, 115, 115, 115, 158, 158, 158, 22, 20, 18, 164, 16, 170, 171, 12, 175, 176, 11, 9, 7, 182, 6, 184, 188 ] racc_action_pointer = [ 143, 62, nil, nil, nil, nil, 174, 174, nil, 171, nil, 167, 167, nil, nil, nil, 164, 128, 162, nil, 155, nil, 160, 144, 150, 123, 128, nil, nil, 127, 115, nil, 47, nil, 50, nil, nil, nil, nil, 52, 12, 1, nil, nil, nil, nil, -1, 15, 109, 7, 9, nil, nil, -4, 94, nil, nil, nil, nil, nil, nil, nil, nil, -3, nil, nil, nil, nil, 7, nil, nil, nil, nil, nil, nil, nil, 117, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 60, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 50, nil, nil, nil, nil, nil, 128, 111, 119, 94, 112, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 138, nil, nil, nil, nil, nil, nil, nil, 140, 148, 56, 153, 114, 76, 50, 63, nil, nil, 150, nil, nil, nil, nil, 95, 159, 152, 0, nil, nil, 156, 166, nil, 75, nil, 66, 1, 177, 97, 162, nil, nil, nil, 180, nil ] racc_action_default = [ -129, -129, -3, -4, -11, -5, -129, -129, -6, -129, -7, -129, -129, -8, -9, -10, -129, -129, -129, -1, -129, -14, -129, -129, -129, -129, -129, -14, -14, -129, -129, -2, -129, -20, -119, -14, -26, -12, -33, -129, -129, -129, -16, 190, -18, -43, -129, -129, -120, -129, -129, -38, -13, -129, -129, -100, -24, -19, -101, -21, -102, -22, -23, -129, -15, -30, -25, -28, -129, -27, -29, -34, -36, -37, -32, -35, -129, -123, -125, -124, -126, -127, -121, -128, -122, -17, -47, -48, -52, -46, -42, -45, -44, -51, -50, -49, -129, -116, -105, -118, -117, -106, -107, -108, -109, -110, -111, -112, -129, -113, -114, -103, -115, -104, -129, -129, -129, -95, -97, -88, -77, -64, -89, -78, -79, -57, -80, -65, -60, -58, -81, -66, -59, -82, -71, -67, -61, -83, -72, -68, -56, -84, -73, -85, -74, -62, -129, -86, -75, -69, -87, -76, -70, -63, -129, -129, -40, -129, -129, -129, -129, -129, -31, -41, -129, -94, -96, -99, -98, -129, -129, -129, -129, -54, -53, -129, -129, -92, -129, -90, -40, -129, -129, -129, -129, -93, -55, -91, -129, -39 ] racc_goto_table = [ 44, 85, 118, 164, 34, 19, 117, 20, 179, 62, 40, 41, 61, 69, 46, 29, 49, 94, 48, 187, 91, 155, 31, 67, 75, 59, 70, 184, 93, 89, 50, 71, 72, 87, 54, 92, 95, 108, 146, 178, 86, 17, 157, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 118, 168, 169, 170, 166, 99, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 185, nil, nil, nil, nil, nil, nil, nil, nil, 174 ] racc_goto_check = [ 14, 13, 23, 27, 11, 2, 36, 15, 35, 19, 11, 11, 18, 21, 16, 12, 20, 19, 11, 35, 18, 23, 2, 8, 8, 17, 22, 27, 8, 5, 24, 25, 26, 4, 28, 29, 30, 32, 33, 34, 3, 1, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, 23, 23, 23, 36, 15, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 13, nil, nil, nil, nil, nil, nil, nil, nil, 14 ] racc_goto_pointer = [ nil, 41, 5, -14, -21, -25, nil, nil, -26, nil, nil, -17, -1, -52, -32, 6, -19, -21, -34, -37, -20, -36, -23, -94, -8, -19, -18, -153, -11, -19, -18, nil, -26, -70, -133, -164, -90, -75 ] racc_goto_default = [ nil, nil, nil, 2, 3, 5, 8, 10, 13, 14, 15, nil, 177, nil, nil, 163, nil, nil, nil, nil, nil, nil, nil, 84, nil, nil, nil, nil, nil, nil, nil, 63, nil, nil, nil, nil, nil, nil ] racc_token_table = { false => 0, Object.new => 1, ";" => 2, "import" => 3, :STRING_LITERAL => 4, "package" => 5, :IDENT => 6, "." => 7, "option" => 8, "=" => 9, "message" => 10, "extend" => 11, "{" => 12, "}" => 13, "enum" => 14, "service" => 15, "syntax" => 16, "rpc" => 17, "(" => 18, ")" => 19, "returns" => 20, "group" => 21, "[" => 22, "]" => 23, "required" => 24, "optional" => 25, "repeated" => 26, "default" => 27, "extensions" => 28, "to" => 29, "max" => 30, "double" => 31, "float" => 32, "int32" => 33, "int64" => 34, "uint32" => 35, "uint64" => 36, "sint32" => 37, "sint64" => 38, "fixed32" => 39, "fixed64" => 40, "sfixed32" => 41, "sfixed64" => 42, "bool" => 43, "string" => 44, "bytes" => 45, "," => 46, :FLOAT_LITERAL => 47, :BOOLEAN_LITERAL => 48, :DEC_INTEGER => 49, :HEX_INTEGER => 50, :OCT_INTEGER => 51 } racc_use_result_var = true racc_nt_base = 52 Racc_arg = [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ] Racc_token_to_s_table = [ '$end', 'error', '";"', '"import"', 'STRING_LITERAL', '"package"', 'IDENT', '"."', '"option"', '"="', '"message"', '"extend"', '"{"', '"}"', '"enum"', '"service"', '"syntax"', '"rpc"', '"("', '")"', '"returns"', '"group"', '"["', '"]"', '"required"', '"optional"', '"repeated"', '"default"', '"extensions"', '"to"', '"max"', '"double"', '"float"', '"int32"', '"int64"', '"uint32"', '"uint64"', '"sint32"', '"sint64"', '"fixed32"', '"fixed64"', '"sfixed32"', '"sfixed64"', '"bool"', '"string"', '"bytes"', '","', 'FLOAT_LITERAL', 'BOOLEAN_LITERAL', 'DEC_INTEGER', 'HEX_INTEGER', 'OCT_INTEGER', '$start', 'proto', 'proto_item', 'message', 'extend', 'enum', 'import', 'package', 'option', 'service', 'syntax', 'dot_ident_list', 'option_body', 'constant', 'message_body', 'user_type', 'extend_body_list', 'extend_body', 'field', 'group', 'enum_body_list', 'enum_body', 'enum_field', 'integer_literal', 'service_body_list', 'service_body', 'rpc', 'rpc_arg', 'message_body_body_list', 'message_body_body', 'extensions', 'label', 'type', 'field_name', 'field_option_list', 'field_option', 'extension', 'comma_extension_list'] Racc_debug_parser = false ##### racc system variables end ##### # reduce 0 omitted module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 3 def _reduce_1( val, _values, result ) result = Protobuf::Node::ProtoNode.new(val) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 5 def _reduce_2( val, _values, result ) result.children << val[1] if val[1] result end .,., # reduce 3 omitted # reduce 4 omitted # reduce 5 omitted # reduce 6 omitted # reduce 7 omitted # reduce 8 omitted # reduce 9 omitted # reduce 10 omitted module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 15 def _reduce_11( val, _values, result ) result = nil result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 18 def _reduce_12( val, _values, result ) result = Protobuf::Node::ImportNode.new(val[1]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 21 def _reduce_13( val, _values, result ) result = Protobuf::Node::PackageNode.new(val[2].unshift(val[1])) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 24 def _reduce_14( val, _values, result ) result = [] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 26 def _reduce_15( val, _values, result ) result << val[2] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 29 def _reduce_16( val, _values, result ) result = Protobuf::Node::OptionNode.new(*val[1]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 32 def _reduce_17( val, _values, result ) result = [val[1].unshift(val[0]), val[3]] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 35 def _reduce_18( val, _values, result ) result = Protobuf::Node::MessageNode.new(val[1], val[2]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 38 def _reduce_19( val, _values, result ) result = Protobuf::Node::ExtendNode.new(val[1], val[3]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 41 def _reduce_20( val, _values, result ) result = [] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 43 def _reduce_21( val, _values, result ) result << val[1] if val[1] result end .,., # reduce 22 omitted # reduce 23 omitted module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 47 def _reduce_24( val, _values, result ) result = nil result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 50 def _reduce_25( val, _values, result ) result = Protobuf::Node::EnumNode.new(val[1], val[3]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 53 def _reduce_26( val, _values, result ) result = [] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 55 def _reduce_27( val, _values, result ) result << val[1] if val[1] result end .,., # reduce 28 omitted # reduce 29 omitted module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 59 def _reduce_30( val, _values, result ) result = nil result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 62 def _reduce_31( val, _values, result ) result = Protobuf::Node::EnumFieldNode.new(val[0], val[2]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 65 def _reduce_32( val, _values, result ) result = Protobuf::Node::ServiceNode.new(val[1], val[3]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 68 def _reduce_33( val, _values, result ) result = [] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 70 def _reduce_34( val, _values, result ) result << val[1] if val[1] result end .,., # reduce 35 omitted # reduce 36 omitted module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 74 def _reduce_37( val, _values, result ) result = nil result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 76 def _reduce_38( val, _values, result ) result = Protobuf::Node::SyntaxNode.new(val[2]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 79 def _reduce_39( val, _values, result ) result = Protobuf::Node::RpcNode.new(val[1], val[3], val[7]) result end .,., # reduce 40 omitted # reduce 41 omitted module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 85 def _reduce_42( val, _values, result ) result = val[1] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 88 def _reduce_43( val, _values, result ) result = [] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 90 def _reduce_44( val, _values, result ) result << val[1] if val[1] result end .,., # reduce 45 omitted # reduce 46 omitted # reduce 47 omitted # reduce 48 omitted # reduce 49 omitted # reduce 50 omitted # reduce 51 omitted module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 99 def _reduce_52( val, _values, result ) result = nil result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 102 def _reduce_53( val, _values, result ) result = Protobuf::Node::GroupNode.new(val[0], val[2], val[4], val[5]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 105 def _reduce_54( val, _values, result ) result = Protobuf::Node::FieldNode.new(val[0], val[1], val[2], val[4]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 107 def _reduce_55( val, _values, result ) result = Protobuf::Node::FieldNode.new(val[0], val[1], val[2], val[4], val[6]) result end .,., # reduce 56 omitted # reduce 57 omitted # reduce 58 omitted # reduce 59 omitted # reduce 60 omitted # reduce 61 omitted # reduce 62 omitted # reduce 63 omitted # reduce 64 omitted # reduce 65 omitted # reduce 66 omitted # reduce 67 omitted # reduce 68 omitted # reduce 69 omitted # reduce 70 omitted # reduce 71 omitted # reduce 72 omitted # reduce 73 omitted # reduce 74 omitted # reduce 75 omitted # reduce 76 omitted # reduce 77 omitted # reduce 78 omitted # reduce 79 omitted # reduce 80 omitted # reduce 81 omitted # reduce 82 omitted # reduce 83 omitted # reduce 84 omitted # reduce 85 omitted # reduce 86 omitted # reduce 87 omitted # reduce 88 omitted # reduce 89 omitted module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 112 def _reduce_90( val, _values, result ) result = val result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 114 def _reduce_91( val, _values, result ) result << val[2] result end .,., # reduce 92 omitted module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 118 def _reduce_93( val, _values, result ) result = [:default, val[2]] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 121 def _reduce_94( val, _values, result ) result = Protobuf::Node::ExtensionsNode.new(val[2].unshift(val[1])) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 124 def _reduce_95( val, _values, result ) result = [] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 126 def _reduce_96( val, _values, result ) result << val[1] result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 129 def _reduce_97( val, _values, result ) result = Protobuf::Node::ExtensionRangeNode.new(val[0]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 131 def _reduce_98( val, _values, result ) result = Protobuf::Node::ExtensionRangeNode.new(val[0], val[2]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 133 def _reduce_99( val, _values, result ) result = Protobuf::Node::ExtensionRangeNode.new(val[0], :max) result end .,., # reduce 100 omitted # reduce 101 omitted # reduce 102 omitted # reduce 103 omitted # reduce 104 omitted # reduce 105 omitted # reduce 106 omitted # reduce 107 omitted # reduce 108 omitted # reduce 109 omitted # reduce 110 omitted # reduce 111 omitted # reduce 112 omitted # reduce 113 omitted # reduce 114 omitted # reduce 115 omitted # reduce 116 omitted # reduce 117 omitted # reduce 118 omitted module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 144 def _reduce_119( val, _values, result ) result = val[1].unshift(val[0]) result end .,., module_eval <<'.,.,', 'lib/protobuf/compiler/proto.y', 146 def _reduce_120( val, _values, result ) result = val[1].unshift(val[0]) result end .,., # reduce 121 omitted # reduce 122 omitted # reduce 123 omitted # reduce 124 omitted # reduce 125 omitted # reduce 126 omitted # reduce 127 omitted # reduce 128 omitted def _reduce_none( val, _values, result ) result end end # class ProtoParser end # module Protobuf