Reading tokens from file then storing into an array for output
<p>i have specification of a DFA in a text file as follows;</p>

<pre><code>DFA = (
        {q1,q2},

        {0,1},

        {(q1,0)-&gt; q1, (q1,1)-&gt; q2, (q2,0)-&gt; q1, (q2,1)-&gt; q2},

        q1,

        {q2}
  )
</code></pre>

<p>What piece of code could help me read each token (character) and store the tokens into an array then printout contents of the array</p>
