Module: OracleSqlParser::Grammar::Condition::Between
- Includes:
- Treetop::Runtime
- Included in:
- OracleSqlParser::Grammar::Condition, BetweenParser
- Defined in:
- lib/oracle-sql-parser/grammar/condition/between.rb
Defined Under Namespace
Modules: BetweenCondition0, BetweenCondition1, BetweenCondition2
Instance Method Summary collapse
Instance Method Details
#_nt_between_condition ⇒ Object
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 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 |
# File 'lib/oracle-sql-parser/grammar/condition/between.rb', line 79 def _nt_between_condition start_index = index if node_cache[:between_condition].has_key?(index) cached = node_cache[:between_condition][index] if cached node_cache[:between_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 i4, s4 = index, [] r5 = _nt_not_keyword s4 << r5 if r5 r6 = _nt_space s4 << r6 end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(BetweenCondition0) else @index = i4 r4 = nil end if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r7 = _nt_between_keyword s0 << r7 if r7 r8 = _nt_space s0 << r8 if r8 r9 = _nt_expr s0 << r9 if r9 r10 = _nt_space s0 << r10 if r10 r11 = _nt_and_keyword s0 << r11 if r11 r12 = _nt_space s0 << r12 if r12 r13 = _nt_expr s0 << r13 end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(BetweenCondition1) r0.extend(BetweenCondition2) else @index = i0 r0 = nil end node_cache[:between_condition][start_index] = r0 r0 end |