lib/ddbcli/ddb-parser.tab.rb in ddbcli-0.4.0 vs lib/ddbcli/ddb-parser.tab.rb in ddbcli-0.4.1
- old
+ new
@@ -112,13 +112,15 @@
'>' => :GT,
'<' => :LT,
'=' => :EQ,
}.fetch(tok)
yield [sym, tok]
- elsif (tok = @ss.scan KEYWORD_REGEXP)
+ elsif (tok = @ss.check KEYWORD_REGEXP) and @ss.rest.slice(tok.length) !~ /\A\w/
+ tok = @ss.scan KEYWORD_REGEXP
yield [tok.upcase.to_sym, tok]
- elsif (tok = @ss.scan /NULL/i)
+ elsif (tok = @ss.check /NULL/i) and @ss.rest.slice(tok.length) !~ /\A\w/
+ 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(/''/, "'")
@@ -192,135 +194,135 @@
...end ddb-parser.y/module_eval...
##### State transition tables begin ###
racc_action_table = [
- 175, 258, 227, 210, 175, 256, 55, 53, 175, 211,
- 190, 53, 175, 188, 191, 177, 175, 216, 330, 177,
- 189, 100, 136, 177, 174, 56, 223, 177, 174, 53,
- 58, 177, 174, 131, 175, 51, 174, 57, 175, 51,
- 174, 215, 114, 144, 249, 224, 225, 226, 228, 177,
- 114, 171, 257, 177, 255, 171, 74, 51, 174, 171,
- 273, 272, 174, 171, 207, 170, 172, 171, 173, 170,
+ 175, 258, 227, 211, 175, 256, 55, 53, 175, 53,
+ 190, 210, 175, 188, 191, 177, 175, 216, 100, 177,
+ 189, 211, 136, 177, 174, 56, 223, 177, 174, 210,
+ 330, 177, 174, 53, 175, 51, 174, 51, 175, 144,
+ 174, 215, 284, 114, 249, 224, 225, 226, 228, 177,
+ 284, 171, 257, 177, 255, 171, 285, 131, 174, 171,
+ 74, 51, 174, 171, 285, 170, 172, 171, 173, 170,
172, 176, 173, 170, 172, 176, 173, 170, 172, 176,
173, 170, 172, 176, 173, 171, 175, 176, 217, 171,
- 288, 348, 41, 175, 349, 100, 117, 175, 42, 170,
+ 207, 58, 261, 175, 262, 288, 114, 175, 57, 170,
172, 177, 173, 170, 172, 176, 173, 136, 177, 176,
- 174, 287, 177, 53, 25, 175, 144, 174, 282, 175,
- 153, 174, 284, 175, 130, 137, 154, 155, 114, 50,
- 177, 175, 49, 129, 177, 284, 285, 171, 177, 174,
- 48, 51, 284, 174, 171, 110, 177, 174, 171, 285,
- 95, 170, 172, 96, 173, 174, 285, 176, 170, 172,
- 70, 173, 170, 172, 176, 173, 171, 99, 176, 153,
- 171, 143, 153, 98, 171, 154, 155, 175, 154, 155,
+ 174, 94, 177, 53, 100, 175, 287, 174, 117, 175,
+ 153, 174, 95, 175, 130, 96, 154, 155, 144, 50,
+ 177, 175, 49, 137, 177, 114, 25, 171, 177, 174,
+ 48, 51, 348, 174, 171, 349, 177, 174, 171, 282,
+ 41, 170, 172, 284, 173, 174, 42, 176, 170, 172,
+ 204, 173, 170, 172, 176, 173, 171, 285, 176, 153,
+ 171, 263, 153, 264, 171, 154, 155, 175, 154, 155,
170, 172, 171, 173, 170, 172, 176, 173, 170, 172,
- 176, 173, 177, 144, 176, 94, 170, 172, 204, 173,
- 70, 174, 176, 3, 4, 153, 95, 227, 18, 96,
- 148, 154, 155, 21, 153, 95, 19, 210, 96, 20,
- 154, 155, 333, 211, 320, 32, 33, 34, 171, 35,
- 149, 223, 80, 81, 82, 83, 22, 23, 24, 25,
- 150, 151, 170, 172, 26, 173, 127, 126, 176, 231,
- 224, 225, 226, 228, 230, 232, 235, 236, 237, 158,
- 36, 37, 27, 38, 39, 28, 95, 29, 159, 96,
- 30, 80, 81, 82, 83, 342, 343, 344, 342, 343,
- 344, 261, 263, 262, 264, 319, 357, 320, 358, 265,
- 160, 266, 144, 162, 163, 110, 60, 125, 123, 180,
+ 176, 173, 177, 129, 176, 95, 170, 172, 96, 173,
+ 99, 174, 176, 3, 4, 153, 98, 227, 18, 273,
+ 272, 154, 155, 21, 153, 95, 19, 110, 96, 20,
+ 154, 155, 32, 33, 34, 265, 35, 266, 171, 36,
+ 37, 223, 38, 39, 70, 143, 22, 23, 24, 25,
+ 144, 70, 170, 172, 26, 173, 148, 149, 176, 231,
+ 224, 225, 226, 228, 230, 232, 235, 236, 237, 333,
+ 95, 320, 27, 96, 319, 28, 320, 29, 150, 151,
+ 30, 80, 81, 82, 83, 80, 81, 82, 83, 342,
+ 343, 344, 342, 343, 344, 357, 127, 358, 126, 158,
+ 159, 160, 144, 162, 163, 110, 61, 125, 123, 180,
181, 184, 64, 186, 100, 122, 121, 120, 116, 193,
- 195, 198, 199, 200, 64, 202, 203, 59, 114, 70,
- 64, 64, 143, 110, 222, 107, 238, 239, 240, 241,
- 242, 243, 245, 184, 247, 106, 251, 129, 253, 144,
- 105, 104, 259, 260, 103, 102, 101, 184, 100, 177,
- 92, 89, 274, 276, 277, 278, 279, 280, 90, 64,
- 89, 222, 198, 46, 45, 292, 158, 144, 64, 44,
- 87, 43, 86, 300, 301, 302, 303, 304, 305, 40,
- 308, 309, 310, 85, 312, 313, 314, 195, 64, 84,
- 318, 77, 76, 322, 323, 324, 75, 245, 61, 31,
- 329, 132, 331, 64, 62, 72, 71, 337, 310, 338,
- 339, 70, 68, 67, 346, 347, 66, 351, 353, 354,
- 355, 65, 64, 359, 360, 361, 189, 191 ]
+ 195, 198, 199, 200, 64, 202, 203, 60, 59, 114,
+ 64, 64, 143, 70, 222, 110, 238, 239, 240, 241,
+ 242, 243, 245, 184, 247, 107, 251, 129, 253, 144,
+ 106, 105, 259, 260, 104, 103, 102, 184, 101, 177,
+ 100, 92, 274, 276, 277, 278, 279, 280, 89, 64,
+ 90, 222, 198, 46, 45, 292, 158, 144, 64, 44,
+ 89, 43, 87, 300, 301, 302, 303, 304, 305, 40,
+ 308, 309, 310, 86, 312, 313, 314, 195, 64, 85,
+ 318, 84, 77, 322, 323, 324, 76, 245, 62, 31,
+ 329, 132, 331, 64, 75, 64, 72, 337, 310, 338,
+ 339, 71, 70, 68, 346, 347, 67, 351, 353, 354,
+ 355, 66, 65, 359, 360, 361, 189, 191 ]
racc_action_check = [
- 318, 208, 198, 173, 320, 205, 27, 105, 314, 173,
- 150, 26, 303, 149, 150, 318, 276, 177, 323, 320,
- 149, 111, 139, 314, 318, 27, 198, 303, 320, 49,
- 28, 276, 314, 103, 260, 105, 303, 28, 259, 26,
- 276, 177, 111, 139, 198, 198, 198, 198, 198, 260,
- 107, 318, 208, 259, 205, 320, 49, 49, 260, 314,
- 232, 232, 259, 303, 173, 318, 318, 276, 318, 320,
+ 318, 208, 198, 258, 320, 205, 27, 105, 314, 26,
+ 150, 258, 303, 149, 150, 318, 276, 177, 140, 320,
+ 149, 173, 108, 314, 318, 27, 198, 303, 320, 173,
+ 323, 276, 314, 49, 260, 105, 303, 26, 259, 140,
+ 276, 177, 310, 108, 198, 198, 198, 198, 198, 260,
+ 329, 318, 208, 259, 205, 320, 310, 103, 260, 314,
+ 49, 49, 259, 303, 329, 318, 318, 276, 318, 320,
320, 318, 320, 314, 314, 320, 314, 303, 303, 314,
303, 276, 276, 303, 276, 260, 256, 276, 177, 259,
- 245, 345, 20, 249, 345, 140, 87, 248, 20, 260,
- 260, 256, 260, 259, 259, 260, 259, 108, 249, 259,
- 256, 245, 248, 25, 87, 231, 140, 249, 243, 229,
- 282, 248, 243, 181, 102, 110, 282, 282, 108, 25,
- 231, 172, 25, 101, 229, 329, 243, 256, 181, 231,
- 25, 25, 310, 229, 249, 112, 172, 181, 248, 329,
- 151, 256, 256, 151, 256, 172, 310, 256, 249, 249,
- 113, 249, 248, 248, 249, 248, 231, 68, 248, 351,
- 229, 114, 337, 68, 181, 351, 351, 137, 337, 337,
- 231, 231, 172, 231, 229, 229, 231, 229, 181, 181,
- 229, 181, 137, 116, 181, 67, 172, 172, 172, 172,
- 117, 137, 172, 0, 0, 125, 67, 184, 0, 67,
- 121, 125, 125, 0, 330, 148, 0, 258, 148, 0,
- 330, 330, 327, 258, 327, 2, 2, 2, 137, 2,
- 122, 184, 84, 84, 84, 84, 0, 0, 0, 0,
- 123, 124, 137, 137, 0, 137, 100, 99, 137, 184,
- 184, 184, 184, 184, 184, 184, 184, 184, 184, 128,
- 18, 18, 0, 18, 18, 0, 126, 0, 129, 126,
- 0, 55, 55, 55, 55, 338, 338, 338, 339, 339,
- 339, 212, 213, 212, 213, 306, 352, 306, 352, 214,
- 130, 214, 131, 132, 133, 136, 31, 98, 96, 141,
+ 173, 28, 212, 172, 212, 245, 107, 248, 28, 260,
+ 260, 256, 260, 259, 259, 260, 259, 139, 172, 259,
+ 256, 67, 248, 25, 111, 231, 245, 172, 87, 229,
+ 282, 248, 67, 181, 102, 67, 282, 282, 139, 25,
+ 231, 137, 25, 110, 229, 111, 87, 256, 181, 231,
+ 25, 25, 345, 229, 172, 345, 137, 181, 248, 243,
+ 20, 256, 256, 243, 256, 137, 20, 256, 172, 172,
+ 172, 172, 248, 248, 172, 248, 231, 243, 248, 125,
+ 229, 213, 337, 213, 181, 125, 125, 249, 337, 337,
+ 231, 231, 137, 231, 229, 229, 231, 229, 181, 181,
+ 229, 181, 249, 101, 181, 151, 137, 137, 151, 137,
+ 68, 249, 137, 0, 0, 351, 68, 184, 0, 232,
+ 232, 351, 351, 0, 330, 148, 0, 112, 148, 0,
+ 330, 330, 2, 2, 2, 214, 2, 214, 249, 18,
+ 18, 184, 18, 18, 113, 114, 0, 0, 0, 0,
+ 116, 117, 249, 249, 0, 249, 121, 122, 249, 184,
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 327,
+ 126, 327, 0, 126, 306, 0, 306, 0, 123, 124,
+ 0, 84, 84, 84, 84, 55, 55, 55, 55, 338,
+ 338, 338, 339, 339, 339, 352, 100, 352, 99, 128,
+ 129, 130, 131, 132, 133, 136, 34, 98, 96, 141,
143, 144, 145, 146, 147, 95, 94, 89, 86, 152,
- 157, 158, 159, 160, 161, 162, 163, 29, 85, 79,
- 178, 179, 180, 78, 182, 77, 186, 188, 189, 190,
- 191, 193, 194, 195, 196, 76, 199, 200, 202, 203,
- 75, 74, 210, 211, 73, 72, 71, 222, 69, 230,
- 66, 65, 237, 238, 239, 240, 241, 242, 64, 244,
- 63, 246, 247, 24, 23, 251, 252, 253, 254, 22,
- 59, 21, 58, 262, 264, 266, 270, 273, 275, 19,
- 277, 279, 281, 57, 284, 285, 291, 293, 294, 56,
- 305, 54, 52, 311, 312, 313, 50, 315, 34, 1,
- 322, 104, 324, 326, 35, 48, 47, 331, 334, 335,
- 336, 44, 43, 40, 340, 344, 39, 346, 347, 348,
- 349, 37, 36, 354, 355, 358, 359, 360 ]
+ 157, 158, 159, 160, 161, 162, 163, 31, 29, 85,
+ 178, 179, 180, 79, 182, 78, 186, 188, 189, 190,
+ 191, 193, 194, 195, 196, 77, 199, 200, 202, 203,
+ 76, 75, 210, 211, 74, 73, 72, 222, 71, 230,
+ 69, 66, 237, 238, 239, 240, 241, 242, 65, 244,
+ 64, 246, 247, 24, 23, 251, 252, 253, 254, 22,
+ 63, 21, 59, 262, 264, 266, 270, 273, 275, 19,
+ 277, 279, 281, 58, 284, 285, 291, 293, 294, 57,
+ 305, 56, 54, 311, 312, 313, 52, 315, 35, 1,
+ 322, 104, 324, 326, 50, 36, 48, 331, 334, 335,
+ 336, 47, 44, 43, 340, 344, 40, 346, 347, 348,
+ 349, 39, 37, 354, 355, 358, 359, 360 ]
racc_action_pointer = [
- 201, 399, 223, nil, nil, nil, nil, nil, nil, nil,
- nil, nil, nil, nil, nil, nil, nil, nil, 252, 370,
- 79, 362, 360, 351, 350, 100, -2, -7, -2, 250,
- nil, 296, nil, nil, 393, 399, 363, 411, nil, 407,
- 400, nil, nil, 399, 398, nil, nil, 367, 385, 16,
- 354, nil, 369, nil, 352, 209, 376, 370, 333, 357,
- nil, nil, nil, 346, 329, 337, 337, 179, 153, 325,
- nil, 333, 304, 305, 321, 311, 322, 312, 310, 306,
- nil, nil, nil, nil, 170, 274, 295, 76, nil, 302,
- nil, nil, nil, nil, 289, 277, 270, nil, 284, 234,
- 233, 115, 103, 20, 360, -6, nil, 6, 84, nil,
- 97, -2, 132, 147, 158, nil, 149, 187, nil, nil,
- nil, 197, 201, 211, 220, 186, 239, nil, 215, 251,
- 251, 248, 272, 255, nil, nil, 282, 172, nil, -1,
- 72, 254, nil, 272, 288, 243, 282, 281, 188, -10,
- -13, 123, 287, nil, nil, nil, nil, 250, 298, 292,
+ 201, 399, 220, nil, nil, nil, nil, nil, nil, nil,
+ nil, nil, nil, nil, nil, nil, nil, nil, 221, 370,
+ 137, 362, 360, 351, 350, 100, -4, -7, 59, 251,
+ nil, 317, nil, nil, 291, 393, 346, 412, nil, 412,
+ 403, nil, nil, 400, 399, nil, nil, 372, 386, 20,
+ 362, nil, 373, nil, 353, 213, 378, 376, 344, 359,
+ nil, nil, nil, 356, 331, 344, 338, 95, 186, 327,
+ nil, 335, 305, 306, 324, 312, 327, 322, 312, 310,
+ nil, nil, nil, nil, 209, 275, 295, 98, nil, 302,
+ nil, nil, nil, nil, 289, 277, 270, nil, 284, 275,
+ 273, 175, 103, 44, 360, -6, nil, 52, -1, nil,
+ 105, 91, 204, 221, 222, nil, 196, 228, nil, nil,
+ nil, 233, 218, 239, 248, 150, 233, nil, 245, 273,
+ 252, 248, 272, 255, nil, nil, 282, 126, nil, 84,
+ -5, 254, nil, 272, 288, 243, 282, 281, 188, -10,
+ -13, 168, 287, nil, nil, nil, nil, 250, 298, 292,
300, 255, 276, 303, nil, nil, nil, nil, nil, nil,
- nil, nil, 126, -10, nil, nil, nil, 12, 261, 262,
+ nil, nil, 88, 16, nil, nil, nil, 12, 261, 262,
309, 118, 279, nil, 203, nil, 258, nil, 297, 300,
302, 302, nil, 308, 275, 320, 289, nil, -2, 323,
319, nil, 325, 295, nil, -18, nil, nil, -22, nil,
- 267, 268, 260, 261, 268, nil, nil, nil, nil, nil,
+ 267, 268, 71, 150, 204, nil, nil, nil, nil, nil,
nil, nil, 334, nil, nil, nil, nil, nil, nil, 114,
- 329, 110, 5, nil, nil, nil, nil, 298, 333, 326,
- 326, 328, 328, 105, 300, 53, 316, 349, 92, 88,
- nil, 344, 322, 323, 309, nil, 81, nil, 204, 33,
+ 329, 110, 154, nil, nil, nil, nil, 298, 333, 326,
+ 326, 328, 328, 136, 300, 58, 316, 349, 92, 172,
+ nil, 344, 322, 323, 309, nil, 81, nil, -2, 33,
29, nil, 344, nil, 369, nil, 299, nil, nil, nil,
331, nil, nil, 321, nil, 355, 11, 351, nil, 352,
nil, 359, 101, nil, 371, 368, nil, nil, nil, nil,
nil, 341, nil, 327, 329, nil, nil, nil, nil, nil,
- nil, nil, nil, 7, nil, 370, 264, nil, nil, nil,
- 125, 369, 374, 382, 3, 340, nil, nil, -5, nil,
- -1, nil, 377, 5, 382, nil, 344, 201, nil, 118,
- 195, 394, nil, nil, 385, 388, 389, 153, 243, 246,
- 391, nil, nil, nil, 395, 64, 404, 405, 391, 392,
- nil, 150, 265, nil, 394, 395, nil, nil, 412, 396,
+ nil, nil, nil, 7, nil, 370, 243, nil, nil, nil,
+ 25, 369, 374, 382, 3, 340, nil, nil, -5, nil,
+ -1, nil, 377, 17, 382, nil, 344, 238, nil, 33,
+ 195, 394, nil, nil, 385, 388, 389, 153, 247, 250,
+ 391, nil, nil, nil, 395, 115, 404, 405, 391, 392,
+ nil, 186, 264, nil, 394, 395, nil, nil, 412, 396,
400, nil ]
racc_action_default = [
-164, -164, -1, -6, -7, -8, -9, -10, -11, -12,
-13, -14, -15, -16, -17, -18, -19, -20, -164, -164,