# # 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', 461) 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 LIMIT NEXT NOT NUMBER ORDER RANGE READ REGIONS SELECT SET SHOW STRING TABLES TABLE UPDATE VALUES WHERE WRITE USE ) KEYWORD_REGEXP = Regexp.compile("(?:#{KEYWORDS.join '|'})", 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 = [ 16, 136, 51, 19, 149, 136, 17, 18, 136, 50, 136, 133, 136, 84, 46, 133, 191, 89, 133, 136, 133, 91, 133, 136, 20, 21, 22, 23, 136, 133, 136, 24, 48, 133, 136, 162, 136, 190, 133, 44, 133, 46, 130, 104, 133, 199, 133, 200, 49, 25, 134, 135, 26, 27, 134, 135, 28, 134, 135, 134, 135, 134, 135, 92, 89, 63, 44, 93, 134, 135, 169, 94, 134, 135, 163, 164, 96, 134, 135, 134, 135, 104, 46, 134, 135, 134, 135, 177, 170, 171, 172, 173, 174, 176, 178, 181, 182, 183, 43, 169, 76, 76, 110, 77, 77, 98, 42, 44, 118, 119, 120, 118, 119, 120, 211, 210, 194, 170, 171, 172, 173, 174, 248, 201, 241, 202, 240, 266, 241, 267, 32, 33, 34, 118, 119, 120, 260, 261, 262, 144, 203, 145, 204, 67, 68, 30, 31, 67, 68, 99, 100, 101, 89, 83, 105, 87, 109, 110, 113, 114, 115, 116, 82, 122, 123, 124, 110, 126, 87, 81, 80, 138, 139, 142, 55, 79, 146, 147, 78, 87, 151, 154, 155, 156, 55, 158, 74, 55, 109, 73, 168, 72, 184, 185, 186, 187, 188, 55, 71, 192, 70, 196, 98, 198, 69, 65, 64, 142, 61, 136, 60, 59, 212, 214, 215, 216, 217, 154, 58, 57, 221, 122, 110, 224, 225, 226, 227, 228, 229, 56, 232, 233, 55, 235, 151, 55, 53, 239, 52, 242, 40, 55, 39, 38, 247, 37, 251, 252, 253, 251, 255, 256, 36, 258, 35, 263, 265, 29, 268 ] racc_action_check = [ 0, 139, 26, 0, 117, 105, 0, 0, 175, 26, 177, 139, 193, 65, 24, 105, 151, 70, 175, 227, 177, 71, 193, 241, 0, 0, 0, 0, 239, 227, 235, 0, 25, 241, 214, 136, 194, 151, 239, 24, 235, 43, 105, 85, 214, 159, 194, 159, 25, 0, 139, 139, 0, 0, 105, 105, 0, 175, 175, 177, 177, 193, 193, 72, 85, 43, 43, 76, 227, 227, 142, 77, 241, 241, 136, 136, 78, 239, 239, 235, 235, 106, 23, 214, 214, 194, 194, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 23, 154, 116, 57, 106, 116, 57, 79, 23, 23, 217, 217, 217, 256, 256, 256, 178, 178, 154, 154, 154, 154, 154, 154, 245, 160, 245, 160, 230, 264, 230, 264, 16, 16, 16, 96, 96, 96, 258, 258, 258, 112, 161, 112, 161, 48, 48, 2, 2, 69, 69, 80, 81, 82, 84, 64, 87, 88, 89, 91, 92, 93, 94, 95, 63, 97, 98, 99, 100, 101, 104, 62, 61, 107, 109, 110, 111, 60, 114, 115, 58, 66, 121, 122, 123, 124, 125, 126, 56, 137, 138, 55, 140, 52, 144, 145, 146, 147, 149, 150, 51, 152, 50, 155, 156, 158, 49, 47, 45, 168, 42, 176, 41, 38, 183, 184, 186, 187, 188, 192, 37, 35, 196, 197, 198, 200, 202, 204, 208, 211, 213, 34, 215, 216, 32, 220, 222, 223, 29, 229, 27, 234, 22, 236, 21, 20, 242, 19, 247, 249, 251, 252, 253, 255, 18, 257, 17, 262, 263, 1, 267 ] racc_action_pointer = [ -4, 257, 143, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 125, 246, 243, 237, 235, 233, 231, 73, 5, 23, -23, 180, nil, 236, nil, nil, 180, nil, 221, 210, nil, 209, 202, nil, nil, 178, 196, 32, nil, 191, nil, 173, 89, 195, 191, 166, 182, nil, nil, 167, 177, 81, 166, nil, 166, 136, 137, 150, 144, 4, 170, nil, nil, 93, -19, 12, 51, nil, nil, nil, 46, 50, 67, 94, 136, 141, 117, nil, 116, 28, nil, 133, 146, 147, nil, 121, 149, 137, 138, 148, 116, 127, 140, 133, 130, 154, nil, nil, 159, -7, 66, 134, nil, 151, 164, 122, 126, nil, 161, 162, 80, -10, nil, nil, nil, 130, 172, 170, 174, 132, 153, nil, nil, nil, nil, nil, nil, nil, nil, nil, 13, 135, 179, -11, 153, nil, 49, nil, 133, 184, 171, 175, nil, 181, 145, -14, 162, nil, 78, 192, 191, nil, 194, 32, 110, 127, nil, nil, nil, nil, nil, nil, 198, nil, nil, nil, nil, nil, nil, -4, 197, -2, 66, nil, nil, nil, nil, 165, 201, nil, 193, 194, 207, nil, nil, nil, 208, 0, 24, nil, 207, 185, 186, nil, 201, nil, 163, nil, 163, nil, nil, nil, 189, nil, nil, 178, nil, 213, 22, 208, 209, 91, nil, nil, 196, nil, 184, 183, nil, nil, nil, 7, nil, 225, 113, nil, nil, nil, 223, 18, 189, nil, nil, 16, nil, 11, 229, nil, nil, 109, nil, 222, nil, 232, nil, 239, 225, 238, nil, 242, 94, 240, 111, nil, nil, nil, 243, 247, 114, nil, nil, 249, nil ] racc_action_default = [ -123, -123, -1, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, -106, -123, -2, -3, -84, -18, -123, -123, -21, -123, -123, -40, -41, -123, -123, -123, -47, -48, -49, -123, -123, -123, -123, -123, -123, 269, -17, -123, -123, -123, -123, -39, -123, -123, -123, -123, -123, -123, -123, -88, -89, -123, -123, -123, -123, -85, -19, -20, -123, -123, -123, -51, -123, -123, -123, -50, -123, -123, -90, -123, -123, -123, -97, -66, -123, -123, -123, -123, -123, -53, -123, -123, -66, -123, -46, -86, -123, -123, -66, -93, -94, -123, -123, -84, -123, -100, -123, -123, -123, -123, -26, -27, -28, -81, -123, -123, -123, -84, -123, -91, -92, -107, -108, -109, -110, -111, -112, -113, -123, -84, -123, -123, -67, -68, -123, -98, -123, -123, -123, -123, -22, -23, -84, -123, -54, -55, -123, -123, -51, -44, -123, -123, -123, -123, -117, -119, -121, -87, -95, -96, -123, -60, -61, -62, -63, -64, -65, -123, -123, -123, -123, -74, -75, -76, -77, -123, -123, -101, -123, -123, -123, -42, -82, -83, -123, -123, -123, -59, -123, -53, -66, -114, -123, -115, -123, -116, -123, -69, -70, -71, -123, -73, -79, -123, -78, -99, -123, -123, -123, -123, -56, -57, -123, -52, -81, -84, -118, -120, -122, -123, -80, -123, -123, -104, -29, -30, -123, -123, -84, -45, -72, -123, -102, -123, -24, -58, -43, -123, -105, -123, -103, -25, -31, -123, -123, -123, -32, -123, -123, -123, -123, -33, -34, -35, -123, -123, -123, -37, -36, -123, -38 ] racc_goto_table = [ 54, 117, 129, 111, 121, 150, 97, 153, 75, 108, 141, 85, 125, 230, 66, 90, 179, 250, 137, 41, 47, 1, 254, 249, 15, 259, 264, 14, 195, 102, 103, 13, 12, 106, 95, 88, 167, 11, 245, 62, 10, 152, 9, 193, 8, 7, 140, 6, 175, 207, 209, 180, 5, 4, 127, 128, 107, 3, 166, 112, 213, 2, 159, 160, 161, nil, nil, 148, 205, nil, nil, nil, 206, nil, 208, nil, nil, 218, nil, 143, nil, nil, nil, 197, nil, nil, nil, nil, nil, nil, 219, 220, nil, 157, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 222, 165, 236, nil, nil, nil, 223, nil, nil, nil, nil, nil, nil, nil, 189, nil, nil, nil, 234, nil, 238, nil, nil, nil, nil, nil, nil, nil, 243, nil, nil, nil, nil, nil, 246, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 257, 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, 237, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 244 ] racc_goto_check = [ 16, 19, 34, 28, 26, 27, 25, 32, 17, 47, 37, 43, 28, 50, 42, 29, 35, 21, 28, 24, 24, 1, 21, 20, 15, 22, 23, 14, 35, 29, 29, 13, 12, 43, 18, 42, 34, 11, 50, 24, 10, 31, 9, 33, 8, 7, 36, 6, 38, 39, 40, 41, 5, 4, 44, 45, 46, 3, 47, 48, 49, 2, 52, 53, 54, nil, nil, 17, 37, nil, nil, nil, 34, nil, 34, nil, nil, 32, nil, 16, nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, 34, 34, nil, 16, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 26, 16, 27, nil, nil, nil, 28, nil, nil, nil, nil, nil, nil, nil, 16, nil, nil, nil, 19, nil, 34, nil, 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, 19, 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, 16, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 16 ] racc_goto_pointer = [ nil, 21, 61, 57, 53, 52, 47, 45, 44, 42, 40, 37, 32, 31, 27, 24, -32, -49, -44, -95, -224, -230, -233, -237, -4, -73, -93, -116, -88, -55, nil, -81, -115, -111, -103, -126, -64, -100, -94, -127, -128, -91, -34, -55, -50, -50, -33, -80, -33, -124, -201, nil, -74, -73, -72 ] 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, 45, nil, nil, nil, 231, nil, nil, nil, nil, 132, nil, nil, nil, nil, 86, nil, nil, nil, nil, nil, nil, 131, nil, nil, nil ] racc_reduce_table = [ 0, 0, :racc_error, 1, 64, :_reduce_1, 2, 64, :_reduce_2, 2, 64, :_reduce_3, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 3, 66, :_reduce_17, 2, 66, :_reduce_18, 4, 66, :_reduce_19, 4, 67, :_reduce_20, 2, 68, :_reduce_21, 7, 69, :_reduce_22, 3, 81, :_reduce_23, 7, 81, :_reduce_24, 9, 81, :_reduce_25, 1, 82, :_reduce_26, 1, 82, :_reduce_27, 1, 82, :_reduce_28, 7, 80, :_reduce_29, 7, 80, :_reduce_30, 1, 83, :_reduce_31, 3, 83, :_reduce_32, 7, 84, :_reduce_33, 1, 85, :_reduce_34, 1, 85, :_reduce_35, 4, 85, :_reduce_36, 1, 86, :_reduce_37, 3, 86, :_reduce_38, 3, 70, :_reduce_39, 2, 71, :_reduce_40, 2, 71, :_reduce_41, 8, 72, :_reduce_42, 11, 72, :_reduce_43, 7, 73, :_reduce_44, 10, 73, :_reduce_45, 5, 74, :_reduce_46, 1, 87, :_reduce_47, 1, 87, :_reduce_48, 1, 93, :_reduce_49, 3, 93, :_reduce_50, 0, 88, :_reduce_none, 5, 88, :_reduce_52, 0, 89, :_reduce_none, 2, 89, :_reduce_54, 1, 94, :_reduce_55, 3, 94, :_reduce_56, 3, 95, :_reduce_57, 5, 95, :_reduce_58, 1, 96, :_reduce_none, 1, 98, :_reduce_60, 1, 98, :_reduce_61, 1, 98, :_reduce_62, 1, 98, :_reduce_63, 1, 98, :_reduce_64, 1, 98, :_reduce_none, 0, 91, :_reduce_none, 2, 91, :_reduce_67, 1, 99, :_reduce_68, 3, 99, :_reduce_69, 3, 100, :_reduce_70, 3, 100, :_reduce_71, 5, 100, :_reduce_72, 3, 100, :_reduce_73, 1, 101, :_reduce_none, 1, 101, :_reduce_none, 1, 101, :_reduce_76, 1, 104, :_reduce_none, 2, 104, :_reduce_78, 1, 103, :_reduce_79, 2, 103, :_reduce_80, 0, 90, :_reduce_none, 2, 90, :_reduce_82, 2, 90, :_reduce_83, 0, 79, :_reduce_none, 2, 79, :_reduce_85, 5, 75, :_reduce_86, 7, 75, :_reduce_87, 1, 105, :_reduce_88, 1, 105, :_reduce_89, 1, 106, :_reduce_90, 3, 106, :_reduce_91, 3, 107, :_reduce_92, 2, 92, :_reduce_93, 1, 109, :_reduce_94, 3, 109, :_reduce_95, 3, 110, :_reduce_96, 4, 76, :_reduce_97, 6, 76, :_reduce_98, 8, 77, :_reduce_99, 1, 111, :_reduce_100, 3, 111, :_reduce_101, 3, 112, :_reduce_102, 5, 112, :_reduce_103, 1, 113, :_reduce_104, 3, 113, :_reduce_105, 1, 78, :_reduce_106, 1, 108, :_reduce_none, 1, 108, :_reduce_none, 1, 97, :_reduce_none, 1, 97, :_reduce_none, 1, 114, :_reduce_none, 1, 114, :_reduce_none, 1, 114, :_reduce_none, 3, 102, :_reduce_114, 3, 102, :_reduce_115, 3, 102, :_reduce_116, 1, 115, :_reduce_117, 3, 115, :_reduce_118, 1, 116, :_reduce_119, 3, 116, :_reduce_120, 1, 117, :_reduce_121, 3, 117, :_reduce_122 ] racc_reduce_n = 123 racc_shift_n = 269 racc_token_table = { false => 0, :error => 1, :RUBY_SCRIPT => 2, :SHELL_SCRIPT => 3, :SHOW => 4, :TABLES => 5, :REGIONS => 6, :CREATE => 7, :TABLE => 8, :IDENTIFIER => 9, :ALTER => 10, :USE => 11, "(" => 12, ")" => 13, :HASH => 14, "," => 15, :RANGE => 16, :STRING => 17, :NUMBER => 18, :BINARY => 19, :READ => 20, :EQ => 21, :NUMBER_VALUE => 22, :WRITE => 23, :INDEX => 24, :ALL => 25, :KEYS_ONLY => 26, :INCLUDE => 27, :DROP => 28, :DESCRIBE => 29, :DESC => 30, :SELECT => 31, :FROM => 32, :COUNT => 33, "*" => 34, :GET => 35, :WHERE => 36, :AND => 37, :BETWEEN => 38, :LE => 39, :LT => 40, :GE => 41, :GT => 42, :BEGINS_WITH => 43, :IN => 44, :IS => 45, :NE => 46, :CONTAINS => 47, :NOT => 48, :NULL => 49, :ORDER => 50, :ASC => 51, :LIMIT => 52, :UPDATE => 53, :SET => 54, :ADD => 55, :DELETE => 56, :INSERT => 57, :INTO => 58, :VALUES => 59, :NEXT => 60, :STRING_VALUE => 61, :BINARY_VALUE => 62 } racc_nt_base = 63 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", "REGIONS", "CREATE", "TABLE", "IDENTIFIER", "ALTER", "USE", "\"(\"", "\")\"", "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 .,., # reduce 4 omitted # reduce 5 omitted # 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 module_eval(<<'.,.,', 'ddb-parser.y', 32) def _reduce_17(val, _values) struct(:SHOW_TABLES, :limit => val[2]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 36) def _reduce_18(val, _values) struct(:SHOW_REGIONS) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 40) def _reduce_19(val, _values) struct(:SHOW_CREATE_TABLE, :table => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 45) def _reduce_20(val, _values) struct(:ALTER_TABLE, :table => val[2], :capacity => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 50) def _reduce_21(val, _values) struct(:USE, :endpoint_or_region => val[1]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 55) def _reduce_22(val, _values) struct(:CREATE, val[4].merge(:table => val[2], :capacity => val[6])) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 60) def _reduce_23(val, _values) {:hash => {:name => val[0], :type => val[1]}, :range => nil, :indices => nil} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 64) def _reduce_24(val, _values) {:hash => {:name => val[0], :type => val[1]}, :range => {:name => val[4], :type => val[5]}, :indices => nil} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 68) def _reduce_25(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', 73) def _reduce_26(val, _values) 'S' end .,., module_eval(<<'.,.,', 'ddb-parser.y', 77) def _reduce_27(val, _values) 'N' end .,., module_eval(<<'.,.,', 'ddb-parser.y', 81) def _reduce_28(val, _values) 'B' end .,., module_eval(<<'.,.,', 'ddb-parser.y', 86) def _reduce_29(val, _values) {:read => val[2], :write => val[6]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 90) def _reduce_30(val, _values) {:read => val[6], :write => val[2]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 95) def _reduce_31(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 99) def _reduce_32(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 104) def _reduce_33(val, _values) {:name => val[1], :key => val[3], :type => val[4], :projection => val[6]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 109) def _reduce_34(val, _values) {:type => 'ALL'} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 113) def _reduce_35(val, _values) {:type => 'KEYS_ONLY'} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 117) def _reduce_36(val, _values) {:type => 'INCLUDE', :attrs => val[2]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 122) def _reduce_37(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 126) def _reduce_38(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 131) def _reduce_39(val, _values) struct(:DROP, :table => val[2]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 136) def _reduce_40(val, _values) struct(:DESCRIBE, :table => val[1]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 140) def _reduce_41(val, _values) struct(:DESCRIBE, :table => val[1]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 145) def _reduce_42(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', 149) def _reduce_43(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', 154) def _reduce_44(val, _values) struct(:SCAN, :attrs => val[2], :table => val[4], :conds => val[5], :limit => val[6], :count => false) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 158) def _reduce_45(val, _values) struct(:SCAN, :attrs => [], :table => val[7], :conds => val[8], :limit => val[9], :count => true) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 163) def _reduce_46(val, _values) struct(:GET, :attrs => val[1], :table => val[3], :conds => val[4]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 168) def _reduce_47(val, _values) [] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 172) def _reduce_48(val, _values) val[0] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 177) def _reduce_49(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 181) def _reduce_50(val, _values) val[0] + [val[2]] end .,., # reduce 51 omitted module_eval(<<'.,.,', 'ddb-parser.y', 187) def _reduce_52(val, _values) val[3] end .,., # reduce 53 omitted module_eval(<<'.,.,', 'ddb-parser.y', 193) def _reduce_54(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 198) def _reduce_55(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 202) def _reduce_56(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 207) def _reduce_57(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2]]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 211) def _reduce_58(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2], val[4]]] end .,., # reduce 59 omitted module_eval(<<'.,.,', 'ddb-parser.y', 218) def _reduce_60(val, _values) :EQ end .,., module_eval(<<'.,.,', 'ddb-parser.y', 222) def _reduce_61(val, _values) :LE end .,., module_eval(<<'.,.,', 'ddb-parser.y', 226) def _reduce_62(val, _values) :LT end .,., module_eval(<<'.,.,', 'ddb-parser.y', 230) def _reduce_63(val, _values) :GE end .,., module_eval(<<'.,.,', 'ddb-parser.y', 234) def _reduce_64(val, _values) :GT end .,., # reduce 65 omitted # reduce 66 omitted module_eval(<<'.,.,', 'ddb-parser.y', 241) def _reduce_67(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 246) def _reduce_68(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 250) def _reduce_69(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 255) def _reduce_70(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2]]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 259) def _reduce_71(val, _values) [val[0], val[1].to_s.upcase.to_sym, val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 263) def _reduce_72(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2], val[4]]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 267) def _reduce_73(val, _values) [val[0], val[2].to_s.upcase.to_sym, []] end .,., # reduce 74 omitted # reduce 75 omitted module_eval(<<'.,.,', 'ddb-parser.y', 273) def _reduce_76(val, _values) :NE end .,., # reduce 77 omitted module_eval(<<'.,.,', 'ddb-parser.y', 279) def _reduce_78(val, _values) :NOT_CONTAINS end .,., module_eval(<<'.,.,', 'ddb-parser.y', 283) def _reduce_79(val, _values) :NULL end .,., module_eval(<<'.,.,', 'ddb-parser.y', 287) def _reduce_80(val, _values) :NOT_NULL end .,., # reduce 81 omitted module_eval(<<'.,.,', 'ddb-parser.y', 293) def _reduce_82(val, _values) true end .,., module_eval(<<'.,.,', 'ddb-parser.y', 297) def _reduce_83(val, _values) false end .,., # reduce 84 omitted module_eval(<<'.,.,', 'ddb-parser.y', 303) def _reduce_85(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 308) def _reduce_86(val, _values) struct(:UPDATE, :table => val[1], :action => val[2], :attrs => val[3], :conds => val[4]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 312) def _reduce_87(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', 317) def _reduce_88(val, _values) :PUT end .,., module_eval(<<'.,.,', 'ddb-parser.y', 321) def _reduce_89(val, _values) :ADD end .,., module_eval(<<'.,.,', 'ddb-parser.y', 326) def _reduce_90(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 330) def _reduce_91(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 335) def _reduce_92(val, _values) [val[0], val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 340) def _reduce_93(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 345) def _reduce_94(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 349) def _reduce_95(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 354) def _reduce_96(val, _values) [val[0], val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 359) def _reduce_97(val, _values) struct(:DELETE, :table => val[2], :conds => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 363) def _reduce_98(val, _values) struct(:DELETE_ALL, :table => val[3], :conds => val[4], :limit => val[5]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 368) def _reduce_99(val, _values) struct(:INSERT, :table => val[2], :attrs => val[4], :values => val[7]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 373) def _reduce_100(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 377) def _reduce_101(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 382) def _reduce_102(val, _values) [val[1]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 386) def _reduce_103(val, _values) val[0] + [val[3]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 391) def _reduce_104(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 395) def _reduce_105(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 400) def _reduce_106(val, _values) struct(:NEXT) end .,., # reduce 107 omitted # reduce 108 omitted # reduce 109 omitted # reduce 110 omitted # reduce 111 omitted # reduce 112 omitted # reduce 113 omitted module_eval(<<'.,.,', 'ddb-parser.y', 414) def _reduce_114(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 418) def _reduce_115(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 422) def _reduce_116(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 427) def _reduce_117(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 431) def _reduce_118(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 436) def _reduce_119(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 440) def _reduce_120(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 445) def _reduce_121(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 449) def _reduce_122(val, _values) val[0] + [val[2]] end .,., def _reduce_none(val, _values) val[0] end end # class Parser end # DynamoDB