module OracleSqlParser::Grammar::Condition
Autogenerated from a Treetop
grammar. Edits may be lost.
Autogenerated from a Treetop
grammar. Edits may be lost.
Autogenerated from a Treetop
grammar. Edits may be lost.
Autogenerated from a Treetop
grammar. Edits may be lost.
Autogenerated from a Treetop
grammar. Edits may be lost.
Autogenerated from a Treetop
grammar. Edits may be lost.
Autogenerated from a Treetop
grammar. Edits may be lost.
Autogenerated from a Treetop
grammar. Edits may be lost.
Autogenerated from a Treetop
grammar. Edits may be lost.
Autogenerated from a Treetop
grammar. Edits may be lost.
Public Instance Methods
_nt_condition()
click to toggle source
# File lib/oracle-sql-parser/grammar/condition.rb, line 95 def _nt_condition start_index = index if node_cache[:condition].has_key?(index) cached = node_cache[:condition][index] if cached node_cache[:condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_comparison_condition if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_floating_point_condition if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else r3 = _nt_model_condition if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else r4 = _nt_mutiset_condition if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 else r5 = _nt_pattern_maching_condition if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 else r6 = _nt_null_condition if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 else r7 = _nt_xml_condition if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 else r8 = _nt_compound_condition if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else r9 = _nt_between_condition if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 else r10 = _nt_exists_condition if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 else r11 = _nt_in_condition if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 else r12 = _nt_is_of_type_condition r12.extend(Condition0) r12.extend(Condition0) if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r0 = r12 else @index = i0 r0 = nil end end end end end end end end end end end end node_cache[:condition][start_index] = r0 r0 end
_nt_logical_condition()
click to toggle source
# File lib/oracle-sql-parser/grammar/condition.rb, line 252 def _nt_logical_condition start_index = index if node_cache[:logical_condition].has_key?(index) cached = node_cache[:logical_condition][index] if cached node_cache[:logical_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] r2 = _nt_not_keyword s1 << r2 if r2 r4 = _nt_space if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 if r3 r5 = _nt_condition s1 << r5 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(LogicalCondition0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(LogicalCondition4) r0.extend(LogicalCondition4) else i6, s6 = index, [] r7 = _nt_condition s6 << r7 if r7 r9 = _nt_space if r9 r8 = r9 else r8 = instantiate_node(SyntaxNode,input, index...index) end s6 << r8 if r8 r10 = _nt_and_keyword s6 << r10 if r10 r12 = _nt_space if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s6 << r11 if r11 i13 = index r14 = _nt_logical_condition if r14 r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true r13 = r14 else r15 = _nt_condition if r15 r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true r13 = r15 else @index = i13 r13 = nil end end s6 << r13 end end end end if s6.last r6 = instantiate_node(SyntaxNode,input, i6...index, s6) r6.extend(LogicalCondition1) else @index = i6 r6 = nil end if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 r0.extend(LogicalCondition4) r0.extend(LogicalCondition4) else i16, s16 = index, [] r17 = _nt_condition s16 << r17 if r17 r19 = _nt_space if r19 r18 = r19 else r18 = instantiate_node(SyntaxNode,input, index...index) end s16 << r18 if r18 r20 = _nt_or_keyword s16 << r20 if r20 r22 = _nt_space if r22 r21 = r22 else r21 = instantiate_node(SyntaxNode,input, index...index) end s16 << r21 if r21 i23 = index r24 = _nt_logical_condition if r24 r24 = SyntaxNode.new(input, (index-1)...index) if r24 == true r23 = r24 else r25 = _nt_condition if r25 r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true r23 = r25 else @index = i23 r23 = nil end end s16 << r23 end end end end if s16.last r16 = instantiate_node(SyntaxNode,input, i16...index, s16) r16.extend(LogicalCondition2) else @index = i16 r16 = nil end if r16 r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true r0 = r16 r0.extend(LogicalCondition4) r0.extend(LogicalCondition4) else i26, s26 = index, [] r27 = _nt_condition s26 << r27 if s26.last r26 = instantiate_node(SyntaxNode,input, i26...index, s26) r26.extend(LogicalCondition3) else @index = i26 r26 = nil end if r26 r26 = SyntaxNode.new(input, (index-1)...index) if r26 == true r0 = r26 r0.extend(LogicalCondition4) r0.extend(LogicalCondition4) else @index = i0 r0 = nil end end end end node_cache[:logical_condition][start_index] = r0 r0 end
_nt_model_condition()
click to toggle source
# File lib/oracle-sql-parser/grammar/condition.rb, line 433 def _nt_model_condition start_index = index if node_cache[:model_condition].has_key?(index) cached = node_cache[:model_condition][index] if cached node_cache[:model_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?('model_condition', false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'model_condition\'') r0 = nil end node_cache[:model_condition][start_index] = r0 r0 end
_nt_where_clause()
click to toggle source
# File lib/oracle-sql-parser/grammar/condition.rb, line 48 def _nt_where_clause start_index = index if node_cache[:where_clause].has_key?(index) cached = node_cache[:where_clause][index] if cached node_cache[:where_clause][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_where_keyword 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_logical_condition s0 << r4 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(WhereClause0) r0.extend(WhereClause1) else @index = i0 r0 = nil end node_cache[:where_clause][start_index] = r0 r0 end
_nt_xml_condition()
click to toggle source
# File lib/oracle-sql-parser/grammar/condition.rb, line 457 def _nt_xml_condition start_index = index if node_cache[:xml_condition].has_key?(index) cached = node_cache[:xml_condition][index] if cached node_cache[:xml_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?('xml_condition', false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'xml_condition\'') r0 = nil end node_cache[:xml_condition][start_index] = r0 r0 end
root()
click to toggle source
# File lib/oracle-sql-parser/grammar/condition.rb, line 8 def root @root ||= :where_clause end