_nt_choice (Treetop::Compiler::Metagrammar)

    # File lib/treetop/compiler/metagrammar.rb, line 935
          def _nt_choice
            start_index = index
            if node_cache[:choice].has_key?(index)
              cached = node_cache[:choice][index]
              @index = cached.interval.end if cached
              return cached
            end

            i0, s0 = index, []
            r1 = _nt_alternative
            s0 << r1
            if r1
              s2, i2 = [], index
              loop do
                i3, s3 = index, []
                r5 = _nt_space
                if r5
                  r4 = r5
                else
                  r4 = instantiate_node(SyntaxNode,input, index...index)
                end
                s3 << r4
                if r4
                  if input.index('/', index) == index
                    r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
                    @index += 1
                  else
                    terminal_parse_failure('/')
                    r6 = nil
                  end
                  s3 << r6
                  if r6
                    r8 = _nt_space
                    if r8
                      r7 = r8
                    else
                      r7 = instantiate_node(SyntaxNode,input, index...index)
                    end
                    s3 << r7
                    if r7
                      r9 = _nt_alternative
                      s3 << r9
                    end
                  end
                end
                if s3.last
                  r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
                  r3.extend(Choice0)
                else
                  self.index = i3
                  r3 = nil
                end
                if r3
                  s2 << r3
                else
                  break
                end
              end
              if s2.empty?
                self.index = i2
                r2 = nil
              else
                r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
              end
              s0 << r2
            end
            if s0.last
              r0 = instantiate_node(Choice,input, i0...index, s0)
              r0.extend(Choice1)
              r0.extend(Choice2)
            else
              self.index = i0
              r0 = nil
            end

            node_cache[:choice][start_index] = r0

            return r0
          end