Module: OracleSqlParser::Grammar::Condition::Multiset
- Includes:
- Treetop::Runtime
- Included in:
- OracleSqlParser::Grammar::Condition, MultisetParser
- Defined in:
- lib/oracle-sql-parser/grammar/condition/multiset.rb
Defined Under Namespace
Modules: IsASetCondition0, IsASetCondition1, IsEmptyCondition0, IsEmptyCondition1, MemberCondition0, MemberCondition1, MutisetCondition0, NestedTable0, SubmultisetCondition0, SubmultisetCondition1
Instance Method Summary collapse
- #_nt_is_a_set_condition ⇒ Object
- #_nt_is_empty_condition ⇒ Object
- #_nt_member_condition ⇒ Object
- #_nt_mutiset_condition ⇒ Object
- #_nt_nested_table ⇒ Object
- #_nt_submultiset_condition ⇒ Object
- #root ⇒ Object
Instance Method Details
#_nt_is_a_set_condition ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oracle-sql-parser/grammar/condition/multiset.rb', line 98 def _nt_is_a_set_condition start_index = index if node_cache[:is_a_set_condition].has_key?(index) cached = node_cache[:is_a_set_condition][index] if cached node_cache[:is_a_set_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_nested_table s0 << r1 if r1 r3 = _nt_space if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 r4 = _nt_is_keyword s0 << r4 if r4 r6 = _nt_space if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s0 << r5 if r5 r8 = _nt_not_keyword if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s0 << r7 if r7 r10 = _nt_space if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s0 << r9 if r9 if has_terminal?(@regexps[gr = '\A[Aa]'] ||= Regexp.new(gr), :regexp, index) r11 = true @index += 1 else terminal_parse_failure('[Aa]') r11 = nil end s0 << r11 if r11 r13 = _nt_space if r13 r12 = r13 else r12 = instantiate_node(SyntaxNode,input, index...index) end s0 << r12 if r12 r14 = _nt_set_keyword s0 << r14 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(IsASetCondition0) r0.extend(IsASetCondition1) else @index = i0 r0 = nil end node_cache[:is_a_set_condition][start_index] = r0 r0 end |
#_nt_is_empty_condition ⇒ Object
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oracle-sql-parser/grammar/condition/multiset.rb', line 218 def _nt_is_empty_condition start_index = index if node_cache[:is_empty_condition].has_key?(index) cached = node_cache[:is_empty_condition][index] if cached node_cache[:is_empty_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_nested_table s0 << r1 if r1 r3 = _nt_space if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 r4 = _nt_is_keyword s0 << r4 if r4 r6 = _nt_space if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s0 << r5 if r5 r8 = _nt_not_keyword if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s0 << r7 if r7 r10 = _nt_space if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s0 << r9 if r9 r11 = _nt_empty_keyword s0 << r11 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(IsEmptyCondition0) r0.extend(IsEmptyCondition1) else @index = i0 r0 = nil end node_cache[:is_empty_condition][start_index] = r0 r0 end |
#_nt_member_condition ⇒ Object
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/oracle-sql-parser/grammar/condition/multiset.rb', line 324 def _nt_member_condition start_index = index if node_cache[:member_condition].has_key?(index) cached = node_cache[:member_condition][index] if cached node_cache[:member_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_expr s0 << r1 if r1 r3 = _nt_space if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 r5 = _nt_not_keyword if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s0 << r4 if r4 r7 = _nt_space if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s0 << r6 if r6 r8 = _nt_member_keyword s0 << r8 if r8 r10 = _nt_space if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s0 << r9 if r9 r11 = _nt_of_keyword s0 << r11 if r11 r13 = _nt_space if r13 r12 = r13 else r12 = instantiate_node(SyntaxNode,input, index...index) end s0 << r12 if r12 r14 = _nt_nested_table s0 << r14 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(MemberCondition0) r0.extend(MemberCondition1) else @index = i0 r0 = nil end node_cache[:member_condition][start_index] = r0 r0 end |
#_nt_mutiset_condition ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oracle-sql-parser/grammar/condition/multiset.rb', line 18 def _nt_mutiset_condition start_index = index if node_cache[:mutiset_condition].has_key?(index) cached = node_cache[:mutiset_condition][index] if cached node_cache[:mutiset_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_is_a_set_condition if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_is_empty_condition if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else r3 = _nt_member_condition if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else r4 = _nt_submultiset_condition r4.extend(MutisetCondition0) r4.extend(MutisetCondition0) if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 else @index = i0 r0 = nil end end end end node_cache[:mutiset_condition][start_index] = r0 r0 end |
#_nt_nested_table ⇒ Object
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 |
# File 'lib/oracle-sql-parser/grammar/condition/multiset.rb', line 539 def _nt_nested_table start_index = index if node_cache[:nested_table].has_key?(index) cached = node_cache[:nested_table][index] if cached node_cache[:nested_table][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_ident r0.extend(NestedTable0) r0.extend(NestedTable0) node_cache[:nested_table][start_index] = r0 r0 end |
#_nt_submultiset_condition ⇒ Object
443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'lib/oracle-sql-parser/grammar/condition/multiset.rb', line 443 def _nt_submultiset_condition start_index = index if node_cache[:submultiset_condition].has_key?(index) cached = node_cache[:submultiset_condition][index] if cached node_cache[:submultiset_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_nested_table s0 << r1 if r1 r3 = _nt_space if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 r5 = _nt_not_keyword if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s0 << r4 if r4 r7 = _nt_space if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s0 << r6 if r6 r8 = _nt_submultiset_keyword s0 << r8 if r8 r10 = _nt_space if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s0 << r9 if r9 r12 = _nt_of_keyword if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s0 << r11 if r11 r14 = _nt_space if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s0 << r13 if r13 r15 = _nt_nested_table s0 << r15 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SubmultisetCondition0) r0.extend(SubmultisetCondition1) else @index = i0 r0 = nil end node_cache[:submultiset_condition][start_index] = r0 r0 end |