# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.9 # from Racc grammer file "". # require 'racc/parser.rb' require 'strscan' require 'ddbcli/ddb-binary' module DynamoDB class Parser < Racc::Parser module_eval(<<'...end ddb-parser.y/module_eval...', 'ddb-parser.y', 493) KEYWORDS = %w( ADD ALL ALTER AND ASC BEGINS_WITH BETWEEN BINARY CREATE CONTAINS COUNT DELETE DESCRIBE DESC DROP FROM GET HASH INCLUDE INDEX INSERT INTO IN IS KEYS_ONLY LIKE LIMIT NEXT NOT NUMBER ORDER RANGE READ REGIONS SELECT SET SHOW STATUS STRING TABLES TABLE UPDATE VALUES WHERE WRITE USE ) KEYWORD_REGEXP = Regexp.compile("(?:#{KEYWORDS.join '|'})\\b", Regexp::IGNORECASE) def initialize(obj) src = obj.is_a?(IO) ? obj.read : obj.to_s @ss = StringScanner.new(src) end @@structs = {} def struct(name, attrs = {}) unless (clazz = @@structs[name]) clazz = attrs.empty? ? Struct.new(name.to_s) : Struct.new(name.to_s, *attrs.keys) @@structs[name] = clazz end obj = clazz.new attrs.each do |key, val| obj.send("#{key}=", val) end return obj end private :struct def scan tok = nil until @ss.eos? if (tok = @ss.scan /\s+/) # nothing to do elsif (tok = @ss.scan /(?:<>|!=|>=|<=|>|<|=)/) sym = { '<>' => :NE, '!=' => :NE, '>=' => :GE, '<=' => :LE, '>' => :GT, '<' => :LT, '=' => :EQ, }.fetch(tok) yield [sym, tok] elsif (tok = @ss.scan KEYWORD_REGEXP) yield [tok.upcase.to_sym, tok] elsif (tok = @ss.scan /NULL/i) yield [:NULL, nil] elsif (tok = @ss.scan /`(?:[^`]|``)*`/) yield [:IDENTIFIER, tok.slice(1...-1).gsub(/``/, '`')] elsif (tok = @ss.scan /x'(?:[^']|'')*'/) #' hex = tok.slice(2...-1).gsub(/''/, "'") bin = DynamoDB::Binary.new([hex].pack('H*')) yield [:BINARY_VALUE, bin] elsif (tok = @ss.scan /x"(?:[^"]|"")*"/) #" hex = tok.slice(2...-1).gsub(/""/, '"') bin = DynamoDB::Binary.new([hex].pack('H*')) yield [:BINARY_VALUE, bin] elsif (tok = @ss.scan /'(?:[^']|'')*'/) #' yield [:STRING_VALUE, tok.slice(1...-1).gsub(/''/, "'")] elsif (tok = @ss.scan /"(?:[^"]|"")*"/) #" yield [:STRING_VALUE, tok.slice(1...-1).gsub(/""/, '"')] elsif (tok = @ss.scan /\d+(?:\.\d+)?/) yield [:NUMBER_VALUE, (tok =~ /\./ ? tok.to_f : tok.to_i)] elsif (tok = @ss.scan /[,\(\)\*\/]/) yield [tok, tok] elsif (tok = @ss.scan /\|(?:.*)/) yield [:RUBY_SCRIPT, tok.slice(1..-1)] elsif (tok = @ss.scan /\!(?:.*)/) yield [:SHELL_SCRIPT, tok.slice(1..-1)] elsif (tok = @ss.scan /[-.0-9a-z_]*/i) yield [:IDENTIFIER, tok] else raise Racc::ParseError, ('parse error on value "%s"' % @ss.rest.inspect) end end yield [false, 'EOF'] end private :scan def parse yyparse self, :scan end def self.parse(obj) self.new(obj).parse end ...end ddb-parser.y/module_eval... ##### State transition tables begin ### racc_action_table = [ 3, 4, 18, 219, 150, 168, 220, 21, 150, 19, 20, 150, 177, 150, 50, 147, 150, 116, 97, 147, 116, 150, 147, 150, 147, 50, 150, 147, 22, 23, 24, 25, 147, 150, 147, 150, 26, 147, 150, 122, 48, 55, 97, 144, 147, 50, 147, 206, 54, 147, 99, 48, 178, 179, 27, 148, 149, 28, 29, 148, 149, 30, 148, 149, 148, 149, 50, 148, 149, 205, 68, 48, 148, 149, 148, 149, 184, 148, 149, 217, 47, 92, 218, 46, 148, 149, 148, 149, 184, 148, 149, 45, 48, 100, 192, 185, 186, 187, 188, 189, 191, 193, 196, 197, 198, 52, 209, 185, 186, 187, 188, 189, 103, 25, 34, 35, 82, 36, 37, 83, 283, 265, 53, 284, 258, 82, 257, 82, 83, 258, 83, 158, 215, 104, 159, 216, 84, 106, 85, 277, 278, 279, 130, 131, 132, 130, 131, 132, 130, 131, 132, 73, 74, 32, 33, 227, 226, 73, 74, 107, 109, 110, 111, 112, 91, 97, 90, 117, 95, 121, 122, 125, 126, 127, 128, 89, 88, 135, 136, 137, 122, 139, 140, 95, 87, 86, 152, 153, 156, 59, 80, 160, 161, 79, 163, 165, 168, 169, 170, 59, 172, 173, 78, 59, 121, 77, 183, 76, 199, 200, 201, 202, 203, 59, 75, 207, 71, 211, 109, 213, 122, 70, 69, 66, 156, 65, 150, 64, 63, 228, 230, 231, 232, 233, 95, 62, 61, 237, 135, 122, 59, 241, 242, 243, 244, 245, 246, 60, 249, 250, 59, 252, 165, 59, 57, 256, 56, 259, 43, 59, 42, 41, 264, 40, 268, 269, 270, 268, 272, 273, 39, 275, 38, 280, 282, 31, 285 ] racc_action_check = [ 0, 0, 0, 176, 117, 207, 176, 0, 153, 0, 0, 244, 150, 192, 26, 117, 208, 118, 76, 153, 93, 209, 244, 258, 192, 90, 256, 208, 0, 0, 0, 0, 209, 252, 258, 230, 0, 256, 190, 118, 26, 28, 93, 117, 252, 46, 230, 165, 28, 190, 77, 90, 150, 150, 0, 117, 117, 0, 0, 153, 153, 0, 244, 244, 192, 192, 25, 208, 208, 165, 46, 46, 209, 209, 258, 258, 156, 256, 256, 175, 25, 71, 175, 25, 252, 252, 230, 230, 168, 190, 190, 25, 25, 78, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 27, 168, 168, 168, 168, 168, 168, 82, 78, 18, 18, 62, 18, 18, 62, 281, 262, 27, 281, 262, 107, 247, 128, 107, 247, 128, 124, 174, 83, 124, 174, 63, 84, 63, 275, 275, 275, 273, 273, 273, 233, 233, 233, 106, 106, 106, 52, 52, 2, 2, 193, 193, 75, 75, 85, 86, 87, 88, 89, 70, 92, 69, 95, 96, 97, 99, 100, 103, 104, 105, 68, 67, 108, 109, 110, 111, 112, 113, 116, 66, 65, 119, 121, 122, 123, 61, 126, 127, 59, 129, 134, 135, 136, 137, 138, 139, 140, 56, 151, 152, 55, 154, 54, 158, 159, 160, 161, 163, 164, 53, 166, 51, 169, 170, 172, 173, 49, 47, 45, 183, 44, 191, 41, 40, 198, 199, 201, 202, 203, 72, 38, 37, 211, 212, 213, 214, 216, 218, 220, 224, 227, 229, 35, 231, 232, 34, 236, 238, 239, 31, 246, 29, 251, 24, 253, 23, 22, 259, 21, 264, 266, 268, 269, 270, 272, 20, 274, 19, 279, 280, 1, 284 ] racc_action_pointer = [ -2, 275, 151, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 109, 266, 260, 257, 255, 250, 248, 56, 4, 95, 14, 195, nil, 254, nil, nil, 195, 240, nil, 230, 225, nil, 218, 217, nil, nil, 191, 210, 35, 185, nil, 204, nil, 182, 94, 204, 197, 171, 192, nil, nil, 169, nil, 180, 94, 123, nil, 175, 148, 142, 162, 142, 154, 71, 224, nil, nil, 100, -21, 40, 80, nil, nil, nil, 89, 110, 127, 149, 148, 147, 152, 127, 15, nil, 126, 3, nil, 144, 158, 159, nil, 131, 161, nil, nil, 148, 149, 160, 129, 103, 138, 152, 145, 141, 167, 148, nil, nil, 173, -9, 0, 146, nil, 164, 178, 134, 117, nil, 174, 175, 105, 178, nil, nil, nil, nil, 142, 186, 184, 188, 144, 166, 191, nil, nil, nil, nil, nil, nil, nil, nil, nil, -12, 148, 194, -5, 166, nil, 53, nil, 146, 199, 185, 189, nil, 195, 158, 15, 175, nil, 65, 207, 206, nil, 209, 181, 118, 65, -11, nil, nil, nil, nil, nil, nil, 214, nil, nil, nil, nil, nil, nil, 25, 213, 0, 104, nil, nil, nil, nil, 179, 217, nil, 208, 209, 223, nil, nil, nil, -5, 3, 8, nil, 223, 199, 200, 185, nil, 217, nil, 178, nil, 178, nil, nil, nil, 204, nil, nil, 193, nil, 229, 22, 224, 225, 126, nil, nil, 211, nil, 199, 198, nil, nil, nil, nil, -2, nil, 242, 112, nil, nil, nil, 239, 20, 204, nil, nil, 13, nil, 10, 245, nil, nil, 107, nil, 238, nil, 248, nil, 256, 241, 255, nil, 259, 123, 257, 112, nil, nil, nil, 260, 264, 106, nil, nil, 266, nil ] racc_action_default = [ -131, -131, -1, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, -114, -131, -2, -3, -90, -131, -21, -131, -131, -24, -131, -131, -45, -46, -131, -131, -131, -131, -53, -54, -55, -131, -131, -131, -131, -131, -131, 286, -19, -131, -20, -131, -131, -131, -44, -131, -131, -131, -131, -131, -131, -131, -131, -94, -95, -131, -131, -131, -131, -91, -22, -23, -131, -131, -131, -131, -57, -131, -131, -131, -131, -56, -131, -131, -96, -131, -131, -131, -103, -72, -131, -106, -107, -131, -131, -131, -131, -26, -59, -131, -131, -72, -131, -131, -52, -92, -131, -131, -72, -99, -100, -131, -131, -90, -131, -108, -131, -131, -131, -131, -31, -32, -33, -27, -87, -131, -131, -131, -90, -131, -131, -97, -98, -115, -116, -117, -118, -119, -120, -121, -131, -90, -131, -131, -73, -74, -131, -104, -131, -131, -131, -131, -25, -28, -90, -131, -60, -61, -131, -131, -57, -49, -131, -72, -131, -131, -131, -125, -127, -129, -93, -101, -102, -131, -66, -67, -68, -69, -70, -71, -131, -131, -131, -131, -80, -81, -82, -83, -131, -131, -109, -131, -131, -131, -47, -88, -89, -131, -131, -131, -65, -131, -59, -72, -90, -122, -131, -123, -131, -124, -131, -75, -76, -77, -131, -79, -85, -131, -84, -105, -131, -131, -131, -131, -62, -63, -131, -58, -87, -90, -51, -126, -128, -130, -131, -86, -131, -131, -112, -34, -35, -131, -131, -90, -50, -78, -131, -110, -131, -29, -64, -48, -131, -113, -131, -111, -30, -36, -131, -131, -131, -37, -131, -131, -131, -131, -38, -39, -40, -131, -131, -131, -42, -41, -131, -43 ] racc_goto_table = [ 58, 129, 143, 164, 123, 134, 108, 12, 11, 167, 81, 155, 120, 247, 44, 51, 138, 93, 194, 72, 98, 267, 1, 151, 276, 281, 271, 105, 17, 16, 210, 266, 15, 14, 166, 67, 114, 115, 182, 262, 13, 118, 96, 208, 10, 9, 154, 8, 190, 223, 225, 195, 7, 6, 141, 133, 142, 119, 5, 124, 229, 2, 174, 175, 176, nil, nil, 181, nil, nil, nil, nil, 221, nil, nil, 222, 162, 224, 214, 113, nil, 234, nil, nil, nil, 102, 101, nil, nil, 157, 212, nil, nil, 235, 236, nil, nil, nil, nil, nil, nil, nil, nil, nil, 171, nil, nil, 253, nil, 238, nil, nil, nil, nil, nil, nil, nil, 180, 239, nil, nil, nil, nil, nil, nil, nil, nil, nil, 251, 255, 204, nil, nil, nil, nil, nil, nil, 260, nil, nil, nil, nil, nil, 263, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 274, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 240, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 254, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 261 ] racc_goto_check = [ 16, 19, 34, 27, 28, 26, 25, 10, 9, 32, 17, 37, 47, 50, 24, 24, 28, 43, 35, 42, 29, 21, 1, 28, 22, 23, 21, 18, 15, 14, 35, 20, 13, 12, 31, 24, 29, 29, 34, 50, 11, 43, 42, 33, 8, 7, 36, 6, 38, 39, 40, 41, 5, 4, 44, 17, 45, 46, 3, 48, 49, 2, 52, 53, 54, nil, nil, 47, nil, nil, nil, nil, 37, nil, nil, 34, 17, 34, 28, 24, nil, 32, nil, nil, nil, 10, 9, nil, nil, 16, 25, nil, nil, 34, 34, nil, nil, nil, nil, nil, nil, nil, nil, nil, 16, nil, nil, 27, nil, 26, nil, nil, nil, nil, nil, nil, nil, 16, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, 19, 34, 16, nil, nil, nil, nil, nil, nil, 34, nil, nil, nil, nil, nil, 34, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 19, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 16, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 16, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 16 ] racc_goto_pointer = [ nil, 22, 61, 58, 53, 52, 47, 45, 44, 8, 7, 40, 33, 32, 29, 28, -34, -52, -57, -105, -233, -243, -251, -255, -11, -80, -103, -131, -95, -56, nil, -101, -126, -125, -115, -138, -76, -111, -108, -142, -143, -105, -33, -55, -62, -61, -40, -85, -41, -139, -217, nil, -88, -87, -86 ] racc_goto_default = [ 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, 49, nil, nil, nil, 248, nil, nil, nil, nil, 146, nil, nil, nil, nil, 94, nil, nil, nil, nil, nil, nil, 145, nil, nil, nil ] racc_reduce_table = [ 0, 0, :racc_error, 1, 67, :_reduce_1, 2, 67, :_reduce_2, 2, 67, :_reduce_3, 1, 67, :_reduce_4, 1, 67, :_reduce_5, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 3, 69, :_reduce_19, 3, 69, :_reduce_20, 2, 69, :_reduce_21, 4, 69, :_reduce_22, 4, 70, :_reduce_23, 2, 71, :_reduce_24, 7, 72, :_reduce_25, 5, 72, :_reduce_26, 6, 72, :_reduce_27, 3, 84, :_reduce_28, 7, 84, :_reduce_29, 9, 84, :_reduce_30, 1, 85, :_reduce_31, 1, 85, :_reduce_32, 1, 85, :_reduce_33, 7, 83, :_reduce_34, 7, 83, :_reduce_35, 1, 86, :_reduce_36, 3, 86, :_reduce_37, 7, 87, :_reduce_38, 1, 88, :_reduce_39, 1, 88, :_reduce_40, 4, 88, :_reduce_41, 1, 89, :_reduce_42, 3, 89, :_reduce_43, 3, 73, :_reduce_44, 2, 74, :_reduce_45, 2, 74, :_reduce_46, 8, 75, :_reduce_47, 11, 75, :_reduce_48, 7, 76, :_reduce_49, 10, 76, :_reduce_50, 9, 76, :_reduce_51, 5, 77, :_reduce_52, 1, 90, :_reduce_53, 1, 90, :_reduce_54, 1, 96, :_reduce_55, 3, 96, :_reduce_56, 0, 91, :_reduce_none, 5, 91, :_reduce_58, 0, 92, :_reduce_none, 2, 92, :_reduce_60, 1, 97, :_reduce_61, 3, 97, :_reduce_62, 3, 98, :_reduce_63, 5, 98, :_reduce_64, 1, 99, :_reduce_none, 1, 101, :_reduce_66, 1, 101, :_reduce_67, 1, 101, :_reduce_68, 1, 101, :_reduce_69, 1, 101, :_reduce_70, 1, 101, :_reduce_none, 0, 94, :_reduce_none, 2, 94, :_reduce_73, 1, 102, :_reduce_74, 3, 102, :_reduce_75, 3, 103, :_reduce_76, 3, 103, :_reduce_77, 5, 103, :_reduce_78, 3, 103, :_reduce_79, 1, 104, :_reduce_none, 1, 104, :_reduce_none, 1, 104, :_reduce_82, 1, 107, :_reduce_none, 2, 107, :_reduce_84, 1, 106, :_reduce_85, 2, 106, :_reduce_86, 0, 93, :_reduce_none, 2, 93, :_reduce_88, 2, 93, :_reduce_89, 0, 82, :_reduce_none, 2, 82, :_reduce_91, 5, 78, :_reduce_92, 7, 78, :_reduce_93, 1, 108, :_reduce_94, 1, 108, :_reduce_95, 1, 109, :_reduce_96, 3, 109, :_reduce_97, 3, 110, :_reduce_98, 2, 95, :_reduce_99, 1, 112, :_reduce_100, 3, 112, :_reduce_101, 3, 113, :_reduce_102, 4, 79, :_reduce_103, 6, 79, :_reduce_104, 8, 80, :_reduce_105, 4, 80, :_reduce_106, 4, 80, :_reduce_107, 1, 114, :_reduce_108, 3, 114, :_reduce_109, 3, 115, :_reduce_110, 5, 115, :_reduce_111, 1, 116, :_reduce_112, 3, 116, :_reduce_113, 1, 81, :_reduce_114, 1, 111, :_reduce_none, 1, 111, :_reduce_none, 1, 100, :_reduce_none, 1, 100, :_reduce_none, 1, 117, :_reduce_none, 1, 117, :_reduce_none, 1, 117, :_reduce_none, 3, 105, :_reduce_122, 3, 105, :_reduce_123, 3, 105, :_reduce_124, 1, 118, :_reduce_125, 3, 118, :_reduce_126, 1, 119, :_reduce_127, 3, 119, :_reduce_128, 1, 120, :_reduce_129, 3, 120, :_reduce_130 ] racc_reduce_n = 131 racc_shift_n = 286 racc_token_table = { false => 0, :error => 1, :RUBY_SCRIPT => 2, :SHELL_SCRIPT => 3, :SHOW => 4, :TABLES => 5, :TABLE => 6, :STATUS => 7, :REGIONS => 8, :CREATE => 9, :IDENTIFIER => 10, :ALTER => 11, :USE => 12, "(" => 13, ")" => 14, :LIKE => 15, :HASH => 16, "," => 17, :RANGE => 18, :STRING => 19, :NUMBER => 20, :BINARY => 21, :READ => 22, :EQ => 23, :NUMBER_VALUE => 24, :WRITE => 25, :INDEX => 26, :ALL => 27, :KEYS_ONLY => 28, :INCLUDE => 29, :DROP => 30, :DESCRIBE => 31, :DESC => 32, :SELECT => 33, :FROM => 34, :COUNT => 35, "*" => 36, "/" => 37, :GET => 38, :WHERE => 39, :AND => 40, :BETWEEN => 41, :LE => 42, :LT => 43, :GE => 44, :GT => 45, :BEGINS_WITH => 46, :IN => 47, :IS => 48, :NE => 49, :CONTAINS => 50, :NOT => 51, :NULL => 52, :ORDER => 53, :ASC => 54, :LIMIT => 55, :UPDATE => 56, :SET => 57, :ADD => 58, :DELETE => 59, :INSERT => 60, :INTO => 61, :VALUES => 62, :NEXT => 63, :STRING_VALUE => 64, :BINARY_VALUE => 65 } racc_nt_base = 66 racc_use_result_var = false 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", "RUBY_SCRIPT", "SHELL_SCRIPT", "SHOW", "TABLES", "TABLE", "STATUS", "REGIONS", "CREATE", "IDENTIFIER", "ALTER", "USE", "\"(\"", "\")\"", "LIKE", "HASH", "\",\"", "RANGE", "STRING", "NUMBER", "BINARY", "READ", "EQ", "NUMBER_VALUE", "WRITE", "INDEX", "ALL", "KEYS_ONLY", "INCLUDE", "DROP", "DESCRIBE", "DESC", "SELECT", "FROM", "COUNT", "\"*\"", "\"/\"", "GET", "WHERE", "AND", "BETWEEN", "LE", "LT", "GE", "GT", "BEGINS_WITH", "IN", "IS", "NE", "CONTAINS", "NOT", "NULL", "ORDER", "ASC", "LIMIT", "UPDATE", "SET", "ADD", "DELETE", "INSERT", "INTO", "VALUES", "NEXT", "STRING_VALUE", "BINARY_VALUE", "$start", "stmt", "query", "show_stmt", "alter_stmt", "use_stmt", "create_stmt", "drop_stmt", "describe_stmt", "select_stmt", "scan_stmt", "get_stmt", "update_stmt", "delete_stmt", "insert_stmt", "next_stmt", "limit_clause", "capacity_clause", "create_definition", "attr_type_list", "index_definition_list", "index_definition", "index_type_definition", "index_include_attr_list", "attrs_to_get", "use_index_clause", "select_where_clause", "order_clause", "scan_where_clause", "update_where_clause", "attrs_list", "select_expr_list", "select_expr", "select_operator", "value", "common_operator", "scan_expr_list", "scan_expr", "scan_operator", "value_list", "null_operator", "contains_operator", "set_or_add", "attr_to_update_list", "attr_to_update", "value_or_null", "update_expr_list", "update_expr", "attr_to_insert_list", "insert_value_clause", "insert_value_list", "single_value", "number_list", "string_list", "binary_list" ] Racc_debug_parser = false ##### State transition tables end ##### # reduce 0 omitted module_eval(<<'.,.,', 'ddb-parser.y', 5) def _reduce_1(val, _values) [val[0], nil, nil] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 9) def _reduce_2(val, _values) [val[0], :ruby, val[1]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 13) def _reduce_3(val, _values) [val[0], :shell, val[1]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 17) def _reduce_4(val, _values) [struct(:NULL), :ruby, val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 21) def _reduce_5(val, _values) [struct(:NULL), :shell, val[0]] end .,., # reduce 6 omitted # reduce 7 omitted # reduce 8 omitted # reduce 9 omitted # reduce 10 omitted # reduce 11 omitted # reduce 12 omitted # reduce 13 omitted # reduce 14 omitted # reduce 15 omitted # reduce 16 omitted # reduce 17 omitted # reduce 18 omitted module_eval(<<'.,.,', 'ddb-parser.y', 40) def _reduce_19(val, _values) struct(:SHOW_TABLES, :limit => val[2]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 44) def _reduce_20(val, _values) struct(:SHOW_TABLE_STATUS) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 48) def _reduce_21(val, _values) struct(:SHOW_REGIONS) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 52) def _reduce_22(val, _values) struct(:SHOW_CREATE_TABLE, :table => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 57) def _reduce_23(val, _values) struct(:ALTER_TABLE, :table => val[2], :capacity => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 62) def _reduce_24(val, _values) struct(:USE, :endpoint_or_region => val[1]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 67) def _reduce_25(val, _values) struct(:CREATE, val[4].merge(:table => val[2], :capacity => val[6])) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 71) def _reduce_26(val, _values) struct(:CREATE_LIKE, :table => val[2], :like => val[4], :capacity => nil) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 75) def _reduce_27(val, _values) struct(:CREATE_LIKE, :table => val[2], :like => val[4], :capacity => val[5]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 80) def _reduce_28(val, _values) {:hash => {:name => val[0], :type => val[1]}, :range => nil, :indices => nil} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 84) def _reduce_29(val, _values) {:hash => {:name => val[0], :type => val[1]}, :range => {:name => val[4], :type => val[5]}, :indices => nil} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 88) def _reduce_30(val, _values) {:hash => {:name => val[0], :type => val[1]}, :range => {:name => val[4], :type => val[5]}, :indices => val[8]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 93) def _reduce_31(val, _values) 'S' end .,., module_eval(<<'.,.,', 'ddb-parser.y', 97) def _reduce_32(val, _values) 'N' end .,., module_eval(<<'.,.,', 'ddb-parser.y', 101) def _reduce_33(val, _values) 'B' end .,., module_eval(<<'.,.,', 'ddb-parser.y', 106) def _reduce_34(val, _values) {:read => val[2], :write => val[6]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 110) def _reduce_35(val, _values) {:read => val[6], :write => val[2]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 115) def _reduce_36(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 119) def _reduce_37(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 124) def _reduce_38(val, _values) {:name => val[1], :key => val[3], :type => val[4], :projection => val[6]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 129) def _reduce_39(val, _values) {:type => 'ALL'} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 133) def _reduce_40(val, _values) {:type => 'KEYS_ONLY'} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 137) def _reduce_41(val, _values) {:type => 'INCLUDE', :attrs => val[2]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 142) def _reduce_42(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 146) def _reduce_43(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 151) def _reduce_44(val, _values) struct(:DROP, :table => val[2]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 156) def _reduce_45(val, _values) struct(:DESCRIBE, :table => val[1]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 160) def _reduce_46(val, _values) struct(:DESCRIBE, :table => val[1]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 165) def _reduce_47(val, _values) struct(:SELECT, :attrs => val[1], :table => val[3], :index => val[4], :conds => val[5], :order_asc => val[6], :limit => val[7], :count => false) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 169) def _reduce_48(val, _values) struct(:SELECT, :attrs => [], :table => val[6], :index => val[7], :conds => val[8], :order_asc => val[9], :limit => val[10], :count => true) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 174) def _reduce_49(val, _values) struct(:SCAN, :attrs => val[2], :table => val[4], :conds => val[5], :limit => val[6], :count => false, :segment => nil, :total_segments => nil) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 178) def _reduce_50(val, _values) struct(:SCAN, :attrs => [], :table => val[7], :conds => val[8], :limit => val[9], :count => true, :segment => nil, :total_segments => nil) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 182) def _reduce_51(val, _values) struct(:SCAN, :attrs => val[4], :table => val[6], :conds => val[7], :limit => val[8], :count => false, :segment => val[1], :total_segments => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 187) def _reduce_52(val, _values) struct(:GET, :attrs => val[1], :table => val[3], :conds => val[4]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 192) def _reduce_53(val, _values) [] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 196) def _reduce_54(val, _values) val[0] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 201) def _reduce_55(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 205) def _reduce_56(val, _values) val[0] + [val[2]] end .,., # reduce 57 omitted module_eval(<<'.,.,', 'ddb-parser.y', 211) def _reduce_58(val, _values) val[3] end .,., # reduce 59 omitted module_eval(<<'.,.,', 'ddb-parser.y', 217) def _reduce_60(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 222) def _reduce_61(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 226) def _reduce_62(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 231) def _reduce_63(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2]]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 235) def _reduce_64(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2], val[4]]] end .,., # reduce 65 omitted module_eval(<<'.,.,', 'ddb-parser.y', 242) def _reduce_66(val, _values) :EQ end .,., module_eval(<<'.,.,', 'ddb-parser.y', 246) def _reduce_67(val, _values) :LE end .,., module_eval(<<'.,.,', 'ddb-parser.y', 250) def _reduce_68(val, _values) :LT end .,., module_eval(<<'.,.,', 'ddb-parser.y', 254) def _reduce_69(val, _values) :GE end .,., module_eval(<<'.,.,', 'ddb-parser.y', 258) def _reduce_70(val, _values) :GT end .,., # reduce 71 omitted # reduce 72 omitted module_eval(<<'.,.,', 'ddb-parser.y', 265) def _reduce_73(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 270) def _reduce_74(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 274) def _reduce_75(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 279) def _reduce_76(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2]]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 283) def _reduce_77(val, _values) [val[0], val[1].to_s.upcase.to_sym, val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 287) def _reduce_78(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2], val[4]]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 291) def _reduce_79(val, _values) [val[0], val[2].to_s.upcase.to_sym, []] end .,., # reduce 80 omitted # reduce 81 omitted module_eval(<<'.,.,', 'ddb-parser.y', 297) def _reduce_82(val, _values) :NE end .,., # reduce 83 omitted module_eval(<<'.,.,', 'ddb-parser.y', 303) def _reduce_84(val, _values) :NOT_CONTAINS end .,., module_eval(<<'.,.,', 'ddb-parser.y', 307) def _reduce_85(val, _values) :NULL end .,., module_eval(<<'.,.,', 'ddb-parser.y', 311) def _reduce_86(val, _values) :NOT_NULL end .,., # reduce 87 omitted module_eval(<<'.,.,', 'ddb-parser.y', 317) def _reduce_88(val, _values) true end .,., module_eval(<<'.,.,', 'ddb-parser.y', 321) def _reduce_89(val, _values) false end .,., # reduce 90 omitted module_eval(<<'.,.,', 'ddb-parser.y', 327) def _reduce_91(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 332) def _reduce_92(val, _values) struct(:UPDATE, :table => val[1], :action => val[2], :attrs => val[3], :conds => val[4]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 336) def _reduce_93(val, _values) struct(:UPDATE_ALL, :table => val[2], :action => val[3], :attrs => val[4], :conds => val[5], :limit => val[6]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 341) def _reduce_94(val, _values) :PUT end .,., module_eval(<<'.,.,', 'ddb-parser.y', 345) def _reduce_95(val, _values) :ADD end .,., module_eval(<<'.,.,', 'ddb-parser.y', 350) def _reduce_96(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 354) def _reduce_97(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 359) def _reduce_98(val, _values) [val[0], val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 364) def _reduce_99(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 369) def _reduce_100(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 373) def _reduce_101(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 378) def _reduce_102(val, _values) [val[0], val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 383) def _reduce_103(val, _values) struct(:DELETE, :table => val[2], :conds => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 387) def _reduce_104(val, _values) struct(:DELETE_ALL, :table => val[3], :conds => val[4], :limit => val[5]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 392) def _reduce_105(val, _values) struct(:INSERT, :table => val[2], :attrs => val[4], :values => val[7]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 396) def _reduce_106(val, _values) struct(:INSERT_SELECT, :table => val[2], :select => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 400) def _reduce_107(val, _values) struct(:INSERT_SCAN, :table => val[2], :select => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 405) def _reduce_108(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 409) def _reduce_109(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 414) def _reduce_110(val, _values) [val[1]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 418) def _reduce_111(val, _values) val[0] + [val[3]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 423) def _reduce_112(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 427) def _reduce_113(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 432) def _reduce_114(val, _values) struct(:NEXT) end .,., # reduce 115 omitted # reduce 116 omitted # reduce 117 omitted # reduce 118 omitted # reduce 119 omitted # reduce 120 omitted # reduce 121 omitted module_eval(<<'.,.,', 'ddb-parser.y', 446) def _reduce_122(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 450) def _reduce_123(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 454) def _reduce_124(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 459) def _reduce_125(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 463) def _reduce_126(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 468) def _reduce_127(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 472) def _reduce_128(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 477) def _reduce_129(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 481) def _reduce_130(val, _values) val[0] + [val[2]] end .,., def _reduce_none(val, _values) val[0] end end # class Parser end # DynamoDB