module OracleSqlParser::Grammar::Condition::Null

Public Instance Methods

_nt_null_condition() click to toggle source
# File lib/oracle-sql-parser/grammar/condition/null.rb, line 60
def _nt_null_condition
  start_index = index
  if node_cache[:null_condition].has_key?(index)
    cached = node_cache[:null_condition][index]
    if cached
      node_cache[:null_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
    r2 = _nt_space
    s0 << r2
    if r2
      r3 = _nt_is_keyword
      s0 << r3
      if r3
        r4 = _nt_space
        s0 << r4
        if r4
          i6, s6 = index, []
          r7 = _nt_not_keyword
          s6 << r7
          if r7
            r8 = _nt_space
            s6 << r8
          end
          if s6.last
            r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
            r6.extend(NullCondition0)
          else
            @index = i6
            r6 = nil
          end
          if r6
            r5 = r6
          else
            r5 = instantiate_node(SyntaxNode,input, index...index)
          end
          s0 << r5
          if r5
            r9 = _nt_null_keyword
            s0 << r9
          end
        end
      end
    end
  end
  if s0.last
    r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
    r0.extend(NullCondition1)
    r0.extend(NullCondition2)
  else
    @index = i0
    r0 = nil
  end

  node_cache[:null_condition][start_index] = r0

  r0
end
root() click to toggle source
# File lib/oracle-sql-parser/grammar/condition/null.rb, line 8
def root
  @root ||= :null_condition
end