# # 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', 501) 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 @prev_tokens = [] until @ss.eos? if (tok = @ss.scan /\s+/) # nothing to do elsif (tok = @ss.scan /(?:>>|<>|!=|>=|<=|>|<|=)/) sym = { '>>' => :GTGT, '<>' => :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 %r|[-.0-9a-z_:/]*|i) yield [:IDENTIFIER, tok] else raise_error(tok, @prev_tokens, @ss) end @prev_tokens << tok end yield [false, ''] end private :scan def raise_error(error_value, prev_tokens, scanner) errmsg = ["__#{error_value}__"] if prev_tokens and not prev_tokens.empty? toks = prev_tokens.reverse[0, 5].reverse toks.unshift('...') if prev_tokens.length > toks.length errmsg.unshift(toks.join.strip) end if scanner and not (rest = (scanner.rest || '').strip).empty? str = rest[0, 16] str += '...' if rest.length > str.length errmsg << str end raise Racc::ParseError, ('parse error on value: %s' % errmsg.join(' ')) end private :raise_error def parse yyparse self, :scan end def on_error(error_token_id, error_value, value_stack) raise_error(error_value, @prev_tokens, @ss) 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, 104, 152, 182, 18, 152, 152, 152, 172, 21, 52, 19, 20, 154, 52, 152, 154, 154, 154, 120, 120, 25, 52, 152, 151, 181, 154, 151, 151, 151, 22, 23, 24, 25, 154, 152, 50, 151, 26, 152, 50, 101, 126, 152, 99, 151, 154, 72, 50, 152, 154, 148, 95, 210, 154, 27, 52, 151, 28, 29, 154, 151, 30, 153, 183, 151, 153, 153, 153, 152, 49, 151, 192, 48, 209, 54, 153, 88, 57, 89, 154, 47, 50, 192, 153, 56, 36, 37, 101, 38, 39, 151, 55, 103, 188, 94, 153, 32, 33, 34, 153, 35, 107, 261, 153, 188, 262, 108, 86, 110, 153, 87, 196, 189, 190, 191, 193, 195, 197, 200, 201, 202, 111, 213, 189, 190, 191, 193, 221, 269, 153, 222, 262, 219, 223, 287, 220, 224, 288, 162, 86, 86, 163, 87, 87, 134, 135, 136, 134, 135, 136, 134, 135, 136, 281, 282, 283, 231, 230, 77, 78, 77, 78, 113, 114, 115, 116, 93, 101, 92, 121, 99, 125, 126, 129, 130, 131, 132, 91, 90, 139, 140, 141, 126, 143, 144, 99, 84, 83, 156, 157, 160, 63, 82, 164, 165, 81, 167, 169, 172, 173, 174, 63, 176, 177, 80, 63, 125, 79, 187, 75, 203, 204, 205, 206, 207, 63, 74, 211, 73, 215, 113, 217, 126, 70, 69, 68, 160, 67, 154, 66, 65, 232, 234, 235, 236, 237, 96, 64, 63, 241, 139, 126, 63, 245, 246, 247, 248, 249, 250, 61, 253, 254, 60, 256, 169, 63, 59, 260, 58, 263, 45, 63, 44, 43, 268, 42, 272, 273, 274, 272, 276, 277, 41, 279, 40, 284, 286, 31, 289 ] racc_action_check = [ 0, 0, 82, 121, 154, 0, 157, 248, 196, 211, 0, 94, 0, 0, 121, 26, 212, 157, 248, 196, 97, 122, 82, 48, 262, 121, 154, 212, 157, 248, 196, 0, 0, 0, 0, 262, 260, 94, 212, 0, 256, 26, 97, 122, 213, 76, 262, 260, 48, 48, 234, 256, 121, 74, 169, 213, 0, 25, 260, 0, 0, 234, 256, 0, 121, 154, 213, 157, 248, 196, 194, 25, 234, 160, 25, 169, 27, 212, 67, 28, 67, 194, 25, 25, 172, 262, 28, 18, 18, 80, 18, 18, 194, 27, 81, 160, 73, 260, 2, 2, 2, 256, 2, 86, 251, 213, 172, 251, 87, 111, 88, 234, 111, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 89, 172, 172, 172, 172, 172, 179, 266, 194, 179, 266, 178, 180, 285, 178, 180, 285, 128, 66, 132, 128, 66, 132, 237, 237, 237, 277, 277, 277, 110, 110, 110, 279, 279, 279, 197, 197, 54, 54, 79, 79, 90, 91, 92, 93, 72, 96, 71, 99, 100, 101, 103, 104, 107, 108, 109, 70, 69, 112, 113, 114, 115, 116, 117, 120, 65, 63, 123, 125, 126, 127, 58, 130, 131, 57, 133, 138, 139, 140, 141, 142, 143, 144, 56, 155, 156, 55, 158, 53, 162, 163, 164, 165, 167, 168, 51, 170, 49, 173, 174, 176, 177, 47, 46, 43, 187, 42, 195, 40, 39, 202, 203, 205, 206, 207, 75, 37, 36, 215, 216, 217, 218, 220, 222, 224, 228, 231, 233, 35, 235, 236, 34, 240, 242, 243, 31, 250, 29, 255, 24, 257, 23, 22, 263, 21, 268, 270, 272, 273, 274, 276, 20, 278, 19, 283, 284, 1, 288 ] racc_action_pointer = [ -2, 279, 96, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 79, 267, 261, 258, 256, 251, 249, 44, 2, 63, 49, 197, nil, 258, nil, nil, 249, 246, 183, 229, nil, 223, 218, nil, 216, 214, nil, nil, 189, 209, 10, 180, nil, 198, nil, 174, 101, 196, 193, 160, 181, nil, nil, nil, nil, 162, nil, 175, 116, 62, nil, 167, 140, 133, 152, 69, 40, 225, 32, nil, nil, 103, 47, 81, -14, nil, nil, nil, 77, 82, 97, 110, 149, 148, 153, 128, -2, nil, 127, 0, nil, 145, 159, 160, nil, 132, 162, nil, nil, 149, 150, 161, 130, 84, 139, 153, 146, 142, 168, 149, nil, nil, 174, -2, 1, 147, nil, 165, 179, 136, 123, nil, 175, 176, 117, 179, nil, nil, nil, nil, 144, 187, 185, 189, 146, 167, 192, nil, nil, nil, nil, nil, nil, nil, nil, nil, -1, 150, 195, 1, 167, nil, 69, nil, 148, 200, 186, 190, nil, 196, 160, 19, 176, nil, 80, 208, 207, nil, 210, 182, 117, 112, 118, nil, nil, nil, nil, nil, nil, 215, nil, nil, nil, nil, nil, nil, 65, 214, 3, 105, nil, nil, nil, nil, 181, 218, nil, 209, 210, 224, nil, nil, nil, -4, 11, 39, nil, 224, 200, 201, 187, nil, 218, nil, 241, nil, 181, nil, nil, nil, 205, nil, nil, 195, nil, 230, 45, 225, 226, 124, nil, nil, 212, nil, 201, 200, nil, nil, nil, nil, 2, nil, 243, 87, nil, nil, nil, 240, 35, 206, nil, nil, 31, nil, 19, 246, nil, nil, 113, nil, 239, nil, 249, nil, 257, 242, 256, nil, 260, 127, 258, 125, nil, nil, nil, 261, 265, 119, nil, nil, 267, nil ] racc_action_default = [ -133, -133, -1, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -116, -133, -2, -3, -133, -133, -92, -133, -23, -133, -133, -26, -133, -133, -47, -48, -133, -133, -133, -133, -55, -56, -57, -133, -133, -133, -133, -133, -133, 290, -4, -5, -21, -133, -22, -133, -133, -133, -46, -133, -133, -133, -133, -133, -133, -133, -133, -96, -97, -133, -133, -133, -133, -93, -24, -25, -133, -133, -133, -133, -59, -133, -133, -133, -133, -58, -133, -133, -98, -133, -133, -133, -105, -74, -133, -108, -109, -133, -133, -133, -133, -28, -61, -133, -133, -74, -133, -133, -54, -94, -133, -133, -74, -101, -102, -133, -133, -92, -133, -110, -133, -133, -133, -133, -33, -34, -35, -29, -89, -133, -133, -133, -92, -133, -133, -99, -100, -117, -118, -119, -120, -121, -122, -123, -133, -92, -133, -133, -75, -76, -133, -106, -133, -133, -133, -133, -27, -30, -92, -133, -62, -63, -133, -133, -59, -51, -133, -74, -133, -133, -133, -127, -129, -131, -95, -103, -104, -133, -68, -69, -70, -71, -72, -73, -133, -133, -133, -133, -82, -83, -84, -85, -133, -133, -111, -133, -133, -133, -49, -90, -91, -133, -133, -133, -67, -133, -61, -74, -92, -124, -133, -125, -133, -126, -133, -77, -78, -79, -133, -81, -87, -133, -86, -107, -133, -133, -133, -133, -64, -65, -133, -60, -89, -92, -53, -128, -130, -132, -133, -88, -133, -133, -114, -36, -37, -133, -133, -92, -52, -80, -133, -112, -133, -31, -66, -50, -133, -115, -133, -113, -32, -38, -133, -133, -133, -39, -133, -133, -133, -133, -40, -41, -42, -133, -133, -133, -44, -43, -133, -45 ] racc_goto_table = [ 62, 133, 147, 168, 127, 138, 112, 12, 171, 159, 11, 124, 46, 53, 251, 97, 142, 85, 76, 198, 102, 271, 1, 155, 280, 285, 275, 109, 17, 16, 270, 214, 15, 14, 170, 71, 118, 119, 186, 122, 266, 13, 212, 100, 10, 9, 158, 8, 194, 227, 229, 199, 7, 6, 145, 146, 123, 5, 128, 233, 2, 178, 137, 179, 180, nil, 185, nil, nil, nil, 225, nil, nil, nil, nil, 226, nil, 228, 218, nil, 238, 117, nil, 166, nil, nil, nil, nil, nil, 106, 216, 161, 105, 239, 240, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 175, 257, nil, 242, nil, nil, nil, nil, nil, nil, nil, nil, 243, 184, nil, nil, nil, nil, nil, nil, nil, nil, 255, 259, nil, nil, 208, nil, nil, nil, nil, 264, nil, nil, nil, nil, nil, 267, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 278, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 244, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 258, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 265 ] racc_goto_check = [ 16, 19, 34, 27, 28, 26, 25, 10, 32, 37, 9, 47, 24, 24, 50, 43, 28, 17, 42, 35, 29, 21, 1, 28, 22, 23, 21, 18, 15, 14, 20, 35, 13, 12, 31, 24, 29, 29, 34, 43, 50, 11, 33, 42, 8, 7, 36, 6, 38, 39, 40, 41, 5, 4, 44, 45, 46, 3, 48, 49, 2, 52, 17, 53, 54, nil, 47, nil, nil, nil, 37, nil, nil, nil, nil, 34, nil, 34, 28, nil, 32, 24, nil, 17, nil, nil, nil, nil, nil, 10, 25, 16, 9, 34, 34, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 16, 27, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, 28, 16, nil, nil, nil, nil, nil, nil, nil, nil, 19, 34, nil, nil, 16, 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, 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, 60, 57, 53, 52, 47, 45, 44, 10, 7, 41, 33, 32, 29, 28, -36, -49, -61, -109, -238, -247, -255, -259, -13, -84, -107, -135, -99, -60, nil, -105, -131, -130, -119, -141, -80, -117, -112, -146, -147, -109, -36, -61, -66, -66, -45, -90, -46, -144, -220, nil, -93, -91, -90 ] 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, 51, nil, nil, nil, 252, nil, nil, nil, nil, 150, nil, nil, nil, nil, 98, nil, nil, nil, nil, nil, nil, 149, nil, nil, nil ] racc_reduce_table = [ 0, 0, :racc_error, 1, 68, :_reduce_1, 2, 68, :_reduce_2, 2, 68, :_reduce_3, 3, 68, :_reduce_4, 3, 68, :_reduce_5, 1, 68, :_reduce_6, 1, 68, :_reduce_7, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 1, 69, :_reduce_none, 3, 70, :_reduce_21, 3, 70, :_reduce_22, 2, 70, :_reduce_23, 4, 70, :_reduce_24, 4, 71, :_reduce_25, 2, 72, :_reduce_26, 7, 73, :_reduce_27, 5, 73, :_reduce_28, 6, 73, :_reduce_29, 3, 85, :_reduce_30, 7, 85, :_reduce_31, 9, 85, :_reduce_32, 1, 86, :_reduce_33, 1, 86, :_reduce_34, 1, 86, :_reduce_35, 7, 84, :_reduce_36, 7, 84, :_reduce_37, 1, 87, :_reduce_38, 3, 87, :_reduce_39, 7, 88, :_reduce_40, 1, 89, :_reduce_41, 1, 89, :_reduce_42, 4, 89, :_reduce_43, 1, 90, :_reduce_44, 3, 90, :_reduce_45, 3, 74, :_reduce_46, 2, 75, :_reduce_47, 2, 75, :_reduce_48, 8, 76, :_reduce_49, 11, 76, :_reduce_50, 7, 77, :_reduce_51, 10, 77, :_reduce_52, 9, 77, :_reduce_53, 5, 78, :_reduce_54, 1, 91, :_reduce_55, 1, 91, :_reduce_56, 1, 97, :_reduce_57, 3, 97, :_reduce_58, 0, 92, :_reduce_none, 5, 92, :_reduce_60, 0, 93, :_reduce_none, 2, 93, :_reduce_62, 1, 98, :_reduce_63, 3, 98, :_reduce_64, 3, 99, :_reduce_65, 5, 99, :_reduce_66, 1, 100, :_reduce_none, 1, 102, :_reduce_68, 1, 102, :_reduce_69, 1, 102, :_reduce_70, 1, 102, :_reduce_71, 1, 102, :_reduce_72, 1, 102, :_reduce_none, 0, 95, :_reduce_none, 2, 95, :_reduce_75, 1, 103, :_reduce_76, 3, 103, :_reduce_77, 3, 104, :_reduce_78, 3, 104, :_reduce_79, 5, 104, :_reduce_80, 3, 104, :_reduce_81, 1, 105, :_reduce_none, 1, 105, :_reduce_none, 1, 105, :_reduce_84, 1, 108, :_reduce_none, 2, 108, :_reduce_86, 1, 107, :_reduce_87, 2, 107, :_reduce_88, 0, 94, :_reduce_none, 2, 94, :_reduce_90, 2, 94, :_reduce_91, 0, 83, :_reduce_none, 2, 83, :_reduce_93, 5, 79, :_reduce_94, 7, 79, :_reduce_95, 1, 109, :_reduce_96, 1, 109, :_reduce_97, 1, 110, :_reduce_98, 3, 110, :_reduce_99, 3, 111, :_reduce_100, 2, 96, :_reduce_101, 1, 113, :_reduce_102, 3, 113, :_reduce_103, 3, 114, :_reduce_104, 4, 80, :_reduce_105, 6, 80, :_reduce_106, 8, 81, :_reduce_107, 4, 81, :_reduce_108, 4, 81, :_reduce_109, 1, 115, :_reduce_110, 3, 115, :_reduce_111, 3, 116, :_reduce_112, 5, 116, :_reduce_113, 1, 117, :_reduce_114, 3, 117, :_reduce_115, 1, 82, :_reduce_116, 1, 112, :_reduce_none, 1, 112, :_reduce_none, 1, 101, :_reduce_none, 1, 101, :_reduce_none, 1, 118, :_reduce_none, 1, 118, :_reduce_none, 1, 118, :_reduce_none, 3, 106, :_reduce_124, 3, 106, :_reduce_125, 3, 106, :_reduce_126, 1, 119, :_reduce_127, 3, 119, :_reduce_128, 1, 120, :_reduce_129, 3, 120, :_reduce_130, 1, 121, :_reduce_131, 3, 121, :_reduce_132 ] racc_reduce_n = 133 racc_shift_n = 290 racc_token_table = { false => 0, :error => 1, :RUBY_SCRIPT => 2, :SHELL_SCRIPT => 3, :GT => 4, :STRING_VALUE => 5, :GTGT => 6, :SHOW => 7, :TABLES => 8, :TABLE => 9, :STATUS => 10, :REGIONS => 11, :CREATE => 12, :IDENTIFIER => 13, :ALTER => 14, :USE => 15, "(" => 16, ")" => 17, :LIKE => 18, :HASH => 19, "," => 20, :RANGE => 21, :STRING => 22, :NUMBER => 23, :BINARY => 24, :READ => 25, :EQ => 26, :NUMBER_VALUE => 27, :WRITE => 28, :INDEX => 29, :ALL => 30, :KEYS_ONLY => 31, :INCLUDE => 32, :DROP => 33, :DESCRIBE => 34, :DESC => 35, :SELECT => 36, :FROM => 37, :COUNT => 38, "*" => 39, "/" => 40, :GET => 41, :WHERE => 42, :AND => 43, :BETWEEN => 44, :LE => 45, :LT => 46, :GE => 47, :BEGINS_WITH => 48, :IN => 49, :IS => 50, :NE => 51, :CONTAINS => 52, :NOT => 53, :NULL => 54, :ORDER => 55, :ASC => 56, :LIMIT => 57, :UPDATE => 58, :SET => 59, :ADD => 60, :DELETE => 61, :INSERT => 62, :INTO => 63, :VALUES => 64, :NEXT => 65, :BINARY_VALUE => 66 } racc_nt_base = 67 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", "GT", "STRING_VALUE", "GTGT", "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", "BEGINS_WITH", "IN", "IS", "NE", "CONTAINS", "NOT", "NULL", "ORDER", "ASC", "LIMIT", "UPDATE", "SET", "ADD", "DELETE", "INSERT", "INTO", "VALUES", "NEXT", "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) [val[0], :overwrite, val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 21) def _reduce_5(val, _values) [val[0], :append, val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 25) def _reduce_6(val, _values) [struct(:NULL), :ruby, val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 29) def _reduce_7(val, _values) [struct(:NULL), :shell, val[0]] end .,., # 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 # reduce 19 omitted # reduce 20 omitted module_eval(<<'.,.,', 'ddb-parser.y', 48) def _reduce_21(val, _values) struct(:SHOW_TABLES, :limit => val[2]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 52) def _reduce_22(val, _values) struct(:SHOW_TABLE_STATUS) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 56) def _reduce_23(val, _values) struct(:SHOW_REGIONS) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 60) def _reduce_24(val, _values) struct(:SHOW_CREATE_TABLE, :table => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 65) def _reduce_25(val, _values) struct(:ALTER_TABLE, :table => val[2], :capacity => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 70) def _reduce_26(val, _values) struct(:USE, :endpoint_or_region => val[1]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 75) def _reduce_27(val, _values) struct(:CREATE, val[4].merge(:table => val[2], :capacity => val[6])) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 79) def _reduce_28(val, _values) struct(:CREATE_LIKE, :table => val[2], :like => val[4], :capacity => nil) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 83) def _reduce_29(val, _values) struct(:CREATE_LIKE, :table => val[2], :like => val[4], :capacity => val[5]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 88) def _reduce_30(val, _values) {:hash => {:name => val[0], :type => val[1]}, :range => nil, :indices => nil} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 92) def _reduce_31(val, _values) {:hash => {:name => val[0], :type => val[1]}, :range => {:name => val[4], :type => val[5]}, :indices => nil} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 96) def _reduce_32(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', 101) def _reduce_33(val, _values) 'S' end .,., module_eval(<<'.,.,', 'ddb-parser.y', 105) def _reduce_34(val, _values) 'N' end .,., module_eval(<<'.,.,', 'ddb-parser.y', 109) def _reduce_35(val, _values) 'B' end .,., module_eval(<<'.,.,', 'ddb-parser.y', 114) def _reduce_36(val, _values) {:read => val[2], :write => val[6]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 118) def _reduce_37(val, _values) {:read => val[6], :write => val[2]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 123) def _reduce_38(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 127) def _reduce_39(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 132) def _reduce_40(val, _values) {:name => val[1], :key => val[3], :type => val[4], :projection => val[6]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 137) def _reduce_41(val, _values) {:type => 'ALL'} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 141) def _reduce_42(val, _values) {:type => 'KEYS_ONLY'} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 145) def _reduce_43(val, _values) {:type => 'INCLUDE', :attrs => val[2]} end .,., module_eval(<<'.,.,', 'ddb-parser.y', 150) def _reduce_44(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 154) def _reduce_45(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 159) def _reduce_46(val, _values) struct(:DROP, :table => val[2]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 164) def _reduce_47(val, _values) struct(:DESCRIBE, :table => val[1]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 168) def _reduce_48(val, _values) struct(:DESCRIBE, :table => val[1]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 173) def _reduce_49(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', 177) def _reduce_50(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', 182) def _reduce_51(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', 186) def _reduce_52(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', 190) def _reduce_53(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', 195) def _reduce_54(val, _values) struct(:GET, :attrs => val[1], :table => val[3], :conds => val[4]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 200) def _reduce_55(val, _values) [] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 204) def _reduce_56(val, _values) val[0] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 209) def _reduce_57(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 213) def _reduce_58(val, _values) val[0] + [val[2]] end .,., # reduce 59 omitted module_eval(<<'.,.,', 'ddb-parser.y', 219) def _reduce_60(val, _values) val[3] end .,., # reduce 61 omitted module_eval(<<'.,.,', 'ddb-parser.y', 225) def _reduce_62(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 230) def _reduce_63(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 234) def _reduce_64(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 239) def _reduce_65(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2]]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 243) def _reduce_66(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2], val[4]]] end .,., # reduce 67 omitted module_eval(<<'.,.,', 'ddb-parser.y', 250) def _reduce_68(val, _values) :EQ end .,., module_eval(<<'.,.,', 'ddb-parser.y', 254) def _reduce_69(val, _values) :LE end .,., module_eval(<<'.,.,', 'ddb-parser.y', 258) def _reduce_70(val, _values) :LT end .,., module_eval(<<'.,.,', 'ddb-parser.y', 262) def _reduce_71(val, _values) :GE end .,., module_eval(<<'.,.,', 'ddb-parser.y', 266) def _reduce_72(val, _values) :GT end .,., # reduce 73 omitted # reduce 74 omitted module_eval(<<'.,.,', 'ddb-parser.y', 273) def _reduce_75(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 278) def _reduce_76(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 282) def _reduce_77(val, _values) val[0] + [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]]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 291) def _reduce_79(val, _values) [val[0], val[1].to_s.upcase.to_sym, val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 295) def _reduce_80(val, _values) [val[0], val[1].to_s.upcase.to_sym, [val[2], val[4]]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 299) def _reduce_81(val, _values) [val[0], val[2].to_s.upcase.to_sym, []] end .,., # reduce 82 omitted # reduce 83 omitted module_eval(<<'.,.,', 'ddb-parser.y', 305) def _reduce_84(val, _values) :NE end .,., # reduce 85 omitted module_eval(<<'.,.,', 'ddb-parser.y', 311) def _reduce_86(val, _values) :NOT_CONTAINS end .,., module_eval(<<'.,.,', 'ddb-parser.y', 315) def _reduce_87(val, _values) :NULL end .,., module_eval(<<'.,.,', 'ddb-parser.y', 319) def _reduce_88(val, _values) :NOT_NULL end .,., # reduce 89 omitted module_eval(<<'.,.,', 'ddb-parser.y', 325) def _reduce_90(val, _values) true end .,., module_eval(<<'.,.,', 'ddb-parser.y', 329) def _reduce_91(val, _values) false end .,., # reduce 92 omitted module_eval(<<'.,.,', 'ddb-parser.y', 335) def _reduce_93(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 340) def _reduce_94(val, _values) struct(:UPDATE, :table => val[1], :action => val[2], :attrs => val[3], :conds => val[4]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 344) def _reduce_95(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', 349) def _reduce_96(val, _values) :PUT end .,., module_eval(<<'.,.,', 'ddb-parser.y', 353) def _reduce_97(val, _values) :ADD end .,., module_eval(<<'.,.,', 'ddb-parser.y', 358) def _reduce_98(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 362) def _reduce_99(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 367) def _reduce_100(val, _values) [val[0], val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 372) def _reduce_101(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 377) def _reduce_102(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 381) def _reduce_103(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 386) def _reduce_104(val, _values) [val[0], val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 391) def _reduce_105(val, _values) struct(:DELETE, :table => val[2], :conds => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 395) def _reduce_106(val, _values) struct(:DELETE_ALL, :table => val[3], :conds => val[4], :limit => val[5]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 400) def _reduce_107(val, _values) struct(:INSERT, :table => val[2], :attrs => val[4], :values => val[7]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 404) def _reduce_108(val, _values) struct(:INSERT_SELECT, :table => val[2], :select => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 408) def _reduce_109(val, _values) struct(:INSERT_SCAN, :table => val[2], :select => val[3]) end .,., module_eval(<<'.,.,', 'ddb-parser.y', 413) def _reduce_110(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 417) def _reduce_111(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 422) def _reduce_112(val, _values) [val[1]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 426) def _reduce_113(val, _values) val[0] + [val[3]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 431) def _reduce_114(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 435) def _reduce_115(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 440) def _reduce_116(val, _values) struct(:NEXT) end .,., # reduce 117 omitted # reduce 118 omitted # reduce 119 omitted # reduce 120 omitted # reduce 121 omitted # reduce 122 omitted # reduce 123 omitted module_eval(<<'.,.,', 'ddb-parser.y', 454) def _reduce_124(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 458) def _reduce_125(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 462) def _reduce_126(val, _values) val[1] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 467) def _reduce_127(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 471) def _reduce_128(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 476) def _reduce_129(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 480) def _reduce_130(val, _values) val[0] + [val[2]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 485) def _reduce_131(val, _values) [val[0]] end .,., module_eval(<<'.,.,', 'ddb-parser.y', 489) def _reduce_132(val, _values) val[0] + [val[2]] end .,., def _reduce_none(val, _values) val[0] end end # class Parser end # DynamoDB