Find index of closing bracket in string list
<p>I am getting input from a text file. I have read all the text and tokenized it.</p>

<p>Here is input sample</p>

<pre><code>.MAIN [
    .HEADING1 [ .TEXT 30000 ]
    .HEADING2 [
      [
        .TEXT1 YAMA
        .TEXT2 THAH
      ]
    ]
  ]
</code></pre>

<p>After tokenization, tokens list contains ".MAIN", "[", ".HEADING1", and so on. Now what I want to find index of closing bracket for a particular starting square bracket. For example if i give my function index 0 (the first starting square bracket) function should return me last index, and if give my function index of starting square bracket of .HEADING1 then it should return me index of closing bracket at same line. </p>
