Module: OracleSqlParser::Grammar::Condition::Null
- Includes:
- Treetop::Runtime
- Included in:
- OracleSqlParser::Grammar::Condition, NullParser
- Defined in:
- lib/oracle-sql-parser/grammar/condition/null.rb
Defined Under Namespace
Modules: NullCondition0, NullCondition1, NullCondition2
Instance Method Summary collapse
Instance Method Details
#_nt_null_condition ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 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 |
# 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 |